PDA

View Full Version : [CLOSED] Gauge Chart Loading Problem



ebeker
Mar 06, 2014, 8:08 PM
i have an Gauge Chart that i data bind dynamically, on the load it comes out as i expected but when the data changes , it loose the control and shows stuff with no meaning. Here is chart codes


<ext:Chart
ID="budgetChart"
runat="server"
StyleSpec="background:#fff;"
InsetPadding="30"
Hidden="false"
ShadowMode="Drop"
Theme="Base:gradients"
Shadow="true"
Flex="2">
<AnimateConfig Easing="ElasticIn" Duration="1000" />
<Store>
<ext:Store ID="Store1"
runat="server"
DataSourceID="dtsBudget"
AutoDataBind="true">
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="LCT" />
<ext:ModelField Name="TOTAL" />
<ext:ModelField Name="LIMIT" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Axes>
<ext:GaugeAxis Minimum="0" AxisID="myax" Steps="10" Maximum="100" Title="Budget" Margin="-10">
<Label Text="mylabel" FontFamily="Calibri" FontSize="25" Height="40"></Label>
</ext:GaugeAxis>
</Axes>
<Series>
<ext:GaugeSeries ShowInLegend="true" AngleField="TOTAL" Donut="30" ColorSet="#F49D10,#ddd">
</ext:GaugeSeries>
</Series>
</ext:Chart>

and here is my code behind where i update the chart


Dim gxa As Ext.Net.GaugeAxis = budgetChart.Axes(0)
gxa.Maximum = dtb.Rows(0).Item(2).ToString (This return my max value)
gxa.Minimum = 100
budgetChart.GetStore().DataBind()


What am i trying to do is that ; load the TOTAL amount and show it in LIMIT amount to see how much of budget left.
Basically updating the Maximum and Minimum from code behind dynamicallu.

Daniil
Mar 07, 2014, 5:48 AM
Hi @ebeker,

Could you, please, provide a runnable sample?