Custom Sigma plugin that renders a percentage-filled shape chart from workbook data.
- Install dependencies:
npm install
- Run dev server:
npm run dev
- Plugin serves at:
http://localhost:3001
- Open workbook in Edit mode.
- Add plugin element (
Sigma Plugin Dev Playgroundor your registered plugin). - Point development URL to
http://localhost:3001if needed. - Configure plugin editor fields:
data source-> table/chart element with source datalabel column-> category labelvalue column-> numeric percentage (0-100 preferred)background color,shape color,fill colorshape URL(optional persistent URL)
- Upload a local PNG in the plugin UI if desired:
- Stored as base64 in
shape image base64config to persist across reloads.
- Stored as base64 in
- One row = one rendered shape.
label columndrives the shape caption.value columndrives fill height.- Values are clamped to
[0, 100].
- Clicking a shape updates the
shape selectedinteraction. - Clicking a shape also fires
shape click triggeraction. - In Sigma actions UI, use the plugin trigger to target controls/charts.
- Uploaded base64 shape has precedence over URL shape.
- If no uploaded shape exists,
shape URLis used as fallback.
- Sign in at Netlify (free tier is fine).
- Add new site → Import an existing project → GitHub.
- Authorize Netlify for your GitHub account and pick repo
kernt07/filled-shape-plugin. - Netlify reads
netlify.toml: build commandnpm run build, publish folderdist. - Deploy. Copy the site URL (e.g.
https://filled-shape-plugin.netlify.app). - In Sigma, set your custom plugin Production URL to that HTTPS URL (or point a plugin element to it).
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])