Menu

Resizing bars in bar graph

2002-08-06
2013-12-16
  • Nobody/Anonymous

    I just started to use this but my bars are have a real big width.  Depending on how many bars are in the graph the size adjusts.  More bar...each one is smaller and vice versa...could someone help me out so i can resize them.  thanks

     
    • Anonymous

      Anonymous - 2002-08-06

      edit the values in lines 111 and/or 112 of phplot.php:

      //Data
      ...
      var $group_frac_width = '.3'; //value from 0 to 1 = width of bar

      var $bar_width_adjust = '1'; //1 = bars of normal width, must be > 0

       
  • jim mc

    jim mc - 2013-12-12

    I have a vertical bar graph, with 6 data points for each day of the week.

    currently the bars are next to each other.

    is there a way to add padding between the vertical data bars ?

    thanks,
    jim mc...

     
  • lbayuk

    lbayuk - 2013-12-12

    Sure. There are 3 class variables that you can set which affect the bar width and spacing. They are bar_extra_space, group_frac_width, and bar_width_adjust. Using these you can 'tune' how PHPlot calculates the bar width and spacing. Take a look at the description in Tuning Bar Charts.

    If you want an example, tell me a little more about your plot. You have "6 points for each day of the week". To clarify: about how many X values (rows) are in your data array, and I assume there are 6 Y values per X, correct?

     
  • jim mc

    jim mc - 2013-12-16

    That did it....

    appreciate your assistance.

    happy holidays.

    jim mc....

    Oh, yes you are correct 6 data points per day. have a months worth of data.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.