Skip to content

[FEATURE] Add "none" option to borderSkipped for bar chart #5709

@bennettdams

Description

@bennettdams

Expected Behavior

Have the option to skip NO border stroke of a bar from bar chart. (option borderSkipped)

Current Behavior

borderSkipped can only be set to 'bottom', 'left', 'top' or 'right'.
For stacked (horizontal) bar charts, skipping a border creates a "hole" at the bar if the previous dataset is transparent (for example when creating a custom Gantt chart):

image

Possible Solution

Add value 'none', 'false' or similar to the borderSkipped option

Context

I created a Gantt chart (horizontal bar chart with four datasets (two for data, two for offset values)), which works fine so far (see picture above).

The first data is the blue bar, the second data is a bar without background color, but a red border (to show deviations of the two values).

I have two X axes (one for data & offset each) and one Y axis.

The problem is ChartJS' barSkipped option: It removes one border stroke (bottom, left, top or right), but I need to show ALL strokes for this use case.

Environment

  • Chart.js version: 2.7.2
  • Browser name and version: all

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions