Combline метки реактивных диаграмм js -2 - PullRequest
0 голосов
/ 27 марта 2020

Я пытаюсь объединить метки в моих осях X: enter image description here

Теперь у меня есть такой результат, но я хочу, чтобы он был таким: enter image description here

это мои данные:

const dataTest = {
  labels: [] as any,
  datasets: [
    {
      label: "Main Chart",
      fill: true,
      lineTension: 0.1,
      backgroundColor: "rgba(75,192,192,0.4)",
      borderColor: "rgba(75,192,192,1)",
      borderCapStyle: "butt",
      borderDash: [],
      borderDashOffset: 0.0,
      borderJoinStyle: "miter",
      pointBorderColor: "rgba(75,192,192,1)",
      pointBackgroundColor: "#fff",
      pointBorderWidth: 1,
      pointHoverRadius: 5,
      pointHoverBackgroundColor: "rgba(75,192,192,1)",
      pointHoverBorderColor: "rgba(220,220,220,1)",
      pointHoverBorderWidth: 2,
      pointRadius: 1,
      pointHitRadius: 10,
      data: [] as any
    }
  ]
};

Спасибо вперед !!!

1 Ответ

0 голосов
/ 27 марта 2020

Ну, я нашел ответ: мне нужно было добавить:

xAxes: [
      {
        type: 'time',
        time: {
          unit: 'month'
        }
      }
    ],

к объекту опции))

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...