Completed
Last Updated: 27 Feb 2014 16:19 by matt
ADMIN
Danail Vasilev
Created on: 30 Jan 2013 09:00
Category: HtmlChart
Type: Feature Request
12
ADD Visible property for the Series in RadHtmlChart
Expose a Visible property for the Series in RadHtmlChart. For example when a Series is clicked it can be hidden.
For the time being the following workaround can be used:
JavaScript:
	<script>
		function pageLoad() {
			var chart = $find("<%=RadHtmlChart1.ClientID%>");
			chart._chartObject.options.series[0].visible = false;
			chart.repaint();
		}
	</script>
ASPX:
		<telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" Width="600" Height="400">
			<PlotArea>
				<Series>
					<telerik:ColumnSeries Name="Series 1">
						<SeriesItems>
							<telerik:CategorySeriesItem Y="30" />
							<telerik:CategorySeriesItem Y="10" />
							<telerik:CategorySeriesItem Y="20" />
						</SeriesItems>
					</telerik:ColumnSeries>
					<telerik:ColumnSeries Name="Series 2">
						<SeriesItems>
							<telerik:CategorySeriesItem Y="5" />
							<telerik:CategorySeriesItem Y="12" />
							<telerik:CategorySeriesItem Y="8" />
						</SeriesItems>
					</telerik:ColumnSeries>
				</Series>
			</PlotArea>
		</telerik:RadHtmlChart>
5 comments
matt
Posted on: 27 Feb 2014 16:19
thank you!!
ADMIN
Misho
Posted on: 27 Feb 2014 12:05
The feature has been already implemented and will be available in Q2 2014 release.
John
Posted on: 30 Oct 2013 20:47
I agree Matt.. I have been working around it with jQuery, but it is messy to say the least. Using jQuery you can do things like:

                    jQuery('#chtMembers svg g:last text').each(function () {
                        selectedItems.push($(this).text());
                    });

To iterate through the chart data elements. In this case, I was selecting the chart legend (the last g eelemnt in the svg element), and then iterating through it's children (the text elements) to push the values into an array...

Just wanted to mention it because there are workaround to do what you need even if they are unable to add this feature. Hope this helps!
matt
Posted on: 30 Oct 2013 17:43
Telerik -- this is a mandatory feature if the RadCharts are going to be anything other than a novelty. I work in the engineering field, and a chart is no use to us if we can't compare a given trend line (LineSeries) to other trend lines (other LineSeries). being able to do this dynamically via UI for disabling/enabling other indicators is a common feature found on financial charting websites (eg: Compare a stock ticker's trend to the S&P index, etc). 

we need the ability to toggle LineSeries on/off (visible/not-visible). doing so should likewise remove it from the legend.
ADMIN
Marin Bratanov
Posted on: 29 Aug 2013 08:13
You may find interesting this idea as well: http://feedback.telerik.com/Project/108/Feedback/Details/57166