Custom Charts

Infinity gives you full control to build advanced visualizations by combining SQL-powered datasets with custom ECharts and JavaScript logic.


✅ When to Use Custom Charts

  • You need a chart type not included in the Infinity UI.

  • You want to apply advanced ECharts customizations (animations, interactions, formatting).

  • You want full control over styling, behaviors, and events.


⚙ Workflow

  1. Create your base visualization using the default Infinity chart options.

  2. Switch the chart type to Custom.

  3. Open Advanced Settings > JS.

  4. Write or edit your custom ECharts code.

  5. Test your code in the ECharts Playground.

  6. Paste it back into Infinity and save.


⚠ Important Notes

[!warning] Do not modify the dataset block unless you fully understand it. The dataset is auto-generated by Infinity and links your SQL data to the chart.

[!note] Changing to Custom disables the Styles Panel. All visual adjustments (colors, labels, axis formatting, etc.) must be done via code.

[!tip] Always validate your custom code externally using the official ECharts Playground before applying it inside Infinity.


✅ Do's & ❌ Don'ts

✅ Do
❌ Don't

Keep the dataset block intact

Remove or manually override the dataset

Use encode to map dataset columns

Hardcode data inside series unless needed

Test your code externally

Paste code directly without testing

Comment your code for clarity

Leave undocumented or cluttered code

Backup your scripts externally

Rely only on Infinity for versioning


💎 Starter Template


🟣 Common Custom Chart Templates

Bar Chart


Line Chart


Pie Chart


Donut Chart


Area Line Chart


Gauge Chart


Simple Click Event Example


✨ Pro Tips

  • Always use the ECharts API Docs.

  • Test every chart variation externally.

  • For production charts, organize code with comments and backups.

  • Consider building a Custom Chart Library page inside your Infinity Documentation for your team.


Last updated