Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 Yesterday 15:40:53

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

Re: pie-charts

colak wrote #339891:

I’m still trying to figure out how to customise the colours, but the data is there.

From memory, and don’t take this as gospel, pie chart colours can be specified in your var block:

colors: ['#ff0000', '#00ff00', '#0000ff', '#ffff00', '#00ffff']

Offline

#14 Yesterday 16:23:27

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

Re: pie-charts

gaekwad wrote #339893:

From memory, and don’t take this as gospel, pie chart colours can be specified in your var block:

colors: ['#ff0000', '#00ff00', '#0000ff', '#ffff00', '#00ffff']...

Hi Pete thanks so much for jumping in.

It was actually simpler than that! All I needed to do was to select the item in the series and add the colour. Sample code:

{ value: 13, name: 'Other' , itemStyle: {color: '#eeeeee'}}

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

Offline

#15 Today 03:05:47

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

Re: pie-charts

Those are pretty cool. Wish I had a record of 21 years of my projects. That’d be really cool to see.

Offline

#16 Today 03:56:10

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

Re: pie-charts

agovella wrote #339897:

Those are pretty cool. Wish I had a record of 21 years of my projects. That’d be really cool to see.

Thanks! As we are reliant on public funding, local and/or EU, regulations demand that we collect and maintain a lot of information.

I’ve spent the last few months, collating it to Apple numbers, where I did the initial charts which are much more to what we published.

The good thing with spreadsheets is that we have the info just once, and then use formulas to separate it.

The issue with online charts is that they are ‘difficult’ to update as the info is totally abstracted and separated.

Adding a publication from 2020 for example, can be done in seconds in spreadsheets and all other tables and charts are updated automatically. Online, I will need to locate and change that info in 3 different charts. That’s the reason I was so tempted to use google 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

#17 Today 06:06:18

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,811
Website GitHub

Re: pie-charts

colak wrote #339898:

Online, I will need to locate and change that info in 3 different charts. That’s the reason I was so tempted to use google charts.

Can you read the content from GSuite directly and update your current charts on the fly? See my accessing spreadsheets shortcode as an example.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB