methnen
Forum Replies Created
-
Forum: Plugins
In reply to: [M Chart] Shortcake UI is not rendered.So the preview you see in the editor is from the image the plugin generates for you. Have you disabled that feature?
Forum: Plugins
In reply to: [M Chart] Shortcake UI is not rendered.When the chart renders on the front end it’s still not showing the chart?
It’s been awhile since I did that code. But if I remember right the preview was a placeholder due to some sort of limitation I ran into with Cupcake. But when it renders life on the front end it SHOULD be the correct form.
- This reply was modified 6 years, 2 months ago by methnen.
Forum: Plugins
In reply to: [M Chart] Download and zoom options.As long as itβs ensued before the chart renders. You should be good.
Forum: Plugins
In reply to: [M Chart] Download and zoom options.Nope. Why enqueue a script that isn’t being used?
Forum: Plugins
In reply to: [M Chart] Download and zoom options.Looks fine from this end. Are you enqueing the exporting module as well?
wp_enqueue_script( 'highcharts-exporting' );- This reply was modified 6 years, 2 months ago by methnen.
Forum: Reviews
In reply to: [M Chart] Great plugin.You certainly can try. I haven’t tested it in awhile though and as I said, the developers abandoned it. But if it still works that would provide what you are asking for.
Forum: Plugins
In reply to: [M Chart] Download and zoom options.You can use either a theme or the filter hook for the chart args:
https://github.com/methnen/m-chart/wiki/Themes
https://github.com/methnen/m-chart/wiki/Action-and-filter-hooks#m_chart_chart_args
Forum: Reviews
In reply to: [M Chart] Great plugin.I’m not sure I follow the question.
You are asking if it’s possible to add a button so you can add charts to a post from a list of already created ones while editing a post?
That’s certainly possible and spending some time building a blocks interface is on my list of to do items once I have the time.
If you install Shortcake I’ve supported that in the plugin and it does exactly that for non Block editing. But know that Shortcake’s devs have abandoned it as far as I can tell.
Forum: Plugins
In reply to: [M Chart] Download and zoom options.The chart images are already generated for each chart and are attached to the chart post as a featured image. So any of the functions that can retrieve a featured image URL could do the same for a chart using the Chart ID #.
Does that make sense?
Forum: Plugins
In reply to: [M Chart] Undefined variable JS errorThis was resolved over email.
A universal fix will be in the next update to M Chart.
Forum: Plugins
In reply to: [M Chart] Chart.js custom colorsAgreed, everything around that could be improved a bit. It’s on my short list so it’ll happen hopefully sometime soon if I have a little spare time to spend on it. π
Glad you got something that worked for you in any case.
Forum: Plugins
In reply to: [M Chart] Chart.js custom colorsThat example in the wiki is for Highcharts.
In Chart.js colors have to be set directly for each data set/item there’s no actual colors value you can change that will just universal effect all chart types like you can in Highcharts. It’s one of my two main complaints about how Chart.js does things. It’s very clunky.
To change the colors in Chart.js you’d need to loop through the settings based on the chart type.
You can see how the plugin does this on line 126 of class-m-chart-chartjs.php:
https://github.com/methnen/m-chart/blob/master/components/class-m-chart-chartjs.php#L126
So basically you’d use that filter hook you’re already experimenting in, check the chart type and data structure by looking at those chart args and then cycle through the data set args in a similar manner but with your alternate colors.
It’s on my feature list to simplify customizing the colors in Chart.js somehow, probably by allowing you set different defaults inside the plugin settings but I just haven’t had time to get to it yet.
- This reply was modified 6 years, 3 months ago by methnen.
Forum: Plugins
In reply to: [M Chart] Automatically change in chart from CSV file?This gets asked occasionally.
The short answer is no. There’s no built in way to do this.
The long answer is yes, you could totally make this happen but you’d need to code something that grabs the data from the Google Sheets document and then applies it to the chart on render by hooking into one of the filter hooks in the plugin.
So it would require some coding and possibly API knowledge depending on what the permissions are on the Google Sheets document.
Forum: Plugins
In reply to: [M Chart] Undefined variable JS errorAlso please feel free to email me any additional information you want to keep more private:
jamie AT methnen.com
Forum: Plugins
In reply to: [M Chart] Undefined variable JS errorThat is an interesting one. That number at the end is to differentiate between different charts on the same page. Since the admin panel only ever shows one chart at a time I just hard coded the number in like that. But clearly in some certain situation the chart is getting an iteration number of 2.
Is there a place I can see this happening? I can probably get it fixed pretty quickly if I can duplicate the issue.