Axis labels on bottom axis jammed for horizontal bar
Axis labels on bottom axis jammed for horizontal bar
If we use, for example, values 0,1,2,3,4,5,6 to build a horizontal bar, automatic labels for the bottom axis overlap for most sizes of the window. If we use 1e-5,2e-5,3e-5,4e-5,5e-5,6e-5,7e-5 it formats and places labels fine.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Alex,
I'm not able to reproduce it here using the code below:
Does this code works for you? Please feel free to modify it so that we can reproduce the proble here.
I'm not able to reproduce it here using the code below:
Code: Select all
With TChart1.Series(0)
For i = 0 To 6
.Add i, "", clTeeColor
Next
End With
Best Regards,
Narcís Calvet / 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 |
Narcís,
Here is a c# code which exports BMP with jammed labels.
using System;
using TeeChart;
namespace tee_test
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
ITChart pChart = new TChartClass();
pChart.ClearChart();
int idx = pChart.AddSeries(ESeriesClass.scHorizBar);
pChart.Aspect.View3D = false;
pChart.Legend.Visible = false;
pChart.Header.Visible = false;
ISeries pSeries = pChart.Series(idx);
pSeries.Marks.Visible = false;
for (int i = 0; i < 7; i++)
pSeries.Add(i, null, 0xffffff);
IBMPExport pBMP = pChart.Export.asBMP;
pBMP.Height = 250;
pBMP.Width = 600;
pBMP.SaveToFile("c:\\tee_testJam.bmp");
}
}
}
Here is a c# code which exports BMP with jammed labels.
using System;
using TeeChart;
namespace tee_test
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
ITChart pChart = new TChartClass();
pChart.ClearChart();
int idx = pChart.AddSeries(ESeriesClass.scHorizBar);
pChart.Aspect.View3D = false;
pChart.Legend.Visible = false;
pChart.Header.Visible = false;
ISeries pSeries = pChart.Series(idx);
pSeries.Marks.Visible = false;
for (int i = 0; i < 7; i++)
pSeries.Add(i, null, 0xffffff);
IBMPExport pBMP = pChart.Export.asBMP;
pBMP.Height = 250;
pBMP.Width = 600;
pBMP.SaveToFile("c:\\tee_testJam.bmp");
}
}
}
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Alex,
Yes, I've been able to reproduce that and added the issue (TV52011014) to our defect list to be fixed for future releases. I've found that another workaround is setting pChart.Axis.Bottom.Labels.Style = EAxisLabelStyle.talMark as shown here:
Another solution is increasing bottom axis increment:
Yes, I've been able to reproduce that and added the issue (TV52011014) to our defect list to be fixed for future releases. I've found that another workaround is setting pChart.Axis.Bottom.Labels.Style = EAxisLabelStyle.talMark as shown here:
Code: Select all
static void Main()
{
ITChart pChart = new TChartClass();
pChart.ClearChart();
int idx = pChart.AddSeries(ESeriesClass.scHorizBar);
pChart.Aspect.View3D = false;
pChart.Legend.Visible = false;
pChart.Header.Visible = false;
ISeries pSeries = pChart.Series(idx);
pSeries.Marks.Visible = false;
for (int i = 0; i < 7; i++)
pSeries.Add(i, null, 0xffffff);
pChart.Axis.Bottom.Labels.Style = EAxisLabelStyle.talMark;
IBMPExport pBMP = pChart.Export.asBMP;
pBMP.Height = 250;
pBMP.Width = 600;
pBMP.SaveToFile("c:\\tee_testJam.bmp");
}
Code: Select all
pChart.Axis.Bottom.Increment=0.4;
Best Regards,
Narcís Calvet / 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 |