Note : This process is only for adding your new chart to other
pages.(Skip this process if this is not your requirement)
If you want to change the color of your chart with respect to the
themecolor you have to follow the below steps.
Step 1:
If you want to add any chart to any other page then follow the below
process.
Open js file of the particular chart that you wanted to add, in that js
file (for example in my case: mychart.js), and inside of that js file
create a new function with " unique "
name (for example in my case: myFunction() ), and then place the chart
js content inside of that function.
Note: If there is more than one chart then you need to create
different functions for different charts respectively.
Ex-1: myFunction1() {
chart js1 content
}
Ex-2:myFunction2() {
chart js2 content
}
Step 2:
Navigate to root path: wwwroot/assets/js/themeColors.js in that js file
you will find a function called "(function names() )"
In that function you will find
"if(document.querySelector('#timeline-chart') !== null){
index1() ;
}"
Below this condition add a new condition with the "id
name and function name" that you've used in your chart js
(Ex: mychart.js)
Ex: " if(document.querySelector('# your chart id') !== null){
myFunction(); =>created function for the above id
}"
Step 3:
If you want to change your chart (Ex: mychart.js) color according
to your themecolor then follow the below process
Ex : Go to root path: wwwroot/assets/js/mychart.js in that js file
you've already created a function (Ex: myFunction() ) inside of
that function there are different color values based on the chart. so,
if you want to change the color then add " myVarVal " value (Ex:- myVarVal )to that particular
color field based on your requirement.