Setting the colour for a line chart

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Setting the colour for a line chart

Post by andyh1234 » Sat Nov 09, 2024 7:55 pm

Hi,

I have a chart widget, when I set it to a bar chart it works fine and I can use the 'set the backgroundDataColors of widget chart' to set background colours for each individual bar, separating each bar colour by a cr.

However, when I swap to a line chart I cannot seem to set the colours of the lines. How do I do this?

It is the standard chart widget included with Livecode 10.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Setting the colour for a line chart

Post by Klaus » Sun Nov 10, 2024 3:04 pm

Hi Andy,

I don't think this is a bug, but rather the "nature" of a "line chart".

The separate values are represented by the little squares, circle or what the "pointstyle" is set to)
and these are colorized correctly. Raise the "pointradius" and you'll see what I mean.


Best

Klaus

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10303
Joined: Wed May 06, 2009 2:28 pm

Re: Setting the colour for a line chart

Post by dunbarx » Fri Nov 15, 2024 4:22 am

Now that one reads like really capable AI.

If wrong, I will welcome the new OP roundly.

Craig

andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Re: Setting the colour for a line chart

Post by andyh1234 » Fri Nov 15, 2024 1:10 pm

Not AI Craig, genuine human.

Regards

Andy

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Setting the colour for a line chart

Post by Klaus » Fri Nov 15, 2024 1:17 pm

Hi Andy,,

Craig does not mean you, but the SPAM posting I deleted a couple of minutes ago. :-)

Best

Klaus

andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Re: Setting the colour for a line chart

Post by andyh1234 » Fri Nov 15, 2024 1:34 pm

Oh, ok. Didn't see the spam post and Craig mentioned OP so I thought he meant me!

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Setting the colour for a line chart

Post by Klaus » Fri Nov 15, 2024 4:44 pm

Yes, I know, that's why I explained the situation to you. 8)

But what about my first answer?

andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Re: Setting the colour for a line chart

Post by andyh1234 » Fri Nov 15, 2024 5:46 pm

Your first answer was great. I had the point size set to 0 so Livecode was just drawing a grey line I could not colour. I changed the point size to 2 and colours circles appeared on the line. It is not what I wanted originally (to colour the line itself) but it will be fine.

Now if the chart would refresh in iOS it would be perfect, but that is a long standing bug by the looks of it so Im not holding out much hope.

Post Reply