How to disable chart interaction

How to disable chart interaction


How to disable chart interaction


How can I disable the interaction events of the chart and just use it as an image when using the chart?


In VChart, you can directly pass in disableTriggerEvent: true to disable interaction.

Code Example

const spec = { type: 'bar', data: [ { id: 'barData', values: [ { month: 'Monday', sales: 22 }, { month: 'Tuesday', sales: 13 }, { month: 'Wednesday', sales: 25 }, { month: 'Thursday', sales: 29 }, { month: 'Friday', sales: 38 } ] } ], xField: 'month', yField: 'sales'
}; const vchart = new VChart(spec, { dom: CONTAINER_ID, disableTriggerEvent: true });
vchart.renderSync(); // Just for the convenience of console debugging, DO NOT COPY!
window['vchart'] = vchart;
Enter fullscreen mode
Exit fullscreen mode



Related Documents



Github: GitHub – VisActor/VChart: VChart, more than just a cross-platform charting library, but also an expressive data storyteller.

Discover more from Coursity

Subscribe to get the latest posts to your email.


No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *