Skip to content

Instantly share code, notes, and snippets.

@SmartWeb25
SmartWeb25 / main.jsx
Last active October 12, 2021 15:42
react-chartjs-2 horizontall scrollable with fixed y-axis
View main.jsx
import React, { Component } from 'react';
import { Line } from 'react-chartjs-2';
export default class ChartComponent extends Component {
getOptions = () => {
var itself = this;
return {
maintainAspectRatio: false,
responsive: true,
elements: {
line: {
View simple infusion form style.css
.infusion-form {
width: 100%;
margin: 30px auto;
max-width: 600px;
}
.infusion-form .infusion-field {
margin-bottom: 15px;
}
.infusion-form .infusion-field {
color: #000;