syncfusion / flutter-widgets

Syncfusion Flutter widgets libraries include high quality UI widgets and file-format packages to help you create rich, high-quality applications for iOS, Android, and web from a single code base.
1.58k stars 773 forks source link

RadialBarSeries with rounded ends looks ugly when some legends are hidden #2105

Open Abhijit-Revamp opened 1 month ago

Abhijit-Revamp commented 1 month ago

Bug description

Hiding points (via legends) in a RadialBarSeries with circular ends looks ugly when only 1 or 2 are visible.

Not sure if setting "maximumValue" on RadialBarSeries has more impact,

The shape becomes thick and looks bad when cornerStyle: CornerStyle.bothCurve, or cornerStyle: CornerStyle.endCurve,

See the attached images

You can reproduce this in the samples:

  1. Open https://flutter.syncfusion.com
  2. Navigate to Circular chart -> Radial Bar
  3. Inside Radial Bar sample, select the option with Legend (activity tracker)
  4. Hide 2 of the 3 points

Steps to reproduce

  1. create RadialBarSeries
  2. in Data have lot of points (say 10)
  3. Add legends with toggleSeriesVisibility=true
  4. Now of the 10 values, hide 8 or 9

Code sample

Code sample ```dart [Add your code here] ```

Screenshots or Video

Screenshots / Video demonstration
All points visible image
With only 1 point visible
image
Same with `cornerStyle: CornerStyle.bothCurve`
image
One more
image

Stack Traces

Stack Traces ```dart [Add the Stack Traces here] ```

On which target platforms have you observed this bug?

Web

Flutter Doctor output

Doctor output ```console [Add your output here] ```
Baranibharathip commented 1 week ago

Hi @Abhijit-Revamp,

We have validated your query and would like to inform you that in the RadialBarSeries, the segment ring size is calculated based on the number of visible data points, radius and widget available size. When the legend is toggled, the remaining segments will always expand to fill the entire radial bar space. This is the default behavior of the RadialBarSeries. To reduce the outer radius of the series, we recommend adjusting the radius settings, which will modify the default radius of the RadialBarSeries.

For more details about radius, refer to the following UserGuide link. Radial bar chart: https://help.syncfusion.com/flutter/circular-charts/chart-types/radial-bar-chart#changing-the-radial-bar-size

Regards, Baranibharathi P.

Abhijit-Revamp commented 1 day ago

@Baranibharathip Thanks. I had a look at that. However my data is dynamic and so are my legends. I have already set the radius and inner radius, however when the labels hide, tracking the radius and calculating the values will be extremely tricky. is it possible to have a flag (as an ENHANCEMENT) to keep the size of each element impact