MINDoSOFT opened a new issue #10148: DataZoom slider labelFormatter function add way to determine if formatting start or end value URL: https://github.com/apache/incubator-echarts/issues/10148 ### What problem does this feature solve? When using dataZoom slider, we need a way to determine if the start value or the end value has been adjusted in the labelFormatter. That way we can use a different formatting function for labeling the start value and a different function for labeling the end value. This is helpful for me because it helps me show on the zoom slider labels that exist in the grid. In my specific example e.g. the zoom slider shows as start label "March 2018" and end label "December 2018". I can fix it for the start label by doing something like "Math.ceil" but this breaks the end label. And I can fix the end label by doing "Math.floor" but this breaks the start label. ### What does the proposed API look like? Basically add a property to the [labelFormatter function](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom-slider.labelFormatter) called startOrEnd that can take value either 'start' or 'end' depending on which value is currently formatted. A code sample : ``` labelFormatter: function (value, valueStr, startOrEnd) { if (startOrEnd == 'start') return 'aaa' value; else if (startOrEnd == 'end') return 'bbb' value; } ``` <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE --> <!-- This issue is in English. DO NOT REMOVE -->
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
