PC Review
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Charting
Re: Line chart - line "remember" last value till next value
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Charting
Re: Line chart - line "remember" last value till next value
![]() |
Re: Line chart - line "remember" last value till next value |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
On his web site, Tushar Mehta has instructions for creating a step chart:
http://tushar-mehta.com/ Jannar Molden wrote: > Hello. > > I need to create line chart from data like this: > > A B > 12:00:00 1 > 12:00:01 1 > 12:00:02 2 > 12:01:12 1 > 12:01:24 3 > 12:01:45 1 > 12:02:06 2 > 12:02:47 1 > ... > ... > > If I use normal line chart, the line will "connect" the data points > from one to the other. But what I want to do is that the line should > stay at the level of the last data value. Because the normal chart > will show e.g. at 12:00:015 value 1.5. I want it to show 1 until > 12:00:02. > > So I should get a graph like this: > > _ > _ | | _ > __| |_| |_| |_ > ---- time ---> > > Not like this: > > /\ > __/\_/ \_/\_ > ---- time ---> > > I'm usint MS Office 2000. > If it's possible to do with Visual Basic, I can try that also :-). -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Jannar -
Excel sometimes has its own ideas about what minimum and maximum values to put on the chart. If you want more control over your axis scale, you can enter your time directly into the boxes of the Format Axis - Scale dialog. If you type 19:12, Excel will convert it internally to 0.8. If you want it to start at 8:15, end at 18:15, with a tick mark every 0:15, use these numbers in that format in the dialog. If you want Excel to use your own formulas to set its axis limits, you can use the approach I describe here: http://www.google.com/groups?selm=e...4%40tkmsftngp11 Use formulas to compute new axis parameters according to your requirements, and let a worksheet_change event procedure change the axes. - Jon ------- Jon Peltier, Microsoft Excel MVP http://www.geocities.com/jonpeltier/Excel/index.html _______ Jannar Molden wrote: > Thank's Debra. > > It was just what I needed! > > Now I got a new problem :-). > > If my data contains about 200 lines of those time -> value pairs, > the scatter chart will create an X axis starting from 00:00:00 even > the first value is 08:13:26. The end of the X (max X) is somehow > better showing 19:12:00 while last value is 18:13:00. > > My time column is formated for custom tt:mm:ss (values like 08:01:03, > and 22:34:45). The cell is showing the time ok, but when editing it > it's shown like 8:01:03 (missing first 0). Calculation between those > cells are working ok though... > > When I select X axis, and format options, Scale (2nd) tab shows values > under Automatic > min = 0, > max = 0.8 > main = 0.1 > ??? = 0.02 > Y crossing? = 0 > > and I think 0 is for 00:00:00 and 0.8 is for 19:12:00. > > And if I select let say 10 lines of my data, the scatter chart will > start automatically from the "right" X position. But if I select 60 > line, the X axis will start from 00:00:00. How do I set the X axis > start from the first value or even close? > > Sorry about those weird labels, but I'm using Finnish version of > Excel, so I don't know the reals English labels :-). > > Cheers, > > Jykke. > > > >>On his web site, Tushar Mehta has instructions for creating a step chart: >> http://tushar-mehta.com/ >> > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
This one's a better description of macros that rescale axes:
http://www.google.com/groups?selm=O...FTNGP10.phx.gbl - Jon ------- Jon Peltier, Microsoft Excel MVP http://www.geocities.com/jonpeltier/Excel/index.html _______ Jon Peltier wrote: > Jannar - > > Excel sometimes has its own ideas about what minimum and maximum values > to put on the chart. > > If you want more control over your axis scale, you can enter your time > directly into the boxes of the Format Axis - Scale dialog. If you type > 19:12, Excel will convert it internally to 0.8. If you want it to start > at 8:15, end at 18:15, with a tick mark every 0:15, use these numbers in > that format in the dialog. > > If you want Excel to use your own formulas to set its axis limits, you > can use the approach I describe here: > > http://www.google.com/groups?selm=e...4%40tkmsftngp11 > > Use formulas to compute new axis parameters according to your > requirements, and let a worksheet_change event procedure change the axes. > > - Jon > ------- > Jon Peltier, Microsoft Excel MVP > http://www.geocities.com/jonpeltier/Excel/index.html > _______ > > Jannar Molden wrote: > >> Thank's Debra. >> >> It was just what I needed! >> >> Now I got a new problem :-). >> >> If my data contains about 200 lines of those time -> value pairs, >> the scatter chart will create an X axis starting from 00:00:00 even >> the first value is 08:13:26. The end of the X (max X) is somehow >> better showing 19:12:00 while last value is 18:13:00. >> >> My time column is formated for custom tt:mm:ss (values like 08:01:03, >> and 22:34:45). The cell is showing the time ok, but when editing it >> it's shown like 8:01:03 (missing first 0). Calculation between those >> cells are working ok though... >> >> When I select X axis, and format options, Scale (2nd) tab shows values >> under Automatic min = 0, >> max = 0.8 >> main = 0.1 >> ??? = 0.02 >> Y crossing? = 0 >> >> and I think 0 is for 00:00:00 and 0.8 is for 19:12:00. >> >> And if I select let say 10 lines of my data, the scatter chart will >> start automatically from the "right" X position. But if I select 60 >> line, the X axis will start from 00:00:00. How do I set the X axis >> start from the first value or even close? >> >> Sorry about those weird labels, but I'm using Finnish version of >> Excel, so I don't know the reals English labels :-). >> >> Cheers, >> >> Jykke. >> >> >> >>> On his web site, Tushar Mehta has instructions for creating a step >>> chart: >>> http://tushar-mehta.com/ >>> >> >> > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

