javascript - Hide x-Axis from angularjs-chartjs -
i using angularjs-chartjs display charts. how can hide x-axis without setting labels : ["", "", ""]
i wish hide them needing use them inside tooltiptemplate
vm.att = { labels: avglabels, datasets: [ { label: "average response time", fillcolor: colors.byname('warning'), strokecolor: colors.byname('warning'), highlightfill: colors.byname('warning'), highlightstroke: colors.byname('warning'), data: avgtest }, ] }; vm.baroptions = { scalelabel: "<%=value%>" + ' ' + 'ms', scalebeginatzero: true, scaleshowgridlines: false, scalegridlinecolor: 'rgba(0,0,0,.05)', scalegridlinewidth: 1, barshowstroke: true, barstrokewidth: 2, barvaluespacing: 2, bardatasetspacing: 1, tooltiptemplate: function (valueobj) { return $filter('date')(valueobj.label, 'shortdate') } };
my chart looks this:
from docs:
new chart(ctx, { type: 'line', data: data, options: { scales: { xaxes: [{ display: false }] } } });
Comments
Post a Comment