Common Zero for Left Axis & Bottom Axis
Common Zero for Left Axis & Bottom Axis
I'm using Steema Silverlight. My Left Y Axis Starts from Zero and Bottom Axis also starts from Zero. So I need a common Zero instead of 2 Zeros. In Windows .NET version it was working. Is there any way to achieve the same in Silverlight version.
- Attachments
-
- CommonZero.PNG (18.25 KiB) Viewed 6219 times
Re: Common Zero for Left Axis & Bottom Axis
Hello Neelam,
I have try to achieve a common 0 using the same code with Winforms and Silverlight and I have gotten the same results in both projects and these are negative. Can you tell us, which values are you using to achieve a common 0 in Winforms? On the other hand, you can solve your problem using GetAxisLabel Event and remove the 0 you don't want as do in next code:
I hope will helps.
Thanks,
I have try to achieve a common 0 using the same code with Winforms and Silverlight and I have gotten the same results in both projects and these are negative. Can you tell us, which values are you using to achieve a common 0 in Winforms? On the other hand, you can solve your problem using GetAxisLabel Event and remove the 0 you don't want as do in next code:
Code: Select all
public MainPage()
{
InitializeComponent();
InitializeChart();
}
Steema.TeeChart.Silverlight.Styles.Line Series1, Series2;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Series1 = new Steema.TeeChart.Silverlight.Styles.Line(tChart1.Chart);
Series2 = new Steema.TeeChart.Silverlight.Styles.Line(tChart1.Chart);
Series1.Add(0, 35);
Series1.Add(1, 134);
Series1.Add(2, 245);
Series1.Add(2, 555);
Series2.Add(0,0);
Series2.Add(1, 50);
Series2.Add(3, 150);
Series2.Add(2, 300);
tChart1.GetAxisLabel = new Steema.TeeChart.Silverlight.GetAxisLabelEventHandler(tChart1_GetAxisLabel);
}
void tChart1_GetAxisLabel(object sender, Steema.TeeChart.Silverlight.GetAxisLabelEventArgs e)
{
if (sender == tChart1.Axes.Left)
{
if (e.LabelText == "0")
{
e.LabelText = " ";
}
}
}
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 |