I would like to see a Pie view in my Chart, but the chart only shows the Legends at the top of the page, the space below it is empty. When I switch to let it show a Bar view, everything shows correctly. Why can’t I see a Pie view?
The Chart object property in the Inspector is set to Pie. This is the code for creating the Chart:
// Set the title of the chart
StepWords.Title = winmain.ListBoxStories.CellValueAt(winmain.ListBoxStories.SelectedRowIndex,0)
me.TitleFontName = "Times New Roman"
me.TitleFontSize = 24
me.TitleColor = &c63930000
me.LegendColor = &c63930000
me.LegendFontSize = 18
me.LegendFontName = "Times New Roman"
// Define the 12 steps of the Hero's Journey and add labels for each story step with percentage
Dim heroJourneySteps() As String = Array("Home", "Challenge", "Mentor", "Edge", "No Return", "Antag. Help.", "Antag. Test", "Despair", "Chain Break", "Fight Ready", "Confrontation", "Resolution")
// Add labels for each story step
For nn As Integer = 0 To heroJourneySteps.Ubound
StepWords.AddLabel(heroJourneySteps(nn))
Next
/// Set the mode of the chart to pie
StepWords.mode = DesktopChart.Modes.Pie
// Create a new dataset with the word count for each story step and add it to your chart:
Var Steps As New ChartLinearDataset("Word Count", Color.Red, True, storyStepWordCount)
// Add the dataset to the chart
StepWords.AddDataset (Steps)