How to Add a Legend to a Doughnut Chart in Creatio Freedom UI Using JavaScript?

How to Add a Legend to a Doughnut Chart in Creatio Freedom UI Using JavaScript?

Hi Creatio Community,

I'm working on a doughnut chart in Creatio Freedom UI and would like to display a legend below the chart. However, the chart configuration available in the Freedom UI designer does not provide an option to enable the legend for a doughnut chart.

I would like to explore whether this can be achieved through a client-side JavaScript handler without modifying the underlying chart configuration or affecting the chart's existing functionality.

  • Chart element: HTML inside the ts-chart component
  • Requirement: Display a custom legend below the doughnut chart, showing each series' actual color and label.

Questions:

  1. Is there a supported way to enable or configure a legend for a doughnut chart in Creatio Freedom UI?
  2. If the designer does not support this option, can a custom legend be added using a Freedom UI client-side JavaScript handler?
  3. How can we access the chart's actual labels, dataset values, and colors from the ts-chart component or its underlying chart configuration?
  4. Is there a recommended or supported API for accessing the chart instance without relying on undocumented internal properties?

My preference is to display the legend below the doughnut chart, using the existing chart labels and colors, while keeping the implementation scoped to this widget and preserving its existing interactions.

Any guidance, examples, or recommended approaches would be appreciated.

Thank you!

Like 0

Like

0 comments
Show all comments