Page 1 of 1
Axis labels on bottom axis jammed for horizontal bar
Posted: Wed Oct 05, 2005 12:22 am
by 9526208
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.
Posted: Wed Oct 05, 2005 9:39 am
by narcis
Hi Alex,
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
Does this code works for you? Please feel free to modify it so that we can reproduce the proble here.
Posted: Wed Oct 05, 2005 7:02 pm
by 9526208
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");
}
}
}
Posted: Wed Oct 05, 2005 7:08 pm
by 9526208
After additional testing i see that line
pSeries.Marks.Visible = false;
makes the difference.
If commented there is no label jam!
Posted: Mon Oct 17, 2005 10:40 pm
by 9526208
So the question is why
pSeries.Marks.Visible = false;
makes the label jam?
Posted: Tue Oct 18, 2005 11:26 am
by narcis
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:
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");
}
Another solution is increasing bottom axis increment: