WordPress Charts
[resolved] How to get each bar to fall on top of correct X-axis labels? (3 posts)

  1. VGNE
    Posted 2 years ago #

    Hello everyone :)

    All the bars of my charts are sliding to the left of the graph. Here is the shortcode that I am using:

    [wp_charts title="barchart" type="bar" width="100%" colors="#FF3300" margin="20px 20px" datasets="60 next 59 next 58 next 57 next 60 next 59 next 58" labels="7-7-13,7-14-13,7-21-13,7-28-13,8-4-13,8-11-13,8-18-13"]

    This image shows what I am talking about.

    Does anyone else have this problem? Any help will be much appreciated!


  2. VGNE
    Posted 2 years ago #

    Never mind I figured it out. Silly mistake on my part :)

    I didn't realize the datasets had to be separated with a comma instead of the word "next" to have each bar sprout from the next x-axis label. This is the correct way I needed my shortcode to be:

    [wp_charts title="barchart" type="bar" width="100%" colors="#FF3300" margin="20px 20px" datasets="60,59,58,57,60,59,58" labels="7-7-13,7-14-13,7-21-13,7-28-13,8-4-13,8-11-13,8-18-13"]

    Hopefully this helps out others!

  3. Paul van Zyl
    Plugin Author

    Posted 2 years ago #

    Hey VGNE

    Sorry I took so long to respond to you, and I'm very glad you've worked this out! The next key word is only for when you've got comparable data sets for certain graph types, such as the line chart where you're mapping out a set of comma separated data points, with a second data set.

    Good luck and look out for the updates coming soon.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Charts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.