Skip to content

Sample: Line

Live preview

Code

html
<div id="chart" style="width:800px;height:420px"></div>
<script type="module">
  import { Insight } from 'https://unpkg.com/@chartbuddy.io/embed';

  new Insight('#chart', {
    persist: false,
    chartData: {
      chartType: 'line',
      isDataTransposed: true,
      seriesData: [
        ['', 'W1', 'W2', 'W3', 'W4', 'W5', 'W6'],
        ['Visits', 120, 140, 135, 160, 155, 172],
      ],
      title: { visible: true, text: 'Weekly Website Visits' },
      subtitle: { visible: false, text: '' },
      legend: { visible: false },
    },
  });
</script>

Developer & LLM documentation · Not the end-user Help Center · Help Center