Currently updateConfig just does Object.assign which makes it a problem since most of the options are nested and it's easy to accidentally turn off something while changing something else - for instance updateConfig({ line: { markers: { true } }) would remove all previously configured marker options like size etc.
The alternate/additional option to handle this is to change updateConfig to take in a function which receives current options as a parameter and returns new options, putting the onus of the deep-merge on the user. @jaimedp
Currently
updateConfig
just doesObject.assign
which makes it a problem since most of the options are nested and it's easy to accidentally turn off something while changing something else - for instanceupdateConfig({ line: { markers: { true } })
would remove all previously configured marker options like size etc.The alternate/additional option to handle this is to change
updateConfig
to take in a function which receives current options as a parameter and returns new options, putting the onus of the deep-merge on the user. @jaimedp