Forum Replies Created

Viewing 15 replies - 16 through 30 (of 313 total)
  • Plugin Author methnen

    (@methnen)

    Have you considered using a bar instead of column chart in this case?

    I would try that with a larger height.

    That will thicken the bars quite a bit an should leave the chart being more readable on mobile.

    I’d also look at trying to use a shorter main title with the rest of the longer info put into the sub title.

    Chart.js and most every Chart rendering library uses Canvas and/or SVG to draw the charts and text handling in both of these is kind of a mess which is why you’ll often see long titles and labels causing issues.

    Plugin Author methnen

    (@methnen)

    I don’t understand the question completely.

    The plugin will create a chart out of whatever data you put into it.

    I don’t “type” the data going in or out to Chart.js on purpose because it’s basically impossible to know what type of data it might be and trying to auto recognize things like dates is very problematic.

    Everything is either a number or a string as far as the plugin is concerned.

    You can use dates if you want and as long as those dates are formatted in a way that works and includes all of the data and date values you want to display it will work fine. There’s many examples of people doing that with this plugin including in the examples in the wiki.

    But it seems you’re trying to do something else.

    The Units thing is more for Display and Tagging purposes (it’s linked to a WP Taxonomy)

    Plugin Author methnen

    (@methnen)

    It’s currently not in my plans, but this is just a Chart.js chart so you could potentially figure out how to do it since Chart.js can be extended via plugins.

    However, the chart should have compressed to fit the width of its container. I’m not immediately sure why that didn’t happen in this instance.

    In cases where a chart will be seen on mobile I’d typically recommend switching to a chart type that will handle that compression best given the data set you have.

    Chart.js does not proportionally resize well. I don’t know if it’s in their (the Chart.js) plans to ever correct that limitation but it’s a standing limitation unless something changed relatively recently.

    For what it’s worth Highcharts which is much more mature is pretty terrible at proportional resizing as well, though if I remember correctly it is there my experience with it was that it mangles the charts worse than what I standardized on for both Chart.js and Highcharts.

    Which was to have the height hard coded and the width fluid.

    Plugin Author methnen

    (@methnen)

    Can I get a little extra info? Are you using Chart.js or Highcharts? How is the CSS being applied?

    You should never make changes to a plugin itself. Changes should always be made via hooks or inside of your theme.

    Happy to help direct you but need a bit more detail. 🙂

    Plugin Author methnen

    (@methnen)

    OK, this one is really weird. I’m not quite sure why it’s happening yet but something is causing the canvas objects to always have a height of 600px despite me hard coding the height into the canvas object itself. This happens on my end too (though it didn’t use to). I think it might be inside of Chart.js that this is happening but I’m not sure yet.

    However, I do have a possible fix. If you can email me at jamie AT methnen.com and let me know on here when you’ve done so I’ll send you an updated copy of M Chart and if you can test it out I’d appreciate that.

    Plugin Author methnen

    (@methnen)

    This issue was resolved over email and the fix will be in the next release of M Chart.

    Plugin Author methnen

    (@methnen)

    Oh, and depending on what kind of caching you’ve got going on you might need to hit the Settings -> Permalinks page in the admin panel to make sure any rewrite rules have been refreshed.

    Plugin Author methnen

    (@methnen)

    I don’t speak or read Japanese so apologies if google translate didn’t do a good job.

    But I think the problem you describe is the M Chart post_type slug conflicting with an existing one in your install of WordPres.

    You can override slugs and any other post type arguments using the following filter hook:

    register_post_type_args

    In practice this looks something like this:

    add_filter( 'register_post_type_args', 'm_chart_register_post_type_args', 10, 2 );
    
    /**
     * Filter register_post_type_args and modify it for our purposes
     */
    public function register_post_type_args( $args, $post_type ) {
    	if ( 'm-chart' == $post_type ) {
    		$args['rewrite']['slug'] = 'something-other-than-chart-here';
    	}
    
    	return $args;
    }

    This should work as is if you throw it into your functions.php file and change the something-other-than-chart-here to what you’d prefer M Chart to use instead of chart for individual chart URLs.

    Plugin Author methnen

    (@methnen)

    @fulibaba sorry for the delay on this. Life has been a lot the last few months.

    I’d like to ask you to try enabling the iframe embed option in the M Chart Settings panel. And see if that solves the issue. If it does not, please let me know?

    Plugin Author methnen

    (@methnen)

    OK, your server is refusing it, even with it zipped, probably because it’s got some JS code in it. I’ll put that somewhere else and then try again. 😛

    Plugin Author methnen

    (@methnen)

    Thought that might be the case. I just sent it again, hopefully it gets to you this time. Let me know please either way.

    Plugin Author methnen

    (@methnen)

    Did you see my email reply with a possible fix?

    • This reply was modified 2 years, 3 months ago by methnen.
    Plugin Author methnen

    (@methnen)

    @fulibaba

    I spent some time poking at this and I’m still not quite sure what’s happening. Chart.js is supposed to honor the height applied to the canvas object. And for some reason in this case it’s not, and it’s actually setting it higher than it was set. I’m gonna see if I can duplicate this locally somehow.

    But can you confirm that the chart in the first tab on your example is indeed the same chart as in the second tab and that it’s height is explicitly set to: 300px as it seems?

    Plugin Author methnen

    (@methnen)

    Do you see a JS error when trying the code?

    Is there somewhere I can see it in action with your theme?

    Plugin Author methnen

    (@methnen)

    Jayesh,

    Sorry for the delay on this. Life has been something else the last month.

    I’m sitting down to work on this and I’m realizing that I might need to se your data set and your settings for the chart in question in order to properly duplicate the issue.

    Would you be willing to pass that all my way?

    jamie AT methnen.com

    Is my email address.

    Also please post here when you send it so I know to look for your email.

Viewing 15 replies - 16 through 30 (of 313 total)