Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
MajorGridLines in Composite Chart
posted

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

 

 

 

 

Me.UltraChart1.TitleLeft.FontColor = Color.Black

 

 

Me.UltraChart1.TitleLeft.Font = New Font("Arial", 12.0F, FontStyle.Bold)

 

 

Me.UltraChart1.TitleLeft.HorizontalAlign = StringAlignment.Center

 

 

Dim area As New Resources.Appearance.ChartArea

 

 

Dim xAxis As New Resources.Appearance.AxisItem()

 

 

Dim x2Axis As New Resources.Appearance.AxisItem()

 

 

Dim yAxis As New Resources.Appearance.AxisItem()

 

 

Dim y2Axis As New Resources.Appearance.AxisItem()

 

 

Dim columnLayer1 As New Resources.Appearance.ChartLayerAppearance()

 

 

Dim columnSeries1 As New Resources.Appearance.NumericSeries()

 

 

Dim columnLayer2 As New Resources.Appearance.ChartLayerAppearance()

 

 

Dim columnSeries2 As New Resources.Appearance.NumericSeries()

 

 

Dim lineLayer As New Resources.Appearance.ChartLayerAppearance()

 

 

Dim lineSeries As New Resources.Appearance.NumericSeries()

 

 

Dim lineLayer1 As New Resources.Appearance.ChartLayerAppearance()

 

 

Dim lineSeries1 As New Resources.Appearance.NumericSeries()

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 =

"<DATA_VALUE:#>"

y2Axis.Visible = F

alse

 

 

 

Dim columnApp As Resources.Appearance.ColumnChartAppearance

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 =

"Period"

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

columnApp =

 

DirectCast

(columnLayer2.ChartTypeAppearance, Resources.Appearance.ColumnChartAppearance)

columnApp.ColumnSpacing = 1

lineSeries.Data.DataSource = Graphdt

lineSeries.Data.LabelColumn =

 

"Period"

lineSeries.Data.ValueColumn =

 

 

"SumOfHL_DP_GPS"

 

lineSeries.PEs.Add(

 

New

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 =

 

"Period"

lineSeries1.Data.ValueColumn =

 

 

"SumOfNetDispatch_GPS"

 

lineSeries1.PEs.Add(

 

New

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)

 

 

Me

.UltraChart1.CompositeChart.ChartAreas.Add(area)

 

 

Me

.UltraChart1.CompositeChart.ChartLayers.Add(columnLayer1)

 

 

Me

.UltraChart1.CompositeChart.Series.Add(columnSeries1)

 

 

Me

.UltraChart1.CompositeChart.ChartLayers.Add(columnLayer2)

 

 

Me

.UltraChart1.CompositeChart.Series.Add(columnSeries2)

 

 

Me

.UltraChart1.CompositeChart.ChartLayers.Add(lineLayer)

 

 

Me

.UltraChart1.CompositeChart.Series.Add(lineSeries)

 

 

Me

.UltraChart1.CompositeChart.ChartLayers.Add(lineLayer1)

 

 

Me

.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

Resources.Appearance.LineChartAppearance

linechartApp1 =

 

DirectCast(Me

.UltraChart1.CompositeChart.ChartLayers(3).ChartTypeAppearance, Resources.Appearance.LineChartAppearance)

 

 

Dim lineApp1 As New

Resources.Appearance.LineAppearance

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