johncblandii Report post Posted January 31, 2008 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. 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. Share this post Link to post Share on other sites
Pallav Report post Posted February 1, 2008 Hi, Thanks for your suggestions. Can you also send me one such XML file where it's not working? Share this post Link to post Share on other sites
johncblandii Report post Posted February 1, 2008 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. Share this post Link to post Share on other sites
Pallav Report post Posted February 5, 2008 Hi, You may post the relevant functions on the forum. But please do not upload full .as files. Share this post Link to post Share on other sites
johncblandii Report post Posted February 5, 2008 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! Share this post Link to post Share on other sites