Hello,
Greetings.
I got an assignment to display a chart which has a multiple X axes. It will show different data as pass it through a dataset. I tried to add sub-axes at bottom and but it is not showing attached labels on it. My first bottom (X) axis is perfect and I want to add more X axis to this chart. See pic.
Need to show multiple X axis with different data
-
- Newbie
- Posts: 2
- Joined: Thu Jan 27, 2022 12:00 am
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Need to show multiple X axis with different data
Hello,
apologies for the delay in response to this message.
There are several questions related to 'multiple axes' and 'multiple custom' which may be of help; there is also the .NET Framework Windows Forms sample which has a couple of demos on custom axes: If you still require help, could you please consider producing a Minimal, Reproducible Example we can run here?
apologies for the delay in response to this message.
There are several questions related to 'multiple axes' and 'multiple custom' which may be of help; there is also the .NET Framework Windows Forms sample which has a couple of demos on custom axes: If you still require help, could you please consider producing a Minimal, Reproducible Example we can run here?
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 2
- Joined: Thu Jan 27, 2022 12:00 am
Re: Need to show multiple X axis with different data
Thank you for your response. Tried example shared by you but not getting as per our requirement. pls see below image.
'line2
Y2 = (From p In dtMasterSales.Tables(1).AsEnumerable() Select p.Field(Of Single)(sTagColNm)).ToArray()
With line2
.Color = Drawing.Color.Red
.Title = "PIC101 (bar)"
.VertAxis = "Left"
.Add(dateIdx2, Y2)
.Labels = sLabels2
.XValues.DateTime = True
.Legend.Visible = False
.Visible = True
End With
Line2Min = 0
Line2Max = 3
line2.CustomVertAxis = AxsLine2
With AxsLine2
.AxisPen.Visible = True
.Increment = 1
.AxisPen.Color = line2.Color
.SetMinMax(Line2Min, Line2Max)
.Automatic = False
.PositionUnits = Steema.TeeChart.PositionUnits.Percent
.RelativePosition = 15
.Visible = True
.Grid.Visible = False
End With
tChart1.Axes.Custom.Add(AxsLine2)
tChart1(1).CustomVertAxis = AxsLine2
'------- Bottom axis code
Dim AxsLine4 As New Steema.TeeChart.Axis(True, False, tChart1.Chart)
With AxsLine4
.AxisPen.Visible = True
.Increment = 0
.AxisPen.Color = line2.Color
.Automatic = False
.PositionUnits = Steema.TeeChart.PositionUnits.Percent
.RelativePosition = 15
.Visible = True
.StartPosition = AxsLine2.RelativePosition
.EndPosition = 100 '- AxsLine2.RelativePosition
.Grid.Visible = False
.Labels.MultiLine = False
.Labels.Angle = 20
End With
tChart1.Axes.Custom.Add(AxsLine4)
tChart1(1).CustomHorizAxis = AxsLine4
line2.CustomHorizAxis = AxsLine4
line2.CustomHorizAxis.Visible = True
my code:'line2
Y2 = (From p In dtMasterSales.Tables(1).AsEnumerable() Select p.Field(Of Single)(sTagColNm)).ToArray()
With line2
.Color = Drawing.Color.Red
.Title = "PIC101 (bar)"
.VertAxis = "Left"
.Add(dateIdx2, Y2)
.Labels = sLabels2
.XValues.DateTime = True
.Legend.Visible = False
.Visible = True
End With
Line2Min = 0
Line2Max = 3
line2.CustomVertAxis = AxsLine2
With AxsLine2
.AxisPen.Visible = True
.Increment = 1
.AxisPen.Color = line2.Color
.SetMinMax(Line2Min, Line2Max)
.Automatic = False
.PositionUnits = Steema.TeeChart.PositionUnits.Percent
.RelativePosition = 15
.Visible = True
.Grid.Visible = False
End With
tChart1.Axes.Custom.Add(AxsLine2)
tChart1(1).CustomVertAxis = AxsLine2
'------- Bottom axis code
Dim AxsLine4 As New Steema.TeeChart.Axis(True, False, tChart1.Chart)
With AxsLine4
.AxisPen.Visible = True
.Increment = 0
.AxisPen.Color = line2.Color
.Automatic = False
.PositionUnits = Steema.TeeChart.PositionUnits.Percent
.RelativePosition = 15
.Visible = True
.StartPosition = AxsLine2.RelativePosition
.EndPosition = 100 '- AxsLine2.RelativePosition
.Grid.Visible = False
.Labels.MultiLine = False
.Labels.Angle = 20
End With
tChart1.Axes.Custom.Add(AxsLine4)
tChart1(1).CustomHorizAxis = AxsLine4
line2.CustomHorizAxis = AxsLine4
line2.CustomHorizAxis.Visible = True
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Need to show multiple X axis with different data
Hello,
please find attached a project demonstrating the use of multiple X axes, the code of which comes from one of the forum posts I suggested you to look at. Can you please modify this project to demonstrate the problem you are experiencing with multiple X axes so that I can reproduce it here?
please find attached a project demonstrating the use of multiple X axes, the code of which comes from one of the forum posts I suggested you to look at. Can you please modify this project to demonstrate the problem you are experiencing with multiple X axes so that I can reproduce it here?
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |