MGS_Sebastien

Members
  • Content count

    36
  • Joined

  • Last visited

Posts posted by MGS_Sebastien


  1. Hi,

    I found a bug in FC, when you're setting : decimals: "0" and you have negative values in your graph, the value is not well rounded.

    In example : -3.5 should be rounded at -4, currently it show -3. I think this is because your devs are using the Math.round integrated function of JS, but this is something wrong.

    Try this dataSource :

    const chartData = {
      chart: {
        caption: "Test decimals",
        theme: "fusion",
        decimals: "0"
      },
      data: [
        {
          label: "test1",
          value: "3.5"
        },
        {
          label: "test2",
          value: "-3.5"
        },
        {
          label: "test3",
          value: "-2.5"
        },
        {
          label: "test4",
          value: "+2.4"
        },
        {
          label: "test5",
          value: "-10.5"
        }
      ]
    };

    I suggest to use this function I delveloped myself that I always use to have good rounding relative numbers (my variables are in french but it works) :

    /**
     * Permet d'arrondir un nombre à la décimale souhaitée
     * @param {number} nombre Nombre à arrondir.
     * @param {number} decimales Nombre de décimales à arrondir. (Par défaut 0)
     * @returns {number}
     */
    function arrondi(nombre, decimales = 0) {
        if (decimales < -1) throw new Error("Le nombre de décimales ne peut être inférieur à -1.");
    
        var neg = nombre < 0;
        if (decimales == -1)
            return nombre;
        else {
            var nombre_abs = Math.round(Math.abs(nombre) * Math.pow(10, decimales)) / Math.pow(10, decimales);
            if (neg) return -nombre_abs
            else return nombre_abs;
        }
    }

     

     


  2. Hi,

    I have a new request. Currently, we cannot do whatever we want about the y-axis. I mean we should be able to specify what values we want to show exactly.

    Whatever are the values in the dataset or whatever is the height of the graph, I want to be able to specify exactly y axis labels needed : in example if I want to have 25% 50% 75% or 10% 20% etc or 22% 44% 88% or 7% 14% 21% etc... etc... How could I do this ? I don't think it's possible with FS at this time.

    A new functionality related to this could be very nice to be developed I think. What  do you think ?


  3. Hi all,

    I just saw that the 3.14.1 is out, and I just want to say that you did a very nice work just for that new thing : "Some attributes of data plot cosmetics like valueFontColor, valueBgColor and valueBorderColor will now apply at data series and individual data point level."

    However ... Why did you stopped at these styles ? "valueFontBold" and "valueFontSize" should have been added too at least, both are really useful I think (might be "valueFontAlpha" too ? But not sure in which case to use it yet) !

    What do you think of it ?


  4. Hi Akash,

    As I use my doughnut in a dashboard, the values are always changing so this means annotations manually placed is very difficult.

     

    Quote

    "since the angled slices dimension may not be sufficient to display the values or labels, which may result to a wrong or incorrect visualization of the chart"

    The ideal thing could be to have a property (like 'placeValuesInside': '1') to place the values inside (and leave label outside).

    Another property could be added in addition : 'minDisplayValue': '5' which hide values under the specified number. (Label stills outside and displayed ! The tooltip will make the job)

     

    Sébastien


  5. Hi,

     

    I have a new suggestion for your developper team :

     

    The ability to apply the same color as the seriename color to the font values !! It could be particulary useful on radar charts for exemple or on any charts where the values are overlaping.

     

    A property like :

    "applySeriesnameColorToValuesFontColor": "1" at chart level object

    and may be at dataset level object too ? (apply it only for some but not all for exemple)

     

    I am surprised that isn't implemented yet. (or might be it is done and I didn't find it...)

     

     

    Sébastien


  6. Hi,

     

    Ok thank you Prerana

    This is a nice tool, I didn't know it ; I think I will use it for other cases :)

    In your fiddle, you forgot to wrap with 'false' parameter of getSmartText method.

     

    However if a newbie developper use FusionCharts, this will take a lot of time to manage these labels, a simple property on the chart could be more effective for the dashboard developpement speed. (And also for experimented developpers it takes some time to develop any tips to find a solution)

     

     

    Sébastien


  7. Hi,

     

    Is it possible to add new property "minLabelWidthPercent" (as the "maxLabelWidthPercent" exists) for next versions...

    I mean when you have two bar charts which pass from right to down in responsive dashboard, how can you fix the same horizontal alignement between the two charts ??? it's impossible actually.

     

    My labels o the two charts are dynamics, so I can't put <br/>...

    And can't put blank chars on all labels because it will align on left...

     

    I already found something :

     

    I get the label length of chart 1

    I get the label length of chart 2

    I calculate diff between the two label length

    And i put blank chars on the lower length of the two...

    The graphs are aligned...

     

    BUT this can be corrected easily with a new property :

    minLabelWidthPercent

     

     

    What do you think of that ?

     

    Sébastien