Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function () {
- $('#chart').on( 'click',function() {
- $.ajax({
- url: '/api/chart/ticket/classification',
- data_type: 'json',
- success: function(json){
- $('#plotagem').highcharts({
- chart: {
- type: 'column'
- },
- title: {
- text: 'Atendimentos Realizados por Fila'
- },
- xAxis: {
- type: 'category'
- },
- yAxis: {
- title: {
- text: 'Total percent market share'
- }
- },
- legend: {
- enabled: false
- },
- plotOptions: {
- series: {
- borderWidth: 0,
- dataLabels: {
- enabled: true,
- format: '{point.y:.1f}%'
- }
- }
- },
- tooltip: {
- headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
- pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}%</b> of total<br/>'
- },
- series: [{
- name: "Brands",
- colorByPoint: true,
- data: json
- }],
- });
- },
- error: function() {
- alert("Error");
- }
- });
- return false;
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement