We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How do I remove the border from a chart object (which is exported as a gif)?

Hello,<br><br>I have been looking through your documentation and have searched for a method that will allow me to turn borders to off for charts I am producing and exporting as gif images, and have not been able to locate a method to do such. Below is an example of the code I am using to create the chart. I have many such charts I am producing, but I would imagine the method in which to not produce a border would be the same??<br><br>        Dim chartSpace As New ChartSpaceClass 'contains the chart<br>        Dim chart As ChChart = chartSpace.Charts.Add(0) 'add a new chart<br>        Dim strSeriesName As String = "File Age by Last Modified Date"<br>        Dim strCategories(6) As Object<br>        Dim strValues(6) As Object<br>        Dim i As Integer<br><br>        'set the category names and values to corresponding cells<br>        'NOTE category names include percentages so they can be displayed in the legend<br>        For i = 2 To 7<br>            strCategories(i - 2) = spread.Range("A" & i).Value<br>            strValues(i - 2) = spread.Range("C" & i).Value<br>        Next i<br><br>        'set chart properties<br>        With chart<br>            .HasTitle = False<br>            .Type = ChartChartTypeEnum.chChartTypePie3D<br>            .SeriesCollection.Add(0)<br>            .SeriesCollection(0).SetData(ChartDimensionsEnum.chDimSeriesNames, CType(ChartSpecialDataSourcesEnum.chDataLiteral, Integer), strSeriesName)<br>            .SeriesCollection(0).SetData(ChartDimensionsEnum.chDimCategories, CType(ChartSpecialDataSourcesEnum.chDataLiteral, Integer), strCategories)<br>            .SeriesCollection(0).SetData(ChartDimensionsEnum.chDimValues, CType(ChartSpecialDataSourcesEnum.chDataLiteral, Integer), strValues)<br>            .HasLegend = True<br>            .SeriesCollection(0).DataLabelsCollection.Add()<br>            .SeriesCollection(0).DataLabelsCollection(0).HasPercentage = True<br>            .SeriesCollection(0).DataLabelsCollection(0).HasValue = False<br><br><br>        End With<br><br>        'save the chart as a gif image<br>        chartSpace.ExportPicture(input_path & "LastModSumChart.gif", "gif", 600, 400)<br><br>


Do you mean that remove the border of the chart area? See following codes:

chart.ChartArea.Border.IsVisible = false;

If it does not fit your need, please post your template file and the changed file(which is removed the border). We will check it soon.