7
On my line chart I wanted that when you hover over the chart line when the caption appears, and that it had a title. This is only possible by filling the array of Abels, but appears below the graph, on the "X" axis the names, and I do not want, I just want the titles in the captions.
Follows the code:
angular.module("app", ["chart.js"]).controller("LineCtrl", function($scope) {
$scope.labels = ["Titulo 1", "Titulo 2", "Titulo 3", "Titulo 4", "Titulo 5", "Titulo 6", "Titulo 7"];
$scope.series = ['Legenda 1', 'Legenda 2'];
$scope.data = [
[65, 59, 80, 81, 56, 55, 40],
[28, 48, 40, 19, 86, 27, 90]
];
$scope.onClick = function(points, evt) {
console.log(points, evt);
};
});
In this way, it generates a title over the captions when passing the mouse, however appears the names below the chart, I wish it did not appear the names below the chart, only in the title even when passing the mouse, as would be?
Reference: http://jtblin.github.io/angular-chart.js/
jsfiddle:http://jsfiddle.net/Lfmhcab3/4/
Someone??? ......
– War Lock
This is not possible and the creator of Chart.js recommends that you create another extension for the line chart and perform the treatment. There are alternative solutions that can be useful for you.
– user21448
Maybe this link can help you: http://stackoverflow.com/questions/32841302/hide-labels-on-x-axis-chartjs
– Carlinhos
See that the caption does not appear when you hover over the line but over the point.
– Ivan Ferrer