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

    Data label / hover in scrolling chart not displaying correct data label after scrolling the chart.


    I am trying to add data label into a un-stacked column chart. My requirement is to have the ability to scroll the chart and also provide data point label / hover for each column in the chart. I followed the sample in smartGWTEE showcase for scrolling chart and that worked.

    But when I added "chart.setShowDataLabels(true);" in the source code to enable data labels in the chart, it did not do anything ( no data labels or hover got displayed).
    Then I disabled that API call and added "chart.setShowValueOnHover(true);" to enable hover per data point to display data point value. This did enable the hover per data point on the initial drawn chart, but when I scroll the chart to right the hover is not displaying correct data point value. The hover shows up on a different data point then the one where the mouse is pointing at. Please see the attached screenshot.

    I have also attached a sample test case using the sample code from the showcase.

    This is the version I am using: SmartClient Version: SNAPSHOT_v12.1d_2020-02-21/PowerEdition Deployment (built 2020-02-21)

    Let me know if there is any workaround/fix to have the data labels correctly displayed in the scrolling chart.

    Attached Files
    Last edited by survivor1505; 25th Mar 2020, 11:13.

    A chart like the one in your sample code already has showDataLabels: true set - that's why adding "chart.setShowDataLabels(true)" seemed to have no impact. The "data labels" are the facet value labels shown along the x-axis in your chart..."Virginia", "Massachusetts", "Indiana", etc. Perhaps you were looking for setShowDataValues()?

    We did see the other issue you raised related to scrolling, and have made a fix to SGWT 6.1p/SC 11.1p and newer releases. The fix should be in the nightly builds dated 2020-03-27 and beyond.

    Finally, we noticed that you're posting in the SmartClient forum with SmartGWT sample code. In the future, you probably want to post in the SmartGWT forum.