You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/01/25 10:58:14 UTC
[GitHub] [echarts] ob-ARC opened a new issue #16429: [Feature] Forward the axis object to formatter functions
ob-ARC opened a new issue #16429:
URL: https://github.com/apache/echarts/issues/16429
### What problem does this feature solve?
In a formatter callback function, it is currently not possible to change the returned format depending on the axis' state, since it is not known for which axis the formatting is requested. Use case: Only show mSecs on a date/time axis if the axis is zoomed in enough (i.e. the range is below a certain threshold).
### What does the proposed API look like?
The solution would simply be to let _getFormattedLabel_ forward "this" (= the axis to label) through _leveledformat_ to the user's callback function.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] Ovilia commented on issue #16429: [Feature] Forward the axis object to formatter functions
Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #16429:
URL: https://github.com/apache/echarts/issues/16429#issuecomment-1022951580
I think maybe [listening to dataZoom changes](https://echarts.apache.org/en/api.html#events.datazoom) and call setOption may be a better idea. Even if the axis is provided in the label formatter, it will not be called when dataZoom changes.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] ob-ARC commented on issue #16429: [Feature] Forward the axis object to formatter functions
Posted by GitBox <gi...@apache.org>.
ob-ARC commented on issue #16429:
URL: https://github.com/apache/echarts/issues/16429#issuecomment-1022897055
Yes, my use case was a time axis. But I guess this feature could be useful for other axis types as well?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] ob-ARC commented on issue #16429: [Feature] Forward the axis object to formatter functions
Posted by GitBox <gi...@apache.org>.
ob-ARC commented on issue #16429:
URL: https://github.com/apache/echarts/issues/16429#issuecomment-1022967899
OK, but that would still leave me the problem that in the formatter callback itself, I would neither know which axis is being labelled, nor what the current state of the axis is. Or do you mean I should set a different callback function to the chart's option each time dataZoom changes?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] Ovilia commented on issue #16429: [Feature] Forward the axis object to formatter functions
Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #16429:
URL: https://github.com/apache/echarts/issues/16429#issuecomment-1022862393
Do you mean time axis?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org