Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Wed Oct 20, 2021 11:04 am

Hi Team

Please let me know how to create the spider chart in the slide as showed in the file.

Thanks,

pr20080798
 
Posts: 146
Joined: Wed Jan 20, 2021 1:15 pm

Thu Oct 21, 2021 3:30 am

Hello Wipro,

Thanks for your inquiry.
Please refer to the following code to create a spider chart.
Code: Select all
 Presentation ppt = new Presentation();
            ISlide slide = ppt.Slides[0];
            RectangleF rect = new RectangleF(90, 100, 550, 320);
            Spire.Presentation.Charts.IChart chart = slide.Shapes.AppendChart(ChartType.Radar, rect, false);
            chart.ChartTitle.TextProperties.Text = "Spider Chart";
            chart.ChartTitle.TextProperties.IsCentered = true;
            chart.ChartTitle.Height = 20;
            chart.HasTitle = true;
            chart.ChartData[1, 0].Value = "A";
            chart.ChartData[2, 0].Value = "B";
            chart.ChartData[3, 0].Value = "C";
            chart.ChartData[4, 0].Value = "D";
            chart.ChartData[5, 0].Value = "E";
            chart.ChartData[6, 0].Value = "F";
            chart.ChartData[7, 0].Value = "G";
            chart.ChartData[8, 0].Value = "H";
            chart.ChartData[9, 0].Value = "I";
            chart.ChartData[10, 0].Value = "J";
            chart.ChartData[11, 0].Value = "K";
            chart.ChartData[12, 0].Value = "L";
            chart.ChartData[13, 0].Value = "M";
            chart.ChartData[14, 0].Value = "N";
            chart.ChartData[15, 0].Value = "O";
            chart.ChartData[16, 0].Value = "P";
            chart.ChartData[17, 0].Value = "Q";
            chart.ChartData[18, 0].Value = "R";
            chart.ChartData[19, 0].Value = "S";
            chart.ChartData[20, 0].Value = "T";
            chart.ChartData[21, 0].Value = "U";

            chart.ChartData[1, 1].Value = 3;
            chart.ChartData[2, 1].Value = 2.5;
            chart.ChartData[3, 1].Value = 2.6;
            chart.ChartData[4, 1].Value = 3;
            chart.ChartData[5, 1].Value = 2;
            chart.ChartData[6, 1].Value = 1.5;
            chart.ChartData[7, 1].Value = 2.8;
            chart.ChartData[8, 1].Value = 3;
            chart.ChartData[9, 1].Value = 2.5;
            chart.ChartData[10, 1].Value = 2.6;
            chart.ChartData[11, 1].Value = 3;
            chart.ChartData[12, 1].Value = 2;
            chart.ChartData[13, 1].Value = 2.5;
            chart.ChartData[14, 1].Value = 3;
            chart.ChartData[15, 1].Value = 3;
            chart.ChartData[16, 1].Value = 2.5;
            chart.ChartData[17, 1].Value = 2.6;
            chart.ChartData[18, 1].Value = 3;
            chart.ChartData[19, 1].Value = 3;
            chart.ChartData[20, 1].Value = 2.5;
            chart.ChartData[21, 1].Value = 3;

            chart.Series.SeriesLabel = chart.ChartData["B1", "B1"];
            chart.Categories.CategoryLabels = chart.ChartData["A2", "A22"];
            chart.Series[0].Values = chart.ChartData["B2", "B22"];
            chart.Series[0].Line.FillType = FillFormatType.Solid;
            chart.Series[0].Line.SolidFillColor.Color = Color.CadetBlue;
            chart.ChartLegend.DeleteEntry(0);

            ppt.SaveToFile("SpiderChart.pptx",Spire.Presentation.FileFormat.Pptx2013);


Please feel free to contact us if you have any questions.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Fri Oct 22, 2021 8:24 am

Dear Wipro,

Greetings from E-iceblue!
Does the code work for you?
Looking forward to your feedback,

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Sun Oct 24, 2021 5:17 am

Hi Team,

Thank you for your response.

Unfortunately this code is not working for me.

pr20080798
 
Posts: 146
Joined: Wed Jan 20, 2021 1:15 pm

Mon Oct 25, 2021 1:35 am

Dear Wipro,

I'm sorry to hear it doesn't work for you. Could you please provide me with your PPT file with the expected spider chart ? I will do a demo for you.

Thanks for your assistance in advance.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Mon Oct 25, 2021 4:22 am

Hi Team

Thank you

I have attached expected spider chart image.

pr20080798
 
Posts: 146
Joined: Wed Jan 20, 2021 1:15 pm

Mon Oct 25, 2021 6:57 am

Dear Wipro,

Thanks for your response.
You send the same spider chart as you did the first time. I'm not sure where in my code doesn't guide you to create your own spider chart? What problems are you currently experiencing in the creation process? Please tell me your problems in details so that I provide the effective solution. Thanks.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Mon Oct 25, 2021 10:12 am

Hi Team

Now this code is working.

Thank you for the solution.
Last edited by pr20080798 on Tue Oct 26, 2021 1:26 am, edited 1 time in total.

pr20080798
 
Posts: 146
Joined: Wed Jan 20, 2021 1:15 pm

Tue Oct 26, 2021 1:12 am

Dear Wipro,

Glad to hear that it works now.
Feel free to contact us if any questions.

Wish you all the best!

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Presentation