Hi,
I am trying to make the horizontal and vertical grid lines visible in my application. But i am not able to make it. Actually I dont want to show all the labels in bottom axis. X axis values are of type datetime. I just need to show start time and end time of the bottom axis. Thats why i made the axis labels as invisible. Now my grid lines are also gone. Please let me know how can i make the grid lines visible without the labels.
Problem in making the vertical and horizontal grid lines
Re: Problem in making the vertical and horizontal grid lines
Hello Nitin,
I made a simple example that I thinks solve your problem and you can use a similar code for your application. Please check next code works as you want.
I hope that will helps
I made a simple example that I thinks solve your problem and you can use a similar code for your application. Please check next code works as you want.
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
Steema.TeeChart.Styles.Bar bar;
private void InitializeChart()
{
bar = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar.FillSampleValues(5);
bar.Marks.Visible = false;
tChart1.Legend.Visible = false;
bar.XValues.DateTime = true;
tChart1.Axes.Bottom.Labels.Angle = 90;
for (int i = 0; i < 5; i++)
{
if (i == 0 || i == 4)
{
bar[i].Label = DateTime.FromOADate(bar[i].X).ToShortDateString();
}
else
{
bar[i].Label = " ";
}
}
}
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 |