After editing pie chart title in google sheets with a function the pie chart displays an error [duplicate] - javascript

In the chart editor there is an option to "Aggregate Column A".
How can I set this in a script using setOption?
Thanks

After reverse engineering the code created from the graph using the method described here https://stackoverflow.com/a/13652972
I found that the option to achieve the same as "Aggregate column a" is
.setOption('applyAggregateData',0)
It makes zero sense with the 0 and such but considering how badly some of the Gapps Script stuff is, im not surprised.

Related

Is there a way to show all values corresponding to a value on x-axis in the tooltip of Google Charts linechart?

I have a simple linechart with 2 lines. On hover, I would like to display both y-values in the tooltip that appears. I know I can accomplish this by writing a Javascript function that creates a custom tooltip for every x-value on the graph, but this seems so redundant to do, especially when the graph gets large. Since Google Chart is able to auto-generate the standard tooltip which contain both the x and y-value I feel like there should be an option to do this with built-in tools, is there?
Probably setting focusTarget to 'category' will do the trick.
See here for an example that uses it.

Adding a line break after title in Google Charts

I am trying to put a line break after a title in Google Charts or before the chart starts (I have a column chart with defined axis, but not single data cell or tab). Is there any possibility to do so in Google Charts?
I can't seem to find a good answer.
The fronts are written in html/css and jQuery/JavaScript.
Append break in your title.
Before "I am Title"
Now "I am Title\r\n/I am chart"
It will display like this
I am Title
I am Chart
At I am Chart you can add your chart
Its better to add line break from backend from where you are getting the data.
I use C# so I would have done at backend like this
Title + Environment.NewLine + Chart

Customisable scatter google chart code with a search bar to filter results. Is a dashboard needed?

Beginner here, I am new to Javascript code and have tried to learn Google visualisations from the documentation that Google provide but I am struggling to get to grips with it.
I am trying to create a customisable google scatter graph with the data imported from this spreadsheet
https://docs.google.com/spreadsheets/d/1A2eZztlcZCCwIrlrYowU6aC3LpD10qDNWwZ9SbtPUxU/
and use the 3rd column as a tooltip (the names).
With this, I would then like to add a search bar to live search the results. For example, searching "Steve" will only show his co-ordinates on the graph.
Is this possible and will I need a dashboard to do it?
Also what is the basic html/javascript required to get the chart? The google documentation explain the customisation of the tooltip well but only when you are inputing data directly into the code rather than importing from a spreadsheet.
Any help would be greatly appreciated!

Alternative to Google Charts Timeline

I've been playing around with the Timeline chart from Google Charts. It's great because it's very easy to use. However, I stumbled upon quite some limitations:
It's not possible to adjust the height of the bars, or the amount of margin around them.
I cant format the labels of the hAxis. No fonts can be applied, or textcolor, or font-size. And for some reason, two of the labels are in bold. (see image below)
It's not possible to add a text column on the right containing an extra set of information (for example, the sum of all hours in this row)
I can't move the hAxis to be displayed above the graph instead of below
etc...
Here's a link to the image:
For this reason, I was hoping some of you could introduce me to an alternative tool or api that I can use. It needs to be easy to use, and free/opensource. I've Googled for numerous chart tools, but almost no tools provide this SIMPLE timeline type of chart (note that it's not a Gantt chart, but it looks like one).
There are a few Gantt chart Javascript libraries, but none seem to be close to the Google Timelines chart.
The only chart I could find that is similar is Visavail.js. It builds upon D3.js and is open source, so you can modify it to your liking. Check out the "Custom Category Data" example. It's a lot like a Google Timelines chart.
For your convenience, I've added a screenshot of the example below:
If you are familiar with d3.js, here is a d3js based example: http://bl.ocks.org/bunkat/1962173

How to explode a pie chart into another pie chart using PHP/Javascript?

I’ve been trying to find a code that can explode a pie chart into another pie chart. This is because at the start when the pie chart loads it looks cramped up with so many entries. On the net I’m only able to find tutorials to do this using Excel. Can anyone help me here? Thanks in advance!
You might want to check out this lib, you can create dynamic and explorable pie charts with it (it š html5, javascript based).
Click and see yourself:
http://datavisualizationsoftwarelab.com/en/products/pie-chart/
Example of a Pie Chart:
This will help you: Google Charts

Categories

Resources