Issue 63455 - scale dialog shows time values incorrectly
Summary: scale dialog shows time values incorrectly
Status: CLOSED DUPLICATE of issue 87900
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: requirements
QA Contact: issues@graphics
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2006-03-22 07:53 UTC by gws4259
Modified: 2013-02-24 21:21 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
test file (12.58 KB, application/vnd.oasis.opendocument.spreadsheet)
2006-03-23 18:25 UTC, lars
no flags Details
Two charts with different time formats (17.05 KB, application/vnd.oasis.opendocument.spreadsheet)
2006-03-27 10:39 UTC, bjoern.milcke
no flags Details
Step1 (31.00 KB, image/png)
2006-03-28 19:49 UTC, gws4259
no flags Details
Step2 (12.87 KB, image/png)
2006-03-28 19:49 UTC, gws4259
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description gws4259 2006-03-22 07:53:31 UTC
1. Create a chart from a spreadsheet with a time y axis
2. open y-axis object properties
3. there are several time values not correctly shown
- a negative min value (eg. -3:00:00) is shown as a positive value (21:00:00)
- main interval (eg. 1:00:00) is shown decimal as 0,0
- sub interval is shown decimal too
Comment 1 frank 2006-03-22 08:45:42 UTC
wrong component, changed to Chart. And as far as I remember a double.
Comment 2 lars 2006-03-23 18:24:31 UTC
confirming all 3 points with 680_m158 on WinXP Pro SP2; possible duplicate for 
last 2 points: issue 6278
Comment 3 lars 2006-03-23 18:25:39 UTC
Created attachment 35182 [details]
test file
Comment 4 bjoern.milcke 2006-03-27 10:39:17 UTC
Created attachment 35282 [details]
Two charts with different time formats
Comment 5 bjoern.milcke 2006-03-27 10:49:57 UTC
The first problem has to do with the number format and is somewhat subtle.

1. When you enter a time in a cell, the format is detected and automatically set
to a fitting format. When you enter "3:00" the format becomes "HH:MM:SS". If you
enter "-3:00" the format gets "[HH]:MM:SS", which displays negative times in
contrast to the first format.
2. In the attached example (tya.ods), the first cell has format "HH:MM:SS", as
well as all other cells except the one with the negative value, which has
"[HH]:MM:SS".
3. When creating a chart out of a range, Calc choses a number format to pass to
the chart for being used for the y-axis. This is currently done by taking the
first cell of the range. As a result, you get "HH:MM:SS" for the y-axis, which
does not show negative times.
4. The scale tab-page uses the format of the y-axis. See the attached
DifferentTimeFormats.ods for two examples of charts with the two number formats.
In the lower chart, the scale tab page show the time correctly in the Minimum
field. In the upper chart it is in principle also the correct format, because
the y-axis also shows 21:00 instead of -3:00.

Currently, I have no idea how we could smartly fix this. If it were possible to
get a "Format that can deal with negative values" for every given format (which
at least does not work for user-defined formats), this would help for the chart.
Alternatively, Calc could take a more sophisticated approach to find a good
number format. With this, you might still get this problem, when all values are
positive, but you want to set a minimum of -1:00.
Comment 6 bjoern.milcke 2006-03-27 10:57:01 UTC
The problems with the major and minor interval would require some functionality
like DifferenceFormatFor( anyFormat ).

The reason why the values are not shown as expected is the following, Assume you
have a number format "Saturday, October 21, 2006". Then, when you want a major
step "1 day", you would get "Sunday, December 31, 1899" as major step. You
wouldn't want this. So, as I said, for each format there should be a difference
format like "1 day 2 hours". As long as we don't have such a thing (again this
usually fails at least for user-defined formats), I don't see any good solution
for this.

Maybe both issues can be fixed especially for time and date formats. But I
wouldn't want to do this in the chart but rather in the number formatter
implementation.
Comment 7 gws4259 2006-03-28 19:49:19 UTC
Created attachment 35320 [details]
Step1
Comment 8 gws4259 2006-03-28 19:49:41 UTC
Created attachment 35321 [details]
Step2
Comment 9 kla 2006-04-12 12:12:18 UTC
As i can read its not an defect but rather an enhancement. I change the Type.
Comment 10 IngridvdM 2010-04-20 15:29:10 UTC
Checked in a recent version OOo 3.2:
The problems within the scale tab page of the axis dialog have been fixed
already (see Issue 87900).

*** This issue has been marked as a duplicate of 87900 ***
Comment 11 IngridvdM 2010-04-20 15:29:49 UTC
closing duplicate issue