We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Several chart questions

Hi,

I'm currently working on a chart that changes with mouse movement.

I've downloaded a sample code that you provided to another user and worked on it.

My questions are:

1. Who do I change the grid size? make it a bit more dense.
2. How I bound the axis so that the chart axis will have a start and end index? I want to fit it to the screen and don't let the user to scroll outside the chart and extend it.
Let's say from 0 to 100 on both axis with intervals of 1.
I can't resolve that in my code and can't create a parallel line to axis X (if I create a parallel line it automatically become the minimum of the chart - I want it to be in the middle of the chart).
3. Is it possible to make the mouse movement smoother? So that there will be no sudden "spikes" with fast mouse movement across X axis.

I have provided my solution.

Regards,

Dov.

Attachment: Drag_Drop_Datapoints_cd37d4d3.zip

5 Replies

SA Santhiya Arulsamy Syncfusion Team December 29, 2015 12:03 PM UTC

Hi Dov,

Thanks for contacting Syncfusion support.

Query: Who do I change the grid size?

Could you please tell us whether you want to resize the panel (Grid) of the chart or chart itself? It would be helpful for us to give a proper solution.

Query: How I bound the axis so that the chart axis will have a start and end index?

We have achieved your requirement by disabling the IsAutoSetRange property and set the Maximum and Minimum values using the Range property in the ChartAxis. We have modified the sample for your reference. Please find the sample from the following location.

Sample
: Drag_Drop_Datapoints

Refer to the following UG link for further information.

http://help.syncfusion.com/wpf/classic-chart/chart-axis#custom-range-support
Query: Is it possible to make the mouse movement smoother?

Currently we don’t have this support in the Classic Chart. However, we can achieved your requirement in workaround. To improve the performance of the chart, you can use our SfChart. In our SfChart, we have the direct support “Visual Data Editing” to achieve your requirement. Could you upgrade to our SfChart?

Sample:  VisualDataEditing

Refer to the following SfChart UG link for further information.

http://help.syncfusion.com/wpf/sfchart/interactive-features#visual-data-editing
Regards,

Santhiya A.


DO Dov December 29, 2015 01:27 PM UTC

Thank you for your fast reply.

Query 1: I want to change the grid of the chart. The squares are a bit too big and I want them to be narrower.

Query 2: I'm not sure I've explained myself correctly, I've created a GIF file that shows what I mean.

 

As you can see if I'm dragging the line to the bottom, there is no end to the chart, the chart just keep dropping. I would like to set the boundaries of the chart and not let the user keep scrolling out of the boundaries.

Query 3: Thanks for your input, I'll look into the SfChart solution, eventually I would like to embed the chart in a RibbonWindow, is it possible with the

SfChart?

Thanks for all your help.

Regards,

Dov.


SA Santhiya Arulsamy Syncfusion Team December 30, 2015 01:12 PM UTC

Hi Dov,

Thanks for your update.

Query: I want to change the grid of the chart.

We have achieved your requirement by using the Interval property in the ChartAxis. Please refer to the following code sample.


[XAML]

<syncfusion:ChartArea.PrimaryAxis >


<syncfusion:ChartAxis  ValueType="Double”


IsAutoSetRange="False" Range="10,30"


Interval="2"/>


</syncfusion:ChartArea.PrimaryAxis>

<syncfusion:ChartArea.SecondaryAxis >


<syncfusion:ChartAxis ValueType="Double”


IsAutoSetRange="False" Range="10,40"


Interval="2"/>


</syncfusion:ChartArea.SecondaryAxis>


Please let us know, if the following attached screenshot fulfill your requirement.
 Intervals

Query:  How to set the boundaries of the chart?

We have achieved your requirement by using the Range property in the SecondaryAxis of ChartAxis. We can set the Range property in double value type axis.
Query: Is it possible to embed the SfChart to RibbonWindow?

Yes, it is possible to embed the SfChart to RibbonWindow.

Thanks,
Santhiya A.


DO Dov January 4, 2016 03:44 PM UTC

Thanks, it's working great!


SA Santhiya Arulsamy Syncfusion Team January 5, 2016 12:42 PM UTC

Hi Dov,

Thank you for the feedback.

Please contact us if you need any further assistance.

Regards,

Santhiya A.


Loader.
Live Chat Icon For mobile
Up arrow icon