google-visualization

Logarithmic scale in material google line chart

a 夏天 提交于 2020-01-03 13:59:25
问题 I am not able to create a logarithmic vertical axis for my material Google Line Chart. Documentation states that I should set vAxis.logScale to true in the options, but this leads to no result. Currently my test reads: <div class="chart"></div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script src="https://www.gstatic.com/charts/loader.js"></script> <script> google.charts.load("current", { "packages": [ "line", "corechart" ]}); google.charts

Google geocharts with coordinates?

守給你的承諾、 提交于 2020-01-03 13:34:13
问题 I want to use google geochart with coordinates (longtitute, latitute). But I cant find any example about this topic. There are a lot of example with region and city example. But with coordinates I Cant find. Please, code example, link, tutorial any thing else? Thanks. 回答1: As said in the documentation: Marker location [Required] The first column is a specific string address (for example, "1600 Pennsylvania Ave"). OR The first two columns are numeric, where the first column is the latitude,

Google Charts not working with Wkhtmltopdf

拥有回忆 提交于 2020-01-03 09:09:11
问题 I am trying to generate multiple charts in a PDF using Google Charts. For the PDFs, I am using CakePDF with the Wkhtmltopdf engine. I appear to be having a problem with actually loading the Google Chart code into the PDF though. This is my current code for my Javascript. <script type="text/javascript" src="https://www.google.com/jsapi"> </script> <script type="text/javascript"> google.load('visualization', '1.0', {'packages':['corechart']}); //setTimeout(function() {google.load('visualization

Google charts trendline not showing

你离开我真会死。 提交于 2020-01-03 08:37:29
问题 I have a Google chart line chart that I want to show a trendline on, but it doesn't show up. The data is fetched from a database and the javascript is generated by PHP but the resulting javascript looks like this: <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> // Load the Visualization API and the piechart package. google.load('visualization', '1.0', {'packages':['corechart']}); // Set a callback to run when the Google Visualization

generate server-side google charts as images

耗尽温柔 提交于 2020-01-03 08:29:08
问题 I've just started using the (new) Google Charts api and its pretty cool. I'm successfully creating charts using this api. I have a throughput challenge however. In my application I generate three charts from real-time data I'm pulling down from NOAA. The time it takes to get the data, massage it into chart form and then draw the chart client-side is an intolerably slow user experience. So my thought was to generate the chart periodically (every 15-30 min) on the (hosted) server and then just

Drawing Google Chart in hidden elements

a 夏天 提交于 2020-01-03 05:20:09
问题 Trying do render Google charts in hidden elements without lucky. The fiddle bellow has an example with bootstrap tabs: Fiddle Got some help from Andrew here: How to draw a google chart when a tab is showed? but the chart now is re-rendering anytime I interact with it, (for example with the range filter). The HTML code is: <div class="container"> <div class="tabbable"> <ul class="nav nav-tabs" data-tabs="tabs"> <li class="active"> <a href="#A" data-toggle="tab">Tab A</a> </li> <li class=""> <a

Using google charts (bars), can I make de bar color linear gradient?

依然范特西╮ 提交于 2020-01-03 05:17:08
问题 I'm using a bar chart and I need that the bars to be gradient rather than solid colors.In the code, you can see that I add "role: style" and after a solid color, but I need that the to have a linear gradient. function drawChart2() { var data = google.visualization.arrayToDataTable([ ["Element", "Difference", { role: "style" }], ['Mg', 1.2 , "#1aab54"] ]); var view = new google.visualization.DataView(data); view.setColumns([0, 1, { calc: "stringify", sourceColumn: 1, type: "string", role:

How to apply placeholder to Google Visualization control wrapper string filter input?

一笑奈何 提交于 2020-01-03 04:30:34
问题 I have to apply placeholder to Google Visualization control wrapper string filter input.I tried with var stringFilter = new google.visualization.ControlWrapper({ 'controlType': 'StringFilter', 'containerId': 'search_container', 'options': { 'filterColumnLabel': 'Name', 'matchType':'any', 'ui': {'label': ''} } }); google.visualization.events.addListener(stringFilter, 'ready', function(){ $(".google-visualization-controls-stringfilter").prop('placeholder', "Search.."); }); but it does not work.

Error in timeline chart bar: <text> attribute x: Expected length, “NaN”

試著忘記壹切 提交于 2020-01-03 02:46:07
问题 Third day I'm trying to get data from json without errors with google timeline chart. I thought it should worked, but i've got an error <text> attribute x: Expected length, "NaN". There is a problem part <g><text text-anchor="middle" x="NaN" y="21.05" font-family="Arial" font-size="13" stroke="none" stroke-width="0" fill="#000000"> </text></g> There is my chart with ajax-call to data: var data = []; $.ajax({ url: "/api/reports/6/linestatus", dataType: "json", success: function (jsonData) {

How to make a grouped bar stack with Google charts?

ぃ、小莉子 提交于 2020-01-02 20:09:10
问题 I'm using Google Charts API 1.1 but i simply can't make grouped stacks. I've used the "targetAxisIndex" separating them into two axis and it kinda works but if i don't set max value for each yAxis they are scaled differently and it's useless once both of the grouped stacks actually refers to the same thing. I'd like to know i can make something similar to this: http://www.highcharts.com/demo/column-stacked-and-grouped 回答1: If you use: var options = { isStacked: true, vAxis: { viewWindow: {