diff --git a/frontend/index.html b/frontend/index.html index 7f559d1..7e6c0af 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,6 +4,7 @@ + Weather Station App diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 4426188..175d746 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -75,87 +75,87 @@ var daily_query = ref({ "0000000000": "0.0", }, }, - rainfall: { - rain_rate: { - unit: "mm\/hr", - list: { - "0000000000": "0.0", - }, - }, - daily: { - unit: "mm", - list: { - "0000000000": "0.0", - }, + }, + rainfall: { + rain_rate: { + unit: "mm\/hr", + list: { + "0000000000": "0.0", }, - event: { - unit: "mm", - list: { - "0000000000": "0.0", - }, + }, + daily: { + unit: "mm", + list: { + "0000000000": "0.0", }, - hourly: { - unit: "mm", - list: { - "0000000000": "0.0", - }, + }, + event: { + unit: "mm", + list: { + "0000000000": "0.0", }, - weekly: { - unit: "mm", - list: { - "0000000000": "0.0", - }, + }, + hourly: { + unit: "mm", + list: { + "0000000000": "0.0", }, - monthly: { - unit: "mm", - list: { - "0000000000": "0.0", - }, + }, + weekly: { + unit: "mm", + list: { + "0000000000": "0.0", }, - yearly: { - unit: "mm", - list: { - list: { - "0000000000": "0.0", - }, - }, + }, + monthly: { + unit: "mm", + list: { + "0000000000": "0.0", }, }, - wind: { - wind_speed: { - unit: "km\/h", + yearly: { + unit: "mm", + list: { list: { - list: { - "0000000000": "0.0", - }, + "0000000000": "0.0", }, }, - wind_gust: { - unit: "km\/h", + }, + }, + wind: { + wind_speed: { + unit: "km\/h", + list: { list: { "0000000000": "0.0", }, }, }, - wind_direction: { - unit: "º", + wind_gust: { + unit: "km\/h", list: { "0000000000": "0.0", }, }, - }, - pressure: { - relative: { - unit: "mmHg", + wind_direction: { + unit: "º", list: { "0000000000": "0.0", }, }, - absolute: { - unit: "mmHg", - list: { - "0000000000": "0.0", - }, + }, + }, + pressure: { + relative: { + unit: "mmHg", + list: { + "0000000000": "0.0", + }, + }, + absolute: { + unit: "mmHg", + list: { + "0000000000": "0.0", }, }, }, @@ -209,7 +209,6 @@ var showMoreData = ref( Cookies.get("showMoreData") != undefined ? Cookies.get("showMoreData") : false ); - async function updateData() { loading.value = { status: true, text: "Loading..." }; const res = await fetch(api_url); @@ -238,131 +237,130 @@ watchEffect(async () => { diff --git a/frontend/src/components/Stat.vue b/frontend/src/components/Stat.vue index 5f87bc3..138a196 100644 --- a/frontend/src/components/Stat.vue +++ b/frontend/src/components/Stat.vue @@ -35,16 +35,25 @@ const props = defineProps({ type: Object, default: {}, }, + chartDot: { + type: Boolean, + default: false + } }); const chartOptions = { responsive: true, + mantainAspectRatio: false, scales: { x: { - display: false, + display: true, title: { display: false, + }, + ticks: { + mirror: false + } }, y: { display: true, @@ -52,7 +61,8 @@ const chartOptions = { display: false, }, ticks: { - mirror: true + display: true, + mirror: false } }, }, @@ -77,10 +87,10 @@ watchEffect(()=>{ }), datasets: [ { - lavel: props.title, + label: props.title, data: Object.values(props.chart), - tension:0.2, - pointStyle: false, + tension:0.4, + pointStyle: props.chartDot ? true: false, cubicInterpolationMode: 'monotone', }, ], @@ -90,26 +100,31 @@ watchEffect(()=>{ diff --git a/frontend/src/components/Stats.vue b/frontend/src/components/Stats.vue index 0fe78bb..adc2a0a 100644 --- a/frontend/src/components/Stats.vue +++ b/frontend/src/components/Stats.vue @@ -1,5 +1,5 @@ diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index b3e8795..07bbec4 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -3,6 +3,8 @@ module.exports = { content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], theme: { extend: {}, + fontFamily: { + } }, plugins: [ require('@tailwindcss/typography'), @@ -10,7 +12,7 @@ module.exports = { ], daisyui:{ - themes: ["garden", "dracula"], + themes: ["light", "dracula"], darkTheme:'dracula', } }