Change legend label color on ChartJS

0
0

Is it possible to change the legend label and strikeout color on the chartjs extension? The documentation for ChartJS has the option to set it but the wisej package does not.

  • You must to post comments
0
0

Here is the link to the documentation regarding the legend configuration. After trying a few different options, I am still unable to change the text color.

 

https://www.chartjs.org/docs/latest/configuration/legend.html#legend-label-configuration

  • You must to post comments
0
0

Can you provide a link to where you saw this in the ChartJS documentation? Does it include a code snippet showing how to do it in JavaScript?

If you know how to do it in JavaScript, you can simply run the JavaScript code from C#, like this:

Wisej.Web.Ext.ChartJS.ChartJS chartJS1 = new Wisej.Web.Ext.ChartJS.ChartJS();
chartJS1.Eval("JavaScript code goes here");

Another thing to note, for chartJS specifically, is that if you want to access the chart from inside chartJS1.Eval() you can use this.widget.chart

Here I used the Eval() function, which runs whatever JavaScript code you send it. You can also use the Call() function, which takes the name of a JavaScript function and runs that function.

-Julie

 

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.