• Resolved smallbizco

    (@smallbizco)


    Hi, great plugin.

    I was just trying to work out how to add some ChartJS options. There’s one that helps with setting the min and max steps etc. for the Y axis. I’ve tried to add this but can’t get this to work.

    an example from ChartJS is:

    scales: {
    yAxes: [{
    ticks: {
    max: 5,
    min: 0,
    stepSize: 0.5
    }
    }]
    }
    };

    So added this (in a line to the shortcode. Problem is this has square brackets so WordPress is seeing this is as shortcode.

    I put:

    [gfchartsreports colors=”#ff2600,#008f00,#0433ff,#fffb00″ gfchartsreports gv_approve_status=”approve” count_answers=”1″ gf_form_id=”2″ gf_entry_id=”193″ group_fields=”1″ include=”3,9,6,13″ type=”bar” height=”400px” chart_js_options=”scales:{yAxes: [{ticks: {beginAtZero: true,steps: 5,stepValue: 0.5,max: 5}}]}”]

    Any ideas how to make this work?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter smallbizco

    (@smallbizco)

    Hi,

    Managed to do this by adding additional strings into maxicharts.php

    May be worth for future versions to increase the options around ticks etc.

    Thanks

    Plugin Author maxicharts

    (@maxicharts)

    Thanks for you feedback and improvements.
    Would you like us to commit your changes for the next release ?
    Cheers

    apcimino2

    (@apcimino2)

    Hi,

    Can you tell me what you changed? I need to not display my x axis.

    Thanks

    Plugin Author maxicharts

    (@maxicharts)

    Hi @apcimino2, we agree that if @smallbizco could share his code, it would be perfect !

    • This reply was modified 7 years ago by maxicharts.
    apcimino2

    (@apcimino2)

    Well if not, do you have another suggestion for how to remove/hide the ticks?

    Plugin Author maxicharts

    (@maxicharts)

    Unfortunately, as @smallbizco mentioned, it is not possible currently in maxicharts, as the square bracket cannot be used inside the shortcode…

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘ChartJS Options’ is closed to new replies.