Jump to content
Software FX Community

Customizing Scrollbar


kap_soft
 Share

Recommended Posts

Hi,

I would like to use custom scroll bar(.Net Control(HScroll/VScroll)) to scroll through the graph instead of in-built chartFX scrollbar. I would like to know how to do this. Also Chart FX in-built scrollbar should not be visible.

Please help me on this.

It would be a great help If anybody can provide sample code for this.

With Regards 

Arun

 

 

Link to comment
Share on other sites

You can hide the scrollbars using the following code:

chart1.ExtraStyle &= ~

ChartStyles.ScrollBars;

Then you can use axis API to scroll the chart from your own code:

chart1.AxisX.ScrollPosition = position;

You can then hook up a scroll bar control or any other control to handle the scrolling by attaching this code into the appropriate events for the control (Scroll event in the case of the standard .NET scroll bar).

Link to comment
Share on other sites

  • 6 months later...

Hi,

I am replying to this old post, as I have clarification on the same area. I am using ChartFX 6.2 for .Net.

I am using .Net horizontal scrollbar to scroll through the X-Axis. I would like to know how to get the scroll size of the chart, to set the max size of my custom scrollbar. ScrollSize property of X-Axis always returns zero.

I tried using SetScrollView(20,40) when loading the graph after all the data is assigned and X-Axis is scalled. It has not changed the Scrollsize properties value. But when Place a button on the graph and invoke the SetScrollView(20,40) method in the buttons click event (i.e., after the form is loaded) it changes the value of AxisX.ScrollSize property.

I also have one more question:- how to loop through the  points available in a series. Also is there a way to set the colour of a point line based on some expression result.

Please help ASAP.

Thanks,

Arun 

 

 

 

Link to comment
Share on other sites

The scroll size is calculated based on the size of the chart and many attributes in the chart. Because of this, this calculation is delayed until the chart is about to be painted in order to avoid multiple calculations.

In order top force a recalculation you may call the UpdateSizeNow method.

As for how to loop through all points in a series you simply loop from 0 to NumberOfPoints-1. Chart FX 7 provides functionality for changing point attributes based on a condition: Conditional Attributes.

Link to comment
Share on other sites

  • 1 year later...

 Hi Frank,

 I need clarification regarding the same but I am using Chart FX 6.2 version for .Net.

I  would like to use a custom scroll bar or say a track bar rather,  to scroll through the graph instead of in-built chartFX scrollbar. Iwould like to know how to do this. Also Chart FX in-built scrollbarshould not be visible.

The Property 'ExtraStyle' does not come into this 6.2 version  How should I go about it?

Please help me on this.

It would be a great help if you can provide sample code for this.

 Thanks & Regards,

Tej

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...