Skip to content

[BUG] Specifying Number array for gridLines.lineWidth causes grid lines to disappear #5668

@druryuow

Description

@druryuow

Expected Behavior

Specifying a Number array for gridLines.lineWidth should result in the corresponding grid lines being drawn at the individually specified line widths.

Current Behavior

Specifying a Number array for gridLines.lineWidth results in grid lines not being drawn.

Possible Solution

Following line in Chart.Scale.draw might be part of the issue:

var axisWidth = me.options.gridLines.lineWidth;

Steps to Reproduce (for bugs)

https://jsfiddle.net/0v5gLtzp/2/

Context

I have a bar chart with 9 categories and these are subdivided into three 'parent' categories, with one category in the first parent category, the next four in the second parent category, and the next four in the third parent category. I would like to make the grid lines between the parent categories thicker than the grid lines between the sub-categories.

Environment

  • Chart.js version: 2.7.2
  • Browser name and version: Firefox 61.0.1, Chrome 68.0.3440.84

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions