WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Charts
[resolved] canvas does not work (14 posts)

  1. elpresidento
    Member
    Posted 6 months ago #

    Hi Paul
    I had defined canvasheight and canvaswidth in last version 0.5.2. Now (after upgrade to version 0.6.6) canvas does not work. Where is old version 0.5.2 for download on page http://wordpress.org/plugins/wp-charts/developers/ ? I expect it should be under tag in svn for rollback. Now I have broken charts and I cannot rollback :(

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

  2. Paul
    Member
    Plugin Author

    Posted 6 months ago #

    Hi

    I've added the old version, for you to use.

    Can I ask though, how are you using the canvasheight and canvaswidth properties ?

    those set the actual canvas width / height and will affect the draw resolution. I'm then using CSS and JS to set the width to 100% of the container, measure that width and make the height equal. if you're sizing the chart you should be able to use the standard width and height properties now.

    Let me know if there is some kind of bug, but I'd like to know what you're doing so that I can understand your use case.

    Cheers.

    Paul

  3. elpresidento
    Member
    Posted 6 months ago #

    tag 0.5.2 is empty

  4. elpresidento
    Member
    Posted 6 months ago #

    Thanks for fix tag, now is 0.5.2 available.

    About canvas. I use this shortcodes (script generated content)

    [wp_charts title="turist" type="line" datasets=2883,2883,2884,2889,2892,2894,2895 labels=07.10,09.10,11.10,14.10,16.10,18.10,21.10 width="100%" colors="#69D2E7" margin="0px 20px 0px 0px" canvasheight=240 canvaswidth=800 ]

    (links removed)

  5. Paul
    Member
    Plugin Author

    Posted 6 months ago #

    sorted....

  6. Paul
    Member
    Plugin Author

    Posted 6 months ago #

    Hey

    Are you wanting to use the canvasheight and canvaswidth to create charts that do not have a equal height and width?

    the only way I can think that this will work while keeping them responsive is to create a proportions property that will allow the script to calculate that width and height appropriately on resize.

    if this is your sue case let me know and I can probably add this feature tonight, though i'll need some testing as I haven't tried this at all.

    Regareds

    Paul

  7. Paul
    Member
    Plugin Author

    Posted 6 months ago #

    ah, didn't see your post above, thats what I thought, so in order to keep the charts responsive in all browsers, , we'll need to supply a proportions property so that the height can be calculated by the JS. (for example you'd need to put in the proportion value of 3.33 - I'll have this sorted in 0.6.8 - should do it tonight or tomorrow.)

    also, 0.5.2 is available for now, and I'll have a workable solution for you in the next minor update as soon as possible.

  8. Paul
    Member
    Plugin Author

    Posted 5 months ago #

    Hi there

    so I've added a 'relativewidth' property to the shortcode which I'd love you to test out, it defaults to 1 for square, where if you're setting you chart to 200px high and 600px wide your ratio would be 3 or for your example above 3.33. Give it a spin and let me know how that works out for you.

    Regards

    Paul

  9. elpresidento
    Member
    Posted 4 months ago #

    Relativewidth property does not work. I tested values from 2 to 4 and chart is still square.

  10. Paul
    Member
    Plugin Author

    Posted 4 months ago #

    That's very odd, will test it as doon. As I get moment today, maybe I screwed up with the svn pushing, will let you know soonest.

  11. Paul
    Member
    Plugin Author

    Posted 3 months ago #

    Hi elpresidento

    relative width is definitely now working, please see this example shortcode, its necessary to set height, width, canvasheight, canvaswidth and the relativewidth properties for the shortcode.

    [wp_charts title="linechart" type="line" align="alignleft" margin="5px 20px" datasets="40,43,61,50,20,40,20 next 33,15,40,32,38,57,46" labels="one,two,three,four,five,six,seven" scaleoverride="true" scalesteps="8" scalestepwidth="10" scalestartvalue="0" scaleFontSize="16" canvaswidth="920px" canvasheight="460px" relativewidth="2" width="920px" height="460px"]

    Thanks for the patience

    Kind Regards

    Paul

  12. Alberg15
    Member
    Posted 3 months ago #


  13. Paul
    Member
    Plugin Author

    Posted 3 months ago #

    seems somethings missing there Alberg15

  14. elpresidento
    Member
    Posted 1 month ago #

    Relativewidth property works fine now.
    Good job. Thaks very much Paul

Reply

You must log in to post.

About this Plugin

About this Topic