Loading...
Loading...
Use this skill when users ask about data visualisation, charts, graphs, or dashboards in an SGDS application. Covers ECharts setup and applying the SGDS colour palette to charts.
npx skill4agent add govtechsg/sgds-web-component sgds-data-visualisation@govtechsg/sgds-web-componentnpm install echartsimport * as echarts from "echarts";
const chart = echarts.init(document.getElementById("chart"));
chart.setOption(option);color| Token | Hex |
|---|---|
| |
| |
| |
| |
| |
colorconst option = {
color: ["#ac1cdb", "#00758d", "#0e7c3d", "#0269d0", "#7e6917"],
// ... rest of chart option
};import * as echarts from "echarts";
echarts.registerTheme("sgds", {
color: ["#ac1cdb", "#00758d", "#0e7c3d", "#0269d0", "#7e6917"],
});
const chart = echarts.init(document.getElementById("chart"), "sgds");colorcolorecharts.registerTheme()