Project

General

Profile

Actions

Bug #1652

closed

xmera Omnia - Collection #1651: Render numeric axes in charts as Integers

Render numeric axes in charts as Integers

Added by liaham almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Affected Version:
Compatible Redmine Version:

Description

๐Ÿ› Thanks for taking the time to fill out this bug report! ๐Ÿ˜Š

What did you expect?

Rendering charts with integer values (number of issues, month, ...) should display an integer scale on the y-axis.

What has happened instead?

The y-axis shows fractional numbers.

What could be a possible solution?

Modify the configuration of chart.js:

scales: {
           yAxis: {stacked: true},
-          xAxis: {stacked: true}
+          xAxis: {stacked: true, ticks: {precision: 0}}
         }

See also https://www.redmine.org/issues/38359.

How can we reproduce the problem?

Render a chart in the report section of a project with issues enabled.

In what environment are you running the plugin?

Please copy and paste your environment information as displayed in Administration ยป Information or run bin/about in the root dir of your Redmine instance.

What browsers are you seeing the problem on?

  • Firefox
  • Chrome
  • Safari

Relevant log output

# Copy your log output (log/production.log) here

not necessary
Actions #1

Updated by liaham over 1 year ago

  • Target version changed from unreleased to 0.2.0
Actions #2

Updated by liaham over 1 year ago

This is how to solve the issue:

        scales: {
          yAxes: { stacked: true, ticks: { precision: 0 } },
          xAxes: { stacked: true, ticks: { precision: 0 } }
        }

Actions #3

Updated by liaham over 1 year ago

  • Status changed from New to In Progress
Actions #4

Updated by liaham over 1 year ago

  • Target version changed from 0.2.0 to 0.2.1
Actions #5

Updated by liaham over 1 year ago

  • Target version changed from 0.2.1 to 0.1.2
Actions #6

Updated by liaham over 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF