> It does not work, probably because I'm still with bootstrap 4.0.
Still, or again? You switched in the mean time. The real problem is: you
are demanding instructions and suggestions, then you are getting these
instructions and sugguesstion, then you are doing something totally
different and after that you are complaining, that things don't work.
Simple as that.
> I've added "pm2_5_aqi" and it works.
But why did you?
Every series you have defined in a chart that works, has a database column
with it's exact name. Period.
[[pm2_5_aqi]] # <=== valid, if not existing as column name in the archive
table
[[[pm2_5_aqi]]] # <=== INVALID, if not existing as column name in
the archive table
payload_key = outAQI
showMaxMarkPoint = true
showMinMarkPoint = true
showAvgMarkLine = false
lineColor = '#428bca'
decimals = 0
[[[pm2_5]]] # <=== valid, if existing as column name in the archive
table
payload_key = outAQI
showMaxMarkPoint = true
showMinMarkPoint = true
showAvgMarkLine = false
lineColor = '#428bca'
decimals = 0
Yves Martin schrieb am Dienstag, 18. Juli 2023 um 15:57:15 UTC+2:
> Hi Michael,
>
> Thank you.
> It does not work, probably because I'm still with bootstrap 4.0.
>
> About table named "pm2_5_aqi", I do not understand how the other charts
> are generated if it is not in the db?
>
> I've added "pm2_5_aqi" and it works.
>
> About the documentation, I do not have all the info, but I will check what
> to send previously about the variables and tags we can add in the Livechart.
>
> I put all in pause for now and I will try it again tonight.
>
> Thank you
>
> Yves,
> YMartin.com/meteo
> Le mardi 18 juillet 2023 à 09 h 40 min 08 s UTC-4, [email protected] a
> écrit :
>
>> For the UV-Chart, something like this should work:
>>
>> [[radiation]]
>> [[[radiation]]]
>> payload_key = radiation
>> showMaxMarkPoint = true
>> showMinMarkPoint = false
>> showAvgMarkLine = false
>>
>> lineColor = '#ffcd56'
>> decimals = 0
>> [[[UV]]]
>> yAxisIndex = 1
>> plotType = bar
>>
>> aggregateType = avg
>> aggregateInterval = 3600
>> payload_key = UV
>> showMaxMarkPoint = false
>> showMinMarkPoint = false
>>
>> showAvgMarkLine = false
>> lineColor = '#7f1ae555'
>> decimals = 0
>>
>> [email protected] schrieb am Dienstag, 18. Juli 2023 um 15:29:09 UTC+2:
>>
>>> If you check the documentation in the skin.conf:
>>>
>>>
>>> https://github.com/brewster76/fuzzy-archer/blob/4.1/skins/Bootstrap/skin.conf#L799
>>>
>>>
>>> "choose weewx field name"
>>>
>>> So [[[pm2_5_aqi]]] is invalid, since you don't have a column in your
>>> archive table named "pm2_5_aqi"
>>>
>>> You probably (just a guess) tried to configure something like that:
>>>
>>> [[outAqi]]
>>> [[[pm1_0]]]
>>>
>>> showMaxMarkPoint = true
>>> showMinMarkPoint = true
>>> showAvgMarkLine = false
>>> lineColor = '#b44242'
>>> decimals = 0
>>> [[[pm2_5]]]
>>>
>>> showMaxMarkPoint = true
>>> showMinMarkPoint = true
>>> showAvgMarkLine = false
>>> lineColor = '#428bca'
>>> decimals = 0
>>> [[[pm10_0]]]
>>> showMaxMarkPoint = true
>>> showMinMarkPoint = true
>>> showAvgMarkLine = false
>>> lineColor = '#7f1ae5'
>>> decimals = 0
>>>
>>> Yves Martin schrieb am Dienstag, 18. Juli 2023 um 15:19:57 UTC+2:
>>>
>>>> Hi,
>>>>
>>>> 2 questions:
>>>>
>>>> 1. How to add a scale on the right side of the chart if 2 charts are
>>>> mixed in one picture?
>>>>
>>>> Here is the code:
>>>>
>>>> [[radiation]]
>>>> [[[radiation]]]
>>>> payload_key = radiation
>>>> #convertFunction = "function(value) { return value / 126.7;
>>>> }" #you can do value conversions if needed
>>>> showMaxMarkPoint = true
>>>> showMinMarkPoint = true
>>>> showAvgMarkLine = true
>>>> lineColor = '#ffcd56'
>>>> decimals = 0
>>>> [[[UV]]]
>>>> yAxisIndex = 1 #to assign UV to the 2nd yAxis
>>>> aggregateType = avg
>>>> aggregateInterval = 3600
>>>> payload_key = UV
>>>> showMaxMarkPoint = true
>>>> showMinMarkPoint = true
>>>> showAvgMarkLine = false
>>>> lineColor = '#7f1ae555'
>>>> decimals = 0
>>>>
>>>> My issue is, I cannot see the UV chart because I cannot add a correct
>>>> scale on the right side of the chart.
>>>>
>>>> 2. How to add the Air Quality charts on the LiveChart:
>>>>
>>>> [[pm2_5_aqi]]
>>>> [[[pm2_5_aqi]]]
>>>> payload_key = outAQI
>>>> showMaxMarkPoint = true
>>>> showMinMarkPoint = true
>>>> showAvgMarkLine = false
>>>> lineColor = '#428bca'
>>>> decimals = 0
>>>> [[[pm2_5]]]
>>>> payload_key = outAQI
>>>> showMaxMarkPoint = true
>>>> showMinMarkPoint = true
>>>> showAvgMarkLine = false
>>>> lineColor = '#428bca'
>>>> decimals = 0
>>>>
>>>> but I get an error like the variable is not set :
>>>>
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> Caught unrecoverable exception in generator 'user.jsonengine.JSONGenerator'
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** 'pm2_5_aqi'
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** Traceback (most recent call last):
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** obj.start()
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** File "/usr/share/weewx/weewx/reportengine.py", line 385, in
>>>> start
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** self.run()
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** File "/usr/share/weewx/user/jsonengine.py", line 51, in run
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** self.gen_data()
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** File "/usr/share/weewx/user/jsonengine.py", line 128, in
>>>> gen_data
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** ret, category_history = self.gen_history_data(category,
>>>> data_type, live_options, self.c$
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** File "/usr/share/weewx/user/jsonengine.py", line 210, in
>>>> gen_history_data
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** db_value_tuple = weewx.units.as_value_tuple(rec, column_name)
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** File "/usr/share/weewx/weewx/units.py", line 1644, in
>>>> as_value_tuple
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** val = record_dict[obs_type]
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** KeyError: 'pm2_5_aqi'
>>>> Jul 18 09:05:56 weewx4-raspi weewx[31203] ERROR weewx.reportengine:
>>>> **** Generator terminated
>>>>
>>>> Yves,
>>>> YMartin.com/meteo
>>>>
>>>
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/9f9a32e3-fcf5-4fb7-9515-ced5f6e42447n%40googlegroups.com.