Question: I would like to draw a horizontal line in a chart using [Chart.js](http://www.chartjs.org/). But I'm not able to do it.

I've read this question - [Chart.js — drawing an arbitrary vertical line](https://stackoverflow.com/questions/30256695/chart-js-drawing-an-arbitrary-vertical-line?rq=1) - but I can't transform the code for drawing **horizontal lines** not vertical.

I hope you can help me (especially potatopeelings :)).

Answer: 
Without any additional code, I managed to draw a line by adding a new entry as a dataset with these options :

Just replace with the size of your dataset, and with the value that the line represents.

```
{
  data: Array.apply(null, new Array(<length>)).map(Number.prototype.valueOf, <value>),
  fill: false,
  radius: 0,
  backgroundColor: "rgba(0,0,0,0.1)"
}

```

The radius of 0 will somehow hide the dots and the fill: false will make it appear as a line.
The simplest way I've found to create a horizontal line was by just creating a new dataset with every entry set to some constant value (y = 75 for example). Then I set `pointRadius` and `pointHitRadius` to zero to hide the tooltips and points on the graph.

```

datasets: [
  {
    data: your_data,
    ...
  },
  {
    data: your_data.map(r => 75),
    pointRadius: 0,
    pointHitRadius: 0,
  },
]

```