A custom Apache Superset visualization plugin that extends the ECharts Timeseries Line Chart with an adjustable line width control.
- Adjustable Line Width: Real-time slider control (0.5 - 10 pixels)
- Area Chart Mode: Optional fill under the curve
- Markers: Configurable data point markers
- Data Zoom: Interactive zoom controls
- Full ECharts Integration: Leverages all standard timeseries features
Copy the plugin directory to your Superset frontend plugins folder:
cp -r plugin-chart-line-adjustable /path/to/superset-frontend/plugins/Add to superset-frontend/package.json in the dependencies section:
{
"dependencies": {
"@superset-ui/plugin-chart-line-adjustable": "file:./plugins/plugin-chart-line-adjustable"
}
}Edit superset-frontend/src/visualizations/presets/MainPreset.js:
Add Import:
import { LineAdjustableChartPlugin } from '@superset-ui/plugin-chart-line-adjustable';Add to plugins array:
new LineAdjustableChartPlugin().configure({
key: 'line_adjustable',
}),cd superset-frontend
npm install
npm run buildRestart your Superset instance to load the new plugin.
- Go to Charts → + Chart
- Select a dataset with time-series data
- Choose "Line Chart (Adjustable)" from the chart type selector (Category: Evolution)
- Configure your metrics and dimensions
- Use the Line Width slider in Chart Options to adjust thickness
| Option | Type | Default | Description |
|---|---|---|---|
| Line Width | Slider | 2 | Line thickness in pixels (0.5 - 10) |
| Area Chart | Checkbox | false | Fill area under the curve |
| Area Opacity | Slider | 0.2 | Opacity of filled area (0 - 1) |
| Marker | Checkbox | false | Show data point markers |
| Marker Size | Slider | 6 | Size of markers (0 - 20) |
| Data Zoom | Checkbox | false | Enable zoom controls |
| Show Legend | Checkbox | true | Display chart legend |
- Chart Key:
line_adjustable - Category: Evolution
- Base Component: ECharts Timeseries
- Supported Annotations: Event, Formula, Interval, Timeseries
plugin-chart-line-adjustable/
├── package.json # Plugin metadata
├── tsconfig.json # TypeScript config
├── README.md # This file
├── src/
│ ├── index.ts # Main export
│ ├── plugin.ts # Plugin class & metadata
│ ├── buildQuery.ts # Query builder
│ ├── controlPanel.tsx # UI controls
│ ├── transformProps.ts # Props transformation
│ └── images/
│ └── thumbnail.png # Chart preview
└── types/
└── external.d.ts # TypeScript declarations
- Apache Superset (development version or 4.x+)
- Node.js 18+
- npm 9+
@superset-ui/core@superset-ui/chart-controls@superset-ui/plugin-chart-echarts
Apache-2.0
WellOxy
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
- Initial release
- Adjustable line width feature
- Area chart support
- Marker configuration