Commit a2627187 authored by Giannis Kepas's avatar Giannis Kepas
Browse files

fix predictions page

parent f58e1b91
Loading
Loading
Loading
Loading
+5 −11
Original line number Diff line number Diff line
@@ -302,8 +302,6 @@ function htmlLegendPlugin(chart: any, legendId: string) {
      boxSpan.style.border = `2px solid ${dataset ? dataset.borderColor : item.strokeStyle}`;
    }



    // Text
    const textContainer = document.createElement('span');
    textContainer.style.color = item.fontColor;
@@ -433,7 +431,6 @@ function ChartComponent({
        order: 0, // Show measurement on top in legend
      });


      chartData.algorithms.forEach((algo, index) => {

        datasets.push({
@@ -786,8 +783,6 @@ function DynamicPredictionsComponent() {
    [sensors, sensor]
  );



  return (
    <div className="min-h-screen bg-gradient-to-br from-violet-50 via-white to-indigo-50 p-4 text-gray-800">
      <main className="mx-auto max-w-7xl rounded-2xl bg-white/90 backdrop-blur-sm shadow-sm ring-1 ring-black/5 p-6">
@@ -805,7 +800,8 @@ function DynamicPredictionsComponent() {
            <select
              value={category}
              onChange={(e) => setCategory(e.target.value as any)}
              className="rounded-lg bg-white/80 ring-1 ring-black/5 px-2 py-1 text-sm text-gray-700 hover:bg-violet-50 outline-none pr-6"
              className="rounded-lg bg-white/80 ring-1 ring-black/5 px-2 py-1 text-sm text-gray-700 hover:bg-violet-50 outline-none pr-6 font-sans"
              style={{ fontFamily: 'system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif' }}
            >
              <option value="temperature">Temperature</option>
              <option value="energy">Energy</option>
@@ -815,7 +811,8 @@ function DynamicPredictionsComponent() {
            <select
              value={sensor}
              onChange={(e) => setSensor(e.target.value)}
              className="rounded-lg bg-white/80 ring-1 ring-black/5 px-2 py-1 text-sm text-gray-700 hover:bg-violet-50 outline-none min-w-[12rem] pr-6"
              className="rounded-lg bg-white/80 ring-1 ring-black/5 px-2 py-1 text-sm text-gray-700 hover:bg-violet-50 outline-none min-w-[12rem] pr-6 font-sans"
              style={{ fontFamily: 'system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif' }}
            >
              {sensors.map(s => <option key={s.id} value={s.id}>{s.label}</option>)}
            </select>
@@ -868,8 +865,6 @@ function DynamicPredictionsComponent() {
            </h2>
          </div>



          {chartData ? (
            <ChartComponent
              key={componentKey}
@@ -886,7 +881,6 @@ function DynamicPredictionsComponent() {
            </div>
          )}


        </section>
      </main>
    </div>
+0 −640

File deleted.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
import { Metadata } from 'next';

import ClientPredictions from './clientpredictions2';
import ClientPredictions from './clientpredictions';

export const metadata: Metadata = {
  title: 'Predictions',