or
Private _chart As New RadChart |
Private Sub PrepareChart() |
Dim radChart As New GridToleranceChart |
Me._chart = radChart.chart |
Me._chart.SkinsOverrideStyles = False |
End Sub |
Private Sub grid_CellFormatting(ByVal sender As Object, _ |
ByVal e As CellFormattingEventArgs) _ |
Handles grid.CellFormatting |
Dim column As GridViewDataColumn = TryCast(e.CellElement.ColumnInfo, GridViewImageColumn) |
If column IsNot Nothing AndAlso StrComp(column.FieldName, _ |
Constants.DefaultToleranceColumnNames.TolPercentChart, CompareMethod.Text) = 0 Then |
If e.CellElement.RowInfo.Tag Is Nothing Then |
Me._chart.Series.Clear() |
column.Width = 300 |
column.AllowResize = False |
e.CellElement.RowElement.RowInfo.Height = 60 |
Dim series As New Telerik.Charting.ChartSeries() |
|
series.Type = Telerik.Charting.ChartSeriesType.Bar |
series.Name = "percentOfTolSeries" |
series.Appearance.LabelAppearance.Visible = False |
' Get the value to add to the series from another cell in the same row of the cell that is being edited |
' Add the value to the series |
Dim rowInfo As GridViewRowInfo = TryCast(e.CellElement.RowInfo, GridViewDataRowInfo) |
Dim value As Decimal = CDec(rowInfo.Cells(Constants.DefaultToleranceColumnNames.PercentOfTol).Value) |
series.Items.Add(New Telerik.Charting.ChartSeriesItem(value)) |
Me._chart.Series.Add(series) |
Me._chart.Refresh() |
Me._chart.Update() |
Me._chart.UpdateGraphics() |
e.CellElement.RowInfo.Tag = Me._chart.GetBitmap() |
End If |
e.CellElement.Image = TryCast(e.CellElement.RowInfo.Tag, System.Drawing.Image) |
e.CellElement.ImageLayout = ImageLayout.Center |
e.CellElement.DrawBorder = False |
e.CellElement.Text = "" |
e.CellElement.Padding = New Padding(0, 0, 0, 0) |
End If |
End Sub |
radChart1.SkinsOverrideStyles =
false
;
chartSeries.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Gradient;
chartSeries.Appearance.FillStyle.FillSettings.GradientMode = Telerik.Charting.Styles.GradientFillStyle.Horizontal;
chartSeries.Appearance.FillStyle.MainColor = Color.FromArgb(255, 55, 96, 145);
chartSeries.Appearance.FillStyle.SecondColor = Color.FromArgb(255, 184, 204, 228);
radChart1.UpdateGraphics();
Hello Team Telerik,
I want to ask how can I have a 3D chart. How can I do this?
Is there a property which set the chart in a 3D mode?
Another Problem I have is that I cant add a radLabel to a radGroupBox programatically.
Thanks very much
Kind regards,
Alfonsina