Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to customize the Radial chart size. #2056

Closed
AkshayCS11 opened this issue Sep 5, 2024 · 2 comments
Closed

Unable to customize the Radial chart size. #2056

AkshayCS11 opened this issue Sep 5, 2024 · 2 comments
Labels
charts Charts component solved Solved the query using existing solutions

Comments

@AkshayCS11
Copy link

Bug description

Unable to customize the Radial chart size and not have the feature to increase the stroke width.

Steps to reproduce

Pass 20 values of data to xvalueMapper and yvaluemapper. Values should be in 8 digits

Code sample

SfCircularChart(
tooltipBehavior: TooltipBehavior(
enable: true,
format: 'point.x : point.y',
),
series: [
RadialBarSeries<ChartData, String>(
strokeWidth: 40,
radius: '100%',
innerRadius: '5%',
cornerStyle: CornerStyle.endCurve,
enableTooltip: true,
name: 'RadialBar',
sortingOrder: SortingOrder.descending,
dataSource: convertToChartData(
List<Map<String, dynamic>>.from(
structuredData)),
xValueMapper: (ChartData data, _) =>
data.x.toString(),
yValueMapper: (ChartData data, _) =>
data.y,
dataLabelMapper: (ChartData data, _) =>
data.x,
dataLabelSettings:
const DataLabelSettings(
isVisible: true,
labelPosition:
ChartDataLabelPosition.outside,
textStyle: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.grey),
),
),
],
),

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Stack Traces

image

On which target platforms have you observed this bug?

Web, Windows

Flutter Doctor output

No errors

@AkshayCS11
Copy link
Author

We need to increase the radius size above 100 to make the chart larger. Then the label part is partially displaying

@LavanyaGowtham2021 LavanyaGowtham2021 added charts Charts component open Open labels Sep 5, 2024
@Hariram-SF4428
Copy link

Hi @AkshayCS11,

Query 1: To customize radial chart size
The size of the radial chart can be increased up to 100 by adjusting the radius property in series. If you need to increase the radius beyond 100, you will need to enlarge the size of the parent widget containing the chart.

UG: Radial bar Chart in Flutter Circular Charts widget | Syncfusion

Query 2: To increase the stroke width
You can achieve this requirement by setting strokeColor to the radial series. By default the stroke color is transparent, so it will not render the stoke for segment.

Code snippet:


    SfCircularChart(
      series: [
        RadialBarSeries<ChartData, String>(
          strokeWidth: 1,
          strokeColor: Colors.black,
          xValueMapper: (ChartData data, _) => data.x.toString(),
          yValueMapper: (ChartData data, _) => data.y,
          ...
          ...
          ...
        ),
      ],
    );
    

We have attached a sample for your reference, if you have any further queries, please get back to us. We are always happy to assist you.

Sample: gh_2056.zip

Regards,
Hariram S

@LavanyaGowtham2021 LavanyaGowtham2021 added waiting for customer response Cannot make further progress until the customer responds. and removed open Open labels Sep 25, 2024
@LavanyaGowtham2021 LavanyaGowtham2021 added solved Solved the query using existing solutions and removed waiting for customer response Cannot make further progress until the customer responds. labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
charts Charts component solved Solved the query using existing solutions
Projects
None yet
Development

No branches or pull requests

3 participants