Hello, I would like to clone a chart to do side by side comparison for different times (x axis is binned in months).
For example, if I am now looking at May, and I would like to see what happened 3 months ago, the data of February from the same data set will be displayed in the chart next to it.
I am aiming to achieve this by using 2 charts that are exactly the same, and then apply different filters / focuses to them.
After giving it some thought, I thought of 2 ways:
- After the main chart is created and properly set with parameters, create a clone of the main chart.
- When setting parameters of the main chart, apply those to the clone simultaneously.
Since a hefty amount of parameters are set differently based on different data sets, method 1 is more preferable than method 2 for me, but I'm not sure how to approach this.
Some parameter values can be obtained if no value is set, but I'm not certain whether every parameter can work with this. Most preferably, maybe there is a method that clones charts in dc.js?
Thank you for any advice.