﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>FusionCharts Forum / FusionCharts v3 / Suggestions &amp; Requests  / Control over Div Line Depth / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>FusionCharts Forum</description><link>http://www.fusioncharts.com/forum/</link><webMaster>support@fusioncharts.com</webMaster><lastBuildDate>Thu, 21 Aug 2008 19:03:39 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Control over Div Line Depth</title><link>http://www.fusioncharts.com/forum/Topic4393-7-1.aspx</link><description>Hi,&lt;br&gt;&lt;br&gt;If you want to change the depth in code, you can just alter the same in allotDepth() method of the chart class and it'll reflect on the chart.</description><pubDate>Wed, 13 Feb 2008 08:18:34 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>Control over Div Line Depth</title><link>http://www.fusioncharts.com/forum/Topic4393-7-1.aspx</link><description>We wanted to show our lines behind the graph(s) but they always showed up on top. So, here are the steps I took to allow for depth management (MSArea2dChart.as).&lt;/P&gt;&lt;P&gt;1) In the chart attribute parsing function add a new param for vDivLineDepth (or whatever you want to call it). I set the available values to TOP and BOTTOM.&lt;/P&gt;&lt;P&gt;2) Create a holder variable (MovieClip). I called it vDivLineHolder.&lt;/P&gt;&lt;P&gt;3) In drawVDivLines, add the following code:&lt;/P&gt;&lt;OL&gt;&lt;LI style="FONT-WEIGHT: normal; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;DIV style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;vDivLineHolder = &lt;SPAN style="COLOR: #0066cc"&gt;this&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #006600"&gt;cMC&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #0066cc"&gt;createEmptyMovieClip&lt;/SPAN&gt;&lt;SPAN style="COLOR: #66cc66"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;"vDivLineHolder"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #0066cc"&gt;this&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #006600"&gt;dm&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #0066cc"&gt;getDepth&lt;/SPAN&gt;&lt;SPAN style="COLOR: #66cc66"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;"VDIVLINES"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #66cc66"&gt;)&lt;/SPAN&gt;&lt;SPAN style="COLOR: #66cc66"&gt;)&lt;/SPAN&gt;;&lt;/DIV&gt;&lt;LI style="FONT-WEIGHT: normal; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;DIV style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;vDivLineHolder.&lt;SPAN style="COLOR: #0066cc"&gt;_x&lt;/SPAN&gt; = &lt;SPAN style="COLOR: #0066cc"&gt;this&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #006600"&gt;elements&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #006600"&gt;canvas&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #006600"&gt;x&lt;/SPAN&gt; + &lt;SPAN style="COLOR: #0066cc"&gt;this&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #006600"&gt;params&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #006600"&gt;canvasPadding&lt;/SPAN&gt;;&lt;/DIV&gt;&lt;LI style="FONT-WEIGHT: normal; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;DIV style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;vDivLineHolder.&lt;SPAN style="COLOR: #0066cc"&gt;_y&lt;/SPAN&gt; = &lt;SPAN style="COLOR: #0066cc"&gt;this&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #006600"&gt;elements&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #006600"&gt;canvas&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #006600"&gt;y&lt;/SPAN&gt;;&lt;/DIV&gt;&lt;LI style="FONT-WEIGHT: normal; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;DIV style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt; &lt;/DIV&gt;&lt;LI style="FONT-WEIGHT: normal; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;DIV style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;SPAN style="COLOR: #b1b100"&gt;if&lt;/SPAN&gt; &lt;SPAN style="COLOR: #66cc66"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0066cc"&gt;this&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #006600"&gt;params&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #006600"&gt;vDivLineDepth&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #0066cc"&gt;toUpperCase&lt;/SPAN&gt;&lt;SPAN style="COLOR: #66cc66"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: #66cc66"&gt;)&lt;/SPAN&gt; == &lt;SPAN style="COLOR: #ff0000"&gt;"BOTTOM"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #66cc66"&gt;)&lt;/SPAN&gt; &lt;SPAN style="COLOR: #66cc66"&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;LI style="FONT-WEIGHT: normal; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;DIV style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;      vDivLineHolder.&lt;SPAN style="COLOR: #0066cc"&gt;swapDepths&lt;/SPAN&gt;&lt;SPAN style="COLOR: #66cc66"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0066cc"&gt;this&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #006600"&gt;dm&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #0066cc"&gt;getDepth&lt;/SPAN&gt;&lt;SPAN style="COLOR: #66cc66"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;"DIVLINES"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #66cc66"&gt;)&lt;/SPAN&gt;&lt;SPAN style="COLOR: #cc66cc"&gt;+1&lt;/SPAN&gt;&lt;SPAN style="COLOR: #66cc66"&gt;)&lt;/SPAN&gt;;&lt;/DIV&gt;&lt;LI style="FONT-WEIGHT: normal; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;DIV style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;SPAN style="COLOR: #66cc66"&gt;}&lt;/SPAN&gt;&lt;SPAN style="COLOR: #b1b100"&gt;else&lt;/SPAN&gt; &lt;SPAN style="COLOR: #66cc66"&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;LI style="FONT-WEIGHT: normal; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;DIV style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;      vDivLineHolder.&lt;SPAN style="COLOR: #0066cc"&gt;swapDepths&lt;/SPAN&gt;&lt;SPAN style="COLOR: #66cc66"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0066cc"&gt;this&lt;/SPAN&gt;.&lt;SPAN style="COLOR: #006600"&gt;lgndMC&lt;/SPAN&gt;&lt;SPAN style="COLOR: #66cc66"&gt;)&lt;/SPAN&gt;;&lt;/DIV&gt;&lt;LI style="FONT-WEIGHT: normal; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;DIV style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;SPAN style="COLOR: #66cc66"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;SPAN style="COLOR: #66cc66"&gt;&lt;FONT color=#111111&gt;This is nothing but a bit of a "hack" to get it to work right. The concept is to add all lines to 1 single parent movieclip vs adding them 1 by 1 to the canvas. There are some other changes that need to be made though. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;SPAN style="COLOR: #66cc66"&gt;&lt;FONT color=#111111&gt;4) You're going to need to toy with the positioning of the elements. My present source code has numerous other changes so to not confuse I'll leave it as just a notice. Keep in mind you're taking a global x/y value and applying it inside a clip that will start N pixels from the left...just do simple math on it.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;SPAN style="COLOR: #66cc66"&gt;&lt;FONT color=#111111&gt;5) The last step is in the allotDepths function. Add +1 to the DIVLINES allotment. This way you can swap with that depth (as soon on line 6) which will be empty so you're essentially swapping with nothing.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;SPAN style="COLOR: #66cc66"&gt;&lt;FONT color=#111111&gt;Line 8 shows you swapping with the legend. It is always going to be on the top of the background anyway so there is no worries of it being too high or too low.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;SPAN style="COLOR: #66cc66"&gt;&lt;FONT color=#111111&gt;Again, this isn't the absolute best solution but without rewriting a lot of the code this was the best way to meet our needs.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;SPAN style="COLOR: #66cc66"&gt;&lt;FONT color=#111111&gt;So, to bring this back as a suggestion/request...Fusion, please allow us to control whether the div lines are on top of the graph(s) or behind them.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="FONT-WEIGHT: normal; FONT-FAMILY: 'Courier New', Courier, monospace"&gt;&lt;SPAN style="COLOR: #66cc66"&gt;&lt;FONT color=#111111&gt;Thanks.&lt;/FONT&gt;&lt;/SPAN&gt;</description><pubDate>Tue, 05 Feb 2008 14:06:53 GMT</pubDate><dc:creator>johncblandii</dc:creator></item></channel></rss>