Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#2534 closed Bug (fixed)

Charts - Top of chart cut off if data contains floats

Reported by: ziegenberg Owned by:
Priority: major Milestone: 1.5.1 Piwik 1.5.1
Component: Core Keywords:
Cc: Sensitive: no

Description

In the Visitor Overview the Chart showing the actions per visit is cut off at the top.

I debugged through [source:trunk/core/Visualization/Chart.php Chart.php] and found the problem there. All the dates in [source:trunk/core/Visualization/Chart.php@4963#L133 Chart.php Line 133] are kind of floats with a comma as the decimal mark and the json_encode() three lines further creates rubbish as it takes the comma as a separator.

Change History (7)

comment:1 Changed 3 years ago by ziegenberg

The comma as decimal mark is the same reason why the calculation in [source:trunk/core/Visualization/Chart.php@4963#L97 getMaxValue()] does not work.

comment:2 Changed 3 years ago by vipsoft (robocoder)

Yeah, I suspected this just after committing [4963]. I'll revert and find the root cause.

comment:3 Changed 3 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

(In [4967]) fixes #2534 (I think)...output looked ok with de_DE.UTF-8

comment:4 Changed 3 years ago by vipsoft (robocoder)

[4967] fixed a bug in the json_encode compatibility function for floats

comment:5 Changed 3 years ago by ziegenberg

Patched my system. Works!

@vipsoft: Thanks for fixing this bug! I really appreciate your short response time.

comment:6 Changed 3 years ago by vipsoft (robocoder)

Thanks for confirming.

comment:7 Changed 3 years ago by vipsoft (robocoder)

  • Summary changed from Top of Chart cut off if data contains floats to Charts - Top of chart cut off if data contains floats
Note: See TracTickets for help on using tickets.