Sandbox: JavaScript

Less Component Required

Be sure to include Behavior-UI's chart.less in your build.

JavaScript Library Required

In addition to the chart files in Behavior-UI, you will also need the behavior-ui fork of HighStock. Presently, only highstock.src is patched; that's all you need.

Basic Usage

<div data-behavior="Chart ToSource" class="full-width chart" data-chart-options="
  'seriesType':'column',
  'xAxis': {
    'type': 'linear',
    'minRange': 1,
    'title': {
      'text': 'Columns'
    }
  },
  'yAxis':{
    'title':{
      'text':'Things'
    }
  },
  'data': {
    'title':{
      'text':'Some Sort of Measurement'
    },
    'series':[
      {
        'name':'Things',
        'data':[1176,931,685,404,241]
      }
    ],
    'xAxis':{
      'categories':['0-20%','20-40%','40-60%','60-80%','80+%']
    }
  }
  " data-tosource-target="!.example-block .response"></div>