Approved
Last Updated: 02 Oct 2017 14:47 by David
ADMIN
Danail Vasilev
Created on: 14 Oct 2014 15:39
Category: HtmlChart
Type: Feature Request
6
ADD ability to reverse legend items order in RadHtmlChart
For the time being you can use the following workaround:
		<script>
			function OnLoad(sender, args) {
				var kendoWidget = $find('<%=RadHtmlChart1.ClientID%>').get_kendoWidget();
				kendoWidget.options.legend.reverse = true;
				kendoWidget.redraw();
			}
		</script>
		<telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" Width="600" Height="400">
			<ClientEvents OnLoad="OnLoad" />
			<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="2" />
							<telerik:CategorySeriesItem Y="5" />
							<telerik:CategorySeriesItem Y="7" />
						</SeriesItems>
					</telerik:ColumnSeries>
					<telerik:ColumnSeries Name="Series 3">
						<SeriesItems>
							<telerik:CategorySeriesItem Y="9" />
							<telerik:CategorySeriesItem Y="11" />
							<telerik:CategorySeriesItem Y="13" />
						</SeriesItems>
					</telerik:ColumnSeries>
				</Series>
				<XAxis>
					<LabelsAppearance RotationAngle="33"></LabelsAppearance>
					<Items>
						<telerik:AxisItem LabelText="Item 1" />
						<telerik:AxisItem LabelText="Item 2" />
						<telerik:AxisItem LabelText="Item 3" />
					</Items>
				</XAxis>
			</PlotArea>
		</telerik:RadHtmlChart>
6 comments
David
Posted on: 02 Oct 2017 14:47
Agree this is a bug. Would like it to be fixed. Option to reverse it sounds fine as well
Gourav
Posted on: 31 Mar 2016 07:51
Thanks Buddy
Phil
Posted on: 27 Oct 2014 05:06
Thanks Danail, as we've discussed elsewhere, you're response doesn't address the issue. I'm not seeking to reverse the legend, or do a manually coded one, just seeking for it to display in the same order as the data it represents. Also, your recommendation of manually coding fails to provide the "turn on / turn off" functionality provided by auto-generated legends. Of course we could manually code that also, but isn't this sort of thing why we use Telerik?
ADMIN
Danail Vasilev
Posted on: 24 Oct 2014 11:03
Hi Phil, as per our discussion it is fine to keep both feedback items about reversing legend order -  the current one and the new one related to stacked series - http://feedback.telerik.com/Project/108/Feedback/Details/141241
ADMIN
Danail Vasilev
Posted on: 16 Oct 2014 15:30
Hi Phil,
Thank you for your feedback!
I have already replied to the support ticket that was opened by you on the matter, so I paste my answer here for the rest of the clients reading it:
Currently the legend items order in the RadHtmlChart control matches the series' definition order and this doesn't change when the series is stacked or not. If the feature request about the ability to reverse legend items is implemented it can also be applied for stacked series. That is why I have logged it as a feature request and not an issue.

Generally you are the first client to request this functionality and therefore I have logged in our feedback portal. As more and more people vote on particular item its priority for implementation in the future raises.
Phil
Posted on: 14 Oct 2014 22:27
Come on, that's not a "feature request", that's a bug. If a stacked chart was displaying the stacked series in alternating orders across the series, that would be ridiculous. Doing the same with the legend is the same. Telerik normally maintain such high, professional standards. How could one argue that having the adjacent legend to a stacked series in the wrong order is not a bug?

Also, if you are going to log this, the title should be:
FIX correct legend items order in RadHtmlChart (currently reversed)