This plugin renders the data using a handlebars template.
Configure key, which can be any string, and register the plugin. This key will be used to lookup this chart throughout the app.
import HandlebarsChartPlugin from '@superset-ui/plugin-chart-handlebars'; new HandlebarsChartPlugin().configure({ key: 'handlebars' }).register();
Then use it via SuperChart. See storybook for more details.
<SuperChart chartType="handlebars" width={600} height={600} formData={...} queriesData={[{ data: {...}, }]} />
├── package.json
├── README.md
├── tsconfig.json
├── src
│ ├── Handlebars.tsx
│ ├── images
│ │ └── thumbnail.png
│ ├── index.ts
│ ├── plugin
│ │ ├── buildQuery.ts
│ │ ├── controlPanel.ts
│ │ ├── index.ts
│ │ └── transformProps.ts
│ └── types.ts
├── test
│ └── index.test.ts
└── types
└── external.d.ts
Below, you will find a list of all currently registered helpers in the Handlebars plugin for Superset. These helpers are registered and managed in the file HandlebarsViewer.tsx.
dateFormat: Formats a date using a specified format.
{{dateFormat my_date format="MMMM YYYY"}}YYYY-MM-DD.stringify: Converts an object into a JSON string or returns a string representation of non-object values.
{{stringify myObj}}.formatNumber: Formats a number using locale-specific formatting.
{{formatNumber number locale="en-US"}}.en-US.parseJson: Parses a JSON string into a JavaScript object.
{{parseJson jsonString}}.