Announcement

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

    FacetChart setShowDataValuesMode(ShowDataValuesMode showDataValuesMode) and compatibility with FacetChart setShowValueOnHover (Boolean t) on 13.0p

    SmartClient Version: v13.0p_2022-02-09/PowerEdition Deployment (built 2022-02-09)
    or
    SmartClient Version: v12.1p_2021-10-22/PowerEdition Deployment (built 2021-10-22)


    When switching to 13.0p I see that FacetChart setShowValueOnHover (Boolean t) is deprecated. I replaced it with:

    FacetChart setShowDataValuesMode( ShowDataValuesMode.INCHARTANDHOVER);

    But now I can't switch between 12.1 releases and 13.0 releases as the type ShowDataValuesMode is not defined in 2021-10-22 version of 12.1.

    1. Is this intended? So I can only move forward but never backward?

    2. If the usage was chart.setShowValueOnHover (true) is this replaced by chart.setShowDataValuesMode( ShowDataValuesMode.INCHARTANDHOVER) or by chart.setShowDataValuesMode( ShowDataValuesMode.AUTO). Can you clarify the documentation to show the equivalence?

    Thanks

    #2
    Quick note - the deprecation is there so that, if you need to switch versions for a while, you can. Once you are switching between two versions where the newer API is available in both, get rid of the deprecation.

    Note also that we can’t solve this by just backporting all new functionality (no frameworks or libraries that we know of take this approach).

    Comment


      #3
      OK, understood your answer to question 1. We can live with that.

      What is the new API's equivalent to chart.setShowValueOnHover (true) , question 2?

      Comment


        #4
        Sorry, should have mentioned: that separate question has been assigned, we are looking at the docs to see what to improve and we will both refine the docs and explain further here.

        Comment


          #5
          We'll update the docs to show more clearly how the new setting showDataValuesMode, represents the two legacy settings, showDataValues and showValueOnHover.

          If your usage previously was setShowValueOnHover(true), ie you only want to see data-values in hovers, and never fixed in the chart, then you want inHoverOnly.

          InChartAndHover is a new feature: it means show values in the chart if they fit (eg, pie-sectors large enough) and show hovers as well, for those that don't fit in the chart.

          InChart*Or*Hover is the legacy behavior of setShowDataValues(true) - show all labels in the chart if they all fit, or all of them in hovers otherwise (unless showValueInHover is false).

          On Auto - depending on the chart type, there are different options for showing data-values - eg, stacked-charts don't show values inline in the chart; column-charts can, and they can rotate titles if they're wider than their columns; pie charts can show some data-values in the chart but not others; all the types can show values in hovers. If you choose Auto, it will first try to show values in the chart, where the chart-type supports it, and where they'll fit. If they don't all fit, it will show the ones that do, including rotating them where it can, if the chart type allows it, and then switch on hovers as well, as needed.

          If you run your code without changing your original settings, getShowDataValuesMode() should return how your current settings have been mapped to the new one.

          Comment


            #6
            This latest description looks good, thanks. Basically add it to the documentation so users can move forward.

            Thanks

            Comment

            Working...
            X