Errors when displaying labels with stacked bars

Get help and support using chartsEngine for LiveCode.

Moderators: heatherlaine, BvG

Post Reply
IanMcK
Posts: 16
Joined: Mon Jul 05, 2010 10:47 am

Errors when displaying labels with stacked bars

Post by IanMcK » Mon Jul 05, 2010 6:49 pm

Hi

I have been experimenting with stacked bar charts and wish to produce a chart with the following data (all TAB delimited)

Monday 0 0 0 0 0
Tuesday 81 170 134 22 10
Wednesday 53 201 128 46 4
Thursday 71 184 124 21 3
Friday 0 0 0 0 0
Saturday 0 0 0 0 0
Sunday 0 0 0 0 0

When I
set the charts["showGridXDescription"] of tChart to false
set the charts["showGridYDescription"] of tChart to true
I get chart 1 (proper bars no X labels)
Chart1 -  xFalse yTrue.jpg
Chart1 - xFalse yTrue.jpg (17.24 KiB) Viewed 7447 times
When I
set the charts["showGridXDescription"] of tChart to true
set the charts["showGridYDescription"] of tChart to true
I get chart 2 (chart is compressed to left)
Chart2 - x True y True.jpg
Chart2 - x True y True.jpg (12.81 KiB) Viewed 7447 times
and when I attempt to modify the y scaling with
set the charts["maxY"] of tChart to 500
for example I get chart 3 (nice grid no bars)
Chart3 - x False y True  yMax set.jpg
Chart3 - x False y True yMax set.jpg (13.91 KiB) Viewed 7447 times
I am using chartsEngine 1.0.8 and revEnterprise 4.0 gm 1

Any work rounds would be appreciated.

Thanks

IanMcK

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Re: Errors when displaying labels with stacked bars

Post by BvG » Thu Dec 09, 2010 9:58 pm

Hi

in chartsEngine the label is a small floating rectangle that contains the names of the value groups.

What you are trying to do is to set the y-grid descriptions. Currently, chartsEngine does not allow to use text there, only numbers. That is why you get weird rendering errors, when you simply enter weekday names there. If you enter the following data, you'll see that it works with numbers:

1 0 0 0 0 0
2 81 170 134 22 10
3 53 201 128 46 4
4 71 184 124 21 3
5 0 0 0 0 0
6 0 0 0 0 0
7 0 0 0 0 0


And if you'd enter numbers, you could then use "set the charts["xConvertsTo"] of grp "myChart" to ...", to convert to a human readable value. Unfortunately, weekday names are not something the convert command does, so currently what you'd like to do won't work with chartsEngine. :cry:
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Post Reply

Return to “chartsEngine”