Try this.
{
type: 'pie',
data: {
datasets: [
{
data: [100,125,45],
backgroundColor: [
'#f16558',
'#965d5a',
'#eabbb9'
],
borderColor:'black',
borderWidth: 0.5,
},
],
labels: ['פחמימה','חלבון','שומן']
},
options: {
legend: {
labels: {
fontColor: "black",
fontSize: 12
}
},
plugins: {
datalabels: {
color: "white",
}
}
}
}
2 Likes
anything on the animation and the pie size?
How exactly do you want to change the size? I assume keeping everything else the same but the pie to be larger/smaller?
And what animation do you want?
It may not be available with Quickchart alone but Chart.js can support it through Yes-Code column.
Yes, keeping everything else the same and the pie smaller.
I would like to have it appear rotating
.
I don’t really know how to use YC
Successfully done.
Demo:
Link to plugin your YC column:
https://customized-pie-chart-js.thinhdinh.repl.co
Adapted from @Manu.n ’s brilliant thread:
Hello,
Here is a first approach to using graphics in addition to those offered by Glide.
I used an open source library:
there is another chart model than the one in the demo.
WARNING: to integrate the graphic, I use the webview component, so you must have a pro package for this to work in publication !!!
[image]
YC link
https://Graph-URI.manun2.repl.co
3 Likes
Manu.n
September 13, 2021, 12:47pm
8
oh too loud, much better than mine.
I just had the idea of proposing a version where instead of label, data, background it is possible to transmit the config, so that everyone can from the doc make their graph.
1 Like
Manu.n
September 13, 2021, 12:53pm
9
What is the data format for QuickChart?
It’s like the config?
Now supporting default width, height, label colors.
If you ask about the default data in the chart I defaulted it to what she described in her original post.
4 Likes
Yeah this can work, we can have the chart style customized to, to make it even more robust.
You just need to plug the data in. I already did that work for you.
Have a template that only returns Carbs, Protein, Fat by its data.
That is unbelievable…
thanks so much.
If I ever want to change the design or the chart I will have to ask for your help again, correct?
If you want to make anything customizable then just tell me in this thread. I will make that part a variable so you just have to change it in the editor.
We should be able to use parameters to define the type of chart, right? That way we don’t need separate repl’s for each chart type?
1 Like
Yeah you’re right. We make this a variable.
Yeah! Want to try it? I’m not proficient enough in JS to get this done quickly…
Hehe if I have some time this week I would love to try it. Also make the colors customizable too. I love some Glide chart color palettes but sometimes I want to make my own as well…
Done! works.
Please do…
I’m sure It will be helpful and I will defiantly use it often…
1 Like