Show Axes Even with NO data
Show Axes Even with NO data
How do I show the axes, instead of an ugly blank chart, even before the series have been added to the chart?
Re: Show Axes Even with NO data
Hello Chris,
I think you can use method of axes SetMinMax(), for initialize previously these. You can do something as next code:
Please, check if previous code works as you want.
I hope will helps.
Thanks,
I think you can use method of axes SetMinMax(), for initialize previously these. You can do something as next code:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
Steema.TeeChart.Styles.Line series1;
private void InitializeChart()
{
tChart1.Aspect.View3D = true;
series1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
tChart1.Axes.Left.SetMinMax(0, 500);
tChart1.Axes.Bottom.SetMinMax(0, 100);
}
private void button1_Click(object sender, EventArgs e)
{
series1.FillSampleValues();
}
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / 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 |
Re: Show Axes Even with NO data
Is there any way to do this without adding an empty series? I handle events and currently assume that all series that exist on my chart are valid. I'd have to develop code specifically to handle these (phantom series) that have to be added when the chart is first initialized.
Re: Show Axes Even with NO data
Hello Chris,
Thanks,
I fear that it is not possible, you need add series,because chart can calculate value its axes.Is there any way to do this without adding an empty series?
You don't need treat series are you using for calculate axes of chart as series phantom. I recommend you, use first series you add in chart for initialize axes, as a valid series, you only have added its values.I handle events and currently assume that all series that exist on my chart are valid. I'd have to develop code specifically to handle these (phantom series) that have to be added when the chart is first initialized.
Thanks,
Best Regards,
Sandra Pazos / 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 |