Announcement

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

    JS Error when hovering Bar chart without defined getDataLineColor function

    Hi there,

    Using the following example, when I hover the bars of the bar chart with my mouse, I get a JS error, "Cannot read property 'charAt' of undefined".
    Is this intended behavior? Shouldn't there be a default value for that function the same way that getDataColor has a default value?

    I can reproduce this issue with the latetest downloadable version(SmartClient_v111p_2017-11-28_Pro) in the newest version of Chrome, as well as Firefox and Internet Explorer.

    Code:
    Code:
    var chartData = [{
            name: "John",
            value: 10
        },
        {
            name: "Doe",
            value: 25
        }
    ];
    
    isc.FacetChart.create({
        ID: "facetChart",
        title: "Comparison",
        width: "100%",
        height: "100%",
    
        chartType: "Bar",
        showValueOnHover: true, //Has to be true
        valueProperty: "value",
    
        data: chartData,
    
        facets: [{
                id: "name",
                title: "Name"
            }
        ],
    
        //JS Error occurs if the following function is not defined
    
        /*
        getDataLineColor: function (index, facetValueId) {
            var item = configForm.getItem("borderColor");
            return lineColors[item.getValue()];
        }
        */
    });
    
    var lineColors = {
        Grey: "#333333",
        Orange: "#FF8C00",
        Cyan: "#00FFFF"
    };

    Kind regards
    Last edited by SimonF; 30 Nov 2017, 05:38.

    #2
    We've made a change to address this issue. Please try the next nightly build, dated Dec 02.

    Regards
    Isomorphic Software

    Comment


      #3
      Hey,
      thank you for the quick fix. I can confirm that the JS error does not occur anymore using the latest Chrome and Firefox builds.
      Kind regards

      Comment

      Working...
      X