Sha256: e42b27f9d74c9cbba99e5fba88d83069b1daf09595e6b8723904cba9d7ad3e57
Contents?: true
Size: 626 Bytes
Versions: 10
Compression:
Stored size: 626 Bytes
Contents
import { Controller } from "@hotwired/stimulus" export default class extends Controller { static values = { label: "Chart", labelArray: Array, dataArray: Array, color: "rgb(54, 162, 235)" } connect() { new Chart(this.element, { type: 'line', data: { labels: this.labelArrayValue, datasets: [{ label: this.labelValue, data: this.dataArrayValue, fill: true, borderColor: this.colorValue, tension: 0.25 }] }, options: { animation: false, maintainAspectRatio: false } }); } }
Version data entries
10 entries across 10 versions & 1 rubygems