Manfred this one was a little tricky and I'm not sure if my [xAxis],
[yAxis] idea would have worked on this particular request, but anyways
here's how to do it. Place this bit of code in the line you have red above.
options.yAxis[this_yAxis].plotLines = [{
value: 1013,
color: '#FF0000',
width: 2,
}]
Change the color (right now it's red) and the width.
You will also need to grab the latest development Belchertown dark CSS file
<https://raw.githubusercontent.com/poblabs/weewx-belchertown/development/skins/Belchertown/belchertown-dark.min.css>
since I had to make some changes to it for the line to appear in dark mode.
Note: backup your current dark CSS file just in case.
On Monday, August 12, 2019 at 9:06:36 PM UTC-4, Pat wrote:
>
> Your problem might be that you're missing a semi-colon at the end of the
> line.
>
> But this raises a larger question/problem. With the re-write of the
> Highcharts generator in 1.0, it seems more and more xAxis and yAxis
> customizations are needed. Instead of me maintaining a mapping of every
> option available, I had an idea today of adding an [xAxis] and [yAxis]
> graphs.conf config section for each graph group. I'll work on testing
> something out which might make your belchertown.js modification easier.
>
>
> On Monday, August 12, 2019 at 4:54:29 PM UTC-4, Manfred Maier wrote:
>>
>> Hi Pat,
>> I'm trying to implement a horizontal 'plotLine' in the barometer graph
>> (for indicating the normal pressure at 1013mbar).
>>
>> Unfortunately my attempts haven't been successful. What I've tried is to
>> implement it in the 'Belchertown.js.tmpl':
>>
>> // Barometer chart plots get a higher precision yAxis tick
>>
>> if (s.obsType == "barometer") {
>>
>> if ( typeof s.yaxis_tickinterval === "undefined" ) {
>>
>> // If no tick interval override, set 0.01 as
>> default tick interval to satisfy an old request for this level of precision.
>>
>> options.yAxis[this_yAxis].tickInterval = 0.01;
>>
>> }
>>
>> // Define yAxis label float format if rounding is
>> defined. Default to 2 decimals if nothing defined
>>
>> if ( typeof s.rounding !== "undefined" ) {
>>
>> options.yAxis[this_yAxis].labels = { format:
>> '{value:.'+s.rounding+'f}' }
>>
>> } else {
>>
>> options.yAxis[this_yAxis].labels = { format:
>> '{value:.2f}' }
>>
>> }
>>
>> options.yAxis[this_yAxis].plotLine.value = 1013
>>
>> }
>>
>> Would you have a hint for me? It's not urgent :)
>>
>> Thanks!
>> Manfred
>>
>>
>>
>>
--
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/4e71f485-acfb-46a3-967e-35420d395358%40googlegroups.com.