Sign in to follow this  
fmrock

Is It Possible To Shade The Area Between 2 Lines?

Recommended Posts

I have two lines on my graph and was wondering if it is possible to shade the area between the 2 lines.

 

I have played around with using areas instead of lines, but didn't get exactly what I was looking for.

Share this post


Link to post
Share on other sites

Hey,

 

Can you please share a screenshot of your requirement?

 

 

Here is the XML we currently have...

 

We tried different things with AREA's but with out any real success. Our requester does not want to see the area below AP_Coll1 highlighted

 

We would like to shade the difference between series Collectable and AP_Coll1.

 

<chart caption='Chart Title' subCaption='' plotGradientColor='' animation='1' xAxisName='Last 24 Months' PyAxisName='Amount' SyAxisName='WAA' showBorder='1' formatNumberScale='0' rotatelabels='1' lineThickness='2' showvalues='0' numberPrefix='$' decimalPrecision='2' SYAxisMinValue='0' SYAxisMaxValue='6'><categories><category label='Nov-10' /><category label='Dec-10' /><category label='Jan-11' /><category label='Feb-11' /><category label='Mar-11' /><category label='Apr-11' /><category label='May-11' /><category label='Jun-11' /><category label='Jul-11' /><category label='Aug-11' /><category label='Sep-11' /><category label='Oct-11' /><category label='Nov-11' /><category label='Dec-11' /><category label='Jan-12' /><category label='Feb-12' /><category label='Mar-12' /><category label='Apr-12' /><category label='May-12' /><category label='Jun-12' /><category label='Jul-12' /><category label='Aug-12' /><category label='Sep-12' /><category label='Oct-12' /></categories><dataset seriesName='Collectable' parentYAxis='P' renderas='Area' Color='B9D9FC' alpha='50' anchorSides='5'  includeInLegend='0'><set value='126.33067375886' /><set value='131.24352331606' /><set value='127.03834115805' /><set value='137.00721150933' /><set value='131.42969363707' /><set value='132.06925896620' /><set value='139.75209395282' /><set value='129.86107812077' /><set value='142.74079720585' /><set value='136.86181277860' /><set value='140.82176439040' /><set value='139.32490963706' /><set value='135.46160025924' /><set value='131.60103095722' /><set value='136.17205378796' /><set value='135.01818513326' /><set value='138.71648474707' /><set value='140.62141433944' /><set value='137.21275475148' /><set value='138.08927493922' /><set value='140.36659109702' /><set value='155.38057833574' /><set value='153.95947632837' /><set value='143.53630728009' /></dataset><dataset seriesName='Collectable' parentYAxis='P' renderas='Line' Color='B9D9FC' alpha='50' anchorSides='5'><set value='126.33067375886' /><set value='131.24352331606' /><set value='127.03834115805' /><set value='137.00721150933' /><set value='131.42969363707' /><set value='132.06925896620' /><set value='139.75209395282' /><set value='129.86107812077' /><set value='142.74079720585' /><set value='136.86181277860' /><set value='140.82176439040' /><set value='139.32490963706' /><set value='135.46160025924' /><set value='131.60103095722' /><set value='136.17205378796' /><set value='135.01818513326' /><set value='138.71648474707' /><set value='140.62141433944' /><set value='137.21275475148' /><set value='138.08927493922' /><set value='140.36659109702' /><set value='155.38057833574' /><set value='153.95947632837' /><set value='143.53630728009' /></dataset><dataset seriesName='AP_Coll1' parentYAxis='P' renderas='Area' Color='EAF7EA' alpha='50' anchorSides='5' includeInLegend='0'><set value='126.33067375886' /><set value='131.24352331606' /><set value='127.03834115805' /><set value='136.96482889733' /><set value='131.42969363707' /><set value='131.84669811320' /><set value='139.68369646882' /><set value='129.57777777777' /><set value='142.43983110485' /><set value='136.86181277860' /><set value='140.65575019040' /><set value='139.19299552906' /><set value='135.35708502024' /><set value='131.56359649122' /><set value='135.94296296296' /><set value='134.64319248826' /><set value='137.55407407407' /><set value='138.15901639344' /><set value='133.69985775248' /><set value='131.98120028922' /><set value='123.07718348002' /><set value='117.43372606774' /><set value='105.11480362537' /><set value='17.30027548209' /></dataset><dataset seriesName='AP_Coll1' parentYAxis='P' renderas='Line' Color='558ED5' anchorSides='5'><set value='126.33067375886' /><set value='131.24352331606' /><set value='127.03834115805' /><set value='136.96482889733' /><set value='131.42969363707' /><set value='131.84669811320' /><set value='139.68369646882' /><set value='129.57777777777' /><set value='142.43983110485' /><set value='136.86181277860' /><set value='140.65575019040' /><set value='139.19299552906' /><set value='135.35708502024' /><set value='131.56359649122' /><set value='135.94296296296' /><set value='134.64319248826' /><set value='137.55407407407' /><set value='138.15901639344' /><set value='133.69985775248' /><set value='131.98120028922' /><set value='123.07718348002' /><set value='117.43372606774' /><set value='105.11480362537' /><set value='17.30027548209' /></dataset><dataset seriesName='AP_Coll2' parentYAxis='P' renderas='Line' Color='558ED5' dashed='1' lineDashGap='10' alpha='50' anchorSides='5'><set value='126.41932624113' /><set value='131.24352331606' /><set value='127.03834115805' /><set value='136.96482889733' /><set value='131.28908091123' /><set value='131.50628930817' /><set value='139.58602554470' /><set value='129.63407407407' /><set value='142.43983110485' /><set value='136.53640416047' /><set value='140.44402132520' /><set value='138.42622950819' /><set value='135.25587044534' /><set value='131.46637426900' /><set value='135.17777777777' /><set value='134.63536776212' /><set value='136.99333333333' /><set value='135.74590163934' /><set value='129.54338549075' /><set value='122.73280231716' /><set value='97.66260162601' /><set value='32.81873373807' /><set /><set /></dataset><dataset seriesName='AP_Coll3' parentYAxis='P' renderas='Line' Color='558ED5' dashed='1' lineDashGap='8' alpha='50' anchorSides='5'><set value='126.48315602836' /><set value='131.81347150259' /><set value='126.97574334898' /><set value='136.96482889733' /><set value='131.17910447761' /><set value='131.82232704402' /><set value='139.41697971450' /><set value='129.51333333333' /><set value='141.97466572836' /><set value='134.50891530460' /><set value='139.26047220106' /><set value='135.91728763040' /><set value='134.21214574898' /><set value='129.33918128654' /><set value='129.16518518518' /><set value='122.65258215962' /><set value='98.34002976190' /><set value='24.35123966942' /><set /><set /><set /><set /><set /><set /></dataset><dataset seriesName='AP_Coll4' parentYAxis='P' renderas='Line' Color='558ED5' dashed='1' lineDashGap='6' alpha='50' anchorSides='5'><set value='125.96631205673' /><set value='131.27609178386' /><set value='126.79968701095' /><set value='137.05893536121' /><set value='131.17596229379' /><set value='130.69261006289' /><set value='137.48534936138' /><set value='127.69555555555' /><set value='137.35186488388' /><set value='130.10178306092' /><set value='134.17593297791' /><set value='125.48991784914' /><set value='106.73782467532' /><set value='20.24639769452' /><set /><set /><set /><set /><set /><set /><set /><set /><set /><set /></dataset><dataset seriesName='FFS' parentYAxis='P' renderas='Line' Color='C00000' ><set value='126.6159434779710' numberPrefix='$'/><set value='126.6159434779710' numberPrefix='$'/><set value='125.4196780442188' numberPrefix='$'/><set value='125.4196780442188' numberPrefix='$'/><set value='125.4196780442188' numberPrefix='$'/><set value='126.6233705461595' numberPrefix='$'/><set value='126.6233705461595' numberPrefix='$'/><set value='126.6233705461595' numberPrefix='$'/><set value='128.0005944910496' numberPrefix='$'/><set value='128.0005944910496' numberPrefix='$'/><set value='128.0005944910496' numberPrefix='$'/><set value='131.2196747011561' numberPrefix='$'/><set value='131.2196747011561' numberPrefix='$'/><set value='131.2196747011561' numberPrefix='$'/><set value='134.7034427219649' numberPrefix='$'/><set value='134.7034427219649' numberPrefix='$'/><set value='134.7034427219649' numberPrefix='$'/><set value='134.7034427219649' numberPrefix='$'/><set value='137.6445768025078' numberPrefix='$'/><set value='137.6445768025078' numberPrefix='$'/><set value='137.6445768025078' numberPrefix='$'/><set value='137.6445768025078' numberPrefix='$'/><set value='137.3909119203236' numberPrefix='$'/><set value='137.3909119203236' numberPrefix='$'/></dataset><dataset seriesName='WAA' parentYAxis='S' renderas='Line' Color='604A7B' ><set value='4.1800000000000' /><set value='4.1200000000000' /><set value='4.1400000000000' /><set value='4.1900000000000' /><set value='4.1500000000000' /><set value='4.1600000000000' /><set value='4.1700000000000' /><set value='4.0600000000000' /><set value='4.1400000000000' /><set value='4.1300000000000' /><set value='4.1800000000000' /><set value='4.1700000000000' /><set value='4.1600000000000' /><set value='4.1400000000000' /><set value='4.2000000000000' /><set value='4.2000000000000' /><set value='4.2200000000000' /><set value='4.1800000000000' /><set value='4.1700000000000' /><set value='4.1700000000000' /><set value='4.1600000000000' /><set value='4.1800000000000' /><set value='4.2000000000000' /><set value='4.1700000000000' /></dataset><dataset seriesName='WorkRVU' parentYAxis='S' renderas='Line' Color='A349A4' ><set value='2.9400000000000' /><set value='2.8600000000000' /><set value='2.8400000000000' /><set value='2.9500000000000' /><set value='2.8600000000000' /><set value='2.8800000000000' /><set value='2.9100000000000' /><set value='2.7700000000000' /><set value='2.8700000000000' /><set value='2.8400000000000' /><set value='2.9100000000000' /><set value='2.8900000000000' /><set value='2.8800000000000' /><set value='2.8300000000000' /><set value='2.9000000000000' /><set value='2.9300000000000' /><set value='2.9600000000000' /><set value='2.9100000000000' /><set value='2.9400000000000' /><set value='2.9400000000000' /><set value='2.9100000000000' /><set value='2.9100000000000' /><set value='2.9600000000000' /><set value='2.9100000000000' /></dataset><trendlines><line startValue='128.8244557665585' Color='9BBB59' displayValue='Proposal     ' parentYAxis='P' showOnTop='1' thickness='2'/></trendlines></chart>

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

Please share the sample image of your requirement for better comprehension.

 

Let us also know the chart type being used.

Share this post


Link to post
Share on other sites

Hi,

 

Please share the sample image of your requirement for better comprehension.

 

Let us also know the chart type being used.

 

We tried using areas to come up with the effect we were looking for. We only want the area that is blue to be shaded, and not the light green area to be shaded.

 

post-7420-0-41624000-1353417218_thumb.jpg

 

We tried to make the green area white, but then we lost all the horiz grid lines...

 

We are using the MSCombiDY2D.swf chart.

Edited by fmrock

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

If you are trying to apply dark color on the data-plot then, you can use "color" attribute under the <dataplot> element.

 

Also, you can configure transparency of the data-plot using "alpha" attribute.

 

Ref. code:

<dataset ... color='00008B' alpha='95' >

 

If this does not suffice your requirement, please elaborate more on your requirement.

Share this post


Link to post
Share on other sites

That is pretty close to what we wanted, except the area that is white, is covering all of the grid lines. When we set the alpha to allow those gridlines to show through, the blue shaded area also came through.

 

We really only want that blue area shaded.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this