I am using the old static Google Chart API to generate a pie chart. The URL I am using is
https://chart.googleapis.com/chart?cht=p&chs=150x150&chd=t:1,2,3&chl=a|b|c
This URL contains the required parameter – chl – for labels, specified in the documentation (https://developers.google.com/chart/image/docs/gallery/pie_charts#pie_chart_label)
However, the image comes back with only lines pointing to the slices, not labels. Any help would be appreciated.
Problem solved: the width in the chs parameter was too small for the labels to show up.
Related
I need to display a chart where the horizontal axis is a kind of a table. I checked the Google Charts documentation as well as other links but could not find any help. Can you tell me whether something like that is possible in Google Charts? If yes, then how?
Below is the link to an image showing a similar kind of a thing.
https://i0.wp.com/criticaltosuccess.com/wp-content/uploads/2014/07/IMG-XL2010-Chart-w-Two-Rows-X-Axis-Labels-and-Lines-e1405615373977.png?resize=600%2C330
I am using chartjs to draw a line chart on my application. I have dates onx-axis but as a category scale. Means labels are strings but are dates. On the y-axis i have numeric values. I am changing the chart on some functionality and after change i want to highlight some area of the chart. Is there any way i can highlight an area on the line chart? I have searched but did not find anything.
I want to do this pragmatically like there are some specific dates which i want to highlight so i want to have this type of effect.
Any kind of help would be much appreciated. I am very beginner in charts and javascript stuff.
P.S this is specifically for the line chart not for the doughnut
I use this https://github.com/chartjs/chartjs-plugin-annotation lib to do something like this.check on it. I think this will helpful.
I'm trying to automate some PowerPoint charts, but I'm having problems preserving some formatting.
When I add a chart using a chart template, the chart doesn't use the slides color scheme, but rather the colors it was saved with. It doesn't help to change the color scheme for the slide - the chart isn't updated. To make the chart update to the color scheme of the slide, I have to clear formatting for the chart. The problem with doing this is that all font sizes are automatically set to 18pt. I cannot find any easy way restore the font sizes for the chart without saving all sizes before calling clear, and set them back after clearing.
Have you looked into using the Format Painter function it may or may not work depending on a variety of factors from my quick look on the net (google it for lots of articles).
Also if you've done one chart you should be able to copy the formatting from one chart to another using the paste special option as mentioned here http://www.pcreview.co.uk/forums/there-format-painter-equivalent-use-many-charts-t3611646.html .
I have a chart generated from Google Charts that can be found here: Chart generate by Google Charts API. As you can see the x axis labels are being overlapped.
Anyone knows how to solve this?
See the docs under Bar Width and Spacing (chbh). There's this snippet:
a - space_between_bars and space_between_groups are given in
absolute units (or default absolute values, if not specified). Bars
will be resized so that all bars will fit in the chart.
So just add chbh=a to the options. Here's the example with this option added.
Is it possible to change color and font size of default pie labels (in this simple example: "Hello" and "World") in Google Image Charts API? I've searched the documentation but I can't figure out how to do it...
Example code:
https://chart.googleapis.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World
https://chart.googleapis.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World&chxs=0,008000,16&chxt=x
You define chxt=x
Then you set the color using chxs in this format
chxs=0,{color_code},{font-size}