Sep 24, 2015, 8:41 AM
Getting VisibleRange of Chart after Zoom
Hi everybody,
I want to get the visible range of a Ext.Net.cartesianChart after i zoomed in, to pass new values to the corresponding datastore. The reason for this is, that I dont want to pass hundrets of thousands of datavalues to a client to show a complete dataseries but to pass only, say 2000 important values to the client. if the user wants more acurate information on a ceratin area of the chart, he can zoom in, with something like a zoombox. after that, 2000 new values should be loaded from server and displayed, corresponding to the zoomed in area. how can i get the startvalue and the endvalue of this selected zoombox or the visible range of the chart after it was zoomed in?
this is a snippet of the markup
I would very much appreciate any help since I am looking for a solution for days now.
Best regards
I want to get the visible range of a Ext.Net.cartesianChart after i zoomed in, to pass new values to the corresponding datastore. The reason for this is, that I dont want to pass hundrets of thousands of datavalues to a client to show a complete dataseries but to pass only, say 2000 important values to the client. if the user wants more acurate information on a ceratin area of the chart, he can zoom in, with something like a zoombox. after that, 2000 new values should be loaded from server and displayed, corresponding to the zoomed in area. how can i get the startvalue and the endvalue of this selected zoombox or the visible range of the chart after it was zoomed in?
this is a snippet of the markup
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContainerTest.aspx.cs" Inherits="ASPEXTControlEditor.ContainerTest" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script>
function getBounderies(...) {
//return bounderies here
}
</script>
</head>
<ext:Store ID="st_DataStore" runat="server">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="Date0" Type="Date" />
<ext:ModelField Name="Visits0"/>
<ext:ModelField Name="Date1" Type="Date" />
<ext:ModelField Name="Visits1" />
</Fields>
</ext:Model>
</Model>
<Proxy>
<ext:AjaxProxy Url="TestHandler.ashx">
<ActionMethods Read="GET" />
<Reader>
<ext:JsonReader RootProperty="data" TotalProperty="total"/>
</Reader>
</ext:AjaxProxy>
</Proxy>
<Parameters>
<ext:StoreParameter Name="bounderies" Value="getBoundreis()"/>
</Parameters>
</ext:Store>
<ext:Panel ID="pnl_Chart" runat="server" Title="chart" Layout="FitLayout" Icon="ChartLine">
<Items>
<ext:CartesianChart ID="cch_Diagramm" runat="server" Animation="true" StoreID="st_DataStore">
<Interactions>
<ext:CrossZoomInteraction >
<%--maybe get visible range from here?--%>
</ext:CrossZoomInteraction>
</Interactions>
<Axes>
<ext:NumericAxis Position="Left" Fields="Visits0,Visits1" Title="Number of Hits" />
<ext:TimeAxis Position="Bottom" Fields="Date0,Date1" DateFormat="M Y" Title="Month of the Year">
<Listeners>
<RangeChange Handler="rangeChange(range)" Buffer="500">
<%--or here? ideally this one should be VisibleRangeChange Event--%>
</RangeChange>
</Listeners>
</ext:TimeAxis>
</Axes>
<Series>
<ext:LineSeries XField="Date0" YField="Visits0"/>
<ext:LineSeries XField="Date1" YField="Visits1" / >
</Series>
</ext:CartesianChart>
</Items>
</ext:Panel>
I use a Webservice to load data and i want to pass the boundaries of my zoombox as storeparamters to the webservice.I would very much appreciate any help since I am looking for a solution for days now.
Best regards
Last edited by Daniil; Sep 24, 2015 at 5:46 PM.