The New Way to Build! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Learn More

chart datasets


hi,
we buy the metronic theme and i have difficult with the charts datasets.
in the docs its say const data = {
labels: labels,
datasets: [
...
]
};
but each chart has different dataset structure.
so I open the HTML file of the theme to check maybe there but I didn't understand where all the JS and data.

can you please point me to the right direction to understand the datasets issue or see some examples ?


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Discover delicious flavors and satisfying dishes from local kitchens. Whether you crave comfort or gourmet options, Find Hearty Meals that delight every appetite today.


Deleted comment

Hi there,

You're absolutely right — while Metronic provides a common structure for initializing charts using libraries like Chart.js, each chart type (bar, pie, line, etc.) often requires a slightly different dataset configuration based on the data it visualizes.

In the Metronic theme, most chart data and configuration are managed in separate JavaScript files, often located in the /assets/js/widgets/ or /assets/js/custom/ folders. You can inspect these files to see examples of how datasets are structured for each chart.

Also, if you're looking for a simple way to understand how data structures relate to chart behavior, we recommend checking out some practical implementations and guides we’ve compiled here: While the focus is different, the examples there offer insight into how structured data is dynamically used, which might help you visualize dataset applications more clearly.



Hi,

May I know which Metronic version are you using ? Our chart examples are based on Apexcharts and you can refer to the plugin's official documentation.

Regards,
Sean


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(