[CLOSED] Negative value column chart does not respond to mouse event : click, double click or tooltip

  1. #1

    [CLOSED] Negative value column chart does not respond to mouse event : click, double click or tooltip

    Hi,

    I created a group bar chart as shown in the attached pic, but the tool-tip does not render on mouse over, in fact the tooltip renderer is not called on mouse over, but it works for the positive values. the double click event and other mouse events are not triggered as well for the negative values, but works well for positive value. How can this issue be resolved.

    Is it possible to render the negative value on the y -axis as it only renders the value above zero, as seen in the attached picture
    Attached Thumbnails Click image for larger version. 

Name:	barchart.PNG 
Views:	32 
Size:	7.7 KB 
ID:	6569  
    Last edited by Daniil; Jul 18, 2013 at 3:35 PM. Reason: [CLOSED]
  2. #2
    Hi @RCM,

    Probably, an ExtJS bug. Could you, please, provide a test case?
  3. #3
    I dont understand what you mean by a test case . just create a column chart with negative value and see how it behaves.
  4. #4
    Hello!

    Please, check the value of Minimum property of your NumericAxis. I've tried the following sample:

    <%@ Page Language="C#" %>
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            Store store = this.Chart1.GetStore();
            
            store.DataSource = new List<object>
            {
                new { Name = "Name 1", Data1 = 20 },
                new { Name = "Name 2", Data1 = -20 }
            };
            
            store.DataBind();
        }
    </script>    
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET Examples</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:Panel 
                runat="server"
                Title="Column Chart"
                Width="400"
                Height="200"
                Layout="FitLayout">
                <Items>
                    <ext:Chart 
                        ID="Chart1" 
                        runat="server"
                        Shadow="true"
                        StyleSpec="background:#fff"
                        Animate="true">
                        <Store>
                            <ext:Store 
                                runat="server" >                           
                                <Model>
                                    <ext:Model runat="server">
                                        <Fields>
                                            <ext:ModelField Name="Name" />
                                            <ext:ModelField Name="Data1" />
                                        </Fields>
                                    </ext:Model>
                                </Model>
                            </ext:Store>
                        </Store>
    
                        <Axes>
                            <ext:NumericAxis                             
                                Fields="Data1"                            
                                Grid="true"
                                Title="Number of Hits"
                                Minimum="-20">
                                <Label>
                                    <Renderer Handler="return Ext.util.Format.number(value, '0,0');" />
                                </Label>
                            </ext:NumericAxis>                            
    
                            <ext:CategoryAxis 
                                Position="Bottom"
                                Fields="Name"
                                Title="Month of the Year"
                                />                            
                        </Axes>
                        <Series>
                            <ext:ColumnSeries 
                                Axis="Left"
                                Highlight="true" 
                                XField="Name" 
                                YField="Data1">
                                <Tips runat="server" TrackMouse="true" Width="140" Height="28">
                                    <Renderer Handler="this.setTitle(storeItem.get('Name') + ': ' + storeItem.get('Data1'));" />
                                </Tips>
                                <Label
                                    Display="InsideEnd" 
                                    Field="Data1" 
                                    Orientation="Horizontal" 
                                    Color="#333" 
                                    TextAnchor="middle" >
                                    <Renderer Handler="return Ext.util.Format.number(value, '0');" />
                                </Label>
                            </ext:ColumnSeries>
                        </Series>
                    </ext:Chart>
                </Items>
            </ext:Panel>
        </form>    
    </body>
    </html>
  5. #5
    Quote Originally Posted by RCM View Post
    I dont understand what you mean by a test case.
    I meant a test case similar to @Baidaly posted.
  6. #6
    Thanks. Setting the minimum value resolved the problem

Similar Threads

  1. DateField/TimeField mouse click event
    By retto in forum 2.x Help
    Replies: 0
    Last Post: Mar 10, 2013, 9:43 AM
  2. [CLOSED] chart series double click event
    By SymSure in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 04, 2012, 2:03 PM
  3. Replies: 3
    Last Post: Mar 23, 2011, 5:32 PM
  4. [CLOSED] Row double click event on gridpanel
    By yobnet in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 29, 2010, 2:54 AM
  5. Hover and double-click event on Panel?
    By dbassett74 in forum 1.x Help
    Replies: 2
    Last Post: May 07, 2009, 1:58 AM

Posting Permissions