I have writen below code to generate mixed chart with colum and line type charts.
when i run my program i could not able to see column chart.
If i manully set y-axis in secondary axis option by clicking right click under chart options.I could able to see column chart.How to solve this problem.
we are evaluating the aspose.excel product to purchase.
Thanks,
Arun
'Generate the second chart sheet
Dim sheetIndex As Integer = excel.Worksheets.Add(SheetType.Chart)
Dim sheet2 As Worksheet = excel.Worksheets(sheetIndex)
sheet2.Name = "Chart"
Dim chartIndex As Integer = sheet2.Charts.Add(ChartType.Column, 0, 0, 0, 0)
Dim chart As Chart = sheet2.Charts(chartIndex)
chart.Title.Text = "Revenue Distribution"
chart.Title.TextFont.IsBold = True 'Set chart title font
chart.Title.TextFont.Size = 16
'Set series
Dim series As String = "Summary!B2:B" & (ds.Tables(0).Rows.Count + 1)
chart.NSeries.Add(series, True)
chart.NSeries(0).Name = "Revenue"
Dim series1 As String = "Summary!D2:D" & (ds.Tables(0).Rows.Count + 1)
chart.NSeries.Add(series1, True)
chart.NSeries(1).Name = "sales"
chart.NSeries(1).Type = ChartType.Line
chart.NSeries(0).DataLabels.IsValueShown = True
chart.NSeries(1).DataLabels.IsValueShown = True
'Set category
chart.NSeries.CategoryData = "Summary!A2:A" & (ds.Tables(0).Rows.Count + 1)
excel.ChangePalette(Color.FromArgb(255, 255, 200), 53)
chart.PlotArea.Area.ForegroundColor = Color.FromArgb(255, 255, 200)
'Set major grid line color
excel.ChangePalette(Color.FromArgb(121, 117, 200), 54)
chart.MajorGridLines.Color = Color.FromArgb(121, 117, 200)
chart.MajorGridLines.IsVisible = False