c# - How to make Telerik's RadHtmlChart legend to be displayed in two columns -


i working on asp.net webforms project. using telerik's radhtmlchart control. display legend in 2 columns. displayed single column. tried make height of small 2 or more columns. didn't work.

radhtmlchart2.legend.appearance.height.equals(20);

thanks

the main purpose of radhtmlchart's legend show information connected displayed data, there no property allows populating custom legend items.

the namefield property specific pieseries, donutseries , bubbleseries, can achieve same appearance in barseries , columnseries setting name property:

<telerik:columnseries datafieldy="yvalue" name="column series"></telerik:columnseries> 

specifying name property series creates "item" in legend. note property used setting series' names explicitly , namefield property equivalent in databind scenario.

i attach sample page have databound columnseries , set name property, can check suggestions.

<%@ page language="c#" autoeventwireup="true" codefile="legend-bar-column.aspx.cs" inherits="tickets_chart_2013_q3_legend_bar_column_legend_bar_column" %>  <!doctype html>  <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">         <asp:scriptmanager id="scriptmanager1" runat="server" />          <telerik:radhtmlchart runat="server" id="chart" skin="black">             <plotarea>                 <series>                     <telerik:columnseries datafieldy="yvalue" name="column series"></telerik:columnseries>                 </series>             </plotarea>         </telerik:radhtmlchart>     </form> </body> </html> 

cs file

using system; using system.collections.generic; using system.data; using system.linq; using system.web; using system.web.ui; using system.web.ui.webcontrols;  public partial class tickets_chart_2013_q3_legend_bar_column_legend_bar_column : system.web.ui.page {     protected void page_load(object sender, eventargs e)     {         chart.datasource = getdata();         cha 

rt.databind(); }

protected datatable getdata() {     datatable table = new datatable();     table.columns.add(new datacolumn("yvalue"));     table.rows.add(new object[] { 10 });     table.rows.add(new object[] { 30 });     table.rows.add(new object[] { 30 });     return table; } 

}

feel free contact me if need further assistance.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -