Changing properties in preExecution or postFetch
We are able to change the properties for the charts, as with any other component. Inside preExecution
, the keyword this
, refers to the component itself, so we will have access to the chart's main object, which we can also manipulate and add, remove, and change options.
For instance, you can apply the following code:
function() { var cdProps = { dotsVisible: true, plotFrame_strokeStyle: '#bbbbbb', colors: ['#005CA7', '#FFC20F', '#333333', '#68AC2D'] }; $.extend(true, this.chartDefinition, cdProps); }
What we are doing is creating an object with all the properties that we want to add or change for the chart, and then extending the chartDefinitions
(where the properties or options are). This is what we are doing with the JQuery function.
Tip
Use the CCC website and make your life easier
This way to apply options makes it easier to set the properties. Just change or add the properties that you need, test it, and...