Get started with tui-chart CDN

MIT licensed

Tui-chart is a terminal-based interactive charting library for JS applications.

Tags:
  • nhn
  • tui
  • application
  • chart
  • tui-chart

Stable version

Copied!

How to start using tui-chart CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with tui-chart CDN - cdnhub.io</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tui-grid@3.11.3/dist/tui-grid.min.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tui-chart@3.11.3/dist/tui-chart.min.css">
  <style>
    #chartContainer { width: 100%; height: 400px; }
  </style>
</head>
<body>
  <div id="chartContainer"></div>
  <script src="https://cdn.jsdelivr.net/npm/tui-grid@3.11.3/dist/tui-grid.min.js"></script>
  <script src="https://cdn.cdnhub.io/tui-chart/3.11.3/tui-chart.min.js"></script>
  <script>
    const chart = new tui.Chart('chartContainer', {
      type: 'line',
      data: {
        columns: ['Year', 'Sales'],
        rows: [
          { 'Year': 2015, 'Sales': 23000 },
          { 'Year': 2016, 'Sales': 25000 },
          { 'Year': 2017, 'Sales': 28000 },
          { 'Year': 2018, 'Sales': 30000 },
          { 'Year': 2019, 'Sales': 32000 },
          { 'Year': 2020, 'Sales': 35000 },
        ],
      },
      options: {
        title: {
          text: 'Sales Over the Years',
          style: {
            fontSize: '20px',
            fontWeight: 'bold',
          },
        },
        xAxis: {
          type: 'category',
          labels: {
            style: {
              fontSize: '14px',
              fontFamily: 'Arial',
            },
          },
        },
        yAxis: {
          labels: {
            style: {
              fontSize: '14px',
              fontFamily: 'Arial',
            },
          },
        },
      },
    });
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions