Charts & bubbles

Hi,

Some days ago I got a request to set up a chart that contains additional information bubbles. Is it possible to implement this feature with Aspose.Cells? It is necessary to convert the excel document into a pdf file.

Thanks in advance

Erik

Hi,

Do you need to render those auto-shapes on the chart to be rendered in the output pdf format? Well, I have logged it into our issue tracking system with an issue id: CELLSNET-18023.

We will look into it in our future versions.

Thank you.

Hi,

Yes, I need to render those shapes in output pdf format. It is already possible to draw up the needed shapes in excel? Can you give me an ETA of the new feature?

Thanks in advance

Erik

Hi Erik,

Hopefully, we can provide the fixed version before the end of this week.

Thank you.

Hi,

Please try the attached version.

We have solved the column bar issues. The shapes on the chart are not
supported as we mentioned. We did add it to our plan and hopefully we can provide a supported version before the end of October this year.



Thank you.

The issues you have found earlier (filed as 18023) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi,

How can I perform the following two tasks in a chart of type “ColumnStacked”

  • Make one data series completely invisible
  • Assign different colors to different data points of a data series

Thanks in advance

Erik

Hi,

1) Could you create a sample stacked column chart in MS Excel manually with one invisible series and post it here, we will check it and let you know how to make the series hidden.

2) Please see the following sample code for your need.

Workbook wb = new Workbook();
wb.Worksheets.Clear();
//Array of cell names
string[] cellsName = new string[]
{
“A1”, “A2”, “A3”, “A4”,
“B1”, “B2”, “B3”, “B4”,
“C1”, “C2”, “C3”, “C4”,
“D1”, “D2”, “D3”, “D4”,
“E1”, “E2”, “E3”, “E4”
};
//Array of cell data
int[] cellsValue = new int[]
{
67,86,68,91,
44,64,89,48,
46,97,78,60,
43,29,69,26,
24,40,38,25
};
//Add a new worksheet to populate cells with data
int dataSheetIdx = wb.Worksheets.Add();
Worksheet dataSheet = wb.Worksheets[dataSheetIdx];
string sheetName = “DataSheet”;
dataSheet.Name = sheetName;
//Populate DataSheet with data
for (int i = 0; i < cellsName.Length; i++)
{
string cellName = cellsName[i];
int cellValue = cellsValue[i];
dataSheet.Cells[cellName].PutValue(cellValue);
}
//Add a chart sheet
int chartSheetIdx = wb.Worksheets.Add(SheetType.Chart);
Worksheet chartSheet = wb.Worksheets[chartSheetIdx];
chartSheet.Name = “ChartSheet”;
//Add a chart in ChartSheet with data series from DataSheet+
int chartIdx = chartSheet.Charts.Add(ChartType.ColumnStacked, 0, 0, 20, 12);
Chart chart = chartSheet.Charts[chartIdx];
chart.NSeries.Add(sheetName + “!A1:E1”, false);

chart.NSeries.Add(sheetName + “!A2:E2”, false);
chart.NSeries.Add(sheetName + “!A3:E3”, false);
chart.NSeries.Add(sheetName + “!A4:E4”, false);


//Apply some sample Formattings…

//Set Properties of CategoryAxis labels.
chart.CategoryAxis.TickLabels.Font.Size = 8;
chart.CategoryAxis.TickLabels.Font.Name = “Tahoma”;

//Set Properties of CategoryAxis labels.
chart.ValueAxis.TickLabels.Font.Size = 8;
chart.ValueAxis.TickLabels.Font.Name = “Arial”;

//Hide the second series.
// chart.NSeries[1].HasSeriesLines = false;//.SeriesLines.IsVisible = false;

//Set colors for the first and second and third data points in the series.
Series series = chart.NSeries[0];
series.Points[0].Area.ForegroundColor = System.Drawing.Color.Red;
series.Points[1].Area.ForegroundColor = System.Drawing.Color.Green;
series.Points[2].Area.ForegroundColor = System.Drawing.Color.Blue;




chart.ChartArea.Border.IsVisible = false;
chart.PlotArea.Border.IsVisible = false;

wb.Save(“e:\test\collsstacked2.xls”);

Thank you.

Hi,

Please consider the attachment provided at the start of this thread. There you can find a chart that contains two data rows.

Regards

Erik

Hi Erik,

I think you may delete the series using the code e.g
//Exclude the second series.
chart.NSeries.RemoveAt(1);

Thank you.

Hi,

I’m afraid it is impossible to delete these data rows. If I delete the row, I’m going to lose the desired effect of the StockOpenHighLowClose chart with different colors for Up-bars. If you take a look at the properties of the data row in Excel, there you can find an option “No color” (see attachment). Is it possible to set this option in Aspose too?

Erik

Hy, I think you can use the following code segment for your need.

For example:

series.Area.Formatting = Aspose.Cells.Charts.FormattingType.None;
series.Line.IsVisible = false;
series.MarkerStyle = Aspose.Cells.Charts.ChartMarkerType.None;

Thank you.

Hi,

Is the issue 18023 already implemented? Can I add shapes to charts and render them to a PDF output? You stated earlier that October 2010 could be a possible ETA.

Thanks in advance,

Erik

Hi,

We will update you soon regarding the issue(add shapes to charts and render them to a pdf output) soon.

Thank you.

Hi.

I am afraid, the feature is not implemented yet. We will let you know if we can provide you exact eta on when it will be supported.

Sorry for any inconvenience caused!