All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
Xaxis Label offset if Yaxis set to negative Version 2017.3.913.45
Scenario
Yaxis datasource range [0-30]
HtmlChart.PlotArea.YAxis.MinValue = -1;
<
telerik:RadHtmlChart
runat
=
"server"
ID
"RadHtmlChart1"
Width
"100%"
Height
"400px"
>
PlotArea
Series
telerik:ColumnSeries
Name
"Products"
DataFieldY
"moreData"
TooltipsAppearance
DataFormatString
"${0}"
/>
LabelsAppearance
Visible
"false"
</
XAxis
DataLabelsField
TextStyle
Margin
"50px"
YAxis
MinValue
"-1"
"{0}"
Legend
Appearance
ChartTitle
Text
"Bookstore Products"
ClientEvents
OnSeriesClick
"RadHtmlChart1_OnSeriesClick"
script
type
"text/javascript"
function RadHtmlChart1_OnSeriesClick(e) {
alert(e.dataItem['Vendor']); // return undefined
}
using
System;
System.Collections.Generic;
System.Data;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;
public
partial
class
Default2 : System.Web.UI.Page
{
protected
void
Page_Load(
object
sender, EventArgs e)
RadHtmlChart1.DataSource = GetChartData();
RadHtmlChart1.DataBind();
DataTable GetChartData()
DataTable tbl =
new
DataTable();
tbl.Columns.Add(
DataColumn(
"Vendor"
,
typeof
(
decimal
)));
"Name"
string
"someColumn"
tbl.Rows.Add(
[] { 0,
"zero"
, 2,
"zeroRecord"
});
[] { 1,
"one"
"firstRecord4"
[] { 2,
"two\\ntwo"
, 3,
"secondRecord4"
//the name of this segment is separated in two lines
[] { 3,
"three"
, 4,
"thirdRecord4"
[] { 98,
"four"
, 5,
"fourthRecord4"
return
tbl;