BUG: MSArea2D, labelDisplay="STAGGER", staggerLines=2
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



BUG: MSArea2D, labelDisplay="STAGGER",... Expand / Collapse
Author
Message
Posted 1/31/2008 3:26:28 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 2/6/2008 1:16:11 PM
Posts: 6, Visits: 6
The problem is in the loop. On line 1610 you are looping over every single category in the list and skipping them if showLabel == false. That's fine but the math used in the loop is i%#. For our present dataset i% any of our numbers will ALWAYS be 1. Here is the trace using your original math:

(excuse formatting)

i   label   pos   staggerLines

1  12AM  0  16
13  1AM  0  16
25  2AM  0  16
37  3AM  0  16
49  4AM  0  16
61  5AM  0  16
73  6AM  0  16
85  7AM  0  16
97  8AM  0  16
109  9AM  0  16
121  10AM  0  16
133  11AM  0  16
145  12PM  0  16
157  1PM  0  16
169  2PM  0  16
181  3PM  0  16
193  4PM  0  16
205  5PM  0  16

So, do you see how i%2 (the number of staggerLines we're using) will always fail? Ok...now to fix it.

Create a counter variable (var counter:Number = 1; roughly around line 1609) and inside the first if statement (in the for loop) increment counter; right after or before depth++).

Now, in the else if labelDisplay == "STAGGER" change all references to "i" to counter EXCEPT when referencing the this.categories[i]. There are really just two places.

I would upload the file but I'm not 100% sure if Fusion would like me throwing up source code to the general public. :-) Fusion, if you want my class changes I'll send'em to you. Just ping me.

I hope this helps someone. Just know in the latest v3, as of today, the STAGGER code is buggy so don't be surprised if you find your chart not properly rendering the labels in stagger mode. Again, this depends on your dataset/numbers. It could be that they line up properly.

Thanks.

Post #4284
Posted 2/1/2008 4:17:53 PM
FusionCharts Team

FusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts Team

Group: Administrators
Last Login: Yesterday @ 8:20:12 AM
Posts: 2,194, Visits: 521
Hi,

Thanks for your suggestions. Can you also send me one such XML file where it's not working?


Thanks,
Pallav Nadhani
FusionCharts Team
Post #4315
Posted 2/1/2008 4:26:22 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 2/6/2008 1:16:11 PM
Posts: 6, Visits: 6
Actually, I already implemented the fix so I can't validate whether this xml would fail or not. If you can just create XML to generates 288 categories with labelStep 12 and 2 data series to match, you should see it reproduced. This was in the MSArea2DChart.as.

I have an enhancement I can post regarding vertical lines. Should I post code in the forums or not? I wouldn't have to post everything but 1 function and a couple notes within other functions. Let me know.

Thanks.

Post #4327
Posted 2/5/2008 1:42:52 PM
FusionCharts Team

FusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts Team

Group: Administrators
Last Login: Yesterday @ 8:20:12 AM
Posts: 2,194, Visits: 521
Hi,

You may post the relevant functions on the forum. But please do not upload full .as files.


Thanks,
Pallav Nadhani
FusionCharts Team
Post #4381
Posted 2/5/2008 1:49:23 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 2/6/2008 1:16:11 PM
Posts: 6, Visits: 6
Ok, will do. I'll create a new post just explaining how to manage vertical line depths (at least one approach to it).

If anyone has wants to see the code for the fix above I'll post it l8rz (it is on my other laptop).

Thanks!

Post #4390
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 6:35pm


Execution: 0.078.