[CLOSED] [#13] labels LineSeries aren't shown into the chart

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] [#13] labels LineSeries aren't shown into the chart

    Hi,

    I need to show the label for the each point of LineSeries for the chart, but if I set the property hidden= true for the panel I don't see the values of labels.
    I attach the example that show my problem.
    If I run the following code with property Hidden="true" for the panel1

    <%@ Page Language = "C#"%>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        public class MonitorViewer
        {
            private double yieldValue;
            private int pnFirstOk;
            private int pnFirstKo;
            private int pnTotalPass;
            private string period;
            
            public MonitorViewer() {}
            
            public double YieldValue {
                get { return yieldValue; }
                set { yieldValue = value; }
            }
            
            public int PnFirstOk {
                get { return pnFirstOk; }
                set { pnFirstOk = value; }
            }
            
            public int PnFirstKo {
                get { return pnFirstKo; }
                set { pnFirstKo = value; }
            }
            
            public int PnTotalPass {
                get { return pnTotalPass; }
                set { pnTotalPass = value; }
            }
            
            public string Period {
                get { return period; }
                set { period = value; }
            }
        }
        
        public object[] DataValue () {
                IList<MonitorViewer> listItems = new List<MonitorViewer>();
                MonitorViewer monitorViewer1 = new MonitorViewer();
                monitorViewer1.YieldValue = Double.Parse("95,97");
                monitorViewer1.Period= "30/03/12 - 20/04/12";
                monitorViewer1.PnFirstOk = 7507;
                monitorViewer1.PnFirstKo = 315;
                monitorViewer1.PnTotalPass = 7994;
                
                MonitorViewer monitorViewer2 = new MonitorViewer();
                monitorViewer2.YieldValue = Double.Parse("96,68");
                monitorViewer2.Period= "20/04/12 - 12/05/12";
                monitorViewer2.PnFirstOk = 5995;
                monitorViewer2.PnFirstKo = 206;
                monitorViewer2.PnTotalPass = 6504;
                
                MonitorViewer monitorViewer3 = new MonitorViewer();
                monitorViewer3.YieldValue = Double.Parse("95,91");
                monitorViewer3.Period= "12/05/12 - 03/06/12";
                monitorViewer3.PnFirstOk = 9732;
                monitorViewer3.PnFirstKo = 415;
                monitorViewer3.PnTotalPass = 10209;
                
                MonitorViewer monitorViewer4 = new MonitorViewer();
                monitorViewer4.YieldValue = Double.Parse("96,09");
                monitorViewer4.Period= "03/06/12 - 24/06/12";
                monitorViewer4.PnFirstOk = 6710;
                monitorViewer4.PnFirstKo = 273;
                monitorViewer4.PnTotalPass = 7309;
                
                MonitorViewer monitorViewer5 = new MonitorViewer();
                monitorViewer5.YieldValue = Double.Parse("96,29");
                monitorViewer5.Period= "24/06/12 - 16/07/12";
                monitorViewer5.PnFirstOk = 1922;
                monitorViewer5.PnFirstKo = 74;
                monitorViewer5.PnTotalPass = 2021;
                
                MonitorViewer monitorViewer6 = new MonitorViewer();
                monitorViewer6.YieldValue = Double.Parse("0,0");
                monitorViewer6.Period= "16/07/12 - 07/08/12";
                monitorViewer6.PnFirstOk = 0;
                monitorViewer6.PnFirstKo = 0;
                monitorViewer6.PnTotalPass = 0;
                
                MonitorViewer monitorViewer7 = new MonitorViewer();
                monitorViewer7.YieldValue = Double.Parse("0,0");
                monitorViewer7.Period= "07/08/12 - 28/08/12";
                monitorViewer7.PnFirstOk = 0;
                monitorViewer7.PnFirstKo = 0;
                monitorViewer7.PnTotalPass = 0;
                
                listItems.Add(monitorViewer1);
                listItems.Add(monitorViewer2);
                listItems.Add(monitorViewer3);
                listItems.Add(monitorViewer4);
                listItems.Add(monitorViewer5);
                listItems.Add(monitorViewer6);
                listItems.Add(monitorViewer7);
                
                object[] periodArray = new object
    [listItems.Count];
                for (int i = 0;i < listItems.Count;i++) {
                    MonitorViewer monitorViewer = listItems[i];
                    object[] itemArray = new object[]{monitorViewer.YieldValue,monitorViewer.Period,monitorViewer.PnFirstOk,monitorViewer.PnFirstKo,monitorViewer.PnTotalPass};
                    
                    periodArray[i] = itemArray;
                }
                return periodArray;
            }
            
            public void Page_Load() {
                //var store = this.yieldChart.GetStore();
                //store.DataSource = DataValue();
                //store.DataBind();
            }
            
            protected void ExtractData(object sender, DirectEventArgs e) {
                var store = this.yieldChart.GetStore();
                store.DataSource = DataValue();
                store.DataBind();
                this.panel1.Hidden = false;
            }
    </script>
    
    <body>
        <form Method=post Runat="server">
            <ext:ResourceManager Id="resourceManager" runat="server" />
                <h3>Example</h3>
                <br/>
                <ext:Button ID="btnSearch" Text="Search" runat="server" Hidden="false" Icon="Magnifier" >
                    <DirectEvents>
                        <Click OnEvent="ExtractData">
                            <EventMask ShowMask="true" MinDelay="100"/>
                        </Click>
                    </DirectEvents>
                </ext:Button>
                <br/>
                <ext:ChartTheme 
                    ID="CustomThemeID" 
                    runat="server" 
                    ThemeName="CustomTheme" 
                    Colors="url(#blueColor),url(#greenColor),url(#redColor),url(#orangeColor)">
                </ext:ChartTheme>
                
                <ext:Panel ID="panel1" runat="server" Height="600" Layout="FitLayout" MarginSpec="0 0 3 0" Hidden="true">
                    <Bin>
                        <ext:Store ID="yieldStore" runat="server">
                            <Reader>
                                <ext:ArrayReader />
                            </Reader>
                            <Model>
                                <ext:Model runat="server">
                                    <Fields>
                                        <ext:ModelField Name="yield"/>
                                        <ext:ModelField Name="period"/>
                                        <ext:ModelField Name="pnFirstOk"/>
                                        <ext:ModelField Name="pnFirstKo"/>
                                        <ext:ModelField Name="pnTotalPass"/>
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Bin>
                    <Items>
                        <ext:Chart 
                            ID="yieldChart" 
                            runat="server" 
                            Flex="1" 
                            Theme="CustomTheme"
                            Shadow="true" 
                            Animate="true"
                            StoreID="yieldStore">
        
                            <Gradients>
                                <ext:Gradient GradientID="redColor" Angle="0">
                                    <Stops>
                                        <ext:GradientStop Offset="0" Color="#e21413" />
                                        <ext:GradientStop Offset="100" Color="#d82931" />
                                    </Stops>
                                </ext:Gradient>
        
                                <ext:Gradient GradientID="orangeColor" Angle="0">
                                    <Stops>
                                        <ext:GradientStop Offset="0" Color="#ecbe38" />
                                        <ext:GradientStop Offset="100" Color="#dc9614" />
                                    </Stops>
                                </ext:Gradient>
        
                                <ext:Gradient GradientID="greenColor" Angle="0">
                                    <Stops>
                                        <ext:GradientStop Offset="0" Color="#3ed730" />
                                        <ext:GradientStop Offset="100" Color="#3ea830" />
                                    </Stops>
                                </ext:Gradient>
        
                                <ext:Gradient GradientID="blueColor" Angle="0">
                                    <Stops>
                                        <ext:GradientStop Offset="0" Color="#4868e7" />
                                        <ext:GradientStop Offset="100" Color="#3c56bf" />
                                    </Stops>
                                </ext:Gradient>
                            </Gradients>
                            
                            <Axes>
                                <ext:NumericAxis Position="Left" Fields="yield" Minimum="0" />
                                <ext:NumericAxis Position="Right" Minimum="0" Fields="pnFirstOk,pnFirstKo,pnTotalPass" Hidden="true">
                                </ext:NumericAxis>
                                <ext:CategoryAxis Position="Bottom" Fields="period">
                                    <Label Font="10px Arial">
                                        <Rotate Degrees="270" />
                                        <Renderer Handler="return Ext.String.ellipsis(value, 15, false);" />
                                    </Label>
                                </ext:CategoryAxis>
                            </Axes>
                
                                <Series>
                                    <ext:ColumnSeries Axis="Left" Highlight="true" XField="period" YField="yield">
                                        <Style Fill="#38B8BF" StrokeWidth="3" />
                                        <Label Contrast="true" Display="Under" Field="yield" Color="#000" TextAnchor="middle" />
                                    </ext:ColumnSeries>
                                    <ext:LineSeries Highlight="true" Axis="Right" Smooth="3" XField="period" YField="pnFirstOk" >
                                        <MarkerConfig Type="Circle" Size="4" Radius="4" StrokeWidth="0" />
                                        
                                        <Label Contrast="true" Display="InsideEnd" Field="pnFirstOk" Color="#000" TextAnchor="middle" />
                                    </ext:LineSeries>
                                    <ext:LineSeries Highlight="true" Axis="Right" Smooth="3" XField="period" YField="pnFirstKo" >
                                        <MarkerConfig Type="Circle" Size="4" Radius="4" StrokeWidth="0" />
                                        
                                        <Label Contrast="true" Display="InsideEnd" Field="pnFirstKo" Color="#000" TextAnchor="middle" />
                                    </ext:LineSeries>
                                    <ext:LineSeries Highlight="true" Axis="Right" Smooth="3" XField="period" YField="pnTotalPass" >
                                        <MarkerConfig Type="Circle" Size="4" Radius="4" StrokeWidth="0" />
                                        
                                        <Label Contrast="true" Display="InsideEnd" Field="pnTotalPass" Color="#000" TextAnchor="middle" />
                                    </ext:LineSeries>
                                </Series>
                        </ext:Chart>
                    </Items>
                </ext:Panel>
        </form>
    </Body>
    </Html>
    I don't see nothing on the labels as it is shown into following image Click image for larger version. 

Name:	Capture.JPG 
Views:	123 
Size:	63.8 KB 
ID:	4722

    If I run the same code with property Hidden="false" for the panel1
    I see this Click image for larger version. 

Name:	Capture1.JPG 
Views:	147 
Size:	57.3 KB 
ID:	4723

    I need to start the panel hidden into my page and after click on the button it is shown.
    How can solve this issue?

    I hope clear.

    Thank you so much.
    Last edited by Baidaly; May 30, 2013 at 5:02 AM. Reason: [CLOSED]
  2. #2
    Hi,

    I am unable to reproduce the issue - I see the same with Hidden true and false.

    What browser do you test with? is it reproducible with all major browsers on your side?
  3. #3
    Quote Originally Posted by Daniil View Post

    What browser do you test with? is it reproducible with all major browsers on your side?
    I use IE9 with standard mode of IE9. I tried also last version of firefox and the page rendering is same of IE9.
  4. #4
    Please clarify what Ext.NET sources do you use?
  5. #5
    Quote Originally Posted by Daniil View Post
    Please clarify what Ext.NET sources do you use?
    I use files taken from Ext.NET.Pro.2.0.0.zip
  6. #6
    I would recommend to update from the v2.1 branch.
    http://svn.ext.net/premium/branches/2.1/

    There are already many bug fixes and improvements (mainly, MVC support).
  7. #7
    Hi,

    I updated Ext.Net at the last version as you suggest, but the problem it's same.
    Can you suggest something?

    Thank you.
  8. #8
    Please send a test project with the dlls to
    support@object.net

    I will investigate.
  9. #9
    Thank you for the test project.

    Here is the screenshot after clicking the Search button.

    So, I see the labels. Can you try it on another PC?
    Attached Thumbnails Click image for larger version. 

Name:	1.jpg 
Views:	123 
Size:	84.0 KB 
ID:	4729  
  10. #10
    Hi,

    The chart that I see into my page is same as you attached into screenshot last post, but my problem is the labels on the LineSeries not the ColumnSeries. If I set for the panel property hidden=true on my side I see this
    Click image for larger version. 

Name:	Cattura1.JPG 
Views:	109 
Size:	63.3 KB 
ID:	4750

    instead I set for the panel property hidden=false I see this
    Click image for larger version. 

Name:	Cattura.JPG 
Views:	137 
Size:	59.4 KB 
ID:	4751

    I highlighted the differences on image below
    Click image for larger version. 

Name:	Ev.JPG 
Views:	100 
Size:	69.6 KB 
ID:	4752

    I want to see the label for the LineSeries.
    I hope clear.
    Thank you so much.
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 19
    Last Post: Apr 26, 2016, 9:56 PM
  2. [OPEN] [#40] How can show the labels over each point of the LineSeries?
    By tactime10 in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Nov 17, 2012, 12:43 AM
  3. [CLOSED] chart isn't shown
    By tactime10 in forum 2.x Legacy Premium Help
    Replies: 9
    Last Post: Oct 17, 2012, 10:45 AM
  4. Replies: 14
    Last Post: Sep 27, 2012, 12:57 PM
  5. Replies: 2
    Last Post: Feb 02, 2011, 2:25 PM

Posting Permissions