Moving labels on Axis X while scrolling
Hi, i´m making a project in winforms using the Chart control to display a Column chart, i want to move te displayed labels with the correspondent column itself.

My chart is currently doing this:
- This is my chart when i'm not scrolling it.
- And this is my chart when i scroll it to see more data.
I want to move the labels with their respective column.
How can i do that?
Thank you.
SIGN IN To post a reply.
3 Replies
YP
Yuvaraj Palanisamy
Syncfusion Team
December 9, 2020 09:47 AM UTC
Hi Alexis,
Greetings from Syncfusion.
We have analyzed your query and we have prepared the simple sample with Enable Zooming and Panning in WinForms chart control and it was working fine at our end. Please find the following code snippet.
|
chartControl1.PrimaryXAxis.ZoomFactor = 0.5;
chartControl1.PrimaryXAxis.ZoomPosition = 0;
this.chartControl1.EnableXZooming = true;
this.chartControl1.MouseAction = ChartMouseAction.Panning;
this.chartControl1.PrimaryXAxis.ZoomActions = ChartZoomingAction.Panning;
this.chartControl1.ShowScrollBars = true; |
Also, we have attached the sample for your reference. Please find the sample from the below link.
Sample: https://www.syncfusion.com/downloads/support/forum/160442/ze/WindowsFormsApplication-1132048624
Output:
Before Scrolling:
After Scrolling:
Could you please check the provided sample, if still you are facing the problem please revert us the modified sample with issue reproduced scenario which will be helpful to serve you better solution at the earliest.
Regards,
Yuvaraj.
AL
Alexis
December 9, 2020 03:54 PM UTC
Thanks for the reply, it works but i have a problem with the X Axis lables, now it shows like this.



Now it shows numbers instead of the string value that i have in my model.
And this is part of my code:
And this is my model:
Could you help me with that?
YP
Yuvaraj Palanisamy
Syncfusion Team
December 10, 2020 11:17 AM UTC
Hi Alexis,
We have analyzed your query and tested the provided sample with setting all proposed properties in your updated screenshot. But it has been worked fine by showing the XValue.
We suspected did you have a usage of ChartFormatAxisLabel in your application, are you customize the e.Label value through it by changing its e.Value.
Beyond this, did you add any properties? Could you please share your project to ensure at our end? Did you check our provided sample whether it has been working fine at your end?
Regards,
Yuvaraj.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
AL Alexis
- Dec 8, 2020 04:28 PM UTC
- Dec 10, 2020 11:17 AM UTC