google-visualization

Google chart does not display results from MySql database

依然范特西╮ 提交于 2020-03-05 00:31:49
问题 I have a problem with google charts but nothing appears. When I delete php code, it says no data, but with the code it just does not appear. Here's the code: <?php $con = mysqli_connect('localhost', 'root', ''); mysqli_select_db($con, 'gamefort'); $s = " select naziv, broj from konzola group by naziv "; $result = mysqli_query($con, $s); ?> <script type="text/javascript"> google.charts.load('current', { 'packages': ['corechart'] }); google.charts.setOnLoadCallback(drawChart); function

How to remove zeros present in the bottom of google charts

筅森魡賤 提交于 2020-03-04 06:18:12
问题 I have created the following chart: The javascript function which I have used is as follows: <script> google.load('visualization', '1', {packages: ['corechart', 'bar', 'table']}); google.setOnLoadCallback(loadcharts); var dept= 'General Ward'; function drawBasic() { //alert(dept); var abc = $.ajax({url:'kpi23.php? dept='+dept,async:false,dataType:"json",}).responseText; var data = new google.visualization.DataTable(abc); var formatter = new google.visualization.NumberFormat({ pattern: 'short'

Annotation with symbols inside stacked bar charts using Google Chart API

瘦欲@ 提交于 2020-03-03 08:12:53
问题 I have a stacked bar chart where I need to annotate the bars with $ symbol as the profit and costs are currency. I am successful in annotating of the bars without currency symbol but I am unable to display with the $ prefixed. Could anyone throw light on this <html> <head> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load("current", { packages: ["corechart"] }); google.charts.setOnLoadCallback(drawChart);

Annotation with symbols inside stacked bar charts using Google Chart API

人走茶凉 提交于 2020-03-03 08:12:34
问题 I have a stacked bar chart where I need to annotate the bars with $ symbol as the profit and costs are currency. I am successful in annotating of the bars without currency symbol but I am unable to display with the $ prefixed. Could anyone throw light on this <html> <head> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load("current", { packages: ["corechart"] }); google.charts.setOnLoadCallback(drawChart);

Google chart multiple series with same scale

本秂侑毒 提交于 2020-03-02 06:56:10
问题 I'm looking for a way to have multiple series on my graphics, with the same scales but displayed only once. as you can see here : http://jsfiddle.net/Youkoal/d3xwnqdu/ I have 4 séries and the chart display all 4 axis. I have noted that this properties do not seem to work here: TextStyle: {color: 'none'} nor {format: 'none'} when included in the axis options. How can I 'hide' those axis or put all series on same scales? 回答1: the first letter in textStyle should be lowercase... textStyle: {

Google chart multiple series with same scale

送分小仙女□ 提交于 2020-03-02 06:56:06
问题 I'm looking for a way to have multiple series on my graphics, with the same scales but displayed only once. as you can see here : http://jsfiddle.net/Youkoal/d3xwnqdu/ I have 4 séries and the chart display all 4 axis. I have noted that this properties do not seem to work here: TextStyle: {color: 'none'} nor {format: 'none'} when included in the axis options. How can I 'hide' those axis or put all series on same scales? 回答1: the first letter in textStyle should be lowercase... textStyle: {

Google Charts - No data available - Able to display a blank chart?

↘锁芯ラ 提交于 2020-02-25 05:45:25
问题 How can I still have Google Charts still show a line chart if my data array looks like this? [['Date','Line']] i.e. just the axis are defined. Most of my charts have data imported but some have nil on the data. I would like to display a blank chart. With data above I get an error message instead of a chart. Here is code in my view google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization

Annotation forcing to appear inside stacked bar charts using Google Chart API

谁说我不能喝 提交于 2020-02-25 04:14:20
问题 I have a stacked bar chart where I need to annotate the bars inside the bars. I am successful in annotating of the bars but thats appearing outside. How do I force the annotations inside the bar with contrasting color. I used this class too but unfortunately no annotations.alwaysOutside <html> <head> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load("current", { packages: ["corechart"] }); google.charts

Annotation forcing to appear inside stacked bar charts using Google Chart API

家住魔仙堡 提交于 2020-02-25 04:12:46
问题 I have a stacked bar chart where I need to annotate the bars inside the bars. I am successful in annotating of the bars but thats appearing outside. How do I force the annotations inside the bar with contrasting color. I used this class too but unfortunately no annotations.alwaysOutside <html> <head> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load("current", { packages: ["corechart"] }); google.charts

Rerender ng2-google-chart after programmatically changing the data

坚强是说给别人听的谎言 提交于 2020-02-24 12:33:22
问题 I am using ng2-google-chart and it works fine. Now I want to use some checkboxes to choose which data is shown in the graph. My graph is connected to the array chartData , which is updated correct after the selection. But the graph does not change. This is my graph <div #graph [chartData]="this.chartData" chartType="AreaChart" GoogleChart></div> Is there a way to rerender it after the data is changed? 回答1: In the mean time I solved this: In angular2-google/directives/angular2-google-chart