Support » Plugin: WordPress Charts » How to set a horizontal chart

  • Resolved Alberg15


    Hi Paul. I’m also trying to get a chart that is wider than it is tall. When I tried your code from the “canvas does not work” post, I still got a square chart, but stretched to the max width and with distorted fonts. I’ve tried all sorts of variations, but I can’t get a clean chart. Here is my code, modeled off of your example:
    [wp_charts title=”my first chart” type=”line” scaleoverride=”true” scalesteps=”10″ scalestepwidth=”10″ scalestartvalue=”0″ scaleFontSize=”16″ datasets=”100, 0,0,100,0,0,100,0,0,100,0,0″ colors=” #003F80″ labels=”Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec” canvaswidth=”600px” canvasheight=”300px” relativewidth=”2″ width=”600px” height=”300px”]

    Thanks for your help. -ab

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Paul van Zyl



    so I used your shortcode

    [wp_charts title="my first chart" type="line" scaleoverride="true" scalesteps="10" scalestepwidth="10" scalestartvalue="0" scaleFontSize="16" datasets="100, 0,0,100,0,0,100,0,0,100,0,0" colors="#003F80" labels="Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec" canvaswidth="600px" canvasheight="300px" relativewidth="2" width="600px" height="300px"]

    and its works perfectly in the 2012 default theme, I can only imagine there is a little bit of dodgy responsive CSS in your theme files causing this issue, if you can send me a link I’ll have a quick look, but I’m closing the issue as it does not seem to be related to the core plugin.

    Hi. You can see it here: This should be a horizontal chart, and it’s distorted.

    I was able to get a horizontal chart to display elsewhere on the site, but only after a lot of heavy CSS, which sort of defeats the purpose of the formatting inside of the shortcode.

    Thanks for any help. -ab

    This plugin has been a great help for me thus far, but I have the same exact issue. Has anyone else been able to work this out without having to edit the CSS? I’m using a Twenty Fourteen WordPress child theme and even when I remove all my CSS edits the chart still doesn’t display properly.

    Any help will be much appreciated 🙂

    Plugin Author Paul van Zyl


    Hi Guyd

    @alberg15 – Tried the link – no luck, of you provide a working link I’ll have a look

    @vgne – I’ve just loaded the asymmetrical chart I added the example shortcode for (above) and seems to be working perfectly. have you got it on localhost or is it available on a live domain ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to set a horizontal chart’ is closed to new replies.