Sha256: e0813d7560b4fc8185021041b7f91509dde036148fe9326b5658de388752a3aa
Contents?: true
Size: 590 Bytes
Versions: 14
Compression:
Stored size: 590 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 } }); } }
Version data entries
14 entries across 14 versions & 1 rubygems