Hi. We are using Teechart .Net 2009 for a line chart. In a line chart, we are using data table for data binding.
Sample codes:
// Databinding
this.scalarChart.Series[seriesNumber].DataSource = dtChartData;
this.scalarChart.Series[seriesNumber].XValues.DataMember = dtChartData.Columns[1].ColumnName;
this.scalarChart.Series[seriesNumber].YValues.DataMember = dtChartData.Columns[3].ColumnName;
//Adding to legend
this.scalarChart.Series[seriesNumber].Title = TagName;
this.scalarChart.Series[seriesNumber].ShowInLegend = true;
The problem:
The last caption text in the legend is getting cut at the end. Please refer the attached pic.
Expectation:
Please suggest how to avoid the text getting cut? ( Note: I have tried appending a blank space at the end, but that also seems to have truncated automatically. have tried appending "\n". Did not work either)
Text in the legend is getting cut
Text in the legend is getting cut
- Attachments
-
- legend_trim.PNG (111.73 KiB) Viewed 4022 times
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Text in the legend is getting cut
Hello,
I've tried running something similar using the latest NuGet version of TeeChart for .NET Framework 4.0:
And the result I get is this:
Do you get a similar result using the latest NuGet?
I've tried running something similar using the latest NuGet version of TeeChart for .NET Framework 4.0:
Code: Select all
private void InitializeChart()
{
var line1 = new Line(tChart1.Chart);
var line2 = new Line(tChart1.Chart);
line1.Title = "Pump speed";
line2.Title = "Mass flow rate in units of";
line1.FillSampleValues();
line2.FillSampleValues();
tChart1.Legend.Alignment = LegendAlignments.Top;
var assembly = Assembly.GetAssembly(typeof(TChart));
var fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
tChart1.Header.Text += $" version {fvi.FileVersion}";
}
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |