Formatting Max and Min Values on a Line Graph

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

ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Re: Formatting Max and Min Values on a Line Graph

Post by ace16vitamine » Thu Aug 31, 2023 7:59 am

Hi Craig,

you think to complicated.

I only need this:
Bildschirmfoto 2023-08-30 um 20.08.12.png
Bildschirmfoto 2023-08-30 um 20.08.12.png (74.41 KiB) Viewed 24838 times
It is not beautiful with the black dot in the left corner but enough. With

1,50,0
2,100,
3,75,

I tell the Graph that the starting Point is 0.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Formatting Max and Min Values on a Line Graph

Post by dunbarx » Thu Aug 31, 2023 2:37 pm

No, no.

I think too easy.

So please tell me how you actually make these graphs, since you were having trouble with the placement of your data points. Do you place them manually, and then draw the lines with a polyline? I still do not see how you were having trouble earlier, and now do not.

I make graphs all the time with LiveCode. It is not really intended to do that sort of thing, but can easily be persuaded. I have fooled LiveCode into thinking it is a CAD program, and create pretty good drawings with it.

Craig

ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Re: Formatting Max and Min Values on a Line Graph

Post by ace16vitamine » Fri Sep 01, 2023 2:01 pm

Hi,

I am using the Line Graph Widget:

set the graphData of widget "Line Graph" to var_values

Content of var_values:

1,50,0
2,100,
3,75,

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Formatting Max and Min Values on a Line Graph

Post by bn » Fri Sep 01, 2023 3:24 pm

Hi Stefan,

If you have access to LC 10.0.0 dp 6 then you should check out the "Graph" widget.
It has wastly more options than the Linegraph widget.

Kind regards
Bernd

ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Re: Formatting Max and Min Values on a Line Graph

Post by ace16vitamine » Fri Sep 01, 2023 3:54 pm

Hey Bernd,

sure, but I am already on MacOS Sonoma beta and LC10.0.0 DP5 is not working with it :-/ But I can try with DP6 later, good idea.

Stefan

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Formatting Max and Min Values on a Line Graph

Post by dunbarx » Fri Sep 01, 2023 4:45 pm

Ah. Yet another example of my thinking everyone still uses LiveCode.

Oftentimes I find out well into a discussion that the entire issue was all about mobile. Now I can add as well that the entire discussion was all about widgets.

I feel like a caveman, but am smug about it.

Craig

ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Re: Formatting Max and Min Values on a Line Graph

Post by ace16vitamine » Fri Sep 01, 2023 6:43 pm

bn wrote:
Fri Sep 01, 2023 3:24 pm
If you have access to LC 10.0.0 dp 6 then you should check out the "Graph" widget.
I'm searching and searching.... You mean the "Chart" widget :-)

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Formatting Max and Min Values on a Line Graph

Post by bn » Fri Sep 01, 2023 9:05 pm

Hi Stefan,

I am sorry, of course I meant Chart widget.

ChartLogo.png
ChartLogo.png (7.2 KiB) Viewed 24745 times


with this icon.


Kind regards
Bernd

ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Re: Formatting Max and Min Values on a Line Graph

Post by ace16vitamine » Thu Sep 07, 2023 1:28 am

Hi Bernd,

the Graph is also not working proper :-/

Button Example:

In LiveCode IDE it is working - In iPhone Simulator not...

on mouseup
put "1,200" & CR & "2,100" & CR &"3,15" into p1
set the tsvdata of widget "Chart_Werte" to p1
end mouseup

Any Ideas why?

Stefan

ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Re: Formatting Max and Min Values on a Line Graph

Post by ace16vitamine » Thu Sep 07, 2023 1:46 am

seems that the datas are still there, a refresh is required. If I try to open another card and go back it is working... But this could not be the solution. Any Ideas how to "reload" the widget after it set the data in there?

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Formatting Max and Min Values on a Line Graph

Post by bn » Thu Sep 07, 2023 9:02 pm

Hi Stefan,

I do not do mobile.

Could you try after setting the Graph at the end:

Code: Select all

go this card
usually this forces the screen redraw.

Kind regards
Bernd

ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Re: Formatting Max and Min Values on a Line Graph

Post by ace16vitamine » Thu Sep 07, 2023 10:08 pm

Does not work...

The Datas are there. If I open another Card it is refreshed. But I have no chance to refresh while I am on the card itself. It is only on mobile device. If I do the same in the IDE (set the csvdata ...) it is prompt refreshed

My workaround is not fine... I created another blank card, go to there and then back :D
Last edited by ace16vitamine on Thu Sep 07, 2023 10:21 pm, edited 1 time in total.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Formatting Max and Min Values on a Line Graph

Post by bn » Thu Sep 07, 2023 10:15 pm

Hi Stefan,

one last try:

send "go this card" to me in 50 milliseconds

Otherwise I am out of ideas and maybe a bug report is needed.

Kind regards
Bernd

ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Re: Formatting Max and Min Values on a Line Graph

Post by ace16vitamine » Thu Sep 07, 2023 10:39 pm

bn wrote:
Thu Sep 07, 2023 10:15 pm
one last try:
send "go this card" to me in 50 milliseconds
No Chance, does not work.
bn wrote:
Thu Sep 07, 2023 10:15 pm
Otherwise I am out of ideas and maybe a bug report is needed.
https://quality.livecode.com/show_bug.cgi?id=24331


Have an nice evening
Stefan

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7238
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Formatting Max and Min Values on a Line Graph

Post by jacque » Fri Sep 08, 2023 6:03 pm

Try this:

Code: Select all

set the backcolor of this card to the backcolor of this card 
That usually forces a redraw for me. I stole it from Panos.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”