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
Series Labels for Column Line chart and legend
posted

 

Hi .

I hzve the requirement for the above chart, so i opted for column line chart but i am not able to display the series labels and the legend as shown(not sure whether this is possible) please help me on this

Below is the code I have written for the same

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

UltraChart1.ChartType = ChartType.ColumnLineChart

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

With UltraChart1.ColumnLineChart.ColumnData

.DataSource = Graphdt

.IncludeColumn(

 

"Month_a", False

)

.IncludeColumn(

 

"MonthlyRIG", False

)

.IncludeColumn(

 

"RollingRIG", False

)

.SwapRowsAndColumns =

 

False

.DataBind()

 

 

End With

 

 

With UltraChart1.ColumnLineChart.LineData

.DataSource = Graphdt

.IncludeColumn(

 

"Month_a", False

)

.IncludeColumn(

 

"ActualPlan_LY", False

)

.IncludeColumn(

 

"ActualPlan_CY", False

)

.IncludeColumn(

 

"FCDP_NY", False

)

.SwapRowsAndColumns =

 

True

.DataBind()

 

 

End With

 

UltraChart1.DataBind()

UltraChart1.Axis.X.Labels.Visible =

 

False

UltraChart1.Axis.X.Labels.SeriesLabels.Visible =

 

True

UltraChart1.Axis.X.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.VerticalLeftFacing

UltraChart1.Axis.X.Extent = 150

UltraChart1.Axis.X2.Visible =

 

False

UltraChart1.Axis.Y2.RangeType = AxisRangeType.Custom

UltraChart1.Axis.Y2.RangeMin = -(Math.Abs(MinMonthlyRIG) - (Math.Abs(MinMonthlyRIG)

 

Mod

5) + 5)

UltraChart1.Axis.Y2.RangeMax = Math.Abs(MaxMonthlyRIG) - (Math.Abs(MaxMonthlyRIG)

 

Mod

5) + 5

UltraChart1.Axis.Y2.TickmarkStyle = AxisTickStyle.DataInterval

UltraChart1.Axis.Y2.TickmarkInterval = 5

UltraChart1.Axis.Y2.MajorGridLines.Visible =

False

 

UltraChart1.Axis.Y2.Extent = 100

UltraChart1.Axis.Y.RangeType = AxisRangeType.Custom

UltraChart1.Axis.Y.RangeMin = 0

UltraChart1.Axis.Y.RangeMax = MaxYAxisRange

UltraChart1.Axis.Y.TickmarkStyle = AxisTickStyle.DataInterval

UltraChart1.Axis.Y.TickmarkInterval = 20

UltraChart1.Axis.Y.Extent = 100

UltraChart1.ColumnLineChart.Column.SeriesSpacing = 1

 

 

With UltraChart1.ColorModel

.ModelStyle = ColorModels.CustomSkin

.Skin.PEs.Add(

New PaintElement(Color.Maroon))

.Skin.PEs.Add(

New PaintElement(Color.LightPink))

.Skin.PEs.Add(

New PaintElement(Color.LightGreen))

.Skin.ApplyRowWise =

False

 

 

 

End With

UltraChart1.Visible =

True

 

Code is written in VB.NET