WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Charts
[resolved] Using Charts within Tabbed Content Boxes (4 posts)

  1. btrivedi
    Member
    Posted 6 months ago #

    Hi,

    I'm using your charting plug in (thanks for it - it's super easy to use!) and am having an issue. When I use the shortcodes in a regular page format (no other coding) it works just fine. I can put the charts in columns, or full width, etc.

    However, when I try to use them in the tabbed content shortcode that comes with the theme I am using (Elegant Themes - Trim Theme) plus your chart codes it screws up the height. Essentially, it squishes the charts. I can still use them within columns, etc. and the width works but the height, no matter what I try, won't work. I've included my code below. Any help? (Code abbreviated)

    [tab][one_third][wp_charts title="mydough" type="doughnut" align="alignleft" margin="5px 5px" data="30,10,55,25" colors="7AB800,#008FBE,#F78000,#929496" width="100%" height="auto"][/one_third][one_third][wp_charts title="mydough2" type="doughnut" align="alignleft" margin="5px 5px" data="30,10,55,25" colors="7AB800,#008FBE,#F78000,#929496" width="100%" height="auto"][/one_third][one_third_last][wp_charts title="mydough3" type="doughnut" align="alignleft" margin="5px 5px" data="30,10,55,25" colors="7AB800,#008FBE,#F78000,#929496" width="100%" height="auto"][/one_third_last][/tab] [tab]Content goes here[/tab]

    (Side note - changing height from auto to 100% doesn't fix it).

    Thanks!

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

  2. Paul
    Member
    Plugin Author

    Posted 6 months ago #

    Hi btrivedi

    I assume this will have to do with the canvas element being rendered inside a hidden div, depending on how they've creating their tabbing plugin, its probably hidden with jQuery's .hide() which sets a css property of display:none which stops canvas rendering, at this stage I'm not quite sure how I would fix this for you, and its a little bit of an edge case for me to tackle, I'll definitely keep it in mind as I develop the plugin further, though the only way I can imagine this would work is to tie render and destroy methods into the tab events which you'd need to likely do on a case by case basis.

    Sorry I can't be of more assistance.

    Thanks for checking out WP Charts.

    Kind Regards

    Paul

  3. btrivedi
    Member
    Posted 6 months ago #

    Hi Paul,

    Thank you so much for the pointer! That's a pretty good hypothesis and I'll look into it. I'll keep you posted!

  4. Paul
    Member
    Plugin Author

    Posted 6 months ago #

    awesome, I'm sure you wont be the only person who faces this challenge.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.