methnen
Forum Replies Created
-
Forum: Plugins
In reply to: [M Chart] Make graphs from post infoForum: Plugins
In reply to: [M Chart] Reverse SortingMarking as resolve as there’s been no response from OP.
Forum: Plugins
In reply to: [M Chart] Can’t insert dataMarking as resolved.
Forum: Plugins
In reply to: [M Chart] Can’t insert dataInteresting. That looks like more a WP setup issue than with the plugin in particular. The script stuff is building the URLs based on the directory and what WP considers the correct domain info.
I actually use MAMP for dev stuff myself and never actually seen that issue.
Forum: Plugins
In reply to: [M Chart] Can’t insert data@matteorubert there are no particular requirements other than WP but yes, jQuery is a requirement. If it’s not being enqueued by default already it should be enqueuing it in time for you.
What version of WP are you using? Anything unusual about your WP install?
Forum: Plugins
In reply to: [M Chart] Reverse SortingYou’d need to look at the settings for whichever charting library you are using. Then create a theme to add that setting to a chart. But I’m reasonably sure that’s possible for whichever library you use Chart.js or Highcharts.
Forum: Plugins
In reply to: [M Chart] Issue with quotation marks in data setThis has been resolved offline. The fix will go into the next release.
Forum: Plugins
In reply to: [M Chart] Issue with quotation marks in data set@biranit I sent you an email with a fix a few days ago, did you have a chance to check that out? Didn’t get a reply from you of any kind so figured I’d message here too just in case you missed it.
Forum: Plugins
In reply to: [M Chart] Multiple charts possible?It does one chart per data set, full stop.
If you’re asking if you can have one column for one chart and another column for another chart in the same data set the answer is NO.
If you are asking if you can have multiple data sets and display multiple charts on the same page the answer is YES.
It’s dynamic in the sense that if you update the data set it will update the attached images and embedded charts as well immediately. It’s not dynamic in that it is not designed to pull data from other sources/websites and display the data in chart form.
The full plugin is free, you’re welcome to play with it and see what it does and whether it fits your use case.
Forum: Plugins
In reply to: [M Chart] Issue with quotation marks in data setThanks for the heads up.
Any chance I could get a sample data set from you I could use while working to fix this?
Please feel free to email me at jamie AT methnen.com with any details.
Once I fix it I’d love to send you the fix and have you test it out before I release it out into the wild.
So you’re using the Highcharts theme but not the Highcharts library. That first setting is still set to Chart.js
So you want the theme to go here:
/public_html/wp-content/themes/rife-free/m-chart-chartjs-themes/
If you put it in the plugin theme folder then the next time the plugin updates you’ll lose that file.
And since Chart.js is the library being used your theme code should look like this:
<?php /** * Theme Name: MinAndMax */ return array( 'colors' => array( '#7cb5ec', '#434348', '#90ed7d', '#f7a35c', '#8085e9', '#f15c80', '#e4d354', '#2b908f', '#f45b5b', '#91e8e1', ), 'options' => array( 'scales' => array( 'r' => array( 'min' => 0, 'max' => 10, ), ), ), );Let me know how that works out for you.
- This reply was modified 5 years, 1 month ago by methnen.
@liyuchang I think there’s been some miscommunication here.
There’s two separate charting libraries that work with M Chart.
Chart.js is the default one with completely free licensing.
Highcharts is another you can use by installing a separate add-on plugin.
Since the libraries both have different setups the theming is library specific.
If you’re just using the core M Chart plugin than everything should be setup via the Chart.js method and you’ll want to follow their docs for any stuff you want to do.
Which are you using?
Let me know and I’ll see if I can build a theme that should work for you.
OK, so your code is goofy and that’s probably the problem.
You need to convert the Highcharts settings your messing with into a PHP array.
So your code should look like this:
<?php /** * Theme Name: highChart-MinAndMax */ return array( 'colors' => array( '#7cb5ec', '#434348', '#90ed7d', '#f7a35c', '#8085e9', '#f15c80', '#e4d354', '#2b908f', '#f45b5b', '#91e8e1', ), 'yAxis' => array( 'min' => 0, 'max' => 10, ), );Did you give the theme a name comment and put it in the correct place? That example path is just if you’re using the twentytwentyone theme. You’ll need to replace that with whatever theme you are actually using.
Also themes need to have a name comment at the top as in the example.
You’d need to alter the chart args again by setting a min max value instead of the default Chart.js behavior of setting them based on the data being displayed.
You could do that, again via the filter hook I mentioned.
Or alternately you could try doing it via a custom theme: