Answered by:
Gant chart and scale

Question
-
Hello all. I'm trying to make a gant chart and i'm use a range bar chart type.
Now the problem is that I want the X scale (datetime) , day by day, dispieat of the chart size, because i have put the chart inside a panel whit scroll bars. Is there any way to put scale day by day?
Another thing is i want to put the weekends whit diferent line colors?
thank you.
Thursday, October 28, 2010 9:42 PM
Answers
-
I'm not sure what you mean with having "X scale day by day"... Have you tried setting the x-axis interval type to days and the interval to 1?
Chart1.ChartAreas["ChartArea1"].AxisX.IntervalType = DateTimeIntervalType.Days; Chart1.ChartAreas["ChartArea1"].AxisX.Interval = 1;
(Change AxisX to AxisY if you actually meant the Y axis... on a range bar chart the Y axis is the horizontal one.)
- Marked as answer by ki_ko Friday, October 29, 2010 2:53 PM
Friday, October 29, 2010 11:45 AMModerator
All replies
-
weekends solved . i use this code :
StripLine stripLine = new StripLine(); stripLine.BackColor = Color.FromArgb(120, Color.Gray); stripLine.IntervalOffset = -1; stripLine.IntervalOffsetType = DateTimeIntervalType.Days; stripLine.Interval = 1; stripLine.IntervalType = DateTimeIntervalType.Weeks; stripLine.StripWidth = 2; stripLine.StripWidthType = DateTimeIntervalType.Days; Chart1.ChartAreas["ChartArea1"].AxisY.StripLines.Add(stripLine);
needs help whit the other problem , x-scale day- by -bay.
holpe for help , thanks
Friday, October 29, 2010 11:07 AM -
I'm not sure what you mean with having "X scale day by day"... Have you tried setting the x-axis interval type to days and the interval to 1?
Chart1.ChartAreas["ChartArea1"].AxisX.IntervalType = DateTimeIntervalType.Days; Chart1.ChartAreas["ChartArea1"].AxisX.Interval = 1;
(Change AxisX to AxisY if you actually meant the Y axis... on a range bar chart the Y axis is the horizontal one.)
- Marked as answer by ki_ko Friday, October 29, 2010 2:53 PM
Friday, October 29, 2010 11:45 AMModerator -
I'm not sure what you mean with having "X scale day by day"... Have you tried setting the x-axis interval type to days and the interval to 1?
Chart1.ChartAreas["ChartArea1"].AxisX.IntervalType = DateTimeIntervalType.Days; Chart1.ChartAreas["ChartArea1"].AxisX.Interval = 1;
(Change AxisX to AxisY if you actually meant the Y axis... on a range bar chart the Y axis is the horizontal one.)
thanks, thats it, problem solved.i forget that in a range bar , Y axis is the horizontal one.
little things give big problems
Friday, October 29, 2010 2:52 PM