Skip to content

BackdropColor scriptable #9981

Answered by LeeLenaleee
pacomorcillo asked this question in Q&A
Discussion options

You must be logged in to vote

You need to turn showLabelBackdrop to true as well.

const options = {
  type: 'line',
  data: {
    labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
    datasets: [{
        label: '# of Votes',
        data: [12, 19, 3, 5, 2, 3],
        borderColor: 'pink'
      },
      {
        label: '# of Points',
        data: [7, 11, 5, 8, 3, 7],
        borderColor: 'orange'
      }
    ]
  },
  options: {
    scales: {
      x: {
        ticks: {
          color: 'white',
          showLabelBackdrop: true,
          backdropColor: (ctx) => (ctx.tick.label)
        }
      },
      y: {
        ticks: {
          color: 'white',
          showLabelBackdrop: true,
          backdro…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pacomorcillo
Comment options

Answer selected by pacomorcillo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants