Files
superset2/superset-frontend/plugins/plugin-chart-echarts
Claude Code 66158aa477 fix(echarts): allow forcing categorical x-axis for temporal columns
The "Force categorical" toggle (xAxisForceCategoricalControl) was only
visible when the x-axis column was Numeric. Temporal x-axes default to a
continuous time scale, where ECharts auto-places ticks at "nice" intervals
that don't line up with the actual buckets, so weekly/monthly grain markers
appear shifted away from their ticks (issue #28204).

The transform layer already supports a categorical axis for temporal data;
only the control's visibility gate blocked it. Expose the toggle for
temporal columns too so users can opt into a discrete, tick-aligned axis.
The numeric-only auto-force-when-sorted behavior in initialValue is left
unchanged, so existing temporal charts keep their time scale unless the user
opts in.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 22:24:31 -07:00
..

@superset-ui/plugin-chart-echarts

Version Libraries.io

This plugin provides Echarts viz plugins for Superset:

  • Timeseries Chart (combined line, area bar with support for predictive analytics)
  • Pie Chart

Usage

Configure key, which can be any string, and register the plugin. This key will be used to lookup this chart throughout the app.

import {
  EchartsTimeseriesChartPlugin,
  EchartsPieChartPlugin,
} from '@superset-ui/plugin-chart-echarts';

new EchartsTimeseriesChartPlugin().configure({ key: 'echarts-ts' }).register();
new EchartsPieChartPlugin().configure({ key: 'pie' }).register();

Then use it via SuperChart. See storybook for more details.

<SuperChart
  chartType="echarts-ts"
  width={600}
  height={600}
  formData={...}
  queriesData={[{
    data: {...},
  }]}
/>