Announcement

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

    FacetChart scaling issue

    Hi,

    We are using a FacetChart to show a bar graph that represents a % value (0-100) on the Y-axis. We have recently upgraded our licence to version 6 from 4 to get the following functionality:

    chart.setAxisStartValue(0.0);
    chart.setAxisEndValue(100.0);

    However, we see different behaviour for the Y axis scaling or ticks when the graph has data and when the graph has zero values. See the two screenshots for details.
    Is there something else we need to set? E.g. can we specify the scaling?
    SmartGWT version: 6.0p

    Without Data:
    Click image for larger version

Name:	facetchart_withoutdata.png
Views:	174
Size:	9.1 KB
ID:	241329

    With Data:
    Click image for larger version

Name:	facetchart_withdata.png
Views:	185
Size:	14.3 KB
ID:	241330

    #2
    Hi checkpt,

    see this perhaps related thread. Are you using a newer version of 6.0p? You'll need to always tell your exact framework build date (I usually get it from the Developer Console).

    Best regards
    Blama

    Comment


      #3
      Hi Blama,

      Thanks for the pointer it seems like a similar issue however, I have just downloaded the latest 6.0p version and still see the same issue.

      Here is the version which exhibits the issue: SmartClient Version: v11.0p_2016-11-13/Pro Deployment (built 2016-11-13)

      Regards,
      Checkpt

      Comment


        #4
        Adding Debug log from Developer Console for Facetchart and further example of issue with 1 column having a value of 1.




        Code:
        17:23:31.289:MUP9:INFO:FacetChart:isc_FacetChart_0:setData: maxValue: 1
        17:23:31.960:MUP9:DEBUG:chartDraw:isc_FacetChart_0:drawing gradations
        17:23:31.993:MUP9:DEBUG:chartDraw:isc_FacetChart_0:drawing data
        17:23:31.993:MUP9:DEBUG:chartDraw:isc_FacetChart_0:availableSpace: 485, availableBarSpace: 465, bars per cluster: 1, final gap between clusters/bars: 5, final within-cluster bar margin: undefined, barThickness: 93, extraSpace: 93
        17:23:32.023:MUP9:INFO:redraws:isc_FacetChart_0:Scheduling redraw (no reason provided)
            Canvas.$q9(_1=>undef, _2=>undef)
            Canvas.markForRedraw(_1=>undef)
            $markForRedraw(this$static=>FacetChart{facets: Array[1],
        valueProperty: "count",
        bandedBackground: false,
        autoRotateLabels: false,
        axisStartValue: 0,
        axisEndValue: 100,
        backgroundColor: "white",
        dataColors: Array[1],
        maxBarThickness: 100,
        valueTitle: "Genauigkeit %",
        title: "",
        showValueOnHover: true,
        data: Array[5],
        AUTOIDClass: "FacetChart",
        ID: "isc_FacetChart_0",
        position: "absolute",
        className: "scChart",
        width: 563,
        height: 611,
        gradients: Array[6],
        drawItems: Array[415],
        quadTree: [QuadTree ID:undefined],
        canvasItems: Array[0],
        dataGradients: Obj,
        isVML: false,
        hasShadows: true,
        orderedData: Array[5],
        locatorParent: [Portlet ID:isc_Portlet_1],
        parentElement: [Layout ID:isc_Portlet_1_body],
        topElement: [VLayout ID:isc_VLayout_0],
        tabIndex: 1509,
        ruleScope: "isc_VLayout_0",
        cacheOffsetCoords: true,
        zIndex: 201332,
        zoomStartValue: "06/10/2016",
        zoomEndValue: "02/10/2016",
        xLabelsHeight: 34,
        yLabelsWidth: 20,
        gradations: Array[201],
        })
            $refresh_0(this$static=>com.oatsystems.raf.smartgwt.client.ReceivingActivity@8)
            $refreshAll(this$static=>com.oatsystems.raf.smartgwt.client.Dashboard@9)
            $dispatch(handler=>com.oatsystems.raf.smartgwt.client.Dashboard$3@17)
            dispatch_1(handler=>com.oatsystems.raf.smartgwt.client.Dashboard$3@17)
            $doFire(this$static=>com.google.gwt.event.shared.HandlerManager$Bus@18, event_0=>An event type)
            $fireEvent(this$static=>com.google.gwt.event.shared.HandlerManager@19, event_0=>An event type)
            $fireEvent_0(this$static=>ToolStripButton{icon: "arrow_refresh_small.png",
        title: "Aktualisieren",
        AUTOIDClass: "ToolStripButton",
        ID: "isc_ToolStripButton_0",
        position: "absolute",
        width: 1,
        left: 1485,
        top: 3,
        styleName: null,
        inherentWidth: true,
        inherentHeight: false,
        overflow: "visible",
        parentElement: [ToolStrip ID:isc_ToolStrip_0],
        topElement: [VLayout ID:isc_VLayout_0],
        tabIndex: 1203,
        ruleScope: "isc_VLayout_0",
        cacheOffsetCoords: true,
        zIndex: 200126,
        state: "Disabled",
        hasFocus: false,
        disabled: true,
        }, event_0=>An event type)
            fireEvent_0(event_0=>An event type)
            anonymous(param=>Obj)
            apply(jsFunction=>anonymous(), thisObj=>[object Window], arguments_0=>[object Arguments])
            entry0(jsFunction=>anonymous(), thisObj=>[object Window], arguments_0=>[object Arguments])
            anonymous(Obj)
            [o]ToolStripButton.click(Obj, undef)
            StatefulCanvas.handleActivate(_1=>Obj, _2=>undef)
            StatefulCanvas.handleClick(_1=>Obj, _2=>undef)
            [c]EventHandler.bubbleEvent(_1=>[ToolStripButton ID:isc_ToolStripButton_0], _2=>"click", _3=>undef, _4=>undef, _5=>undef)
            [c]EventHandler.handleClick(_1=>[ToolStripButton ID:isc_ToolStripButton_0], _2=>undef)
            [c]EventHandler.$k5(_1=>[object MouseEvent], _2=>undef)
            [c]EventHandler.handleMouseUp(_1=>[object MouseEvent], _2=>undef)
            [c]EventHandler.dispatch(_1=>[c]EventHandler.handleMouseUp(), _2=>[object MouseEvent])
            anonymous(event=>[object MouseEvent])
        
        17:23:32.265:TMR6:INFO:drawing:isc_FacetChart_0:$ra(): redrawing
        17:23:32.371:TMR6:INFO:FacetChart:isc_FacetChart_0:Redraw called on drawPane with drawingType:bitmap
        17:23:32.373:TMR6:INFO:sizing:isc_FacetChart_0:Specified size: 563x611, drawn scroll size: 563x611, border: 0x0, margin: 0x0, reason: redraw
        17:23:32.373:TMR6:DEBUG:sizing:isc_FacetChart_0:handle sizes: {scrollLeft: 0,
        scrollTop: 0,
        scrollWidth: 563,
        scrollHeight: 611,
        clientWidth: undef,
        clientHeight: undef,
        offsetWidth: 563,
        offsetHeight: 611,
        styleLeft: "0px",
        styleTop: "0px",
        styleWidth: "563px",
        styleHeight: "611px",
        styleClip: ""}
        17:23:32.374:TMR6:DEBUG:drawing:isc_FacetChart_0:Redraw() - Total time to redraw in DOM:109

        Comment


          #5
          We're not seeing any problem. Can you provide some repro code? For reference, see the section titled, "Preparing a Standalone Test Case" here.

          Comment


            #6
            Here is the example class BuiltInDS.java and ReceivingData.java. You will also need to add <inherits name="com.smartgwt.Charts"/> to .gwt.xml file.

            The demo code will draw graph data on refresh for different conditions depending on the seconds provided by Date object. The two cases that show the issue happen at 0-20seconds past the minute e.g. from hh:mm:00 to hh:mm:20. The rest of the 10 sec intervals draw correct data.

            Regards,
            checkpt
            BuiltInDS.java ReceivingData.java

            Comment


              #7
              We've applied a fix for this to SGWT 6.0p/SC 11.0p and newer branches. It will be in the nightly builds dated 2016-11-17 and beyond.

              Comment


                #8
                Hi Isomorphic,

                Thanks for the quick turnaround, the fix looks good.

                Regards,
                checkpt

                Comment

                Working...
                X