Forum Discussion

Sdg8481's avatar
Sdg8481
Helper I
6 years ago
Solved

SVG Bar Chart within a table

Hi, from searching on the internet i found this brilliant code for adding a barchart into a standard table.   However, i can see that ChartScale is hardcoded (at 10,000), however all of my values i...
  • lbendlin's avatar
    lbendlin
    6 years ago

    That probably means that internally the SVG defaults the chart scale to 100 if no value is given.

     

    In that case you need to provide a dynamic chart scale based on your largest number.

     

    Say, your numbers a and b are 4300 and 3500.  Then your chart scale should be a "1"  followed by 

     

    (int(LOG10(max(number a,number b))+1) "0"  strings.