Chartsengine in Standalones

Get help and support using chartsEngine for LiveCode.

Moderators: heatherlaine, BvG

Post Reply
DukeUK
Posts: 23
Joined: Sun Dec 06, 2009 5:55 pm

Chartsengine in Standalones

Post by DukeUK » Sun Feb 14, 2010 1:04 pm

Hi

No idea what I'm doing wrong here, but maybe someone can help.

I've used chartsEngine to draw 2 graphs from data on the card and it all works brilliantly, apart from a couple of things I can't quite work out.

On the x axis if I set gridx to a value, the subdivisions aren't the correct numbers. For instance, if the total x is say 6, the mid point might show as 3.0, 3.01 or 2.96 etc.

The main problem I'm having though is I just can't get it to work at all in a standalone.

I'm missing something here no doubt.

I've tried the [set the mainstack of stack "chartsEngine" to "nameofmainstack"] and save as per the manual and that puts the chartsEngine stack in the mainstack, but it still doesn't work in the standalone.

I've tried this with my project and a mainstack with just the example in the docs, but I still get the same result.

I'm totally new to this so any 'pointing me in the right direction' would be much appreciated.

Kev

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Chartsengine in Standalones

Post by malte » Sun Feb 14, 2010 4:46 pm

Hi Kev,

to make it work in a standalone try the following:

Make chartsEngine a substack of your mainstack

In your mainstack add:

on openStack
start using stack "chartsEngine"
pass openStack
end openStack

This will assure that chartsEngine is available in the messagePath. In the IDE you can just use the checkBox to make it work. For the rounding stuff: Charts is a bit "dumb" there, as the grid drawing depends on the width of the chart and the number of subDivisions that are drawn. It does no rounding initially, but you can round it of course:

set the charts["gridXNumberFormat"] of group "myChart" to "#"

Should do the trick.

Hope that helps,

Malte

DukeUK
Posts: 23
Joined: Sun Dec 06, 2009 5:55 pm

Re: Chartsengine in Standalones

Post by DukeUK » Sun Feb 14, 2010 6:17 pm

Thanks very much Malte.

All works fine now ! Great

Pretty impressive really.

Kev

kwinkler
Posts: 61
Joined: Fri Nov 26, 2010 5:59 am
Location: Connecticut, USA

Re: Chartsengine in Standalones

Post by kwinkler » Fri Dec 03, 2010 8:51 pm

I've inserted the suggested code, but I get the error "Chunk: can't find stack"

Where precisely should the chartsengine stack be located? I've tried several locations, but can't seem to find the right one.

I assume by "chartsengine stack" we are referring to the chartsEngine.rev file?

kwinkler
Posts: 61
Joined: Fri Nov 26, 2010 5:59 am
Location: Connecticut, USA

Re: Chartsengine in Standalones

Post by kwinkler » Fri Dec 03, 2010 9:37 pm

Mission accomplished.

Reading the user guide more closely solved the problem. I just needed to use the "Standalone Application Settings...." Stacks dialog to include the chartsEngine stack. Now the charts work in the standalone application.

Post Reply

Return to “chartsEngine”