Chart legend text

Hi

My question is related to the topic https://forum.dhtmlx.com/t/dhtmlx-charts-legend-format/72528, which unfortunately remained unanswered.

I’m trying to setup the area chart and I have a problem with the chart’s legend. Is there any way to change the texts in the legend? In all the examples I have seen so far, the texts are taken directly from the data keys like “Company A”, “Company B” etc. This is extremely unpractical, because in my case, the legend text should be name of a project, which:

  • might be very long = the data keys would be very long too and are repeated many times in the data json,
  • might not be unique - it is a project name after all and as such is chosen by the users of my system. However if they are used as a keys of an object, this is a real problem.

If there would be some way how to change or configure the texts of the legend (even manually), I could use for example a project id for the data keys (= always unique) and use the project name only for the legend.

Thank you very much

Ondrej

My apologies for the delay. Thank you for your report.
I’ve sent your request to the dev team and it will be observed, so the probable solution may appear in the future updates.

We have extend the possibility to define a label for the chart series for a more friendly displaying in the chart legend.
This feature was added in the latest dhx.Suite update (v 8.2.0).
You can check the details in the docs:
JavaScript Chart - series Config | DHTMLX Suite 8 Docs (label property of the series)
Also, here is a snippet demonstrating the usage:
DHTMLX - Chart. Label for the series legend
Please, download the latest available dhx.Suite build from your client’s area to get this feature.
Thank you for your report.
Best regards.