toomuchdesign/react-minimal-pie-chart

Not able to add multiline text with different format in central of pie/donut

krishnagopalpatidar opened this issue · 1 comments

Do you want to request a feature or report a bug?

help needed

What is the current behaviour?

Not able to add multiline text with different format in central of pie/donut. We assigned a div to label property with labelStyle and labelPosition as 0. It works fine if we give one line string value, but doesn't work if we assign div.

What is the expected behaviour?

As per definition of LabelRenderFunction, it seems to accept ReactElementso it should accept

with multiline text in different format. Please find attached image having central text we need.

Steps to Reproduce the Problem

  • lineWidth={10}
  • labelPosition={0}
  • Required values for label, labelStyle

Specifications

  • Version: 8.2.0
  • Platform: React 17.0.2
  • Subsystem:

Pie donut with single central text

hi @krishnagopalpatidar
if the output to be styled is provided as PieChart children, then it has to render SVG elements, no divs or any else DOM elements.

Otherwise you can consider rendering these extra elements as normal DOM elements out of the PieChart (finding a proper way to position then).