Sign in to follow this  
genghis9021

Draggable Line Chart (Dragline.swf)

Recommended Posts

Hi,

 

I've been experimenting with the PowerCharts DRAGGABLE LINE CHART (DragLine.swf).

 

My goal is to use the "chart" as a control permitting users to SET values with the line chart.

 

For instance, consider that the chart is used to "forecast" some economic parameter like Employment. Users would set their "forecasted" values for each quarter and then these would be posted to the server for future storage and use.

 

I'm having a problem in that if my vertical axis values are 0-10 I can select say "9" but the actual point on the graph seems to be at 8.8 or 9.2 (it doesn't look great). Is there a way to make ONLY integer values settable and therefore post-able ?

 

I have been able to have only integer values display, so that even when it appears to the eye that the node is on x.8 or x.2 the actual hover display value is 'x'.

 

I've attached my XML.

 

Thanks,

 

Kurt

UnemploymentDragNode.xml

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi Kurt,

 

Thank you for the post.

 

I would like to bring to your notice a few Dragging Related Attributes that can be used to control the way the users are let to drag.

 

1. snapToDivOnly:

Using this option, you can set the configuration that data points can be dragged only to the nearest divisional lines on chart.

That means, the data points cannot acquire a value between any two divisional lines and as such, they'll always fall on a divisional line value.

 

2. snapToDiv:

When dragging the lines, you can snap them to the nearest divisional line on chart. To do so, just set this attribute as 1.

 

The difference between this attribute and snapToDivOnly attribute is that snapToDivOnly attribute (when set to 1) allows you to drag the data points onto a div line.

But using this attribute, you can create a "sticky" kind of interface, so that when the data points is dropped near a divisional line, it assumes the divisional line value.

However, if it's dropped at a farther location, it will stay here.

 

3. snapToDivRelaxation :

When snaptoDiv is set to 1, this attribute lets you set the distance in pixels (from each divisional lines), where the data points will behave "sticky".

 

4. doNotSnap:

If you do not want the data points to stick to any divisional lines, set this attribute as 1.

 

5. allowAxisChange:

In FusionCharts drag charts, the end user has to option to change axis limits.

He can increase/decrease the axis limits as per his requirements. If you do not want the user to be able to change axis limits, set this attribute as 0.

 

For more details on 'Drag-able Line Chart Specification Sheet', please refer to the link below,

http://docs.fusioncharts.com/powercharts/Contents/?ChartSS/DragLine.htm

 

However, I am afraid, you have to code in your own logic to round off the values.

 

Hope this helps !

Share this post


Link to post
Share on other sites

Bindhu,

 

Thank you very much. It makes the chart behave exactly as I desire once the numDivLines is set properly.

 

BTW, I lived in Bangalore for 6 years . . . Indiranagar.

 

Kurt

 

Hi Kurt,

 

Thank you for the post.

 

I would like to bring to your notice a few Dragging Related Attributes that can be used to control the way the users are let to drag.

 

1. snapToDivOnly:

Using this option, you can set the configuration that data points can be dragged only to the nearest divisional lines on chart.

That means, the data points cannot acquire a value between any two divisional lines and as such, they'll always fall on a divisional line value.

 

2. snapToDiv:

When dragging the lines, you can snap them to the nearest divisional line on chart. To do so, just set this attribute as 1.

 

The difference between this attribute and snapToDivOnly attribute is that snapToDivOnly attribute (when set to 1) allows you to drag the data points onto a div line.

But using this attribute, you can create a "sticky" kind of interface, so that when the data points is dropped near a divisional line, it assumes the divisional line value.

However, if it's dropped at a farther location, it will stay here.

 

3. snapToDivRelaxation :

When snaptoDiv is set to 1, this attribute lets you set the distance in pixels (from each divisional lines), where the data points will behave "sticky".

 

4. doNotSnap:

If you do not want the data points to stick to any divisional lines, set this attribute as 1.

 

5. allowAxisChange:

In FusionCharts drag charts, the end user has to option to change axis limits.

He can increase/decrease the axis limits as per his requirements. If you do not want the user to be able to change axis limits, set this attribute as 0.

 

For more details on 'Drag-able Line Chart Specification Sheet', please refer to the link below,

http://docs.fusionch...SS/DragLine.htm

 

However, I am afraid, you have to code in your own logic to round off the values.

 

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