Chart Subtitle Has too Much Space with Long Title
If my chart title has a very long title which wraps around, and I show a sub-title, the sub title has several rows of blank space between it and the title. So the long title is displayed correctly above the chart, but the sub-title is displayed in the chart background down towards the bottom of the chart. See the screen shots below for comparison. I believe this is a bug.
My charts are intended to display survey results, 1 per question. If the question is very long, this could be a problem. See my code below.
<SfChart @ref="chartObj" Title="@($"{SelectedQuestion.QuestionNumber}. {SelectedQuestion.Text}")" SubTitle="@(GetSubtitle())" Theme="@CurrentTheme" Width="@ChartWidth" Height="@ChartHeight">
<ChartTooltipSettings Enable="true" />
<ChartTitleStyle TextOverflow="TextOverflow.Wrap" TextAlignment="Alignment.Center"></ChartTitleStyle>
<ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Category" />
<ChartPrimaryYAxis Interval="1" />
<ChartSeriesCollection>
<ChartSeries DataSource="@BarChartData" XName="X" YName="Y" Type="ChartSeriesType.Column" Fill="rgba(61, 44, 191, 1)" />
</ChartSeriesCollection>
<ChartAnnotations>
<ChartAnnotation X="105" Y="35" CoordinateUnits="Units.Pixel" Region="Regions.Chart">
<ContentTemplate>
<img src="/images/logo_200_60.png" alt="Website Logo" width="200" height="60"/>
</ContentTemplate>
</ChartAnnotation>
</ChartAnnotations>
<ChartMargin Left="5" Right="5" Top="65" Bottom="0"></ChartMargin>
</SfChart>
Hi David,
We have considered your reported scenario as bug and logged a defect report for the issue “Chart subtitle position is not proper when title textoverflow is wrap”. This fix will be available in our weekly patch release which is scheduled to be rolled on 29th April 2025. We appreciate your patience until then. You can keep track of the bug from the below feedback link.
Feedback Link : https://www.syncfusion.com/feedback/67037/chart-subtitle-position-is-not-proper-when-title-textoverflow-is-wrap
If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”
Regards,
Durga Gopalakrishnan.
David,
We are glad to announce that our v29.1.40 patch release is rolled out; we have added the fix for reported issue. You can use the latest Syncfusion.Blazor.Charts NuGet package.
Root Cause:
When title textoverflow is 'Wrap', the height of the text is large, based on this height the chart subtitle is not positioned properly.
Fix:
Implemented proper logic for the subtitle text position calculation.
NuGet Package : https://www.nuget.org/packages/Syncfusion.Blazor.Charts/
Sample : https://blazorplayground.syncfusion.com/hZVIZeDrVYMVTXAH
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
- 2 Replies
- 2 Participants
-
DW David Warwick
- Apr 15, 2025 10:31 PM UTC
- May 2, 2025 12:26 PM UTC