Hi, everyone
I want to hide null or empty data in RadChart, but when I use Charting DataTable I cannot hide the null or empty values.
I hide null or empty values in Chart Picture like that
I want to hide null or empty data in RadChart, but when I use Charting DataTable I cannot hide the null or empty values.
I hide null or empty values in Chart Picture like that
if
(!_showNullValues)
{
foreach (ChartSeries series in chart.Series)
{
if (series.Items.Count == 0)
{
series.Appearance.EmptyValue.Line.Width = 0.0f;
series.Appearance.EmptyValue.Mode = Telerik.Charting.Styles.
EmtyValuesMode.Zero;
}
}
}
I set emptyvalue is zero to write datatable zero rather than first non-empty value for empty value.
How can I hide empty value in datatable in RadChart?
8 Answers, 1 is accepted
0
Hi Fatih,
The datatable in RadChart closely matches the chart state, so if there is an empty series it will be shown in the datatable too. However, if there are no items in a certain series, you can simply remove it from the RadChart.Series collection:
RadChart1.Series.Remove(series);
All the best,
Ves
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The datatable in RadChart closely matches the chart state, so if there is an empty series it will be shown in the datatable too. However, if there are no items in a certain series, you can simply remove it from the RadChart.Series collection:
RadChart1.Series.Remove(series);
All the best,
Ves
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
SoD
Top achievements
Rank 2
answered on 03 Jan 2009, 11:24 AM
unfortunately my series included some null data and some normal data. I want to highlight or remove in datatable the null or empty data in the dataGrid.
0
Hello Fatih,
Unfortunately, the datatable content cannot be customized, it matches the ChartSeriesItems for each ChartSeries.
Best regards,
Ves
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Unfortunately, the datatable content cannot be customized, it matches the ChartSeriesItems for each ChartSeries.
Best regards,
Ves
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Hiren Savjiyani
Top achievements
Rank 2
answered on 09 Oct 2009, 05:50 AM
Hi All,
I have also faced the same problem.. NULL values in series was making my chart series line ugly..
Finally i tried one trick and was successful...
In the ItemDataBound event, i have added these lines:
if (e.SeriesItem.YValue == 0.0)
e.SeriesItem.Parent.Items.Remove(e.SeriesItem);
Hope that will resolve issue
Regards,
WebDataDesign
http://www.webdatadesign.com.au
I have also faced the same problem.. NULL values in series was making my chart series line ugly..
Finally i tried one trick and was successful...
In the ItemDataBound event, i have added these lines:
if (e.SeriesItem.YValue == 0.0)
e.SeriesItem.Parent.Items.Remove(e.SeriesItem);
Hope that will resolve issue
Regards,
WebDataDesign
http://www.webdatadesign.com.au
0
Jason
Top achievements
Rank 2
answered on 20 Nov 2009, 07:43 PM
Hiren,
That is a good solution but the only problem is if data becomes null and gets a value after it has been removed the line or bar does not reappear. I tried added the code below to bring it back but it doesn't work.
There must be some time of way to loop through it to check to see if the value is null, if not then display it on the chart.
That is a good solution but the only problem is if data becomes null and gets a value after it has been removed the line or bar does not reappear. I tried added the code below to bring it back but it doesn't work.
if
(e.SeriesItem.YValue >= 1)
{
e.SeriesItem.Parent.Items.Add(e.SeriesItem);
}
There must be some time of way to loop through it to check to see if the value is null, if not then display it on the chart.
0
chandu mahi
Top achievements
Rank 1
answered on 18 Dec 2009, 02:47 PM
Hi,
Even i am also facing with same issue. can you suggest me. i tried with above code . eventhough its not showing radchart data.
I can see the data in datatable but output is coming with Empty series "There is No or Empty Series ".
why?
I am using Q1 2009 version
Even i am also facing with same issue. can you suggest me. i tried with above code . eventhough its not showing radchart data.
I can see the data in datatable but output is coming with Empty series "There is No or Empty Series ".
why?
I am using Q1 2009 version
0
Ravi Keshwani
Top achievements
Rank 1
answered on 08 Jul 2010, 02:23 PM
Please help i am also facing this issue
0
Hi Ravi Keshwani,
Can you please attach a small example, demonstrating the problem? Thanks.
Greetings,
Ves
the Telerik team
Can you please attach a small example, demonstrating the problem? Thanks.
Greetings,
Ves
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items