1- Doughnut 2D / Pie 2D Charts:
When choosing a doughnut or pie chart, the “Legend” is not displayed even if the chart advanced property checkbox (Legend > Display > ✔ ) is checked.
It took me a while of experimentation and failure until I had the idea of making it visible through the code as follows:
// Server Events > Chart_Rendered:
public void Chart_Rendered(ChartJsRenderer renderer)
{
// Example:
var data = renderer.Data;
var options = renderer.Options;
DbChart chart = renderer.Chart;
if (chart.ID == “xxx”) { // Check chart ID
// Change layout.padding option
// Refer https://www.chartjs.org/docs/latest/ for possible options
renderer.Options = Merge(options, new Dictionary <string,dynamic>
{
{“legend”, new Dictionary <string,dynamic> {{“display”, true}}}
});
}
}
After doing so, the legend appeared immediately. so I think that checkbox is not properly associated.
2- Bar 2D Chart:
The option (Custom sort sequence) is not working, and it always appears in alphabetic order, although :
- I have read the help file very well
- I have double-checked that spelling of my categories is correct, as it appears on the chart (including letter case)
- I have selected (X ASC) in the Sort Type option
- I am sure there are no spaces before or after the comma
it always shows in alphabetical order…
Example of my custom category labels sorting:
Delayed Tasks,Active Tasks,Completed,Canceled,Archived
Thank you for your help