Hi Danill,
Thank you for your response.
Please see the test case below.
<%@ Page Language="C#" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
this.Chart1.GetStore().DataSource = new List<object>
{
new { Month = "Jan", Data1 = 20 },
new { Month = "Feb", Data1 = 20 },
new { Month = "Mar", Data1 = 19 },
new { Month = "Apr", Data1 = 18 },
new { Month = "May", Data1 = 18 },
new { Month = "Jun", Data1 = 17 },
new { Month = "Jul", Data1 = 16 },
new { Month = "Aug", Data1 = 16 },
new { Month = "Sep", Data1 = 16 },
new { Month = "Oct", Data1 = 16 },
new { Month = "Nov", Data1 = 15 },
new { Month = "Dec", Data1 = 15 }
};
}
</script>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>Line Chart - Ext.NET Examples</title>
<script>
var menuClick = function (val) {
};
var setValueClick = function (a, b, c) {
Ext.getCmp("Menu").show();
}
</script>
<link href="/resources/css/examples.css" rel="stylesheet" />
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Panel ID="Panel1"
runat="server"
Width="650"
Height="550"
Layout="FitLayout">
<Items>
<ext:CartesianChart
ID="Chart1"
runat="server"
InsetPadding="40"
InnerPadding="0 40 0 40">
<Store>
<ext:Store ID="Store1" runat="server">
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="Month" />
<ext:ModelField Name="Data1" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Interactions>
<ext:PanZoomInteraction ZoomOnPanGesture="true" />
</Interactions>
<Items>
<ext:TextSprite
Text="Line Chart"
FontSize="22"
Width="100"
Height="30"
X="40"
Y="20" />
</Items>
<Axes>
<ext:NumericAxis
Position="Left"
Fields="Data1"
Grid="true"
Minimum="0"
Maximum="24">
<Renderer Handler="return layout.renderer(label) + '%';" />
</ext:NumericAxis>
<ext:CategoryAxis
Position="Bottom"
Fields="Month"
Grid="true">
<Label RotationDegrees="-45" />
</ext:CategoryAxis>
</Axes>
<Series>
<ext:LineSeries XField="Month" YField="Data1">
<StyleSpec>
<ext:Sprite LineWidth="4" />
</StyleSpec>
<HighlightConfig>
<ext:Sprite FillStyle="#000" Radius="5" LineWidth="2" StrokeStyle="#fff" />
</HighlightConfig>
<Marker>
<ext:Sprite Radius="4" />
</Marker>
<Tooltip TrackMouse="true" StyleSpec="background: #fff;" ShowDelay="0" DismissDelay="0" HideDelay="0">
<Renderer Handler="this.setHtml(storeItem.get('Month') + ': ' + storeItem.get('Data1') + '%');" />
</Tooltip>
<Listeners>
<ItemMouseDown Fn="setValueClick"/>
</Listeners>
</ext:LineSeries>
</Series>
<Plugins>
<ext:ChartItemEvents runat="server"/>
</Plugins>
</ext:CartesianChart>
</Items>
</ext:Panel>
<ext:Menu ID="Menu" Floating="true" runat="server">
<Items>
<ext:Button ID="RemoveDataPoint" Text="Remove Data Point" runat="server">
<Listeners>
<Click Handler="menuClick(this)" />
</Listeners>
</ext:Button>
</Items>
</ext:Menu>
</form>
</body>
</html>