angular-chart.js icon indicating copy to clipboard operation
angular-chart.js copied to clipboard

Need help on usage of chart-dataset-override

Open rmshkmr opened this issue 7 years ago • 3 comments

I want show the label - "Minutes" in the chart. But it is not appearing. https://jsfiddle.net/rmshkmr/hhf1vspr/

rmshkmr avatar Oct 15 '16 07:10 rmshkmr

Where you want to show the label "Minutes"? Can you explain what you need?

mathben avatar Oct 17 '16 00:10 mathben

While hovering it shows the "Bar Chart" instead i need "Minutes" selection_015

rmshkmr avatar Oct 18 '16 10:10 rmshkmr

@rmshkmr I dont know if this can help you, but give it a shot

this.optionsTransac={
      tooltips:{
        enabled:true,
        xPadding:15,
        yPadding:15,
        callbacks:{
          //remove title
          title:function(data){ return [];},
          //remove label
          label(tooltipItem,data){ return ""; },
          //change tooltip body
          afterBody: function(data) {
            return ['Month of Transaction Date: '+data[0].xLabel,'Year of Transaction Date: 2015','Sale Amount: '+ data[0].yLabel];
          }
        }
      }
    }

   <canvas id="bar" class="chart chart-bar" 
     chart-options="$ctrl.optionsTransac" >
  </canvas>

erick2014 avatar Oct 20 '16 00:10 erick2014