Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Diagram Zoom

    I have the attached 2 screenshots. Note that the zoom -Chart "stops" when having a steap increase /decrease from/to zero. Is this a known issue ?
    If not, how to reproduce it?All the data I am showing is in a MSSQL table.
    Using smartgwt 07.03.16 power

    #2
    Here the attachments
    Attached Files

    Comment


      #3
      I see similar effects in your showcase when changing the diagram-type to line:

      http://www.smartclient.com/smartgwte...tockPricesZoom
      Attached Files

      Comment


        #4
        While experimenting with your examples and changing the chart to type="LINE" and changing some values to be "zero", I see a similar problem with your zoom. Maybe it is another issue, maybe it is related, so here it goes:
        The two arrows are showing the same point of time in the attachment (screenshot).
        But the zoom is not accurate: while the sample decreases after the arrow to zero, the zoom increases !!!!! Maybe therer is an issue with "zeros" as my original problem was also related to the "zero" value.

        Testcase:
        Code:
        @Override  
            public void onModuleLoad() {  
                final FacetChart chart = new FacetChart();  
                chart.setData(MultiSeriesChartData.getData());  
                chart.setFacets(new Facet("time", "Period"), new Facet("region", "Region"));  
                chart.setValueProperty("value");  
                chart.setChartType(ChartType.LINE);  
                chart.setTitle("Revenue");  
                chart.setCanZoom(true);
         
                final DynamicForm chartSelector = new DynamicForm();  
                final SelectItem chartType = new SelectItem("chartType", "Chart Type");  
                chartType.setValueMap(  
                        ChartType.AREA.getValue(),  
                        ChartType.BAR.getValue(),  
                        ChartType.COLUMN.getValue(),  
                        ChartType.DOUGHNUT.getValue(),  
                        ChartType.LINE.getValue(),  
                        ChartType.PIE.getValue(),  
                        ChartType.RADAR.getValue());  
                chartType.setDefaultToFirstOption(true);  
                chartType.addChangedHandler(new ChangedHandler() {  
                    public void onChanged(ChangedEvent event) {  
                        String selectedChartType = chartType.getValueAsString();  
                        if (ChartType.AREA.getValue().equals(selectedChartType)) {  
                            chart.setChartType(ChartType.AREA);  
                        } else if (ChartType.BAR.getValue().equals(selectedChartType)) {  
                            chart.setChartType(ChartType.BAR);  
                        } else if (ChartType.COLUMN.getValue().equals(selectedChartType)) {  
                            chart.setChartType(ChartType.COLUMN);  
                        } else if (ChartType.DOUGHNUT.getValue().equals(selectedChartType)) {  
                            chart.setChartType(ChartType.DOUGHNUT);  
                        } else if (ChartType.LINE.getValue().equals(selectedChartType)) {  
                            chart.setChartType(ChartType.LINE);  
                        } else if (ChartType.PIE.getValue().equals(selectedChartType)) {  
                            chart.setChartType(ChartType.PIE);  
                        } else if (ChartType.RADAR.getValue().equals(selectedChartType)) {  
                            chart.setChartType(ChartType.RADAR);  
                        }  
                    }  
                });  
                chartSelector.setFields(chartType);  
         
                VLayout layout = new VLayout(15);  
                layout.addMember(chartSelector);  
                layout.addMember(chart);  
                layout.setWidth("50%");
                layout.setHeight100();
         
                layout.draw();  
            }
        Data: (Modified)
        Code:
        public class MultiSeriesChartData extends Record {
        
            public MultiSeriesChartData(String time, float value, String region) {
                setAttribute("time", time);
                setAttribute("value", value);
                setAttribute("region", region);
            }
        
            public static MultiSeriesChartData[] getData() {
                return new MultiSeriesChartData[] {
                    new MultiSeriesChartData("1/1/2002", 108.88f, "North"),
                    new MultiSeriesChartData("1/1/2002", 891.93f, "South"),
                    new MultiSeriesChartData("1/1/2002", 715.13f, "East"),
                    new MultiSeriesChartData("1/1/2002", 559.34f, "West"),
                    new MultiSeriesChartData("2/1/2002", 626.63f, "North"),
                    new MultiSeriesChartData("2/1/2002", 637.73f, "South"),
                    new MultiSeriesChartData("2/1/2002", 976.97f, "East"),
                    new MultiSeriesChartData("2/1/2002", 216.27f, "West"),
                    new MultiSeriesChartData("3/1/2002",  799.18f, "North"),
                    new MultiSeriesChartData("3/1/2002",  916.38f, "South"),
                    new MultiSeriesChartData("3/1/2002",  853.82f, "East"),
                    new MultiSeriesChartData("3/1/2002",  344.79f, "West"),
                    new MultiSeriesChartData("4/1/2002",  707.1f, "North"),
                    new MultiSeriesChartData("4/1/2002",  796.73f, "South"),
                    new MultiSeriesChartData("4/1/2002",  590.05f, "East"),
                    new MultiSeriesChartData("4/1/2002",  209.03f, "West"),
                    new MultiSeriesChartData("5/1/2002",  321.58f, "North"),
                    new MultiSeriesChartData("5/1/2002",  363.25f, "South"),
                    new MultiSeriesChartData("5/1/2002",  446.66f, "East"),
                    new MultiSeriesChartData("5/1/2002",  338.79f, "West"),
                    new MultiSeriesChartData("6/1/2002",  423.43f, "North"),
                    new MultiSeriesChartData("6/1/2002",  216.04f, "South"),
                    new MultiSeriesChartData("6/1/2002",  511.3f, "East"),
                    new MultiSeriesChartData("6/1/2002",  292.49f, "West"),
                    new MultiSeriesChartData("7/1/2002",  837.1f, "North"),
                    new MultiSeriesChartData("7/1/2002",  970.83f, "South"),
                    new MultiSeriesChartData("7/1/2002",  888.2f, "East"),
                    new MultiSeriesChartData("7/1/2002",  842.14f, "West"),
                    new MultiSeriesChartData("8/1/2002",  975.65f, "North"),
                    new MultiSeriesChartData("8/1/2002",  758.96f, "South"),
                    new MultiSeriesChartData("8/1/2002",  853.26f, "East"),
                    new MultiSeriesChartData("8/1/2002",  103.42f, "West"),
                    new MultiSeriesChartData("9/1/2002",  440.78f, "North"),
                    new MultiSeriesChartData("9/1/2002",  727.4f, "South"),
                    new MultiSeriesChartData("9/1/2002",  822.97f, "East"),
                    new MultiSeriesChartData("9/1/2002",  405.61f, "West"),
                    new MultiSeriesChartData("10/1/2002",  327.79f, "North"),
                    new MultiSeriesChartData("10/1/2002",  538.75f, "South"),
                    new MultiSeriesChartData("10/1/2002",  854.46f, "East"),
                    new MultiSeriesChartData("10/1/2002",  106.61f, "West"),
                    new MultiSeriesChartData("11/1/2002",  451.64f, "North"),
                    new MultiSeriesChartData("11/1/2002",  871.23f, "South"),
                    new MultiSeriesChartData("11/1/2002",  145.49f, "East"),
                    new MultiSeriesChartData("11/1/2002",  829.97f, "West"),
                    new MultiSeriesChartData("12/1/2002",  178.88f, "North"),
                    new MultiSeriesChartData("12/1/2002",  918.7f, "South"),
                    new MultiSeriesChartData("12/1/2002",  534.44f, "East"),
                    new MultiSeriesChartData("12/1/2002",  964.85f, "West"),
                    new MultiSeriesChartData("1/1/2003",  122.72f, "North"),
                    new MultiSeriesChartData("1/1/2003",  890.61f, "South"),
                    new MultiSeriesChartData("1/1/2003",  0f, "East"),
                    new MultiSeriesChartData("1/1/2003",  166.02f, "West"),
                    new MultiSeriesChartData("2/1/2003",  252.96f, "North"),
                    new MultiSeriesChartData("2/1/2003",  512.08f, "South"),
                    new MultiSeriesChartData("2/1/2003",  0f, "East"),
                    new MultiSeriesChartData("2/1/2003",  853.91f, "West"),
                    new MultiSeriesChartData("3/1/2003",  786.04f, "North"),
                    new MultiSeriesChartData("3/1/2003",  523.83f, "South"),
                    new MultiSeriesChartData("3/1/2003",  781.93f, "East"),
                    new MultiSeriesChartData("3/1/2003",  714.54f, "West"),
                    new MultiSeriesChartData("4/1/2003",  490.04f, "North"),
                    new MultiSeriesChartData("4/1/2003",  0f, "South"),
                    new MultiSeriesChartData("4/1/2003",  258.83f, "East"),
                    new MultiSeriesChartData("4/1/2003",  199.57f, "West"),
                    new MultiSeriesChartData("5/1/2003",  232.65f, "North"),
                    new MultiSeriesChartData("5/1/2003",  759.15f, "South"),
                    new MultiSeriesChartData("5/1/2003",  134.91f, "East"),
                    new MultiSeriesChartData("5/1/2003",  269.29f, "West"),
                    new MultiSeriesChartData("6/1/2003",  436.18f, "North"),
                    new MultiSeriesChartData("6/1/2003",  423.31f, "South"),
                    new MultiSeriesChartData("6/1/2003",  592.31f, "East"),
                    new MultiSeriesChartData("6/1/2003",  677.62f, "West"),
                    new MultiSeriesChartData("7/1/2003",  667.57f, "North"),
                    new MultiSeriesChartData("7/1/2003",  834.87f, "South"),
                    new MultiSeriesChartData("7/1/2003",  953.77f, "East"),
                    new MultiSeriesChartData("7/1/2003",  902.08f, "West"),
                    new MultiSeriesChartData("8/1/2003",  485.39f, "North"),
                    new MultiSeriesChartData("8/1/2003",  455.7f, "South"),
                    new MultiSeriesChartData("8/1/2003",  182.68f, "East"),
                    new MultiSeriesChartData("8/1/2003",  213.83f, "West"),
                    new MultiSeriesChartData("9/1/2003",  799.83f, "North"),
                    new MultiSeriesChartData("9/1/2003",  239.27f, "South"),
                    new MultiSeriesChartData("9/1/2003",  383.04f, "East"),
                    new MultiSeriesChartData("9/1/2003",  0f, "West"),
                    new MultiSeriesChartData("10/1/2003",  533.71f, "North"),
                    new MultiSeriesChartData("10/1/2003",  352.66f, "South"),
                    new MultiSeriesChartData("10/1/2003",  299.48f, "East"),
                    new MultiSeriesChartData("10/1/2003",  983.99f, "West"),
                    new MultiSeriesChartData("11/1/2003",  752.46f, "North"),
                    new MultiSeriesChartData("11/1/2003",  710.61f, "South"),
                    new MultiSeriesChartData("11/1/2003",  817.26f, "East"),
                    new MultiSeriesChartData("11/1/2003",  798.84f, "West"),
                    new MultiSeriesChartData("12/1/2003",  349.16f, "North"),
                    new MultiSeriesChartData("12/1/2003",  645.47f, "South"),
                    new MultiSeriesChartData("12/1/2003",  462.25f, "East"),
                    new MultiSeriesChartData("12/1/2003",  413.88f, "West"),
                    new MultiSeriesChartData("1/1/2004",  107.5f, "North"),
                    new MultiSeriesChartData("1/1/2004",  237.2f, "South"),
                    new MultiSeriesChartData("1/1/2004",  900.95f, "East"),
                    new MultiSeriesChartData("1/1/2004",  671.39f, "West"),
                    new MultiSeriesChartData("2/1/2004",  201.79f, "North"),
                    new MultiSeriesChartData("2/1/2004",  398.4f, "South"),
                    new MultiSeriesChartData("2/1/2004",  440.5f, "East"),
                    new MultiSeriesChartData("2/1/2004",  179.28f, "West"),
                    new MultiSeriesChartData("3/1/2004",  696.97f, "North"),
                    new MultiSeriesChartData("3/1/2004",  572.3f, "South"),
                    new MultiSeriesChartData("3/1/2004",  528.65f, "East"),
                    new MultiSeriesChartData("3/1/2004",  811.09f, "West"),
                    new MultiSeriesChartData("4/1/2004",  482.62f, "North"),
                    new MultiSeriesChartData("4/1/2004",  657.75f, "South"),
                    new MultiSeriesChartData("4/1/2004",  253.78f, "East"),
                    new MultiSeriesChartData("4/1/2004",  205.98f, "West"),
                    new MultiSeriesChartData("5/1/2004",  602.92f, "North"),
                    new MultiSeriesChartData("5/1/2004",  659.21f, "South"),
                    new MultiSeriesChartData("5/1/2004",  844.88f, "East"),
                    new MultiSeriesChartData("5/1/2004",  268.72f, "West"),
                    new MultiSeriesChartData("6/1/2004",  961.68f, "North"),
                    new MultiSeriesChartData("6/1/2004",  367.78f, "South"),
                    new MultiSeriesChartData("6/1/2004",  171.6f, "East"),
                    new MultiSeriesChartData("6/1/2004",  669.74f, "West"),
                    new MultiSeriesChartData("7/1/2004",  157.36f, "North"),
                    new MultiSeriesChartData("7/1/2004",  781.19f, "South"),
                    new MultiSeriesChartData("7/1/2004",  244.19f, "East"),
                    new MultiSeriesChartData("7/1/2004",  345.07f, "West"),
                    new MultiSeriesChartData("8/1/2004",  803.01f, "North"),
                    new MultiSeriesChartData("8/1/2004",  398.78f, "South"),
                    new MultiSeriesChartData("8/1/2004",  713.52f, "East"),
                    new MultiSeriesChartData("8/1/2004",  996.36f, "West"),
                    new MultiSeriesChartData("9/1/2004",  942.33f, "North"),
                    new MultiSeriesChartData("9/1/2004",  411.54f, "South"),
                    new MultiSeriesChartData("9/1/2004",  371.09f, "East"),
                    new MultiSeriesChartData("9/1/2004",  590.91f, "West"),
                    new MultiSeriesChartData("10/1/2004",  874.63f, "North"),
                    new MultiSeriesChartData("10/1/2004",  857.04f, "South"),
                    new MultiSeriesChartData("10/1/2004",  649.05f, "East"),
                    new MultiSeriesChartData("10/1/2004",  861.61f, "West"),
                    new MultiSeriesChartData("11/1/2004",  789.86f, "North"),
                    new MultiSeriesChartData("11/1/2004",  788.52f, "South"),
                    new MultiSeriesChartData("11/1/2004",  120.13f, "East"),
                    new MultiSeriesChartData("11/1/2004",  807.02f, "West"),
                    new MultiSeriesChartData("12/1/2004",  268.58f, "North"),
                    new MultiSeriesChartData("12/1/2004",  774.83f, "South"),
                    new MultiSeriesChartData("12/1/2004",  997.72f, "East"),
                    new MultiSeriesChartData("12/1/2004",  191.29f, "West")
                };
            }
        
        }
        Attached Files

        Comment


          #5
          Hi Isomorphic,

          I can reproduce using the online sample. See attached screenshot.
          Click image for larger version

Name:	Chart_error.png
Views:	131
Size:	227.8 KB
ID:	235648

          Best regards
          Blama

          EDIT: Seeing the crossposts: This seems not to be value-near-0-related.
          Attached Files
          Last edited by Blama; 8 Mar 2016, 08:34.

          Comment


            #6
            Originally posted by Blama View Post
            Hi Isomorphic,

            I can reproduce using the online sample. See attached screenshot.
            [ATTACH=CONFIG]n235648[/ATTACH]

            Best regards
            Blama
            I think this is a new issue, since in my examples, the data was truncated in the zoom-area, and in your examples the data was truncated in the original chart. But yes, this is a similar issue !
            So there seem to be 4 issues all similar but different:
            1) Data is truncated in the zoom chart when going from zero http://forums.smartclient.com/forum/...632#post235632
            2) Data is truncated in the zoom chart (but not going from zero) http://forums.smartclient.com/forum/...40#post2356403)
            3) Zoom-Area completely ignores a part of the original data http://forums.smartclient.com/forum/...643#post235643
            4) Original chart is truncated http://forums.smartclient.com/forum/...645#post235645

            Isomorphic please take a look at these 4 issues

            Comment


              #7
              Another example of truncated values in the main chart, please refer to the attachment.
              Click image for larger version

Name:	Bildschirmfoto 2016-03-10 um 13.48.50.png
Views:	40
Size:	1.22 MB
ID:	235708

              Comment


                #8
                I was experimenting and I get another problem. See the attached screenshots.
                As you see, the first seems correct, but the second not. The original chart and the zoom-region are totally different. So what is correct? The original chart? The zoomed chart?
                Click image for larger version

Name:	Bildschirmfoto 2016-03-10 um 13.59.32.png
Views:	40
Size:	353.1 KB
ID:	235713Click image for larger version

Name:	Bildschirmfoto 2016-03-10 um 13.59.47.png
Views:	52
Size:	280.6 KB
ID:	235714

                Comment


                  #9
                  Originally posted by edulid View Post

                  I think this is a new issue, since in my examples, the data was truncated in the zoom-area, and in your examples the data was truncated in the original chart. But yes, this is a similar issue !
                  So there seem to be 4 issues all similar but different:
                  1) Data is truncated in the zoom chart when going from zero http://forums.smartclient.com/forum/...632#post235632
                  2) Data is truncated in the zoom chart (but not going from zero) http://forums.smartclient.com/forum/...40#post2356403)
                  3) Zoom-Area completely ignores a part of the original data http://forums.smartclient.com/forum/...643#post235643
                  4) Original chart is truncated http://forums.smartclient.com/forum/...645#post235645

                  Isomorphic please take a look at these 4 issues
                  We see the repro code for the 3rd issue. For the others, can you provide repro code or indicate what sample was used?

                  Comment


                    #10
                    We see the problem causing the 3rd issue and are testing a solution - the fix may solve more than just that one. We'll update this thread as more becomes known.

                    Comment


                      #11
                      The 2) issue can be reproduced in your showcase: http://www.smartclient.com/smartgwte...tockPricesZoom (http://forums.smartclient.com/forum/...9-diagram-zoom)

                      Comment


                        #12
                        We've committed a fix for the "zero problem" (issue #3) to SGWT 5.0p/SC 10.p and newer. It will be available in the nightly builds dated 2016-03-12 and newer.

                        As far as issue #2, we're not able to reproduce it, and you've not provided your complete version info. From the New Topic page:
                        Be sure your post includes:

                        1. The *complete* SmartGWT or SmartClient version from the lower left-hand corner of the Developer Console (see FAQ for how to open Developer Console), for example, "v10.0p_2015-06-18/PowerEdition Deployment"
                        In "Area" mode, there should be lines or gaps in the chart at the bottom - these correspond to the locations of the x-axis labels and help the user judge data location. In "Line" mode, these should become dotted vertical grey lines, and indeed that's what we see when we rebuild the showcase ourselves.

                        We don't see gaps in "Line" mode as your screen capture shows. When you say,
                        I see similar effects in your showcase when changing the diagram-type to line:

                        http://www.smartclient.com/smartgwte...tockPricesZoom
                        presumably you mean you rebuilt the showcase yourself with said changes, since the online version can't be modified. What browser and OS are you using?

                        If you're comfortable checking the SmartClient Framework, go to http://www.smartclient.com/#stockPriceCharting in the same browser, and change chartType: "Area" to chartType: "Line" in the stockChart.js tab and click "Try It". Do you see the problem from your screenshot, or the grey lines I mentioned near each x-axis label?

                        Comment


                          #13
                          Issue #3 is corrected, thanks.

                          For issue #2: I was using smartgwt 07.03.16 power (5.0p). (And now using 20.03.15 5.0p and it's the same)
                          No, i am NOT rebuilding the showcase with changes. I just opened the showcase, changed (with right-click in the context-menu) the chart type to Line.

                          So, step by step:
                          Open http://www.smartclient.com/smartgwte...tockPricesZoom with Firefox 45.0
                          Right click
                          Change chart type to line
                          you should see the gaps in the zoom-chart

                          In your smartclient Example (http://www.smartclient.com/#stockPriceCharting) it is the same: Right click, change chart to "Line", and then I see the gaps.
                          If I change in the stockChart.js "Area" to "Line" and then "try it", then I DO NOT SEE THIS GAPS. So it seems only to happen when right clicking the chart and changing the chart type from the context menu.

                          Comment


                            #14
                            Browser Firefox 45.0
                            OS: Apple 10.11.2

                            Comment


                              #15
                              Isomorphic?
                              Were you able to reproduce Issue #2?

                              Comment

                              Working...
                              X