Line Graph Widget - Axis and Label colours?

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
j9v6
Posts: 99
Joined: Tue Aug 06, 2019 9:27 am
Contact:

Line Graph Widget - Axis and Label colours?

Post by j9v6 » Tue Jan 03, 2023 3:31 pm

Hi everyone, I'm in the process of adding dark mode to my App and have run into a wall with setting axis and label colours for the Line Graph widget. The default colour for these elements is black, which works on a light background, however that doesn't work when you have a black background. I've looked through the Dictionary and the forums and have drawn a blank so far. It appears the only colours I can set or query are the Graph Colors and the Hilited Coordinates Colours. :/

Anyone got any ideas or workarounds?

Thanks, Al.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: Line Graph Widget - Axis and Label colours?

Post by bn » Tue Jan 03, 2023 8:21 pm

j9v6 wrote:
Tue Jan 03, 2023 3:31 pm
Hi everyone, I'm in the process of adding dark mode to my App and have run into a wall with setting axis and label colours for the Line Graph widget. The default colour for these elements is black, which works on a light background, however that doesn't work when you have a black background.
Hi Al,

You could try to put a graphic with a light gray (180,180,180) behind the Line Graph widget. Other than variations of this technique would involve changing the source code of the Line Graph widget which is a major undertaking.


LineGraphWithBackground.jpg
LineGraphWithBackground.jpg (22.97 KiB) Viewed 2587 times

Kind regards
Bernd

j9v6
Posts: 99
Joined: Tue Aug 06, 2019 9:27 am
Contact:

Re: Line Graph Widget - Axis and Label colours?

Post by j9v6 » Wed Jan 04, 2023 11:59 am

Hi Bernd,

Thanks for your suggestion. I was mulling that over this morning as a possible way forward and your screen-shots do make it look quite nice too. The alternative is as you said to try changing the widget source code which is not something I want to get in to right now as it looks like quite a task!!!! :O.

Cheers,

Al. :)

Post Reply