I'm trying to plot a 2nd Y axis with the associated scale on the right of the graph. When I plot the 2nd value though, it seems to be using the scale on the left. What am I doing wrong here? You can see from the attached graph snapshot that the plotting isn't what I'd expect.
Dim lineMonthlyProfits As New LineSeriesDim lineTotalProfits As New LineSeriesDim yAxisTotalProfits As New AxisYDo While ChartingMonth < Now() GrossProfit = 0 : Fees = 0 'Code here that pulls values from db TotalProfit += GrossProfit - Fees lineMonthlyProfits.SeriesItems.Add(CInt(GrossProfit - Fees)) lineTotalProfits.SeriesItems.Add(Int(TotalProfit)) chartMonthlyProfits.PlotArea.XAxis.Items.Add(CStr(Month(ChartingMonth)) & "/" & Right(CStr(Year(ChartingMonth)), 2)) ChartingMonth = DateAdd(DateInterval.Month, 1, ChartingMonth)LooplineMonthlyProfits.Name = "Monthly Profit"lineMonthlyProfits.LabelsAppearance.DataFormatString = "{0:c0}"lineTotalProfits.LabelsAppearance.DataFormatString = "{0:c0}"chartMonthlyProfits.PlotArea.Series.Add(lineMonthlyProfits)chartMonthlyProfits.PlotArea.YAxis.MaxValue = 20000 'Not needed but in place for testing purposesyAxisTotalProfits.Name = "Total Profits"chartMonthlyProfits.PlotArea.AdditionalYAxes.Add(yAxisTotalProfits)chartMonthlyProfits.PlotArea.XAxis.AxisCrossingPoints.Add(0)chartMonthlyProfits.PlotArea.XAxis.AxisCrossingPoints.Add(lineTotalProfits.SeriesItems.Count)lineTotalProfits.Name = yAxisTotalProfits.NamechartMonthlyProfits.PlotArea.Series.Add(lineTotalProfits)chartMonthlyProfits.PlotArea.YAxis.LabelsAppearance.DataFormatString = "{0:c0}"chartMonthlyProfits.PlotArea.YAxis.MinorGridLines.Visible = FalsechartMonthlyProfits.PlotArea.XAxis.MinorGridLines.Visible = FalsechartMonthlyProfits.PlotArea.XAxis.MajorGridLines.Visible = FalsechartMonthlyProfits.Legend.Appearance.Visible = False