PDA

View Full Version : [CLOSED] Ext. Net chart - Issues



velusoft
Sep 02, 2015, 7:07 AM
I have the following issues

1. When i click on legends - it is blinking in IE.
2. I want axis should start from zero always. Currently it is starting is based on data....



<ext:Chart ID="ChartYtd" runat="server" StyleSpec="background:#fff;" Shadow="true" StandardTheme="Category1" Animate="true" Width="920" Height="400">
<LegendConfig Position="Right" />
<Store>
<ext:Store ID="storeYtd" runat="server">
<Model>
<ext:Model ID="Model41" runat="server">
<Fields>
<ext:ModelField Name="MonthNYear" Type="String" />
<ext:ModelField Name="Planned">
<Convert Handler="if (value == null) { value = undefined; }; return value;" />
</ext:ModelField>
<ext:ModelField Name="Actuals">
<Convert Handler="if (value == null) { value = undefined; }; return value;" />
</ext:ModelField>
<ext:ModelField Name="Month" Type="String" />
<ext:ModelField Name="Year" Type="String" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Axes>
<ext:NumericAxis Position="Left" Fields="Planned,Actuals" Title="k $" Grid="true">
<LabelTitle Font="normal 11px Arial;" Fill="Black" />
<Label Font="normal 11px Arial;" Fill="Black" />
<GridConfig>
<Even Stroke="#000000" StrokeWidth="0.5" />
<Odd Stroke="#000000" StrokeWidth="0.5" />
</GridConfig>
</ext:NumericAxis>
<ext:CategoryAxis Position="Bottom" Fields="MonthNYear" Title="Month Year">
<LabelTitle Font="normal 11px Arial;" Fill="Black" />
<Label Font="normal 11px Arial;" Fill="Black" />
</ext:CategoryAxis>
</Axes>
<LegendConfig Position="Bottom" BoxStroke="false" BoxStrokeWidth="0" />
<Series>
<ext:LineSeries Axis="Left" XField="MonthNYear" YField="Planned" Title="Planned" Smooth="8" ShowMarkers="true">
<Tips ID="Tips7" runat="server" TrackMouse="true" Width="300" Anchor="left" Height="20" Cls="chartToolTip">
<%-- <Renderer Handler="this.update(String(item.value[1]))" />--%>
<Renderer Handler="this.setTitle('Planned: ' + Ext.util.Format.number(item.value[1],'000.00') + ' (Click here to see drill down report)');" />
</Tips>
<MarkerConfig Fill="#FF0000" Stroke="#FF0000" Type="Circle" Radius="2" StrokeWidth="2" Cursor="pointer" />
<Style Stroke="#FF0000" StrokeWidth="2" />
<Listeners>
<ItemMouseUp Handler="Ext.net.DirectMethods.BindYtdChartDrillDownData(it em.storeItem.raw.Month, item.storeItem.raw.Year);" />
<AfterRender Handler="this.markerGroup.each(function(m) { m.addCls('showPointerCursor'); });" />
</Listeners>
</ext:LineSeries>
<ext:LineSeries Axis="Left" XField="MonthNYear" YField="Actuals" Title="Actuals" Smooth="3">
<Tips ID="Tips1" runat="server" TrackMouse="true" Width="300" Anchor="left" Height="20" Cls="chartToolTip">
<%-- <Renderer Handler="this.update(String(item.value[1]))" />--%>
<Renderer Handler="this.setTitle('Actuals: ' + Ext.util.Format.number(item.value[1],'000.00') + ' (Click here to see drill down report)');" />
</Tips>
<MarkerConfig Fill="000081" Stroke="000081" Type="Circle" Radius="2" StrokeWidth="1" Cursor="pointer" />
<Style Stroke="#000081" StrokeWidth="2.5" />
<Listeners>
<ItemMouseUp Handler="Ext.net.DirectMethods.BindYtdChartDrillDownData(it em.storeItem.raw.Month, item.storeItem.raw.Year);" />
<AfterRender Handler="this.markerGroup.each(function(m) { m.addCls('showPointerCursor'); });" />
</Listeners>
</ext:LineSeries>
</Series>
</ext:Chart>

fabricio.murta
Sep 03, 2015, 8:05 PM
Hello @velusoft!

I couldn't reproduce the issue reported on your question item 1. Maybe because there's a lot missing in order to reproduce your graph locally. Without the data it shown a numeric y-axis from 0 to 1.1 in intervals of 0.1. I could click the numeric axis' legend and nothing happened.

When I clicked the date legend on the bottom of the screen (Planned, Actuals), they worked as expected: on click, the display is toggled and it is grayed out. No blinking whatsoever.

As for your question item 2, use Minimum="0" and maybe AdjustMinimumByMajorUnit="false" on your <ext:NumeriAxis /> definition.