feat(web-app): add chart lib to display series
This commit is contained in:
@@ -1,22 +1,42 @@
|
||||
<template>
|
||||
<img alt="Vue logo" src="./assets/logo.png" />
|
||||
<HelloWorld msg="Welcome to Your Vue.js + TypeScript App" />
|
||||
<div style="text-align: center">
|
||||
<h1>Home Monitor</h1>
|
||||
<br />
|
||||
<!-- <Scatter :data="chartSeries" :options="options" /> -->
|
||||
<button @click="addTemperature">Add Temperature</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
import HelloWorld from "./components/HelloWorld.vue";
|
||||
import {
|
||||
Chart as ChartJS,
|
||||
LinearScale,
|
||||
PointElement,
|
||||
LineElement,
|
||||
Tooltip,
|
||||
Legend,
|
||||
} from "chart.js";
|
||||
import { Scatter } from "vue-chartjs";
|
||||
|
||||
import { HttpClient } from "./Services/HttpClient";
|
||||
import { TimeSeriesManager } from "./TimeSeriesManager";
|
||||
import { URL, USERNAME, PASSWORD } from "./const";
|
||||
import { URL, USERNAME, PASSWORD, USER, ROOM, DEVICE, APP_NAME } from "./const";
|
||||
|
||||
const httpClient = new HttpClient(URL, USERNAME, PASSWORD);
|
||||
const manager = new TimeSeriesManager(httpClient);
|
||||
console.log(manager.getTimeSeriesData(USER, ROOM, DEVICE));
|
||||
|
||||
export default defineComponent({
|
||||
name: "App",
|
||||
components: {
|
||||
HelloWorld,
|
||||
name: APP_NAME,
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
manager,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
addTemperature() {},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user