Hello, i would like to know if it's possible to resize chart view area to fit container, at the moment whole ChartView is docked to "Fill" for that container but Area has that white border.
Example what i want is shown on image.
Thanks in advance.
4 Answers, 1 is accepted
0
Accepted
Hello, Joavn,
By default, RadChartView there is a margin applied to its view. In order to eliminate it, you can use the following code snippet:
I hope this information helps.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
By default, RadChartView there is a margin applied to its view. In order to eliminate it, you can use the following code snippet:
LineSeries lineSeries =
new
LineSeries();
lineSeries.DataPoints.Add(
new
CategoricalDataPoint(20,
"Jan"
));
lineSeries.DataPoints.Add(
new
CategoricalDataPoint(22,
"Apr"
));
lineSeries.DataPoints.Add(
new
CategoricalDataPoint(12,
"Jul"
));
lineSeries.DataPoints.Add(
new
CategoricalDataPoint(19,
"Oct"
));
this
.radChartView1.Series.Add(lineSeries);
this
.radChartView1.ChartElement.View.Margin =
new
Padding(0);
I hope this information helps.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
0
Joavn
Top achievements
Rank 1
answered on 04 Feb 2019, 08:40 AM
I marked your post as answer as it did help in what i needed. Thanks!
0
Hello, Joavn,
RadChartView relies on the axes in order to draw the series correctly. That is why instead of clearing the axis, I would recommend just to hide them. This will not break the rending mechanism:
Should you have further questions please let me know.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
RadChartView relies on the axes in order to draw the series correctly. That is why instead of clearing the axis, I would recommend just to hide them. This will not break the rending mechanism:
LineSeries lineSeries =
new
LineSeries();
lineSeries.DataPoints.Add(
new
CategoricalDataPoint(20,
"Jan"
));
lineSeries.DataPoints.Add(
new
CategoricalDataPoint(22,
"Apr"
));
lineSeries.DataPoints.Add(
new
CategoricalDataPoint(12,
"Jul"
));
lineSeries.DataPoints.Add(
new
CategoricalDataPoint(19,
"Oct"
));
this
.radChartView1.Series.Add(lineSeries);
this
.radChartView1.ChartElement.View.Margin =
new
Padding(0);
lineSeries.HorizontalAxis.IsVisible =
false;
lineSeries.VerticalAxis.IsVisible =
false;
Should you have further questions please let me know.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.