Skip to content

Filler plugin fill wrong region when target has negative value #8583

@zeitlinger

Description

@zeitlinger

Expected Behavior

image

Current Behavior

image

Steps to Reproduce

Changed order.js on master

module.exports = {
  config: {
    type: 'line',
    data: {
      labels: [0, 1, 2],
      datasets: [
        {
          fill: "-1",
          data: [0, -1, -1],
          // data: [1, 0, 0], //this produced the expected
          backgroundColor: '#ff0000',
        },
        {
          fill: "-1",
          data: [0, 2, 2],
          backgroundColor: '#00ff00',
        },
        {
          fill: "-1",
          data: [0, 0, 1],
          backgroundColor: '#0000ff',
        }
      ]
    },
    options: {
      elements: {
        line: {
          fill: true
        },
        point: {
          radius: 0
        }
      },
      layout: {
        padding: 32
      },
      scales: {
        x: {display: false},
        y: {display: false, stacked: true}
      },
      plugins: {
        legend: false,
        title: false,
        tooltip: false,
        filler: true
      }
    }
  },
  options: {
    canvas: {
      height: 256,
      width: 512
    }
  }
};

Context

Trying to get charts correct for Gaia Project

image

Environment

Git: 7ccf9e2
Used Karma Debug Runner

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