Documentation

Build charts with a single tag

WireCharts gives you a namespaced Blade component for every chart type. The Basics are free and open source; the rest unlock with a Pro license.

Installation

Require the package via Composer:

bash
composer require wirecharts/wirecharts

Then add the scripts directive before the closing body tag in your layout:

blade
@wirechartsScripts

Quick start

Drop a chart anywhere in a Blade view:

blade
<x-chart::line
    :series="[['name' => 'Revenue', 'data' => [120, 180, 150, 260]]]"
    :categories="['Jan', 'Feb', 'Mar', 'Apr']"
    smooth
/>

Activating Pro

After purchasing, activate your license key to unlock every Pro component:

bash
php artisan wirecharts:activate YOUR-LICENSE-KEY

Common props

Every chart accepts these in addition to its own props.

Prop Type Default Description
height int|string 320 Chart height in pixels, or any CSS length.
theme string auto auto, light or dark. "auto" follows your dark mode.
model string null A Livewire property to live-bind the series to.
class string Any classes are merged onto the chart container.

All components