Hi all,
I have a requirement above in composite chart. I have almost completed but the problem i am facing with the major grid lines in X axis and Y axis which i am not able to do
This is VB.NET. Below is the code :
Me
.UltraChart1.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.Composite
Me.UltraChart1.BackColor = Color.White
xAxis.Labels.Orientation = [Shared].Styles.TextOrientation.VerticalLeftFacing
xAxis.OrientationType = [Shared].Styles.AxisNumber.X_Axis
xAxis.Extent = 100
xAxis.DataType = [Shared].Styles.AxisDataType.String
xAxis.SetLabelAxisType = Core.Layers.SetLabelAxisType.GroupBySeries
xAxis.LineColor = Color.Black
xAxis.Labels.FontColor = Color.Black
xAxis.Labels.ItemFormatString =
"<ITEM_LABEL>"
xAxis.Margin.Near.Value = 0.5
xAxis.Margin.Far.Value = 0.5
x2Axis.Labels.Orientation = [Shared].Styles.TextOrientation.VerticalLeftFacing
x2Axis.OrientationType = [Shared].Styles.AxisNumber.X2_Axis
x2Axis.Extent = 100
x2Axis.DataType = [Shared].Styles.AxisDataType.String
x2Axis.LineColor = Color.Transparent
x2Axis.SetLabelAxisType = Core.Layers.SetLabelAxisType.ContinuousData
x2Axis.Margin.Near.Value = 0.75
x2Axis.Margin.Far.Value = 0.5
x2Axis.Visible =
False
yAxis.OrientationType = [Shared].Styles.AxisNumber.Y_Axis
yAxis.Extent = 100
yAxis.TickmarkStyle = [Shared].Styles.AxisTickStyle.Smart
yAxis.DataType = [Shared].Styles.AxisDataType.Numeric
yAxis.LineColor = Color.Black
yAxis.Labels.FontColor = Color.Black
yAxis.Labels.ItemFormatString =
"<DATA_VALUE:#>"
y2Axis.OrientationType = [Shared].Styles.AxisNumber.Y2_Axis
y2Axis.Extent = 100
y2Axis.TickmarkStyle = [Shared].Styles.AxisTickStyle.Smart
y2Axis.DataType = [Shared].Styles.AxisDataType.Numeric
y2Axis.LineColor = Color.Black
y2Axis.Labels.FontColor = Color.Black
y2Axis.Labels.ItemFormatString =
y2Axis.Visible = F
alse
columnSeries1.Data.DataSource = Graphdt
columnSeries1.Data.LabelColumn =
"Period"
columnSeries1.Data.ValueColumn =
"SumOfUplift_GPS"
columnSeries1.PEs.Add(
New Resources.Appearance.PaintElement(Color1))
columnLayer1.ChartType = [Shared].Styles.ChartType.ColumnChart
columnLayer1.Series.Add(columnSeries1)
columnLayer1.ChartArea = area
columnLayer1.AxisX = xAxis
columnLayer1.AxisY = yAxis
columnApp =
DirectCast
(columnLayer1.ChartTypeAppearance, Resources.Appearance.ColumnChartAppearance)
columnApp.ColumnSpacing = 1
columnSeries2.Data.DataSource = Graphdt
columnSeries2.Data.LabelColumn =
columnSeries2.Data.ValueColumn =
"SumOfAdjBaseFC_GPS"
columnSeries2.PEs.Add(
New
Resources.Appearance.PaintElement(Color2))
columnLayer2.ChartType = [Shared].Styles.ChartType.ColumnChart
columnLayer2.Series.Add(columnSeries2)
columnLayer2.ChartArea = area
columnLayer2.AxisX = xAxis
columnLayer2.AxisY = yAxis
(columnLayer2.ChartTypeAppearance, Resources.Appearance.ColumnChartAppearance)
lineSeries.Data.DataSource = Graphdt
lineSeries.Data.LabelColumn =
lineSeries.Data.ValueColumn =
"SumOfHL_DP_GPS"
lineSeries.PEs.Add(
Resources.Appearance.PaintElement(Color3))
lineLayer.ChartType = [Shared].Styles.ChartType.LineChart
lineLayer.Series.Add(lineSeries)
lineLayer.ChartArea = area
lineLayer.AxisX = x2Axis
lineLayer.AxisY = yAxis
lineSeries1.Data.DataSource = Graphdt
lineSeries1.Data.LabelColumn =
lineSeries1.Data.ValueColumn =
"SumOfNetDispatch_GPS"
lineSeries1.PEs.Add(
Resources.Appearance.PaintElement(Color4))
lineLayer1.ChartType = [Shared].Styles.ChartType.LineChart
lineLayer1.Series.Add(lineSeries1)
lineLayer1.ChartArea = area
lineLayer1.AxisX = x2Axis
lineLayer1.AxisY = yAxis
area.Axes.Add(xAxis)
area.Axes.Add(x2Axis)
area.Axes.Add(yAxis)
area.Axes.Add(y2Axis)
.UltraChart1.CompositeChart.ChartAreas.Add(area)
.UltraChart1.CompositeChart.ChartLayers.Add(columnLayer1)
.UltraChart1.CompositeChart.Series.Add(columnSeries1)
.UltraChart1.CompositeChart.ChartLayers.Add(columnLayer2)
.UltraChart1.CompositeChart.Series.Add(columnSeries2)
.UltraChart1.CompositeChart.ChartLayers.Add(lineLayer)
.UltraChart1.CompositeChart.Series.Add(lineSeries)
.UltraChart1.CompositeChart.ChartLayers.Add(lineLayer1)
.UltraChart1.CompositeChart.Series.Add(lineSeries1)
Dim linechartApp As New
Resources.Appearance.LineChartAppearance
linechartApp =
DirectCast(Me
.UltraChart1.CompositeChart.ChartLayers(2).ChartTypeAppearance, Resources.Appearance.LineChartAppearance)
Dim lineApp As New
Resources.Appearance.LineAppearance
lineApp.IconAppearance.Icon = [Shared].Styles.SymbolIcon.Square
lineApp.IconAppearance.IconSize = [Shared].Styles.SymbolIconSize.Medium
lineApp.Thickness = 0
linechartApp.LineAppearances.Add(lineApp)
linechartApp.NullHandling = [Shared].Styles.NullHandling.DontPlot
Dim linechartApp1 As New
linechartApp1 =
.UltraChart1.CompositeChart.ChartLayers(3).ChartTypeAppearance, Resources.Appearance.LineChartAppearance)
Dim lineApp1 As New
lineApp1.IconAppearance.Icon = [Shared].Styles.SymbolIcon.Circle
lineApp1.IconAppearance.IconSize = [Shared].Styles.SymbolIconSize.Medium
lineApp1.LineStyle.MidPointAnchors =
True
lineApp1.Thickness = 0
linechartApp1.LineAppearances.Add(lineApp1)
linechartApp1.NullHandling = [Shared].Styles.NullHandling.DontPlot
UltraChart1.Tooltips.Format = [Shared].Styles.TooltipStyle.RowColumnPlusDataValue
Can anyone please suggest in this
Thanks in advance
Santosh
Did you try this:
xAxis.MajorGridLines.Visible = true