Jump to content
Software FX Community

Scrolling chart area


User (Legacy)

Recommended Posts

Hello

can you tell if there is a possibility to have the chart area scrolled in

the real-time

I have scrollable Bar charts and when I'm moving horizontal scrollbar the

chart's view is not

scrolled until I release the mouse button

Thanks for any help

--

George Aston

Sprintbit Software

www.sprintbit.com

contact@sprintbit.com

Link to comment
Share on other sites

While on the topic,

I would like to have the charts scrollable but I do not want to have the

scrollbar

visible, so I could control the chart from the code only.

Probably it is impossible to do now, but can you consider it as an future

enhancement., please.

Why?, I have for example 10 charts type of Bar and each of them is

scrollable and showing

the scrollbar, is fact this is a waste of window real estate when no

scrollbar controls are needed

"Sprintbit Software" <support@sprintbit.com> wrote in message

news:JAA13mfbEHA.3152@webserver3.softwarefx.com...

> Hello

> can you tell if there is a possibility to have the chart area scrolled in

> the real-time

> I have scrollable Bar charts and when I'm moving horizontal scrollbar the

> chart's view is not

> scrolled until I release the mouse button

>

> Thanks for any help

>

> --

> George Aston

> Sprintbit Software

> www.sprintbit.com

> contact@sprintbit.com

>

>

Link to comment
Share on other sites

Oh, Thanks, you see what happens when you get used to use only propeties not

flags.

Well finally I'm going to achevie the task I want to

Last question:

Now when I have first chart with the scroolbar visible it is a time for

synchronization rest of it.

But the problem is that when I move the scrolbar or clicking on the arrows

the rest of charts does not have the exact same view.

There is always up to +- 3 points of difference between fistr chart and rest

of them

See the code

Private Sub ChartFX1_UserScroll(Index As Integer, ByVal wScrollMsg As Long,

ByVal wScrollParam As Long, nRes As Integer)

On Error Resume Next

Dim mini As Double, maxi As Double

With ChartFX1

.item(0).Axis(AXIS_X).GetScrollView mini, maxi ' I'm getting the

view from first chart

For NInteger = 1 To .Count - 1

If .item(NInteger).Visible = True Then

.item(NInteger).Axis(AXIS_X).SetScrollView mini, maxi

End If

Next

End With

End Sub

The very first chart has viev ends on for example maxi=88

but rest of them ends on maxi=100

Any other synchronization technics are needed?

Sincerly

--

George Aston

Sprintbit Software

www.sprintbit.com

contact@sprintbit.com

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:Bg5Mr3ybEHA.3888@webserver3.softwarefx.com...

> This can be achieved by doing:

>

> chart.Style = chart.Style and not CS_SCROLLBARS

>

> While keeping the chart scrollable, this flag will remove the scrollbars.

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

Yes they have all the same parameters and look

All parametewrs are set in the loop so

With .Axis(AXIS_X)

.AutoScale = False

.PixPerUnit = 11

.Max = 100: .Min = 1 '

.STEP = 2

.MinorStep = 1

End With

Problem still persist

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:Ul96Kd1bEHA.3888@webserver3.softwarefx.com...

> Make sure the Step or MinorStep (if set) is the SAME in all charts.

>

> SetScrollView will round to the Step (MinorStep if there is one).

>

> For example, set:

>

> chart1.MinorStep = 1

> chart2.MinorStep = 1

> chart3.MinorStep = 1

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

I have created sample project that demonstrates the problem of

synchronization.

Please try it and you will see that sometimes is synchronized sometimes not.

Also I have another project, where chart's data editor does not responding

to the keyboard

All necessary thirty party files are included, you will need to register two

additional ocx.

Double click on data editor cell and try to change an number

You can pick up the project from my server

http://www.sprintbit.org/files/Test.zip

While I'm writing, there is still some unresolved request, from me and some

other users

How to get which point number (position on X-axis) is, after clicking on the

chart plot area?

I thought that this eventChartFX1_GetPointLabel is for this purpose, but it

is not.

Maybe you will explain it once and for good for all users

Thank you for your support

--

George Aston

Sprintbit Software

www.sprintbit.com

contact@sprintbit.com

"Sprintbit Software" <support@sprintbit.com> wrote in message

news:JAA13mfbEHA.3152@webserver3.softwarefx.com...

> Hello

> can you tell if there is a possibility to have the chart area scrolled in

> the real-time

> I have scrollable Bar charts and when I'm moving horizontal scrollbar the

> chart's view is not

> scrolled until I release the mouse button

>

> Thanks for any help

>

> --

> George Aston

> Sprintbit Software

> www.sprintbit.com

> contact@sprintbit.com

>

>

Link to comment
Share on other sites

The problem you are having is because of timing.

The UserScroll event is fired BEFORE the scroll operation is performed, so

at the time you receive the event the chart has NOT yet being scrolled. You

need to let the chart scroll and then do your code, otherwise GetScrollView

will return you the view PRIOR to doing the scroll.

You can easily achieve this using a timer with Interval=1 (Enabled = false

at design time).

Private Sub ChartFX1_UserScroll(Index As Integer, ByVal wScrollMsg As Long,

ByVal wScrollParam As Long, nRes As Integer)

Timer1.Enabled = True

End Sub

Private Sub Timer1_Timer()

On Error Resume Next

If FlagScrolling = True Then Exit Sub

FlagScrolling = True

Dim mini As Double, maxi As Double

With ChartFX1

.Item(0).Axis(AXIS_X).GetScrollView mini, maxi

For NInteger = 1 To .Count - 1

If .Item(NInteger).Visible = True Then

.Item(NInteger).Axis(AXIS_X).SetScrollView mini, maxi

End If

Next

End With

FlagScrolling = False

Timer1.Enabled = False

End Sub

--

FP

Software FX

Link to comment
Share on other sites

I see, now it work.

What about this clicking events:

ChartFX1_LButtonDblClk returns ByVal nSerie As Integer, ByVal nPoint As

Long,

but

ChartFX1_LButtonDown does not return such information

why it was so hard to implement too?

Anyway, please help us to figure out how you get it under

ChartFX1_LButtonDown event

I thought maybe PixelToValue will be appropriate method but it is not

(however the name

of this method is suggesting it)

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:YR10ImMcEHA.3080@webserver3.softwarefx.com...

> The problem you are having is because of timing.

>

> The UserScroll event is fired BEFORE the scroll operation is performed, so

> at the time you receive the event the chart has NOT yet being scrolled.

You

> need to let the chart scroll and then do your code, otherwise

GetScrollView

> will return you the view PRIOR to doing the scroll.

>

> You can easily achieve this using a timer with Interval=1 (Enabled = false

> at design time).

>

> Private Sub ChartFX1_UserScroll(Index As Integer, ByVal wScrollMsg As

Long,

> ByVal wScrollParam As Long, nRes As Integer)

> Timer1.Enabled = True

> End Sub

>

> Private Sub Timer1_Timer()

> On Error Resume Next

> If FlagScrolling = True Then Exit Sub

> FlagScrolling = True

> Dim mini As Double, maxi As Double

> With ChartFX1

> .Item(0).Axis(AXIS_X).GetScrollView mini, maxi

>

> For NInteger = 1 To .Count - 1

> If .Item(NInteger).Visible = True Then

> .Item(NInteger).Axis(AXIS_X).SetScrollView mini, maxi

> End If

> Next

>

> End With

> FlagScrolling = False

> Timer1.Enabled = False

> End Sub

>

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...