Apr 30, 2015, 6:56 PM
Dynamically assign a maximum value to a numeric axis used in a polar chart
Hi,
Thank you for the reply in advance.
I'm currently working on implementing the 'PolarChart' element into a site and I'm running into an issue with dynamically assigning a maximum value to the numeric axis employed by the chart. Assigning this value manually like this:
Works perfectly, but I'm wondering if the Maximum value could somehow be set dynamically from a method in code behind, however I'm unsure of how to (and if its possible) to implement this.
For example:
Thank you for the reply in advance.
I'm currently working on implementing the 'PolarChart' element into a site and I'm running into an issue with dynamically assigning a maximum value to the numeric axis employed by the chart. Assigning this value manually like this:
<ext:PolarChart
ID="PolarChart1"
runat="server"
StyleSpec="background:#fff;"
InsetPadding="25"
Flex="1">
<Store>
<ext:Store runat="server" ID="Store">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="Name" />
<ext:ModelField Name="data1" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Axes>
<ext:NumericAxis Position="Gauge" Minimum="0" Maximum="1000" MajorTickSteps="5" MinorTickSteps="20" Margin="7" />
</Axes>
<Series>
<ext:GaugeSeries Field="data1" Donut="30" Colors="#82B525,#ddd" TotalAngleDegrees="180" />
</Series>
</ext:PolarChart>
¨Works perfectly, but I'm wondering if the Maximum value could somehow be set dynamically from a method in code behind, however I'm unsure of how to (and if its possible) to implement this.
For example:
<ext:PolarChart
ID="PolarChart1"
runat="server"
StyleSpec="background:#fff;"
InsetPadding="25"
Flex="1">
<Store>
<ext:Store runat="server" ID="Store">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="Name" />
<ext:ModelField Name="data1" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Axes>
<ext:NumericAxis Position="Gauge" Minimum="0" Maximum="Ext.encode(#{maxQuota}))" MajorTickSteps="5" MinorTickSteps="20" Margin="7" />
</Axes>
<Series>
<ext:GaugeSeries Field="data1" Donut="30" Colors="#82B525,#ddd" TotalAngleDegrees="180" />
</Series>
</ext:PolarChart>
Again, thank you for your reply.