Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2014
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Bar width of bar chart

    Hi everyone!

    I'm creating a module that has a functionality of graphing using
    bar chart in jqplot.

    But i have this little problem:
    whenever I graph a single data, the width of bar
    in my bar chart is too wide.

    Is there a way to limit or set the maximum width of bars inside
    the bar chart?

    Thank you very much.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,166
    Thanks
    23
    Thanked 600 Times in 599 Posts
    When you get new plug-ins the first thing you should do is READ THE FANCY MANUAL commonly dubbed RTFM. You may hear that many times in the future.
    From the manual http://www.jqplot.com/docs/files/jqPlotOptions-txt.html

    // BarRenderer.
    // With BarRenderer, you can specify additional options in the rendererOptions object
    // on the series or on the seriesDefaults object. Note, some options are respecified
    // (like shadowDepth) to override lineRenderer defaults from which BarRenderer inherits.

    seriesDefaults: {
    rendererOptions: {
    barPadding: 8, // number of pixels between adjacent bars in the same
    // group (same category or bin).
    barMargin: 10, // number of pixels between adjacent groups of bars.
    barDirection: 'vertical', // vertical or horizontal.
    barWidth: null, // width of the bars. null to calculate automatically.
    shadowOffset: 2, // offset from the bar edge to stroke the shadow.
    shadowDepth: 5, // nuber of strokes to make for the shadow.
    shadowAlpha: 0.8, // transparency of the shadow.
    }
    },
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • Users who have thanked sunfighter for this post:

    cidcid (01-14-2014)

  • #3
    New to the CF scene
    Join Date
    Jan 2014
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you!

    bar width works


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •