Try entering the same value for each index in the dataset. This will give you a straight line horizontally at the selected point along the y axis.
angular.module("app", ["chart.js"]).controller("LineCtrl", function ($scope) { $scope.labels = ["January", "February", "March", "April", "May", "June", "July"]; $scope.series = ['Series A', 'Series B']; $scope.data = [ [65, 65, 65, 65, 65, 65, 65], [35, 35, 35, 35, 35, 35, 35] ]; $scope.onClick = function (points, evt) { console.log(points, evt); }; $scope.datasetOverride = [{ yAxisID: 'y-axis-1' }, { yAxisID: 'y-axis-2' }]; $scope.options = { scales: { yAxes: [ { id: 'y-axis-1', type: 'linear', display: true, position: 'left' }, { id: 'y-axis-2', type: 'linear', display: true, position: 'right' } ] } }; });
Here is the markup
<canvas id="line" class="chart chart-line" chart-data="data" chart-labels="labels" chart-series="series" chart-options="options" chart-dataset-override="datasetOverride" chart-click="onClick" </canvas>
source share