scroll through dynamic 0-24 hour time format xvlaues

baroony

New Member
Joined
Aug 27, 2019
Messages
4
i am working on dynamic chart showing hourly data (1-24 format) and i want to scroll tgrough data on specified time span like 5hour,there is times that .minimumscale is greater than .maximumscale property on chart (cht.chart.axes. ...)and scroll has problem( for example when time span is between 23 to 3. how to fix problem
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi, welcome to the board.

Your request is a bit vague, we have no idea what your source data looks like.

But perhaps consider setting up your data so that, for example, 03:00 on Day 1 is identified differently from 03:00 on Day 2 - so have a schedule that covers perhaps 48 hours.

OR, consider something that says something like
IF endtime < starttime
build the selected data in two sections, first section from start time to midnight, second section from midnight to end time.
 
Upvote 0
Hi, welcome to the board. Your request is a bit vague, we have no idea what your source data looks like. But perhaps consider setting up your data so that, for example, 03:00 on Day 1 is identified differently from 03:00 on Day 2 - so have a schedule that covers perhaps 48 hours. OR, consider something that says something like IF endtime < starttime build the selected data in two sections, first section from start time to midnight, second section from midnight to end time.

how to set data like 03:00 on Day 1 is identified differently from 03:00 on Day 2
 
Upvote 0
I don't really understand your question.

It would probably be best if you can post a small sample of your data, including some entries that go over midnight, and some that don't, and explain what exactly you want the results to be.
 
Upvote 0
'part of macro ,d28 d29 updated with scroll
' rng is time vector hour basis
' operator records data every hour and we have large data for some years
' i want to scroll through data and user specify time span of chart
With cht.Chart
.ChartType = xlXYScatterLines
.HasAxis(xlCategory) = True
.Axes(xlCategory).MinimumScale = rng(sh.Range("d28").Value)
.Axes(xlCategory).MaximumScale = rng(sh.Range("d29").Value)
End With
 
Upvote 0
I'm afraid that doesn't help me at all.

It would probably be best if you can post a small sample of your data, including some entries that go over midnight, and some that don't, and explain what exactly you want the results to be.
Can you do this ?
 
Upvote 0
i use trick, i set x-axis values showing false,
,add extra line(k) with values equal to zero(instead horizontal axis),and then add costum
labels through: cht.Chart.SeriesCollection(k).DataLabels(j).Text
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top