Code

Opened 5 years ago

Closed 4 years ago

#12026 closed (wontfix)

widthratio rounding option/filter

Reported by: openinformation <nospam@…> Owned by: nobody
Component: Template system Version: 1.1
Severity: Keywords: widthratio, feature request
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The widthratio tag is great for displaying quick graphs and percentages. The only "problem" is that it rounds to 0 digits after the decimal point. That often adds up to percentages > 100%.

It would be great if one could specify a filter that controls the number of digits behind the decimal point.

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by thejaswi_puthraya

  • Component changed from Uncategorized to Template system
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 4 years ago by russellm

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

Marking wontfix because it isn't obvious to me how this would work. Any problem that exists with 0 decimal places will exist with N decimal places, it will just be a smaller error. In order to guarantee that a series of values add up to 100, you need to have knowledge of the entire series, which isn't really possible with a simple template tag.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.