ApexCharts Ruby
  • About
  • Installation
  • Usage
    • Cartesian Charts
      • Cartesian Charts: Part 1
        • Line Chart
        • Stepline Chart
        • Area Chart
        • Column Chart
        • Bar Chart
        • Range Bar Chart
      • Cartesian Charts: Part 2
        • Scatter Chart
        • Candlestick Chart
        • Box Plot Chart
      • Cartesian Charts: Part 3
        • Mixed Charts
        • Syncing Charts
        • Brush Chart
        • Annotations
        • Multiple Y-Axes
    • Heatmap Chart
    • Radar Chart
    • Bubble Chart
    • Polar Charts
      • Pie Chart
      • Donut Chart
      • Radial Bar Chart
  • Data Formats
    • Cartesian Charts
      • Candlestick Chart
      • Box Plot Chart
    • Heatmap Chart
    • Radar Chart
    • Bubble Chart
    • Polar Charts
  • Options
    • Introduction
    • Global Options
    • Formatter Function
    • Defer Chart Rendering
    • Render within a script with type module
  • Miscellaneous
    • Reusable Custom Palette
    • Use Alongside Other Charting Libraries
      • Alongside Chartkick
        • Chartkick (Chart.js) and ApexCharts
        • Chartkick (Google Charts) and ApexCharts
        • Chartkick (Highcharts) and ApexCharts
    • Web Support
      • Rails
      • Sinatra
      • Middleman
      • Plain HTML+ERB (Without Framework)
Powered by GitBook
On this page
  1. Usage
  2. Cartesian Charts

Cartesian Charts: Part 1

PreviousCartesian ChartsNextCartesian Charts: Part 2

Last updated 1 year ago

Line Chart

<%= line_chart(series, options) %>

Stepline Chart

<%= line_chart(series, {**options, theme: 'palette7', curve: 'stepline'}) %>

Area Chart

<%= area_chart(series, {**options, theme: 'palette5'}) %>

Column Chart

<%= column_chart(series, {**options, theme: 'palette4'}) %>

Bar Chart

<%= bar_chart(series, {**options, xtitle: 'Properties', ytitle: 'Week', height: 800, theme: 'palette7'}) %>

Range Bar Chart

<% range_bar_series = [{
      name: "Series A",
      data: {
        'A' => [1, 5],
        'B' => [4, 6],
        'C' => [5, 8],
        'D' => [3, 11]
      }
    }, {
      name: "Series B",
      data: {
        'A' => [2, 6],
        'B' => [1, 3],
        'C' => [7, 8],
        'D' => [5, 9]
      }
  }]
%>

<%= range_bar_chart(range_bar_series, theme: 'palette3') %>
Example Line Chart
Example Stepline Chart
Example Area Chart
Example Column Chart
Example Bar Chart
Example Range Bar Chart