-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
ref(charts): Move ECharts options as top level component props #9652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| const DEFAULT_TRUNCATE_LENGTH = 80; | ||
|
|
||
| // Truncates labels for tooltip | ||
| function truncateLabel(seriesName, truncate) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These functions are moved from app/organizationDiscover/result/utils
| return moment(value).format('MMM D, YYYY'); | ||
| } | ||
|
|
||
| function getFormatter({filterEmpty, filterNull, filter, isGroupedByDate, truncate}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd vote to drop filterEmpty and filterNull since you can easily pass a filter function that does the same. I think there's value in keeping this API simple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This moves some properties out of the `options` object that is passed to ECharts, into a top level component property of BaseChart. This allows us to implement more default functionality into BaseChart (e.g. charting a line series for `previousPeriod`).
9502d14 to
34e0c52
Compare
This moves some properties out of the
optionsobject that is passed to ECharts, into a top level component property of BaseChart.This allows us to implement more default functionality into BaseChart
(e.g. charting a line series for
previousPeriod).isGroupedByDatetoBaseChartso that we can move formatting logic into charting componentsseriesinto a top level property inBaseChartso that we can add logic to support a Line series forpreviousPeriod.xAxis,yAxis,tooltip,grid