You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2022/02/11 02:11:30 UTC
[echarts] branch master updated: fix(tooltip): set content tooltip.enterable along with render tooltip.enterable. close #16440
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts.git
The following commit(s) were added to refs/heads/master by this push:
new ee2d85a fix(tooltip): set content tooltip.enterable along with render tooltip.enterable. close #16440
new b683f03 Merge pull request #16463 from fuchunhui/fix-16440
ee2d85a is described below
commit ee2d85a9da8fa06dd82cfbf6c09945d091278567
Author: fuchunhui <fu...@gmail.com>
AuthorDate: Mon Feb 7 15:21:22 2022 +0800
fix(tooltip): set content tooltip.enterable along with render tooltip.enterable. close #16440
---
src/component/tooltip/TooltipView.ts | 1 +
test/tooltip-setOption.html | 51 +++++-------------------------------
2 files changed, 7 insertions(+), 45 deletions(-)
diff --git a/src/component/tooltip/TooltipView.ts b/src/component/tooltip/TooltipView.ts
index fc69ecf..51b5200 100644
--- a/src/component/tooltip/TooltipView.ts
+++ b/src/component/tooltip/TooltipView.ts
@@ -801,6 +801,7 @@ class TooltipView extends ComponentView {
}
const tooltipContent = this._tooltipContent;
+ tooltipContent.setEnterable(tooltipModel.get('enterable'));
const formatter = tooltipModel.get('formatter');
positionExpr = positionExpr || tooltipModel.get('position');
diff --git a/test/tooltip-setOption.html b/test/tooltip-setOption.html
index 340021c..b1dd5b5 100644
--- a/test/tooltip-setOption.html
+++ b/test/tooltip-setOption.html
@@ -43,49 +43,25 @@ under the License.
}
</style>
-
<h1>dynamic data update tooltip content and keep show</h1>
<div><a target="_blank" href="dynamicData.html">dynamicData.html</a></div>
<div><a target="_blank" href="dynamicData2.html">dynamicData2.html</a></div>
<div><a target="_blank" href="dynamicData3.html">dynamicData3.html</a></div>
<h1>triggerOn: click, setOption when trigger axis (keep show)</h1>
<div class="chart" id="click-setOption1"></div>
-
-
<h1>tooltip should auto show and auto disappear when setOption(..., {notMerge: true})</h1>
<div class="chart" id="setOption2"></div>
<div class="chart" id="setOption3" style="height: 550px"></div>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
<script>
-
require(['echarts'], function (echarts) {
-
var option = {
+ legend: {
+ tooltip: {
+ show: true,
+ enterable: true
+ }
+ },
tooltip: {
trigger: 'axis',
triggerOn: 'click',
@@ -117,14 +93,10 @@ under the License.
})
</script>
-
-
-
<script>
require([
'echarts'
], function (echarts) {
-
function genOption() {
return {
tooltip: {
@@ -157,7 +129,6 @@ under the License.
});
setTimeout(function () {
-
// chart.clear();
chart.dispose();
@@ -166,16 +137,9 @@ under the License.
chart.setOption(genOption());
}, 2000)
}, 100);
-
});
</script>
-
-
-
-
-
-
<script>
require(['echarts'], function (echarts) {
var colors = ['red', 'blue'];
@@ -223,9 +187,6 @@ under the License.
});
});
});
-
</script>
-
-
</body>
</html>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org