-
Notifications
You must be signed in to change notification settings - Fork 272
fix(plugin-chart-echarts): default to standard x-axis format #1043
fix(plugin-chart-echarts): default to standard x-axis format #1043
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/superset/superset-ui/AM4Scg19Vz9gTJkRJFn9JxNgi2Wf |
eb80cdb
to
a370d5f
Compare
['%d-%m-%Y %H:%M:%S', '%Y-%m-%d %H:%M:%S | 14-01-2019 01:32:10'], | ||
['%d-%m-%Y %H:%M:%S', '%d-%m-%Y %H:%M:%S | 14-01-2019 01:32:10'], |
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.
Bycatch - typo in the description
a370d5f
to
dcedf7b
Compare
Codecov Report
@@ Coverage Diff @@
## master #1043 +/- ##
==========================================
+ Coverage 27.74% 28.06% +0.31%
==========================================
Files 428 436 +8
Lines 8758 8869 +111
Branches 1314 1345 +31
==========================================
+ Hits 2430 2489 +59
- Misses 6155 6194 +39
- Partials 173 186 +13
Continue to review full report at Codecov.
|
@@ -184,7 +193,7 @@ export default function transformProps(chartProps: ChartProps): EchartsProps { | |||
const value: number = !richTooltip ? params.value : params[0].value[0]; | |||
const prophetValue = !richTooltip ? [params] : params; | |||
|
|||
const rows: Array<string> = [`${xAxisFormatter(value)}`]; | |||
const rows: Array<string> = [`${tooltipFormatter(value)}`]; |
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.
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.
LGTM, Ignore my previous reply.
🏆 Enhancements
Default to using the default time axis formatter for the ECharts Timeseries chart and remove default 45 degree rotation. Also introduce a new adaptive time formatter for use in the tooltip which shows increasing level of detail based on the timestamp. This is in contrast with the current adaptive time formatter, which e.g. only shows the seconds/milliseconds when a timestamp has second/subsecond granularity.
Last full year (only months show up):

Last quarter (months with weekly ticks):

Last month (four day ticks):

Last week (daily ticks):

Two days (6 hour ticks):

Tooltip with millisecond granularity data:
