google-visualization

when using Angular-google-chart directive, how do you access the selected item in the pie chart?

只愿长相守 提交于 2019-12-24 13:09:42
问题 I'm using the angular-google-charts [bouil.github.io/angular-google-chart/] directive to create a pie chart. I can fire a method using this with <div google-chart chart="myChart" style="{{cssStyle}}" on-select="seriesSelected()"></div> $scope.seriesSelected = function () { console.log('item selected'); } However, I can't work out how to get the key of the selected item. I can see how to do this when using google charts without the angular directive: how to stackoverflow answer. However, I can

GWT Google Visualization - subsequent redraws change number of Y axis steps?

人走茶凉 提交于 2019-12-24 12:36:18
问题 I am having a weird bug with GWT google visualization library wrapper, specifically AnnotatedTimeLine. Namely, I draw my chart on the initial ajax call to google visualization tools, and then I redraw it every 5 seconds using a timer. Each time it redraws, the "steps" on Y axis change their values and frequency (sometimes you will have them in more frequent intervals). Note values of graph stay exactly the same. I've included 2 screenshots to show you 2 stances it goes from. On every

Using special characters with Google Charts

和自甴很熟 提交于 2019-12-24 11:50:11
问题 I'd like to use special characters with Google Charts, for instance having an apostrophe in a node name. How can I do this? I have tried Unicode as well as UTF-8 and still I get a SyntaxError from Google. Thanks in advance. 回答1: You should use the standard ASCII character encodings. A good list of them can be found here, and an explanation can be found here. 来源: https://stackoverflow.com/questions/9143163/using-special-characters-with-google-charts

Google Charts legend is not correctly displayed

孤街浪徒 提交于 2019-12-24 11:46:09
问题 I am creating google chart and my legend is not being folded into pages. My code is somthing like <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script> google.load("visualization", "1.1", { packages: ["bar", "table"] }); var chart; var table; var graphOptions = { title: 'Liczba ekspozycji w miesiącu', pointSize: 5, vAxis: { viewWindowMode: "explicit", viewWindow: { min: 0 } }, height: '500' }; $(function() { chart = new google.charts.Bar(document.getElementById(

Coloring Google Stepped Area Charts?

萝らか妹 提交于 2019-12-24 11:27:05
问题 is it possible to color each step indivual? Now all steps are blue but I want the first step blue, second yellow, third red, ... <div id="chart_div" style="width: 100%; height: 200px;"></div> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Step', 'Equity'], ['1', -40], ['2', -40], ['3', -40], ['4', -40], ['5', -30], ['6', -30], ['7', 10], ['8', 10], ['9', 10], [

put Google line chart in Leaflet popup

血红的双手。 提交于 2019-12-24 11:19:06
问题 I'm trying to insert a Google line chart into a standalone Leaflet popup. I have the chart generation code in the header as instructed here, and then I put the div element in the popup. var popup = L.popup() .setLatLng([51.5, -0.09]) .setContent('<div id="curve_chart" style="width: 400px; height: 200px"></div>') .openOn(mymap); This just creates an empty 400x200 popup. I'm pretty sure that the problem arises because the chart generation script can't find the div element because it doesn't

Google Charts: how do I change the percentage label color?

爱⌒轻易说出口 提交于 2019-12-24 11:09:22
问题 I'm using Google Charts to display pie charts. In my options variable, I have the legend set this: legend: {position: 'labeled', textStyle: {color: 'white', fontSize: 24}} Now if you look at the image below, the font color only applies to the label name, but not the percentage text or the label line. Is there anything I can do to change the color for the percentage text and the label line to white? 回答1: didn't see an option that will change the text style for the charts elements mentioned but

CategoryFilter as column selector

帅比萌擦擦* 提交于 2019-12-24 10:56:35
问题 I used the following example to create a drop down menu: https://jsfiddle.net/asgallant/WaUu2/ which makes it possible to select a column and then show the line on the graph. But I also want to use a ChartRangeFilter but the problem is this method doesn't use a dashboard so I have no clue were to start to make everything work together. And most of the examples I found use this dashboard method. I want it to approximately to be like this example http://jsfiddle.net/x7pyk55q/4/ but would like

Write response from JSON Array to Google Chart and HTML

穿精又带淫゛_ 提交于 2019-12-24 10:48:33
问题 I have a google chart code like below <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 API is loaded. google.setOnLoadCallback(drawChart); // Callback that creates and populates a data table, // instantiates the pie chart, passes in the data and // draws it. function drawChart() { // Create the data table. var data = new google

How to show percentage in google BarChart?

落爺英雄遲暮 提交于 2019-12-24 10:15:08
问题 How to get the total number and percentage in google charts? I just want to get the percent and the number in the google charts, are there options that need to be set? google.charts.load('current', {packages: ['corechart', 'bar']}); google.charts.setOnLoadCallback(drawBasic); function drawBasic() { var data = google.visualization.arrayToDataTable([ ['City', '2010 Population',], ['New York City, NY', 8175000], ['Los Angeles, CA', 3792000], ['Chicago, IL', 2695000], ['Houston, TX', 2099000], [