Skip to content

Steppedline: 'after' not drawn correctly when offsetgridlines is true #6838

@plindman

Description

@plindman

Expected Behavior

Drawing a main line with additional filled areas to provide context for the main line values.
The main data series point to appear at the middle of x-value area.
The filled areas are constant for each x value and step down at the end of each x-value.

Current Behavior

The step down of the filled area happens already at the middle of the x-value area.
Should be at the vertical
If you remove options.scales: {xAxes: [{gridLines: {offsetGridLines: true}}]}, the step down is drwan at the right position,
but the main data point is then drawn at the left edge of the x-area.

Possible Solution

Steps to Reproduce (for bugs)

https://jsbin.com/narakelemu/edit?html,js,output

Environment

  • Chart.js version: 2.8.0 and 2.9.3
  • Browser name and version: Chrome 79.0.3945.79, Firefox 71.0, Edge

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions