Custome Chart for Radar Graphs

Hi,

I saw in the documentation, that combination of radar charts is not yet supported. I'm looking for the possibility to use different series, for which 1 is a RadarFilled type, whereas the others are simple Radar.

I use .net; the result was the last selected type for all series
Following gives the sample code:

for (int idx = 0; idx < evdList.Count + 1; idx++)
{
colLetter = CommonProcs.ConvertIndexRowToLetter(idx + 1);
int currIdx = chart.NSeries.Add("Samenvatting!" + colLetter + ((int)(competenceStartRow + 1)).ToString() + ":" + colLetter + ((int)(competenceRowS2 + 1)).ToString(), true);
if (idx == 0)
{
chart.NSeries[currIdx].Type = ChartType..RadarFilled;
chart.NSeries[currIdx].Area.FillFormat = Color.Red;
}
else
{
chart.NSeries[currIdx].Type = ChartType.RadarWithDataMarkers;
}
}

Is there a planning when this would be available?

Thanks for your support.

Hi,

We will certainly fix this issue, but now, please try the following sample code for your need:

if (idx == 0)
{
chart.NSeries[currIdx].Type = ChartType.RadarFilled;
chart.NSeries[currIdx].Area.ForegroundColor = System.Drawing.Color.Red;
}
else
{
chart.NSeries[currIdx].Type = ChartType.RadarFilled;
chart.NSeries[currIdx].Area.Formatting = FormattingType.None;
chart.NSeries[currIdx].MarkerStyle = ChartMarkerType.Automatic;
}



Thank you.

p { margin: 0pt; font-family: Arial,Verdana,Tahoma; font-size: 11pt; } table { margin: 0pt; font-family: Arial,Verdana,Tahoma; font-size: 11pt; } .footer { color:Gray; font-size: 11px; text-align: center; } .back1 { background-color: whitesmoke; } .back2 { background-color: #f1f5e1; } .back3 { background-color: cornsilk; }

body {
font-size: 11pt;
}

Hi,

Well, after closely checking this issue again, we find RadarFilled and RadarWithDataMarkers cannot exist in a chart together in MS Excel either. Aspose.Cells works the same way as MS Excel, so it's not an issue by any means. Please check it in MS Excel manually for confirmation, if you find something different, kindly show your template file with details.


Thank you.

Hi,

I tried the code, but it doesn't work. None of the series are Radarfilled (meaning that the area is filled).

Concerning the second post, I attached the Excel file. In the last sheet the radar chart is displayed with 3 series. 2 of them are RadarWithDataMarkers, and 1 with Radarfilled, giving the desired effect.

Should I use something else than the ChartType to get this result?

Thanks for your support.

Hi,

Thanks for providing us the template excel file containing your chart.

We will look into it and get back to you soon.

Thank you.

Hi,

Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells and refer the following sample code as per your requirement:

Workbook workbook = new Workbook();

workbook.Open(@"F:\FileTemp\example.xls");

workbook.Worksheets.Add("Radar");

Charts charts = workbook.Worksheets["Radar"].Charts;

int index = charts.Add(ChartType.RadarFilled, 0, 0, 40, 16);

Chart chart = charts[index];

chart.Legend.Position = LegendPositionType.Bottom;

chart.NSeries.Add("=Samenvatting!B9:D23", true);

chart.SecondValueAxis.IsVisible = true;

chart.SecondCategoryAxis.IsVisible = true;

chart.NSeries.CategoryData = "=Samenvatting!$A$9:$A$23";

chart.NSeries.SecondCatergoryData = "=Samenvatting!$A$9:$A$23";

//you have to plot some series to the second axis first.

//otherwise f you directly change the series type as RadarWithDataMarkers,

//the all series's type will be RadarWithDataMarkers. It works as MS Excel.

for (int currIdx = 1; currIdx < 3; currIdx++)

{

chart.NSeries[currIdx].PlotOnSecondAxis = true;

}

for (int currIdx = 0; currIdx < 3; currIdx++)

{

if (currIdx == 0)

{

chart.NSeries[currIdx].HasRadarAxisLabels = false;

chart.NSeries[currIdx].Area.ForegroundColor = System.Drawing.Color.Red;

}

else

{

chart.NSeries[currIdx].Type = ChartType.RadarWithDataMarkers;

}

}

workbook.Save(@"F:\FileTemp\dest.xls");

Thank You & Best Regards,

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


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

Hi,

sorry for the late response. It works fine, thanks !

Stefaan