Hauptmenü

Widget chart

Begonnen von MornLum, 10 Februar 2019, 21:08:30

Vorheriges Thema - Nächstes Thema

MornLum

Hallo,

ich kämpfe nun schon ewig mit dem Widget "Chart". Ich bekomme es einfach nicht hin, dass ein Diagramm angezeigt wird. Fehlen Informationen? Welche Angaben sind ein minimum?

Ich habe folgenden Code:
<div data-type="chart" data-device="TH_Xiomi_6_T" data-logdevice="Log_TH_Xiomi_6_T" data-logfile="-" data-columnspec="4:temperature"></div>
Bekomme immer den Fehler: Widget_Chart.js:3083

Ich habe bisher immer Simplechart verwendet. Hierzu der Code:
<div data-type="simplechart" data-device="TH_Xiomi_6_T" data-logdevice="Log_TH_Xiomi_6_T" data-columnspec="4:temperature"></div>
Dieser funktioniert ohne Probleme.

Wo könnte der Fehler liegen?

Vielen Dank im Voraus.

MornLum

#1
Kann mir niemand sagen, wass ich am Befehl für den "Chart" falsch gemacht habe?

Auszug aus der Log:
2019-02-06_06:55:37 TH_Xiomi_1_T temperature: 23.3
2019-02-06_06:56:43 TH_Xiomi_1_T temperature: 23.27
2019-02-06_07:43:15 TH_Xiomi_1_T temperature: 22.96
2019-02-06_08:27:26 TH_Xiomi_1_T temperature: 22.68
2019-02-06_09:19:29 TH_Xiomi_1_T temperature: 22.68


Informationen zum Log Device:
Internals:
   DEF        ./log/Log_TH_Xiomi_1_T.log TH_Xiomi_1_T
   FD         28
   FUUID      5c587581-f33f-93a3-e777-3f737d906cc428ce
   NAME       Log_TH_Xiomi_1_T
   NOTIFYDEV  TH_Xiomi_1_T
   NR         124
   NTFY_ORDER 50-Log_TH_Xiomi_1_T
   REGEXP     TH_Xiomi_1_T
   STATE      active
   TYPE       FileLog
   currentlogfile ./log/Log_TH_Xiomi_1_T.log
   logfile    ./log/Log_TH_Xiomi_1_T.log
   READINGS:
     2019-02-11 19:28:39   linesInTheFile  244
   helper:
     bm:
       FileLog_Attr:
         cnt        2
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        11.02. 19:49:07
         max        2.50339508056641e-05
         tot        3.91006469726562e-05
         mAr:
           set
           Log_TH_Xiomi_1_T
           alias
           Log Bad Temperatur
       FileLog_Define:
         cnt        1
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        11.02. 19:49:07
         max        0.000419855117797852
         tot        0.000419855117797852
         mAr:
           HASH(0x63a0e50)
           Log_TH_Xiomi_1_T FileLog ./log/Log_TH_Xiomi_1_T.log TH_Xiomi_1_T
       FileLog_Get:
         cnt        5
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        11.02. 20:04:25
         max        0.0164899826049805
         tot        0.0417904853820801
         mAr:
           HASH(0x63a0e50)
           Log_TH_Xiomi_1_T
           CURRENT
           INT
           2019-02-11_00:00:00
           2019-02-11_23:59:59
           4:TH_Xiomi_1_T.temperature\x3a::
       FileLog_Log:
         cnt        1
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        11.02. 19:49:07
         max        0.000121116638183594
         tot        0.000121116638183594
         mAr:
           HASH(0x63a0e50)
           HASH(0x63c44f8)
       FileLog_Set:
         cnt        10
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        11.02. 20:04:25
         max        0.00594592094421387
         tot        0.0331754684448242
         mAr:
           HASH(0x63a0e50)
           Log_TH_Xiomi_1_T
           ?
       FileLog_regexpFn:
         cnt        1
         dmx        -1000
         dtot       0
         dtotcnt    0
         mTS        11.02. 20:04:25
         max        0.000118017196655273
         tot        0.000118017196655273
         mAr:
           Log_TH_Xiomi_1_T
           4:TH_Xiomi_1_T.temperature\x3a::
   pos:
Attributes:
   alias      Log Bad Temperatur
   room       00.OG,Bridge.ZigBee,Log.Files

pflock_y

Moin,

versuch es mal so:

         <div data-type="chart"
data-device="TH_Xiomi_6_T"
data-logdevice="Log_TH_Xiomi_6_T"
data-columnspec="4:temperature" 
data-style='["SVGplot l1fill"]'
data-logfile="-">
</div>


Der Trick ist data-style='["..."]' glaub ich zumindest.  ::)

grüße
pflock_y

MornLum

Danke!
Jetzt hat es funktioniert.