In following the steps given on the web site below, I am able to generate a chart, but only with the axis value I entered in the wizard, but I am wanting to use the values from a data source. I must be missing something very simple. I have added a data source, but values not there. Help please?
http://help.infragistics.com/Help/NetAdvantage/NET/2007.3/CLR2.0/html/Chart_Creating_a_Composite_Chart_Using_the_Chart_Wizard_Part_1_of_2.html
http://help.infragistics.com/Help/NetAdvantage/NET/2007.3/CLR2.0/html/Chart_Creating_a_Composite_Chart_Using_the_Chart_Wizard_Part_2_of_2.html
I wanted to send some screen shots of what is going on. I want the data to come from a view in SQL 2005.
In your code, for the 2nd data table, you've added rows to 'table' instead of 'budgetTable'.Also, for the X axis that's used for the line layer you need to setxAxisLine.SetLabelAxisType = SetLabelAxisType.ContinuousData;
Hey Max, thanks for getting back with me -
I have acutually workout the issues that i was dealing with however, i have some more formating tasks - 1. how to formate the Yaxis range so it goes in 1000s rather than the actual values
2. Because there will be 3 lines for each year i need a way to map the line circle to land on the acutal colum that is the same year.
Thanks in advance for your thoughs.
1. The best way is to setyAxis.TickmarkStyle = AxisTickStyle.Smart;This setting automatically picks a round interval, along with start and end values. 2. This is something that requires a little bit of trial and error. You can set a margin on the x axis that you use for the line layer in order to make the line points appear in the center of the column points. A value of 3 or 4 percent seems to work well.
xAxisLine.Margin.Near.MarginType =
LocationType.Percentage;xAxisLine.Margin.Near.Value = 3;xAxisLine.Margin.Far.MarginType = LocationType.Percentage;xAxisLine.Margin.Far.Value = 3;
That worked great!! Thanks so much !
Ok, one more issue - i am trying to get the SeriesLables to center and show the colomn names ie. 2007, 2008 and 2009 i tried everything i know to do but alas -
xAxisColumn.DataType = AxisDataType.String; xAxisColumn.OrientationType = AxisNumber.X_Axis;xAxisColumn.SetLabelAxisType = SetLabelAxisType.GroupBySeries;xAxisColumn.Labels.HorizontalAlign = StringAlignment.Center;xAxisColumn.Labels.VerticalAlign = StringAlignment.Center;xAxisColumn.Labels.SeriesLabels.FormatString = "Fiscal\nMonth\n";xAxisColumn.Labels.Orientation = TextOrientation.VerticalLeftFacing;xAxisColumn.RangeType = AxisRangeType.Automatic;xAxisColumn.LineThickness = 1;
xAxisLine.DataType = AxisDataType.String;xAxisLine.SetLabelAxisType = SetLabelAxisType.ContinuousData;xAxisLine.Labels.Orientation = TextOrientation.VerticalLeftFacing;xAxisLine.LineThickness = 1;xAxisLine.Margin.Near.MarginType = LocationType.Percentage;xAxisLine.Margin.Near.Value = 3;xAxisLine.Margin.Far.MarginType = LocationType.Percentage;xAxisLine.Margin.Far.Value = 3;
Thanks Max, you blokes have been such a great help gettiing my head around charting.
Thanks so much!
For Item Labels:seriesColumn1.Label = "2007";seriesColumn2.Label = "2008";seriesColumn3.Label = "2009";xAxisColumn.Labels.Orientation = TextOrientation.VerticalLeftFacing;
For Series Labels:xAxisColumn.Labels.SeriesLabels.Layout.Behavior = AxisLabelLayoutBehaviors.UseCollection;AxisLabelLayoutBehavior behavior = new WrapTextAxisLabelLayoutBehavior();behavior.Enabled = true;behavior.EnableRollback=false;behavior.UseOnlyToPreventCollisions=false;xAxisColumn.Labels.SeriesLabels.Layout.BehaviorCollection.Add(behavior);