Hi
Hi Mary,
Yeh that didn't remove the lines. The function I use to create the stacked chart is as follows - I have highlighted in red your line
Private Sub AddAVCBarStackedChart(ByRef sld As SlideEx, ByRef strSQL As String, ByRef strBars As Int16, ByRef strTitle As String, _
ByRef XCoord As Int16, ByRef YCoord As Int16, ByRef Width As Int16, ByRef Height As Int16, ByRef ChartTitle As String, _
ByRef MinValue As Int16, ByRef MaxValue As Int16, ByRef AxisVisible As Boolean, ByRef ShowLegend As String)
' Labels & Colours
' ----------------
Dim strLabel01 As String = Request.QueryString("Lbl01"), ToChartColor01 As String = "#" & Request.QueryString("Col01")
Dim strLabel02 As String = Request.QueryString("Lbl02"), ToChartColor02 As String = "#" & Request.QueryString("Col02")
Dim strLabel03 As String = Request.QueryString("Lbl03"), ToChartColor03 As String = "#" & Request.QueryString("Col03")
Dim strLabel04 As String = Request.QueryString("Lbl04"), ToChartColor04 As String = "#" & Request.QueryString("Col04")
Dim strLabel05 As String = Request.QueryString("Lbl05"), ToChartColor05 As String = "#" & Request.QueryString("Col05")
Dim strLabel06 As String = Request.QueryString("Lbl06"), ToChartColor06 As String = "#" & Request.QueryString("Col06")
Dim strLabel07 As String = Request.QueryString("Lbl07"), ToChartColor07 As String = "#" & Request.QueryString("Col07")
Dim FromChartColor01 As String = PickGradientFromColor(ToChartColor01)
Dim FromChartColor02 As String = PickGradientFromColor(ToChartColor02)
Dim FromChartColor03 As String = PickGradientFromColor(ToChartColor03)
Dim FromChartColor04 As String = PickGradientFromColor(ToChartColor04)
Dim FromChartColor05 As String = PickGradientFromColor(ToChartColor05)
Dim FromChartColor06 As String = PickGradientFromColor(ToChartColor06)
Dim FromChartColor07 As String = PickGradientFromColor(ToChartColor07)
' Sort out Labels
' ---------------
strLabel01 = Replace(strLabel01, "||", "'")
strLabel02 = Replace(strLabel02, "||", "'")
strLabel03 = Replace(strLabel03, "||", "'")
strLabel04 = Replace(strLabel04, "||", "'")
strLabel05 = Replace(strLabel05, "||", "'")
strLabel06 = Replace(strLabel06, "||", "'")
strLabel07 = Replace(strLabel07, "||", "'")
' Create DataSet
' --------------
Dim cf As New CommonFunctions
Dim DS As New DataSet
Dim strRowCount As Int32 = 0
DS = cf.GetDataList(strSQL, "")
strRowCount = DS.Tables(0).Rows.Count
' Add chart with default data
' ----------------------------
Dim chart As ChartEx = sld.Shapes.AddChart(ChartTypeEx.StackedBar, XCoord, YCoord, Width, Height)
' Vertical Axis Controls
' ----------------------
chart.ValueAxis.IsAutomaticMinValue = False
chart.ValueAxis.IsAutomaticMaxValue = False
chart.ValueAxis.MinValue = MinValue
chart.ValueAxis.MaxValue = MaxValue
chart.ValueAxis.IsVisible = AxisVisible
' Setting chart Title = None
' -------------------------
If strTitle = "" Then
chart.ChartTitle.Text.Text = ""
Else
Dim strNewTitle As String = DS.Tables(0).AsEnumerable().Max(Function(a) a("Group"))
chart.ChartTitle.Text.Text = strNewTitle
End If
chart.ChartTitle.Text.CenterText = True
chart.HasTitle = True
chart.ValueAxis.MajorTickMark = TickMarkType.None
chart.CategoryAxis.MajorTickMark = TickMarkType.None
chart.CategoryAxis.IsPlotOrderReversed = True
chart.GapWidth = 35
' Chart Legend
' -------------
chart.HasLegend = False
If Not ShowLegend = "" Then
chart.HasLegend = True
Select Case ShowLegend
Case "Right"
chart.Legend.Position = LegendPositionTypeEx.Right
Case "Bottom"
chart.Legend.Position = LegendPositionTypeEx.Bottom
Case Else
chart.Legend.Position = LegendPositionTypeEx.Bottom
End Select
Dim leg As TextFrameEx = chart.Legend.TextProperties
leg.Paragraphs(0).ParagraphFormat.DefaultPortionFormat.FontHeight = 12
End If
' Format Chart Labels
' -------------------
Dim tfC As TextFrameEx = chart.CategoryAxis.TextProperties
Dim portC As PortionFormatEx = tfC.Paragraphs(0).ParagraphFormat.DefaultPortionFormat
portC.FontHeight = 12
Dim tfV As TextFrameEx = chart.ValueAxis.TextProperties
Dim portV As PortionFormatEx = tfV.Paragraphs(0).ParagraphFormat.DefaultPortionFormat
portV.FontHeight = 12
'Setting the index of chart data sheet
Dim defaultWorksheetIndex As Integer = 0
'Getting the chart data worksheet
Dim fact As ChartDataCellFactory = chart.ChartData.ChartDataCellFactory
'Delete default generated series and categories
chart.ChartData.Series.Clear()
chart.ChartData.Categories.Clear()
'Adding new series
chart.ChartData.Series.Add(fact.GetCell(defaultWorksheetIndex, 0, 1, strLabel01), chart.Type)
chart.ChartData.Series.Add(fact.GetCell(defaultWorksheetIndex, 0, 2, strLabel02), chart.Type)
If strBars >= 3 Then chart.ChartData.Series.Add(fact.GetCell(defaultWorksheetIndex, 0, 3, strLabel03), chart.Type)
If strBars >= 4 Then chart.ChartData.Series.Add(fact.GetCell(defaultWorksheetIndex, 0, 4, strLabel04), chart.Type)
If strBars >= 5 Then chart.ChartData.Series.Add(fact.GetCell(defaultWorksheetIndex, 0, 5, strLabel05), chart.Type)
If strBars >= 6 Then chart.ChartData.Series.Add(fact.GetCell(defaultWorksheetIndex, 0, 6, strLabel06), chart.Type)
If strBars >= 7 Then chart.ChartData.Series.Add(fact.GetCell(defaultWorksheetIndex, 0, 7, strLabel07), chart.Type)
'Take first chart series
Dim series As ChartSeriesEx = chart.ChartData.Series(0)
'Now populating series data
Dim lbl As New DataLabelEx(series)
Try
For seriesNumber As Int16 = 0 To strBars - 1
series = chart.ChartData.Series(seriesNumber)
' Sort out Colours
' ----------------
Dim ToChartColor As String = ""
Dim FromChartColor As String = ""
Select Case seriesNumber
Case 0
ToChartColor = ToChartColor01
FromChartColor = ToChartColor01
Case 1
ToChartColor = ToChartColor02
FromChartColor = ToChartColor02
Case 2
ToChartColor = ToChartColor03
FromChartColor = ToChartColor03
Case 3
ToChartColor = ToChartColor04
FromChartColor = ToChartColor04
Case 4
ToChartColor = ToChartColor05
FromChartColor = ToChartColor05
Case 5
ToChartColor = ToChartColor06
FromChartColor = ToChartColor06
Case 6
ToChartColor = ToChartColor07
FromChartColor = ToChartColor07
End Select
For PointIndex As Int16 = 0 To strRowCount - 1
chart.ChartData.Categories.Add(fact.GetCell(defaultWorksheetIndex, PointIndex + 1, 0, DS.Tables(0).Rows(PointIndex).Item("DataDescription")))
Dim strRowValue As Double = FormatNumber(DS.Tables(0).Rows(PointIndex).Item("Score0" & seriesNumber + 1), 1)
Dim strBaseValue As Double = DS.Tables(0).Rows(PointIndex).Item("UnweightedBase")
If strBaseValue < minBase Then
series.Values.Add(fact.GetCell(defaultWorksheetIndex, PointIndex + 1, seriesNumber + 1, 0))
Else
series.Values.Add(fact.GetCell(defaultWorksheetIndex, PointIndex + 1, seriesNumber + 1, strRowValue))
End If
series.Format.Fill.FillType = FillTypeEx.Gradient
series.Format.Fill.GradientFormat.GradientShape = GradientShapeEx.Linear
series.Format.Fill.GradientFormat.GradientDirection = GradientDirectionEx.FromCenter
series.Format.Fill.GradientFormat.GradientStops.Add(CSng(1.0), ColorTranslator.FromHtml(ToChartColor))
series.Format.Fill.GradientFormat.GradientStops.Add(CSng(0), ColorTranslator.FromHtml(ToChartColor))
' Doesn't do anything???
series.Format.Line.FillFormat.FillType = FillTypeEx.NoFill
' Format Data Labels
' ------------------
lbl = New DataLabelEx(series)
lbl.ShowValue = True
lbl.ShowCategoryName = False
lbl.Id = PointIndex
Dim LabelPortion As New PortionEx()
LabelPortion.PortionFormat.FontHeight = 10
If strBaseValue < minBase Then LabelPortion.Text = strBaseTooLow Else LabelPortion.Text = strRowValue & "%"
lbl.TextFrame.Text = " "
lbl.TextFrame.Paragraphs(0).Portions.Clear()
lbl.TextFrame.Paragraphs(0).Portions.Add(LabelPortion)
lbl.TextFrame.Paragraphs(0).Portions(0).PortionFormat.FillFormat.FillType = FillTypeEx.Solid
lbl.TextFrame.Paragraphs(0).Portions(0).PortionFormat.FillFormat.SolidFillColor.Color = ColorTranslator.FromHtml(TextColour(ToChartColor))
If strRowValue < 0 Then
lbl.Position = LegendDataLabelPositionEx.Center
lbl.Delete = True
Else
lbl.Position = LegendDataLabelPositionEx.Center
End If
series.Labels.Add(lbl)
Next
Next
Catch ex As Exception
End Try
End Sub
Hi Marry,
Hi,
Has this been resolved:
series.Format.Line.FillFormat.FillType = FillTypeEx.NoFill;
Above code is also not working for me.
Hi Pranav,
Hi Pranav,
//Hiding series linesseries.HasSeriesLines = false;
The issues you have found earlier (filed as SLIDESNET-33728) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.