Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2025-05-20 19:52:23

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,178
Website GitHub Mastodon Twitter

pie-charts

Can anyone recommend a good javascript based pie-chart that is easy to update frequently, and presents the chart as an svg?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#2 2025-05-21 09:49:44

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,357
GitHub

Offline

#3 2025-05-21 14:05:12

amordecosmos
Plugin Author
From: London (Hometown: Vancouver)
Registered: 2004-08-03
Posts: 117
Website

Re: pie-charts

chart.js

I don’t see how to save a chart as svg in the official docs, but this has instructions

Offline

#4 2025-05-22 14:30:09

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,178
Website GitHub Mastodon Twitter

Re: pie-charts

Thanks for all your suggestions!!! I’m testing all the above and www.chartjs.org.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 Yesterday 08:17:08

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,178
Website GitHub Mastodon Twitter

Re: pie-charts

After a lot of research, I (unfortunately) found that google charts are the easiest as they use the familiar spreadsheet format and update the embedded chart automatically, on any data changes.

The issue that I have is that at the moment my CSP in htaccess is blocking them from embedding. I checked the net and I’m yet to find a directive that can just exclude the charts.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#6 Yesterday 16:11:49

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,178
Website GitHub Mastodon Twitter

Re: pie-charts

colak wrote #339876:

After a lot of research, I (unfortunately) found that google charts are the easiest as they use the familiar spreadsheet format and update the embedded chart automatically, on any data changes.

The issue that I have is that at the moment my CSP in htaccess is blocking them from embedding. I checked the net and I’m yet to find a directive that can just exclude the charts.

solved:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#7 Today 01:05:25

agovella
Member
From: Houston, TX
Registered: 2005-05-01
Posts: 67
Website Twitter

Re: pie-charts

colak wrote #339877:

solved:)

That’s cryptic. :-)

How’d you do it?

Offline

#8 Today 07:48:22

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,178
Website GitHub Mastodon Twitter

Re: pie-charts

agovella wrote #339878:

That’s cryptic. :-)

How’d you do it?

I added an exception for google subdomains.

Here’s the complete code

Header set Content-Security-Policy: "default-src 'self' data: 'unsafe-inline' 'unsafe-eval' font-src 'self'; manifest-src 'self'; object-src 'none'; img-src 'self' data: 'unsafe-inline' 'unsafe-eval' *.vimeo.com *.youtube.com *.ytimg.com *.youtube-nocookie.com *.vimeocdn.com *.google.com; frame-src 'self' data: *.vimeo.com *.youtube.com *.ytimg.com *.youtube-nocookie.com *.vimeocdn.com *.google.com;"

As is usual, the resolution of one issue, also reveals other problems. It appears that google sheets charts are not responsive. I’m trying to find a solution online as the css I have implemented does not appear to work.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB