Advertisement
Guest User

Untitled

a guest
Jan 25th, 2017
1,069
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function () {
  2.             Highcharts.setOptions({
  3.                 lang: {
  4.                     loading: 'Ładowanie...',
  5.                     months: ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'],
  6.                     weekdays: ['Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota', 'Niedziela'],
  7.                     shortMonths: ['Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze', 'Lip', 'Sie', 'Wrz', 'Paź', 'Lis', 'Gru'],
  8.                     exportButtonTitle: "Eksportuj",
  9.                     printButtonTitle: "Drukuj",
  10.                     rangeSelectorFrom: "Od",
  11.                     rangeSelectorTo: "Do",
  12.                     rangeSelectorZoom: "",
  13.                     downloadPNG: 'Pobierz jako obraz PNG',
  14.                     downloadJPEG: 'Pobierz jako obraz JPEG',
  15.                     downloadPDF: 'Pobierz jako obraz PDF',
  16.                     downloadSVG: 'Pobierz jako obraz SVG'
  17.                     // resetZoom: "Reset",
  18.                     // resetZoomTitle: "Reset,
  19.                     // thousandsSep: ".",
  20.                     // decimalPoint: ','
  21.                 }
  22.             });
  23.            
  24.             var seriesOptionsdmax = [];
  25.             //dmaxModified
  26.             $.getJSON('/test/statistics/5/list?parameter=dmaxModified&type=wats', function (dmax) {
  27.                 seriesOptionsdmax = [];
  28.                 seriesOptionsdmax[0] = {
  29.                     name: 'dMax Modified',
  30.                     color: '#0fbc09',
  31.                     data: dmax
  32.                 };
  33.  
  34.             });
  35.             $.getJSON('/test/statistics/5/list?parameter=dmaxModified&type=perKg', function (dmax) {
  36.                 seriesOptionsdmax[1] = {
  37.                     name: 'W/kg',
  38.                     color: '#085fbc',
  39.                     data: dmax
  40.                 };
  41.                 Highcharts.stockChart('dmaxmodified', {
  42.  
  43.                     exporting: {
  44.                         enabled: false
  45.                     },
  46.                     rangeSelector: {
  47.                         enabled: false
  48.                     },
  49.  
  50.                     navigator: {
  51.                         enabled: false
  52.                     },
  53.  
  54.                     title: {
  55.                         text: 'dMax Modified'
  56.                     },
  57.  
  58.                     yAxis: {
  59.  
  60.                         labels: {
  61.                             enabled: false
  62.                         },
  63.                         plotLines: [{
  64.                             value: 0,
  65.                             width: 2,
  66.                             color: 'silver'
  67.                         }]
  68.                     },
  69.  
  70.                     plotOptions: {
  71.                         series: {
  72.                             compare: 'percent',
  73.                             showInNavigator: true
  74.                         }
  75.                     },
  76.  
  77.                     tooltip: {
  78.                         pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b>({point.change}%)<br/>',
  79.                         valueDecimals: 2,
  80.                         split: true
  81.                     },
  82.  
  83.                     series: seriesOptionsdmax
  84.                 });
  85.             });
  86.  
  87.             //fbla2
  88.             var seriesOptionsfbla2 = [];
  89.             $.getJSON('/test/statistics/5/list?parameter=fbla2&type=wats', function (fbla2) {
  90.                 seriesOptionsfbla2[0] = {
  91.                     name: 'FBLA2',
  92.                     color: '#ffae00',
  93.                     data: fbla2
  94.                 };
  95.  
  96.             });
  97.             $.getJSON('/test/statistics/5/list?parameter=fbla2&type=perKg', function (fbla2) {
  98.                 seriesOptionsfbla2[1] = {
  99.                     name: 'W/kg',
  100.                     color: '#085fbc',
  101.                     data: fbla2
  102.                 };
  103.                 Highcharts.stockChart('fbla2', {
  104.  
  105.                     exporting: {
  106.                         enabled: false
  107.                     },
  108.                     rangeSelector: {
  109.                         enabled: false
  110.                     },
  111.  
  112.                     navigator: {
  113.                         enabled: false
  114.                     },
  115.  
  116.                     title: {
  117.                         text: 'Fixed Blood Lactate Accumulation 2 mmol'
  118.                     },
  119.  
  120.                     yAxis: {
  121.  
  122.                         labels: {
  123.                             enabled: false
  124.                         },
  125.                         plotLines: [{
  126.                             value: 0,
  127.                             width: 2,
  128.                             color: 'silver'
  129.                         }]
  130.                     },
  131.  
  132.                     plotOptions: {
  133.                         series: {
  134.                             compare: 'percent',
  135.                             showInNavigator: true
  136.                         }
  137.                     },
  138.  
  139.                     tooltip: {
  140.                         pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b>({point.change}%)<br/>',
  141.                         valueDecimals: 2,
  142.                         split: true
  143.                     },
  144.  
  145.                     series: seriesOptionsfbla2
  146.                 });
  147.             });
  148.  
  149.             //fbla4
  150.             var seriesOptionsfbla4 = [];
  151.             $.getJSON('/test/statistics/5/list?parameter=fbla4&type=wats', function (fbla4) {
  152.                 seriesOptionsfbla4[0] = {
  153.                     name: 'FBLA4',
  154.                     color: '#02ccff',
  155.                     data: fbla4
  156.                 };
  157.  
  158.             });
  159.             $.getJSON('/test/statistics/5/list?parameter=fbla4&type=perKg', function (fbla4) {
  160.                 seriesOptionsfbla4[1] = {
  161.                     name: 'W/kg',
  162.                     color: '#085fbc',
  163.                     data: fbla4
  164.                 };
  165.                 Highcharts.stockChart('fbla4', {
  166.  
  167.                     exporting: {
  168.                         enabled: false
  169.                     },
  170.                     rangeSelector: {
  171.                         enabled: false
  172.                     },
  173.  
  174.                     navigator: {
  175.                         enabled: false
  176.                     },
  177.  
  178.                     title: {
  179.                         text: 'Fixed Blood Lactate Accumulation 4 mmol'
  180.                     },
  181.  
  182.                     yAxis: {
  183.  
  184.                         labels: {
  185.                             enabled: false
  186.                         },
  187.                         plotLines: [{
  188.                             value: 0,
  189.                             width: 2,
  190.                             color: 'silver'
  191.                         }]
  192.                     },
  193.  
  194.                     plotOptions: {
  195.                         series: {
  196.                             compare: 'percent',
  197.                             showInNavigator: true
  198.                         }
  199.                     },
  200.  
  201.                     tooltip: {
  202.                         pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b>({point.change}%)<br/>',
  203.                         valueDecimals: 2,
  204.                         split: true
  205.                     },
  206.  
  207.                     series: seriesOptionsfbla4
  208.                 });
  209.             });
  210.  
  211.  
  212.             //maxLoad
  213.             var seriesOptionsmaxload = [];
  214.             $.getJSON('/test/statistics/5/list?parameter=maxLoad&type=wats', function (max) {
  215.                 seriesOptionsmaxload[0] = {
  216.                     name: 'Maksymalne obciążenie',
  217.                     color: '#ff0000',
  218.                     data: max
  219.                 };
  220.  
  221.             });
  222.             $.getJSON('/test/statistics/5/list?parameter=maxLoad&type=perKg', function (max) {
  223.                 seriesOptionsmaxload[1] = {
  224.                     name: 'W/kg',
  225.                     color: '#085fbc',
  226.                     data: max
  227.                 };
  228.                 Highcharts.stockChart('maxLoad', {
  229.  
  230.                     exporting: {
  231.                         enabled: false
  232.                     },
  233.                     rangeSelector: {
  234.                         enabled: false
  235.                     },
  236.  
  237.                     navigator: {
  238.                         enabled: false
  239.                     },
  240.  
  241.                     title: {
  242.                         text: 'Maksymalne obciążenie testu'
  243.                     },
  244.  
  245.                     yAxis: {
  246.  
  247.                         labels: {
  248.                             enabled: false
  249.                         },
  250.                         plotLines: [{
  251.                             value: 0,
  252.                             width: 2,
  253.                             color: 'silver'
  254.                         }]
  255.                     },
  256.  
  257.                     plotOptions: {
  258.                         series: {
  259.                             compare: 'percent',
  260.                             showInNavigator: true
  261.                         }
  262.                     },
  263.  
  264.                     tooltip: {
  265.                         pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b>({point.change}%)<br/>',
  266.                         valueDecimals: 2,
  267.                         split: true
  268.                     },
  269.  
  270.                     series: seriesOptionsmaxload
  271.                 });
  272.             });
  273.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement