UI chart primeReact

UI Components for React
Post Reply
kimthi113114
Posts: 1
Joined: 28 Oct 2022, 06:22

28 Oct 2022, 06:27

hi everyone!
I am studying about charts,
On the website I saw Chart Bar,
Can I adjust it like this?
Image

habubey
Posts: 34
Joined: 24 Aug 2022, 13:17

28 Oct 2022, 15:49

Hello,
Yes, of course, you can.
You have to import this code

Code: Select all

import ChartDataLabels from 'chartjs-plugin-datalabels';

and this code as well:

Code: Select all

const config = {
    type: 'bar',
    options: {
      scales: {
          x: {
            stacked: true
          },
        y: {
          beginAtZero: true,
          stacked: true
        }
      }
    },
    plugins: [ChartDataLabels]
  };
  // </block:config>
  
  module.exports = {
    actions: [],
    config: config,
  };
  
Also this video will help your issue: https://www.youtube.com/watch?v=rH14xZm ... el=ChartJS

Best

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest