SHARE
TWEET

Untitled

a guest May 15th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  productivityChart(id:any = "productivityChart"){
  2.  
  3.     console.log("Gráfica de productividad:");
  4.     console.log(this.productivityData);
  5.  
  6.  
  7.     var chart = this.AmCharts.makeChart( "productivityChart", {
  8.       "type": "serial",
  9.       "theme": "light",
  10.       "color": "#FFFFFF",
  11.       "dataProvider": this.productivityData? this.productivityData.graphicData:[],
  12. //[{"date": "5:00", "value":"12","color":this.redIndicatorColor,"tools":"21323"},{"date": "6:00", "value":"12","color":this.blueIndicatorColor},{"date": "7:00", "value":"12","color":this.redIndicatorColor},{"date": "8:00", "value":"12","color":this.redIndicatorColor},],
  13.       "valueAxes": [ {
  14.         "gridColor": "#FFFFFF",
  15.         "gridAlpha": 0.2,
  16.         "dashLength": 0,
  17.         "labelsEnabled": false
  18.       } ],
  19.       "gridAboveGraphs": true,
  20.       "startDuration": 1,
  21.       "graphs": [ {
  22.         //"balloonText": "Hora: [[category]]: <br> Golpes Totales: [[value]] </br> Golpes Potenciales: [[goals]] <br> Herramientas: [[tools]]",
  23.         "balloonText": "<div class='tooltip1' style='margin: -40px'> <span>&bull;</span> [[value]] </div>",
  24.         "fillAlphas": 1,
  25.         "lineAlpha": 0,
  26.         "labelText": "[[value]]",
  27.         //"labelPosition": "inside",
  28.         "labelFunction":function(value:any, valueText:any,valueAxis:any){
  29.           // console.log(value);
  30.           // console.log(valueAxis);
  31.           // console.log(valueText);
  32.           return value.dataContext.value;
  33.         },
  34.         "axisColor":"",
  35.         "type": "column",
  36.         "valueField": "value",
  37.         "colorField": "color",
  38.       } ],
  39.       "chartCursor": {
  40.         "categoryBalloonEnabled": false,
  41.         "cursorAlpha": 0,
  42.         "zoomable": false
  43.       },
  44.       "categoryField": "date",
  45.       "categoryAxis": {
  46.         "gridPosition": "start",
  47.         "gridAlpha": 1,
  48.         "tickPosition": "start",
  49.         "tickLength": 20
  50.       },
  51.       "legend": {
  52.         //"align": "center",
  53.         "data": [{
  54.           "title": "Objetivo Cumplido",
  55.           "color": this.blueIndicatorColor
  56.         }, {
  57.           "title": "Objetivo No Cumplido",
  58.           "color": this.redIndicatorColor
  59.         }]
  60.       },
  61.       "export": {
  62.         "enabled": true
  63.       },
  64.       "balloon": {
  65.         "adjustBorderColor": true,
  66.         "color": "#000000",
  67.         "fillColor": "transparent",
  68.         "borderAlpha": 0,
  69.         "borderColor": "#000000"
  70.       }
  71.  
  72.     } );
  73.  
  74.  
  75.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top