Jump to content
Software FX Community

Customizing Scrollbar


kap_soft

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...