Skip to content

Commit

Permalink
chore(plugin-chart-echarts): bump ECharts to 5.4.0 (#21916)
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro authored Oct 24, 2022
1 parent 7edf1fb commit f5977ca
Show file tree
Hide file tree
Showing 6 changed files with 445 additions and 29 deletions.
32 changes: 16 additions & 16 deletions superset-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import {
} from '@superset-ui/plugin-chart-echarts';
import data from './data';
import negativeNumData from './negativeNumData';
import confbandData from './confbandData';
import stackWithNullsData from './stackWithNulls';
import { withResizableChartDemo } from '../../../../shared/components/ResizableChartDemo';

new EchartsTimeseriesChartPlugin()
Expand Down Expand Up @@ -66,26 +68,26 @@ export const Timeseries = ({ width, height }) => {
{ data: queryData, colnames: ['__timestamp'], coltypes: [2] },
]}
formData={{
contributionMode: undefined,
forecastEnabled,
colorScheme: 'supersetColors',
color_scheme: 'supersetColors',
seriesType: select(
'Line type',
['line', 'scatter', 'smooth', 'bar', 'start', 'middle', 'end'],
'line',
),
logAxis: boolean('Log axis', false),
yAxisFormat: 'SMART_NUMBER',
y_axis_format: 'SMART_NUMBER',
stack: boolean('Stack', false),
showValue: boolean('Show Values', false),
onlyTotal: boolean('Only Total', false),
percentageThreshold: number('Percentage Threshold', 0),
show_value: boolean('Show Values', false),
only_total: boolean('Only Total', false),
percentage_threshold: number('Percentage Threshold', 0),
area: boolean('Area chart', false),
markerEnabled: boolean('Enable markers', false),
markerSize: number('Marker Size', 6),
minorSplitLine: boolean('Minor splitline', false),
opacity: number('Opacity', 0.2),
zoomable: boolean('Zoomable', false),
x_axis: '__timestamp',
}}
/>
);
Expand All @@ -100,23 +102,71 @@ export const WithNegativeNumbers = ({ width, height }) => (
{ data: negativeNumData, colnames: ['__timestamp'], coltypes: [2] },
]}
formData={{
contributionMode: undefined,
colorScheme: 'supersetColors',
color_scheme: 'supersetColors',
seriesType: select(
'Line type',
['line', 'scatter', 'smooth', 'bar', 'start', 'middle', 'end'],
'line',
),
yAxisFormat: '$,.2f',
y_axis_format: '$,.2f',
stack: boolean('Stack', true),
showValue: true,
showLegend: true,
onlyTotal: boolean('Only Total', true),
show_value: true,
show_legend: true,
only_total: boolean('Only Total', true),
orientation: select(
'Orientation',
['vertical', 'horizontal'],
'vertical',
),
x_axis: '__timestamp',
}}
/>
);

export const ConfidenceBand = ({ width, height }) => (
<SuperChart
chartType="echarts-timeseries"
width={width}
height={height}
queriesData={[
{
data: confbandData,
colnames: [
'ds',
'SUM(num)',
'SUM(num)__yhat_lower',
'SUM(num)__yhat_upper',
],
coltypes: [2, 0, 0, 0],
},
]}
formData={{
color_scheme: 'supersetColors',
series_type: 'line',
x_axis_time_format: 'smart_date',
x_axis: 'ds',
}}
/>
);

export const StackWithNulls = ({ width, height }) => (
<SuperChart
chartType="echarts-timeseries"
width={width}
height={height}
queriesData={[
{
data: stackWithNullsData,
colnames: ['ds', '1', '2'],
coltypes: [2, 0, 0],
},
]}
formData={{
color_scheme: 'supersetColors',
series_type: 'bar',
stack: true,
x_axis_time_format: 'smart_date',
x_axis: 'ds',
}}
/>
);
Loading

0 comments on commit f5977ca

Please sign in to comment.