Hello Telerik,
Please see this code here:.
01.
Dim
HBH_Chart
As
New
RadHtmlChart
02.
HBH_Chart.ID =
"HBH_Chart"
03.
HBH_Chart.Width = Unit.Pixel(500)
04.
HBH_Chart.Height = Unit.Pixel(500)
05.
HBH_Chart.Legend.Appearance.Position = HtmlChart.ChartLegendPosition.Right
06.
07.
Dim
HBHSeries
As
New
PieSeries
08.
HBHSeries.Name =
"HBH1"
09.
HBHSeries.TooltipsAppearance.DataFormatString =
"{0}"
10.
HBHSeries.LabelsAppearance.Visible =
True
11.
12.
For
Each
row
As
DataRow
In
dataSet.Rows
13.
Dim
item
As
New
SeriesItem
14.
item.YValue = row.Field(Of
Integer
)(
"AantalClienten"
)
15.
item.Name = row.Field(Of
String
)(
"Naam"
)
16.
item.BackgroundColor = System.Drawing.ColorTranslator.FromHtml(row.Field(Of
String
)(
"Kleur"
))
17.
Next
18.
19.
HBH_Chart.PlotArea.Series.Clear()
20.
HBH_Chart.PlotArea.Series.Add(HBHSeries)
21.
HBH_Chart.PlotArea.XAxis.DataLabelsField =
"Naam"
22.
HBH_Chart.PlotArea.YAxis.LabelsAppearance.DataFormatString =
"{0}"
23.
24.
HtmlChartHolder.Controls.Clear()
25.
HtmlChartHolder.Controls.Add(HBH_Chart)
I try to create a PieChart dynamically. But the only thing that I see is that it takes up it's space in the page (i.e. the placeholder is filled). But the actual chart is not visible. It's see as a white rectangle. What am I missing here?
Thanks a lot for your answer,
Best regards,
Francois