add startValue and endValue parameters in zoom event triggered by slider
See original GitHub issueWhat problem does this feature solve?
When user uses slider to zoom the chart, the event triggered does not have parameters startValue
and endValue
. It only has start
and end
percentage values.
What does the proposed API look like?
Version
4.2.1
Reproduction link
https://www.echartsjs.com/examples/en/editor.html?c=line-simple
Steps to reproduce
- Please copy the following code into input on the left side.
option = {
title: {
text: 'ECharts 入门示例'
},
tooltip: {},
legend: {
data:['销量']
},
xAxis: {
data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
},
yAxis: {},
series: [{
name: '销量',
type: 'line',
data: [5, 20, 36, 10, 10, 20]
}],
dataZoom: [
{
type: 'slider',
show: true,
realtime: false
},
]
};
myChart.on('dataZoom', function (params) {
console.log(params);
// should return exact values, but returns undefined
console.log(params.startValue);
console.log(params.endValue);
});
- Then try to zoom the chart and have a look at console.
What is expected?
As described in the docs, datazoom event includes startValue
and endValue
in the payload if the event is triggered by using toolbox. But I think the datazoom event (triggered by the slider) should also take parameters startValue
and endValue
besides start
and end
percentage parameters.
What is actually happening?
startValue
and endValue
parameters are not included in the payload of the event.
Thank you.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Getting values instead of percentages of dataZoom in Apache ...
In the event I receive 'start' and 'end' as percentages, but what I would like to receive are the actual start and end...
Read more >[GitHub] [incubator-echarts] derekflint commented on issue #10700 ...
[GitHub] [incubator-echarts] derekflint commented on issue #10700: add startValue and endValue parameters in zoom event triggered by slider.
Read more >Using Webinar practice session - Zoom Support
You can start the practice session, broadcast, and end the event hours or days ahead of the scheduled date, without impacting your ability ......
Read more >Zooming axis via API / external scrollbar - amCharts
To zoom the chart horizontally, we would zoom out X axis. ... It takes Date objects as parameters, e.g.: TypeScript / ES6 ......
Read more >Configure Sliders or Range Sliders - SAP Help Portal
As an application designer you can configure sliders or range sliders so that application users can input and change values dynamically and trigger...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 any updates on this?
honestly, the solution at https://stackoverflow.com/questions/42503988/echarts-datazoom-event-does-not-return-timestamp-but-only-percentages/43910746#43910746 feels like an unnecessary workaround
Hi @Ovilia! I’m already aware of this note. My purpose is to see the same values not only in datazoom event triggered by toolbox, but also in the event triggered by the slider.