Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   new Chart(monthlyCtx, {
  2.                   type: "line",
  3.                   data: {
  4.                     labels: monthlyLabels,
  5.                     label: "",
  6.                     datasets: [
  7.                       {
  8.                         data: monthly,
  9.                         borderWidth: 2,
  10.                         borderColor: "#ff5200",
  11.                         fill: true,
  12.                         pointRadius: 0
  13.                       }
  14.                     ]
  15.                   },
  16.                   options: {
  17.                     tooltips: {
  18.                       enabled: false
  19.                     },
  20.                     responsive: true,
  21.                     scales: {
  22.                       xAxes: [
  23.                         {
  24.                           display: true,
  25.                           type: "time",
  26.                           time: {
  27.                             parser: "YYYY-MM-DD HH:mm:ss",
  28.                             unit: "month",
  29.                             displayFormats: {
  30.                               day: "DD.MM",
  31.                               month: "MM.YYYY"
  32.                             }
  33.                           },
  34.                           distribution: "linear",
  35.                           scaleLabel: {
  36.                             display: true,
  37.                             labelString: "miesiąc",
  38.                             fontStyle: "bold"
  39.                           },
  40.                           ticks: {
  41.                             maxRotation: 90,
  42.                             minRotation: 45
  43.                           }
  44.                         }
  45.                       ],
  46.                       yAxes: [
  47.                         {
  48.                           ticks: ifDataIsAvailableShowChart(monthly, 2)
  49.                         }
  50.                       ]
  51.                     },
  52.                     legend: {
  53.                       display: false
  54.                     }
  55.                   }
  56.                 });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement