Use same chart across multiple canvas - chart.js

How can I use the same chart to be rendered across multiple canvas. I want to create one ChartJs object and assign it to multiple canvas.

You can't, what you can do is create 1 config object and call new Chart multiple times each time with another canvas id.
Other solution is to create the chart once and call .toBase64Image() on it and set that as an image source for multiple images so that you only have to create your chart once but can show it multiple times

Related

Chart.js bar chart multiple bars in one row

I want to have a bar chart, where some rows may have multiple distinct disconnected bars. Is it possible to use Chart.js to achieve something like this? If not, is there another chart package to achieve this in Vue?

Export chart to png (Chart.js)

Is there anyway to export the chart to a image without the need to create a canvas and all. This is what I am trying to do, first I want to create a chart with all the necessary data and then I want to export that to png all in the server side, without touching html.
Chart.js is a canvas based library so you always need some sort of canvas, either a normal one, an offscreen one or an equivalant in node. If you dont want to create your own canvas you can use quickChart. Here you can pass your config and you get a png with that chart back

line label pie chart graphael

I'm creating a html5 web for mobile device and I'm using graphael to create a pie chart.
The chart is render perfectly but I have two problems that I don't found the solution.
I want that the first portion of the chart start at 12 oclock.
https://dl.dropbox.com/u/23287638/piechart.png
And my second problem its' that I want to have a line label for each portion of the chart like this:
https://dl.dropbox.com/u/23287638/chart2.png
Any suggestion to how to do this two things?
Thanks

Chart templates, color schemes and font sizes

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 .

Different line settings by Google Charts

I have to draw chart with different line settings (weight, pointSize, etc.). For example first line has to be 3px weight and 5px point size, but second - without points. I didn`t find option to configure chart in such way. There is a compound charts but it is a deprecated API. I also thought that I could call draw() method several times with different data and options, but it cleans previous drawing. So my question - how could I call draw multiple times without rewriting previous drawing or how I could configure chart to use custom formatting for different lines?
Have you check the settings in the "series" option? Doc : https://google-developers.appspot.com/chart/interactive/docs/gallery/linechart