vatesfr / xen-orchestra

The global orchestration solution to manage and backup XCP-ng and XenServer.
https://xen-orchestra.com
Other
743 stars 260 forks source link

feat(xo-core): add multi color donut chart ui component #7661

Closed P4l0m4 closed 1 month ago

P4l0m4 commented 1 month ago

This UI component is an SVG based donut chart.

This is how it looks if all the possible props are provided: Capture d'écran 2024-05-15 100845

It can receive an array of objects, each containing a value (number) and a color (warning, error, success, unknown). Example:

{
      value: 15,
      color: 'success',
    },

It can also receive an icon prop (icon must be of IconDefinition type) and a max value that, if greater than the sum of the segment's value, will add an extra segment with a default color.