How to change Google chart font size? - charts

Is it possible to change Google chart font size, my problem is that when i shrink width and height of whole chart, text becomes small and unreadable, any way to custom set font size?
Also is it posible to change tooltip size , described as a in the image?

in options, set legend and tooltip by
{legend:{textStyle:{fontSize:'xx', fontName:'xx'}}}
{tooltip:{textStyle:{fontSize:'xx', fontName:'xx'}}}
Check out here for more details

For Areachart:
var options = {
tooltip: {textStyle: {fontName: 'TimesNewRoman',fontSize: 12,bold: false}}
}
Thanks,
Arun v

legend.textStyle and tooltip.textStyle control this as documented for scatter charts for instance here

Related

Change font size of series label in Google Line Chart

Is there an option to set the font size for the labels given to each series line, which show up to the right in Google Charts? In the overview example (https://developers.google.com/chart/interactive/docs/gallery/linechart) the labels I'm referring to are "Dogs" and "Cats". My chart has a lot of series, and the labels are too numerous and get cut off at the bottom of the chart. I want to make them smaller so they fit.
use the following option...
legend.textStyle.fontSize
e.g.
legend: {
textStyle: {
fontSize: 8
}
}

How to increase the size of overviewruler items in vs code?

I want to increase the size (width to be proper) of items shown in the Overview ruler, For example: errors / infos e.t.c
I can customise the color using "editorOverviewRuler.errorForeground": "#ff0000", in "workbench.colorCustomizations": {}, but how do I increase its size. I've attached a pic to be more clear.
This feature request was not accepted.
Related issue: https://github.com/microsoft/vscode/issues/115571
You can change the width of the scrollbar, and thus the Overview Ruler markers using the following setting:
"editor.scrollbar.verticalScrollbarSize": 20,

How do you add slice spacing to just the selected item of a pie chart with iOS Charts in Swift 3?

I am using the Charts library by Daniel Gindi.
I am able to set my delegate and have a function run whenever a slice is selected, but the line pieChartDataSet.sliceSpace sets the spacing for the entire chart instead of just one slice.
Here is an example of what I want to achieve:
Thanks for your help.
chartView.highlightValue(x: 0, dataSetIndex: 0)
This pieChartDataSet.sliceSpace is for highlight feature, and you just have to write code to highlight the slice you want.
Take a look at drawHighlighted() in pie chart renderer.

Unwanted word wrapping in caption

In a FusionCharts (version 3.4.0) 2D Bar chart, I found that the caption wraps to a second line when the bar labels are long. How do I prevent it from doing this so that the caption appears on one line?
Check out this jsFiddle to reproduce the problem:
http://jsfiddle.net/eZjjT/163/
-
To prevent wrapping of caption text in horizontal bar charts, you can specify the maximum percentage of width for data labels along the X-axis, using the “maxLabelWidthPercent” attribute.

Remove padding in google chart?

I'm wondering why google charts add a blank padding when not specifying the top/right/left axises.
Select the image and you'll find a huge padding except the bottom which is already filled & that's why, how to remove that?
Specifically, Talking about the right and left paddings.
Thank you.
You can use the chartArea option as follows:
options.chartArea = { left: '8%', top: '8%', width: "70%", height: "70%"};
More documentation can be viewed here:
https://developers.google.com/chart/interactive/docs/gallery/piechart#Configuration_Options
When using the Google Chart API you can eliminate the padding. I made an example Here.
The relevant parameter is chma.
According to the documentation:
You can specify the size of the chart's margins, in pixels. Margins are calculated inward from the specified chart size (chs); increasing the margin size does not increase the total chart size, but rather shrinks the chart area, if necessary.
You can try these parameters online in the Chart Playground HERE.
HTH!
Edit: Warning from Google
Important: The Image Charts portion of Google Chart Tools has been officially deprecated as of April 20, 2012. It will continue to work as per our deprecation policy.
Unfortunately, as said in Chart Margins documentation you can set only the minimum margin on each side of the chart.
Google adds some unnecessary margin (mostly on top) itself and there is no parameter which can stop this behavior.