@helioviewer/superset-plugin-chart-big-calendar
v2.0.0
Published
Big Calendar Heatmap
Readme
superset-plugin-chart-big-calendar
This is the Big Calendar Heatmap Superset Chart Plugin. It provides a different kind of calendar heatmap which works for showing large amounts of calendar data spread out over multiple years. Each calendar month is represented by one vertical column of the heatmap, which allows you to display multiyear data in a usable form factor.
Features
- Allows you to display calendar data over multiple years. The built-in calendar heatmap is terrible if you need to show more than a few months of data.
- Supports linear and logarithmic scaling for metrics.
- Supports custom colors
Installation
- Navigate to your superset installation's front end code and install the plugin.
cd <your_superset>/superset-frontend
npm i @helioviewer/superset-plugin-chart-big-calendar- Register the chart plugin by editing
<your_superset>/superset-frontend/src/visualizations/presets/MainPreset.js. At the top of the file, import the chart plugin, and add it to the plugin list
// ... other imports ...
import { SupersetPluginChartBigCalendar } from '@helioviewer/superset-plugin-chart-big-calendar';
// ... other code ...
plugins: [
new SupersetPluginChartBigCalendar().configure({key: 'ext-big-calendar-heatmap'}),
// ... other plugins ...
]
// ... other code ...Usage
WANTED - If you're a developer and you know how to work with chart plugins, we could use your help to simplify this process.
Select your date column and edit the Custom SQL so that it returns
DATE(date_column). The resulting custom function should be nameddateas the plugin expects to see a column nameddate.Select your metric, typically
COUNT(*). The plugin expects a column namedcount, if your metric is different, try renaming it to count.
The plugin does not support multiple metrics nor multiple columns. There should be only one date column and one metric selected.
Edit customization options as-desired.
Developer Usage
To build the plugin, run the following commands:
npm ci
npm run buildAlternatively, to run the plugin in development mode (=rebuilding whenever changes are made), start the dev server with the following command:
npm run devTo add the package to Superset, see Usage section above.
