Hosts
silverpoint in Apache Superset
At a glance
| Integration | Package | Registry | Kind | Through | Status |
|---|---|---|---|---|---|
| Apache Superset | superset-plugin-chart-silverpoint | npm | bi | react | released |
Draws with @silverpoint/react 0.11.1 and @silverpoint/embed 0.11.1's /hosts binding.
| Requirement | |
|---|---|
| Superset | master (React 18.3), the release after 6.1. 6.0 and 6.1 ship React 17: not supported. |
| Peer dependencies | @superset-ui/core, @superset-ui/chart-controls, react and react-dom ^18.3.0 |
Install the plugin
cd superset-frontend
npm install superset-plugin-chart-silverpointRegister the preset next to Superset's own:
// src/visualizations/presets/MainPreset.ts (MainPreset.js before Superset master)
import { SilverpointChartPreset } from 'superset-plugin-chart-silverpoint';
export default class MainPreset extends Preset {
constructor() {
super({
name: 'Legacy charts',
presets: [
new SilverpointChartPreset(),
// or a subset:
// new SilverpointChartPreset({ charts: ['bar-chart', 'line-chart', 'sankey-chart'] }),
],
plugins: [ /* … Superset's own … */ ],
});
}
}Then rebuild the frontend:
npm run build
# Superset master's .npmrc sets min-release-age=3: for three days after a silverpoint
# release npm answers ETARGET for @silverpoint/*. Wait, or:
npm install superset-plugin-chart-silverpoint --min-release-age=0
# in the image: docker build --build-arg NPM_MIN_RELEASE_AGE=0 …The package imports the library's stylesheet and EB Garamond itself, each chart has a light and a dark thumbnail, and Superset's webpack configuration needs no change. The repository's docker/Dockerfile builds a Superset image with the plugins registered, and docker/compose.yml runs it with the examples loaded.
Each chart
| Panel | What it holds |
|---|---|
| Query | One control per role: a dimension role takes a column, a measure role a metric, a temporal role adds a time grain. Plus filters, the row limit and the sort order. |
| Options | The chart's own options (curve, orientation, …) and the title. |
| Appearance | Ground, substrate, mode, palette. Theme default follows Superset's light or dark theme. |
Superset aggregates, filters and sorts; the plugin binds the result with specFromTable. For a bar chart of wins per team: Silverpoint Bar chart, X the column team, Value the metric SUM(wins), sort by the metric, descending.
Not (yet) a .supx
Superset's Extensions framework cannot contribute a chart type (an extension sees @apache-superset/core only, which has no chart registry), so the classic plugin is the only path.
See also
- Apache Superset: the repository and its README
- Embed in any page: the spec, the host catalog and
specFromTable, the conformance kit every integration runs - Every host integration