Sign in to follow this  
jcoker

Strange display when using scatter plot

Recommended Posts

Sometimes the layout of the X axis in my scatter charts are messed up. In the included example, I see the data scrunched up instead of spread out along the full range of X.

 

 

 


<chart xAxisName="Minimum Bid" yAxisName="Achieved Rank" decimals="4" showLegend="0" anchorSides="4" anchorRadius="5">

 <categories verticalLineThickness="1">

   <category name="$0.26" x="0.2600" showVerticalLine="1"/>

   <category name="$0.28" x="0.2800" showVerticalLine="1"/>

   <category name="$0.30" x="0.3000" showVerticalLine="1"/>

   <category name="$0.32" x="0.3200" showVerticalLine="1"/>

   <category name="$0.34" x="0.3400" showVerticalLine="1"/>

   <category name="$0.36" x="0.3600" showVerticalLine="1"/>

   <category name="$0.38" x="0.3800" showVerticalLine="1"/>

   <category name="$0.40" x="0.4000" showVerticalLine="1"/>

   <category name="$0.42" x="0.4200" showVerticalLine="1"/>

   <category name="$0.44" x="0.4400" showVerticalLine="1"/>

   <category name="$0.46" x="0.4600" showVerticalLine="1"/>

   <category name="$0.48" x="0.4800" showVerticalLine="1"/>

   <category name="$0.50" x="0.5000" showVerticalLine="1"/>

 </categories>

 <dataSet seriesName="forecast">

   <set id="forecast1" x="0.2600" y="3.0000" tooltext="forecast: rank 3 at $0.26"/>

   <set id="forecast2" x="0.3200" y="2.0000" tooltext="forecast: rank 2 at $0.32"/>

   <set id="forecast3" x="0.5000" y="1.0000" tooltext="forecast: rank 1 at $0.50"/>

 </dataSet>

</chart>

 

 

 

Attached are two files, the XML file directly and a ZIP file containing the test HTML file (self-contained) and the data file (again).

data.xml

test.zip

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Welcome to FusionCharts Forum. :D

Could you please try using "labelDisplay='ROTATE'" attribute in the <chart> element?

Please refer to the attachment that we are sending you.

Hope this helps. :)

scatterchart.zip

Share this post


Link to post
Share on other sites

Setting rotation prevents the labels from overlapping, but doesn't fix the layout problems. Note the large amount of space on the left and right of all the X values (categories).

 

 

 

I've attached an image showing what the chart looks like, but you can also reproduce this with the HTML file attached to the original post (inside the ZIP, since the board doesn't allow posting HTML files directly).

post-7221-128441578553_thumb.png

Share this post


Link to post
Share on other sites

I'm not sure what you mean. Those X values are the data being plotted (USD in this case). How should they be adjusted? What I would expect is that the X axis is dynamically scaled (as it is usually) regardless of the actual X values.

 

 

 

For what it's worth, I did try multiplying all X values by 100, but that made no difference.

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

Could you please specify xAxisMinValue='0.24'  & xAxisMaxValue='0.52' in the <chart> element?

I am sure this will help.

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