Hey ! I use Blazing Charts since few days and I like it, but I’m beginner and I havn’t succeed to pick data from sql or php.
I have read Plugin author comments and olugin doculentation but i don’t understand the kind of function i can use for sending data with “blazing_charts_insert()” function.
Can someone just give me a simple exemple of what to do for my understanding !
Is there a GUI to create charts? How does one point to data?
Some reviews seem to indicate this doesn’t exist, but thought I’d ask.
]]>Hi Massoud,
Thanks for the great plug-in. Which revision of the D3 library is loaded by blazingcharts? Is there an option to select a different library revision?
I loaded D3.v4 with <script src=”//d3js.org/d3.v4.min.js”> in the header, but receive “d3.scaleLinear is not a a function” error on the console. In changing from v3 to v4, the d3.scale.linear function was replaced by d3.scaleLinear. Is an older library being used?
Outside of the WP and blazingcharts environment, my html, css and js is working as expected.
Thank you in advance!
]]>Hy,
I am trying to create a map chart with Highmaps library, but in the code I do not see how to implement this like with highcharts.
Do you plan to integrate highMaps library just like Highcharts ?
Or can I hook your plugin to add just the necessary code to add highMaps library.
Thanks,
Didier
Hello,
how can i use this plugin to show a line chart. I have postet the following example code from https://blazingspider.com/wp-demo/187/chart-js-time-scale-sample/#more-187 into a page, but it doesn’t work.
Can anyone help me?
Example code from the website:
[BlazingChart charttype="chartjs" source="a Chart Snippet" options="bundle"]
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script>
<style>
canvas {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
</style>
<div style="width:75%;">
<canvas id="canvas"></canvas>
</div>
<br>
<br>
<button id="randomizeData">Randomize Data</button>
<button id="addData">Add Data</button>
<button id="removeData">Remove Data</button>
<script>
window.onload = function() {
function randomScalingFactor() {
return Math.round(Math.random() * 100 * (Math.random() > 0.5 ? -1 : 1));
}
function randomColorFactor() {
return Math.round(Math.random() * 255);
}
function randomColor(opacity) {
return 'rgba(' + randomColorFactor() + ',' + randomColorFactor() + ',' + randomColorFactor() + ',' + (opacity || '.3') + ')';
}
function newDate(days) {
return moment().add(days, 'd').toDate();
}
function newDateString(days) {
return moment().add(days, 'd').format();
}
var config = {
type: 'line',
data: {
datasets: [{
label: "Dataset with string point data",
data: [{
x: newDateString(0),
y: randomScalingFactor()
}, {
x: newDateString(2),
y: randomScalingFactor()
}, {
x: newDateString(4),
y: randomScalingFactor()
}, {
x: newDateString(5),
y: randomScalingFactor()
}],
fill: false
}, {
label: "Dataset with date object point data",
data: [{
x: newDate(0),
y: randomScalingFactor()
}, {
x: newDate(2),
y: randomScalingFactor()
}, {
x: newDate(4),
y: randomScalingFactor()
}, {
x: newDate(5),
y: randomScalingFactor()
}],
fill: false
}]
},
options: {
responsive: true,
title:{
display:true,
text:"Chart.js Time Point Data"
},
scales: {
xAxes: [{
type: "time",
display: true,
scaleLabel: {
display: true,
labelString: 'Date'
}
}],
yAxes: [{
display: true,
scaleLabel: {
display: true,
labelString: 'value'
}
}]
}
}
};
jQuery.each(config.data.datasets, function(i, dataset) {
dataset.borderColor = randomColor(0.4);
dataset.backgroundColor = randomColor(0.5);
dataset.pointBorderColor = randomColor(0.7);
dataset.pointBackgroundColor = randomColor(0.5);
dataset.pointBorderWidth = 1;
});
jQuery('#randomizeData').click(function() {
jQuery.each(config.data.datasets, function(i, dataset) {
jQuery.each(dataset.data, function(j, dataObj) {
dataObj.y = randomScalingFactor();
});
});
window.myLine.update();
});
jQuery('#addData').click(function() {
if (config.data.datasets.length > 0) {
var lastTime = myLine.scales['x-axis-0'].labelMoments[0].length ? myLine.scales['x-axis-0'].labelMoments[0][myLine.scales['x-axis-0'].labelMoments[0].length - 1] : moment();
var newTime = lastTime
.clone()
.add(1, 'day')
.format('MM/DD/YYYY HH:mm');
for (var index = 0; index < config.data.datasets.length; ++index) {
config.data.datasets[index].data.push({
x: newTime,
y: randomScalingFactor()
});
}
window.myLine.update();
}
});
jQuery('#removeData').click(function() {
config.data.datasets.forEach(function(dataset, datasetIndex) {
dataset.data.pop();
});
window.myLine.update();
});
var ctx = document.getElementById("canvas").getContext("2d");
window.myLine = new Chart(ctx, config);
};
</script>
]]>
Hi,
Is it possible to use custom field values in the snippets?
I use Advanced Custom Fields and can use their shortcode to output numbers but it does not work within the snippet. I know it is not a functionality that was intended, but I wonder if it can be done by someone without much coding experience.
Cheers
]]>Can you please update to chart.js 2.2.x. It has a lot of new features and I would love to use it.
There is also a CDN source: https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.2.2/Chart.min.js
Moreover can you please create a new example on your demo page because the syntax change in version 2.x.
Would be very nice!
]]>Hello,
I tried activating this plug in and received a fatal error with a message saying parse error on line 58 for blazing-charts.php. I’m currently in WordPress version 4.5.3 with the Dyad theme installed. It looks like that line is trying to add a filter, I’m not positive though. Any thoughts on how I can start to troubleshoot this? I’m very interested in using this plugin.
Thanks!
]]>I’m trying to activate Blazing Charts, but am getting this error message:
Parse error: syntax error, unexpected ‘[‘ in /var/www/html/we/***website address***/wp-content/plugins/blazing-charts/blazing-charts.php on line 58
Any advice on this issue?
]]>I just installed this plugin to use Blazing Chart for displaying Chart.js graphs. Is it possible to use php coding in the chart snippits to fetch data from a mysql database or what is the best way to do this?
]]>Hello Massoud,
I have one slight problem with your otherwise wonderful plugin:
I can′t include two doughnut charts from chart.js in one page (i′m aware af the problems of using different libraries in the same post, but does this apply to charts from the same library?).
I simply paste the shortcode with different chart snippets in to the document, but only the latter is shown…
all the best
Ole
Hello,
I red that you suggest not to mix libraries,
how can I add a radar chart to a page where there is also a d3.js pie chart?
could you please add an example to the example webisite?
I like your plugin
Thank you
Hello,
I’m not getting the “Chart Snippets” post in the dashboard,
how can I insert the snippets?
It would be interesting added the NVD3js library to Blazing Charts
Cheers
Hi,
Please tell me what is the subdirectory where Snippets plane text must be stored ?
Hi,
I use Types plugin so there are more post types (besides Posts and Pages). When Blazing Charts is active, the link to one of those categories in the sidebar of the admin side dissapears.
I’ve checked it has nothing to do with the number of items listed at the same time.
Here is a screenshot for clarification https://goo.gl/4Jrkyo
Thanks
Sorry for the engrish