Components

Overview

The BoxLang Charts Module provides three main components for creating interactive, responsive charts in your BoxLang applications:

Quick Reference

Component Hierarchy

<bx:chart>
    <bx:chartseries>
        <bx:chartdata>
        <!-- Additional chartdata components -->
    </bx:chartseries>
    <!-- Additional chartseries components -->
</bx:chart>

Supported Chart Types

Type
Description
Component

pie

Circular proportional chart

bar

Vertical bar chart

line

Connected data points

doughnut

Pie chart with center hole

radar

Multi-variable circular chart

polarArea

Pie chart with varying radius

area

Line chart with filled area

horizontalbar

Horizontal bar chart

scatter

X-Y coordinate plot

bubble

Three-dimensional data visualization

Data Source Options

The module supports multiple ways to provide data to charts:

  1. Component-based: Using nested bx:chartdata components

  2. Query-based: Using BoxLang query objects

  3. Array-based: Using arrays of structs or arrays

Examples

Basic Usage

Multi-Series Chart

Query-Based Chart

Bubble Chart with Three-Dimensional Data

Component Documentation

The main container component that renders the chart. Supports extensive configuration options for styling, responsive behavior, axes, and display options.

Key Features:

  • Responsive design with configurable aspect ratios

  • Comprehensive styling options (fonts, colors, borders)

  • Axis configuration and grid line control

  • Multiple series support with stacking/clustering options

Defines a data series within a chart. Specifies the chart type and can source data from components, queries, or arrays.

Key Features:

  • 10 different chart types supported

  • Multiple data source options

  • Per-series styling overrides

  • Border and color customization

Represents individual data points within a chart series. Supports standard value-based data points and three-dimensional bubble chart coordinates.

Key Features:

  • Simple item/value pairs for most charts

  • Three-coordinate system (x,y,r) for bubble charts

  • Automatic data validation and type conversion

  • Flexible labeling system

Installation & Setup

Requires BoxLang 1.0.0+ with web support enabled.

Module Structure

Getting Started

  1. Install the module: box install bx-charts

  2. Include in your template: Use the bx:chart component

  3. Add data: Use nested bx:chartseries and bx:chartdata components

  4. Customize: Apply styling and configuration attributes as needed

For complete attribute references and advanced usage examples, see the individual component documentation pages.

Last updated

Was this helpful?