Skip to content

changing color only for gridLines at index zero #4948

Description

@elghali

I am trying to change style of x-axes and y-axes only at index zero, but I want to only show gridlines for yAxes, however if I set the display:false for gridLines under xAxes, the property zeroLineColor doesn't work anymore, here is my options variable:

        xAxes: [
          {
            display: true,
            barPercentage: 0.03,
            stacked: true,
            gridLines: {
              display: false,
              zeroLineColor: '#000',
            },
            scaleLabel: {
              display: true,
              labelString: 'Time',
              fontColor: 'red'
            },
            labels: {
              show: true
            }
          }
        ],
        yAxes: [
          {
            type: 'linear',
            display: true,
            id: 'y-axis-1',
            gridLines: {
              display: true,
              zeroLineColor: '#000'
            },
            labels: {
              show: true
            },
          }
        ]
      }

this code sets the yAxes color at index zero to black but not the xAxes at index zero, obviously because I set its display to false

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions