WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Charts
[resolved] Bar Char Scale (4 posts)

  1. sohoit_raff
    Member
    Posted 10 months ago #

    I've managed to use this plugin with custom fields and managed to create all forms of charts. However i have one small question.. when i create a bar chart with data 55, 60 and 65. The scale of the axis is in the thousands so 50.101 50.201 etc. My question is if there is a way for force it to be whole numbers only so 50 51 52 etc.

    Id appreciate any help you could provide

    http://wordpress.org/extend/plugins/wp-charts/

  2. Paul
    Member
    Plugin Author

    Posted 10 months ago #

    Hi There

    for the bar charts you must use the following

    datasets="40,32,50,35 next 20,25,45,42 next 40,43, 61,50 next 33,15,40,22"

    and you must also ensure you have the correct number of labels.

    This is because the bar chart is able to show comparative data and therefore requires sets divided by the "next" keyword, even if you only have a single value per set.

    If you're doing it this way could you add a code snippet and link to an example if possible?

    Hope this helps.

    Warmest Regards

    Paul

  3. sohoit_raff
    Member
    Posted 10 months ago #

    Hi Paul

    Thank you for your very quick response.

    Unfortunately i'm working on it locally at the moment, i'm looking to get up onto a client area this week.. but here is the shortcode i'm using...

    [wp_charts width="185px" height="185px" canvaswidth="185" canvasheight="185" title="graph_container3" class="graph_container" type="bar" datasets="60, 50, 55" labels="Lorem Ipsum, Lorem Ipsum, Lorem Ipsum" colors="#83d1f5, #94c247, #83d1f5"]

    are you saying the dataset should be...

    datasets="60, 50, 55 next"?

  4. Paul
    Member
    Plugin Author

    Posted 10 months ago #

    Hey there,

    all datasets should be seperated by the next keyword, as the bar chart can have multiple items of data (a dataset) per "label", if you only have one you should be seperating each with the next keyword.

    ie :datasaets="50 next 20 next 10" or datasets="20,10,50 next 30,30,10 next 50,40,20"

    alternatively it sounds like your data would be better displayed using a PIE chart or line. Hope that helps.

    Warmest Regards

    Paul

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.