Accepted answer

I've solved your problem with clone your config for each chart. Currently, you render charts with one object config, which is shared and when render second chart, the config is changed. So you should clone config for each chart.

This is my solution (forked and edited from your jsfiddle)

const clone = (o) => JSON.parse(JSON.stringify(o))

var configs = {
    chart1: clone(config),
    chart2: clone(config)

<script async src="//,html,css,result/dark/"></script>

Related Query

More Query from same tag