Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Axis Laravel Package

epessine/axis

View on GitHub
Deep Wiki
Context7

title: "Interacting with Charts" weight: 3 prev: /docs/your-first-chart

The global $axis object

Every chart rendered by Axis is stored on the global Javascript object $axis or window.$axis. You can access the chart instance via $axis['chart-id'], and the chart-id can be obtained using the Axis chart object getId() method:

use Axis\Chart;

$chart = Chart::chartjs()
    ->line()
    ->title('Example')
    ->labels(['Mon', 'Tue', 'Wed', 'Thu'])
    ->series('Interactions', [1, 3, 4, 6]);

$chartId = $chart->getId(); // $chartId stores the chart instance id

You can use this identifier to interact with the chart instance via Javascript:

<section>
    <h1>Chart Interaction Example</h1>
    <div>{{ $chart }}</div>
    <button type="button" onclick="$axis[[@js](https://github.com/js)($chartId)].destroy()">
        DON'T PRESS
    </button>
</section>

In the above example, when the button is clicked, the chart instance will be destroyed.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver