BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Thanks, that is clear. You understood my requirement.
Do you think either of these alternatives is possible?
a) place a text box over the graph with a value axis legend:
or b) remove the value axis altogether
Pieter
chart.PrimaryValueAxis.TickLabelPosition = OfficeTickLabelPosition.TickLabelPosition_None; |
Hello,
Has this changed? Is it now possible to add text labels rather than numeric in the value axis in the radar chart?
Thanks Pieter
WordDocument document = new WordDocument();
document.EnsureMinimal();
//Adds chart to the slide with position and size
WChart chart = document.LastParagraph.AppendChart(500, 300);
chart.ChartType = OfficeChartType.Radar;
//Assign data
chart.DataRange = chart.ChartData[1, 1, 6, 2];
chart.IsSeriesInRows = false;
//Set data to the chart RowIndex, columnIndex and data
chart.ChartData.SetValue(1, 1, "Food");
chart.ChartData.SetValue(1, 2, "Count");
chart.ChartData.SetValue(2, 1, "Fruits");
chart.ChartData.SetValue(3, 1, "Vegitables");
chart.ChartData.SetValue(4, 1, "Dairy");
chart.ChartData.SetValue(5, 1, "Proptein");
chart.ChartData.SetValue(6, 1, "Grains");
chart.ChartData.SetValue(1, 2, "Percentage");
chart.ChartData.SetValue(2, 2, "36");
chart.ChartData.SetValue(3, 2, "14");
chart.ChartData.SetValue(4, 2, "13");
chart.ChartData.SetValue(5, 2, "28");
chart.ChartData.SetValue(6, 2, "9");
//Apply chart elements
//Set chart title
chart.ChartTitle = "Radar Chart";
//Set legend
chart.HasLegend = false;
//Set Datalabels
IOfficeChartSerie serie = chart.Series[0];
serie.DataPoints.DefaultDataPoint.DataLabels.IsValue = true;
//Add textbox
IWTextBox textbox = document.LastParagraph.AppendTextBox(120, 100);
textbox.TextBoxFormat.TextWrappingStyle = TextWrappingStyle.InFrontOfText;
//Sets horizontal and vertical position for textbox
textbox.TextBoxFormat.HorizontalPosition = 370;
textbox.TextBoxFormat.VerticalPosition = 160;
//Adding text to textbox
IWParagraph paragraph = textbox.TextBoxBody.AddParagraph();
IWTextRange textRange = paragraph.AppendText("5 - Very low");
textRange.CharacterFormat.FontName = "Calibri";
textRange.CharacterFormat.FontSize = 11;
paragraph = textbox.TextBoxBody.AddParagraph();
textRange = paragraph.AppendText("10 - Low");
textRange.CharacterFormat.FontName = "Calibri";
textRange.CharacterFormat.FontSize = 11;
paragraph = textbox.TextBoxBody.AddParagraph();
textRange = paragraph.AppendText("15 - High");
textRange.CharacterFormat.FontName = "Calibri";
textRange.CharacterFormat.FontSize = 11;
paragraph = textbox.TextBoxBody.AddParagraph();
textRange = paragraph.AppendText("40 - Very High");
textRange.CharacterFormat.FontName = "Calibri";
textRange.CharacterFormat.FontSize = 11;
document.Save("Sample.docx"); |