mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-11 18:32:50 +00:00
fixed chart
This commit is contained in:
@@ -2,20 +2,15 @@ import React from 'react';
|
||||
import {Link} from 'react-router';
|
||||
|
||||
import Loading from '../utils/Loading';
|
||||
import _chartjs from 'chart.js';
|
||||
import Chart from 'react-chartjs';
|
||||
import {
|
||||
ChartOptions,
|
||||
DataTemplate
|
||||
}
|
||||
from './chartOptions';
|
||||
import { ChartOptions, DataTemplate } from './chartOptions';
|
||||
|
||||
import './SensorInfo.scss';
|
||||
|
||||
const LineChart = Chart.Line;
|
||||
|
||||
export default class SensorInfo extends React.Component {
|
||||
|
||||
|
||||
componentWillMount() {
|
||||
let location = this.props.params.location;
|
||||
this.props.sensorActions.fetchUniqueDates(location);
|
||||
@@ -74,7 +69,7 @@ export default class SensorInfo extends React.Component {
|
||||
temp.datasets[0].data.push(d.maxtemp);
|
||||
temp.datasets[1].data.push(d.mintemp);
|
||||
}
|
||||
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user