Sign in to follow this  
abhidev

Line Chart Step Size

Recommended Posts

Hi,

 

I am using a line chart to display my data for a month, 3 months, 6 months and lastly an year. Can you please tell me a better way as in how i can set the step size according to the number of months. I want to show maximum of 6-7 data points on the x-axis. Currently I am using a formula as labelstep = Total no. of days / 5 but this is uneven. is there a way as in where i can fix the start and end points fixed? Thanks in advance.

Share this post


Link to post
Share on other sites

Hi,

 

Could you please send a screenshot of your requirement?

 

Awaiting your reply.

I have attached the screenshots for your reference. I am not able to get a consistent step size on X axis based on the number of months. Is there a way where the step size can be assigned evenly. Thanks.

post-8666-052163400 1290498571_thumb.jpg

post-8666-048351000 1290498582_thumb.jpg

post-8666-080452300 1290498589_thumb.jpg

post-8666-029748200 1290498596_thumb.jpg

Share this post


Link to post
Share on other sites

Hi,

 

I am afraid, as of now, there are no other ways to create the chart except adjusting the values explicitly to match the labels.

 

Please feel free to revert in case you have any further queries.

Share this post


Link to post
Share on other sites

Hi,

 

I am afraid, as of now, there are no other ways to create the chart except adjusting the values explicitly to match the labels.

 

Please feel free to revert in case you have any further queries.

 

 

Is there a way to assign the label step based on number of months ? Also how do i explicitly adjust the values??

Share this post


Link to post
Share on other sites

Hi,

 

Please try mentioning the value for the "labelStep" attribute in the <chart> element depending on your XML data.

 

Ex: <chart labelStep='5' >

<set label='Jan 1' value='25' />

<set label='Jan 2' value='35' />

<set label='Jan 3' value='42' />

<set label='Jan 4' value='35' />

<set label='Jan 5' value='31' />

<set label='Feb 1' value='30' />

<set label='Feb 2' value='13' />

</chart>

 

The above example would first display the 1st label, i.e, Jan 5 and then the 6th label, i.e, Feb 1. Therefore, you would need to count and explicitly set the value for the attribute in order to make the labels display accordingly.

 

Hope this helps. :)

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