0

I'm using scatter graph. On hover over a point, the box representing the point color is not filled

Look here

I need to fill it with the color of the line instead of just the border being of the color.

Fiddle

This is my dataset:

this.ScatterChart.data.datasets.push({
  label: this.label,
  data: this.Axiscoordinates,
  fill: false,
  lineTension: 0.1,
  borderColor: SetColor,
  color: SetColor,
  backGroundColor: SetColor,
  borderWidth: 1,
  yAxisID: this.yAxisUnit,
  showLine: true
});
MAK
  • 3
  • 3

1 Answers1

0

in your dataset object put the backgroundColor to the color you want it to be, that will solve it

datasets: [
  {
    data: []
    backgroundColor: color
  }
]

EDIT:My mistake backgroundColor is with a lower g instead of a captial one

LeeLenalee
  • 27,463
  • 6
  • 45
  • 69
  • Hi! Thanks for the reply. Tried that but does not work. Have added my dataset to the question if you'd like to have a look :) – MAK Jan 29 '21 at 10:01
  • Can you provide all of your code because when I test it, it seems to work just fine, example: https://jsfiddle.net/Leelenaleee/3nre61kp/8/ – LeeLenalee Jan 29 '21 at 10:18
  • It looks similar but doesn't work: https://jsfiddle.net/imMak/y1qn82mx/14/ – MAK Jan 29 '21 at 11:33
  • Found the issue, backgroundColor is not with a capital G, my mistake – LeeLenalee Jan 29 '21 at 11:51