[weewx-user] Re: Horizontal line with Highcharts
Keine Sache. Ich habe hier auch unzählige Fragen gestellt und war froh, wenn mir jemand geholfen hat. Einige meiner Fragen hast Du jetzt auch und ich kenne mittlerweile die Antworten :) Andre schrieb am Donnerstag, 18. Juni 2020 um 19:02:00 UTC+2: > Many thanks, Manfred. > So langsam muss ich mal über eine eigene Danksagungseite nur für Dich > nachdenken. ;) > > > Am Donnerstag, 18. Juni 2020 18:57:16 UTC+2 schrieb Manfred Maier: >> >> Here you go: >> >> // 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].plotLines = [{* >> *value: 1013.25,* >> *color: '#E5544E',* >> *width: 1,* >> *dashStyle: 'ShortDash',* >> *zIndex: 0,* >> *}]* >> } >> >> // Dewpoint chart plots get Schwuele indicator for the >> yAxis >> if (s.obsType == "dewpoint") { >> options.yAxis[this_yAxis].plotLines = [{ >> value: 17, >> color: '#E5544E', >> width: 1, >> dashStyle: 'ShortDash', >> zIndex: 0, >> }, >> { >> value: 19.9, >> color: '#E5544E', >> width: 1, >> dashStyle: 'ShortDash', >> zIndex: 0, >> }] >> } >> >> >> >> The first 10 lines or so are already part of the belchertown.js.tmpl (in >> the 'js' folder) - from line 1374 onwards (in my case). >> The code in bold writing adds a line to the barometer chart. And the next >> section adds two lines to the Dewpoint chart. >> >> You probably will want to adapt this 'dewpoint' part to your needs. >> >> Manfred >> Andre schrieb am Donnerstag, 18. Juni 2020 um 18:49:15 UTC+2: >> >>> Yes, this is excacly what I'm looking for. >>> Your code sharing will be very nice. >>> >>> >>> Am Donnerstag, 18. Juni 2020 18:43:28 UTC+2 schrieb Manfred Maier: Hi, a line like on my barometer chart (www.wetter-zorneding.de)? If so: Yes, that's possible but requires some additional lines in the belchertown.js.tmpl In case this is what you are looking for, I can copy my code here. Manfred Am Donnerstag, 18. Juni 2020 18:40:19 UTC+2 schrieb Andre: > > Is it possible to draw a horizontal colored line on specific yaxis > value? > I need a fixed line to show peak values. > > Regards Andre > -- 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 weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/2c95d9b3-a054-4819-9392-498a9f426345n%40googlegroups.com.
[weewx-user] Re: Horizontal line with Highcharts
Many thanks, Manfred. So langsam muss ich mal über eine eigene Danksagungseite nur für Dich nachdenken. ;) Am Donnerstag, 18. Juni 2020 18:57:16 UTC+2 schrieb Manfred Maier: > > Here you go: > > // 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].plotLines = [{* > *value: 1013.25,* > *color: '#E5544E',* > *width: 1,* > *dashStyle: 'ShortDash',* > *zIndex: 0,* > *}]* > } > > // Dewpoint chart plots get Schwuele indicator for the > yAxis > if (s.obsType == "dewpoint") { > options.yAxis[this_yAxis].plotLines = [{ > value: 17, > color: '#E5544E', > width: 1, > dashStyle: 'ShortDash', > zIndex: 0, > }, > { > value: 19.9, > color: '#E5544E', > width: 1, > dashStyle: 'ShortDash', > zIndex: 0, > }] > } > > > > The first 10 lines or so are already part of the belchertown.js.tmpl (in > the 'js' folder) - from line 1374 onwards (in my case). > The code in bold writing adds a line to the barometer chart. And the next > section adds two lines to the Dewpoint chart. > > You probably will want to adapt this 'dewpoint' part to your needs. > > Manfred > Andre schrieb am Donnerstag, 18. Juni 2020 um 18:49:15 UTC+2: > >> Yes, this is excacly what I'm looking for. >> Your code sharing will be very nice. >> >> >> Am Donnerstag, 18. Juni 2020 18:43:28 UTC+2 schrieb Manfred Maier: >>> >>> Hi, >>> a line like on my barometer chart (www.wetter-zorneding.de)? >>> >>> If so: Yes, that's possible but requires some additional lines in the >>> belchertown.js.tmpl >>> >>> In case this is what you are looking for, I can copy my code here. >>> >>> >>> Manfred >>> >>> Am Donnerstag, 18. Juni 2020 18:40:19 UTC+2 schrieb Andre: Is it possible to draw a horizontal colored line on specific yaxis value? I need a fixed line to show peak values. Regards Andre >>> -- 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 weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/0a06f845-9f3d-4609-8012-4cf9bc121f7eo%40googlegroups.com.
[weewx-user] Re: Horizontal line with Highcharts
Here you go: // 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].plotLines = [{* *value: 1013.25,* *color: '#E5544E',* *width: 1,* *dashStyle: 'ShortDash',* *zIndex: 0,* *}]* } // Dewpoint chart plots get Schwuele indicator for the yAxis if (s.obsType == "dewpoint") { options.yAxis[this_yAxis].plotLines = [{ value: 17, color: '#E5544E', width: 1, dashStyle: 'ShortDash', zIndex: 0, }, { value: 19.9, color: '#E5544E', width: 1, dashStyle: 'ShortDash', zIndex: 0, }] } The first 10 lines or so are already part of the belchertown.js.tmpl (in the 'js' folder) - from line 1374 onwards (in my case). The code in bold writing adds a line to the barometer chart. And the next section adds two lines to the Dewpoint chart. You probably will want to adapt this 'dewpoint' part to your needs. Manfred Andre schrieb am Donnerstag, 18. Juni 2020 um 18:49:15 UTC+2: > Yes, this is excacly what I'm looking for. > Your code sharing will be very nice. > > > Am Donnerstag, 18. Juni 2020 18:43:28 UTC+2 schrieb Manfred Maier: >> >> Hi, >> a line like on my barometer chart (www.wetter-zorneding.de)? >> >> If so: Yes, that's possible but requires some additional lines in the >> belchertown.js.tmpl >> >> In case this is what you are looking for, I can copy my code here. >> >> >> Manfred >> >> Am Donnerstag, 18. Juni 2020 18:40:19 UTC+2 schrieb Andre: >>> >>> Is it possible to draw a horizontal colored line on specific yaxis value? >>> I need a fixed line to show peak values. >>> >>> Regards Andre >>> >> -- 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 weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/18f23152-86cd-40f1-a651-52a76fc046b5n%40googlegroups.com.
[weewx-user] Re: Horizontal line with Highcharts
Yes, this is excacly what I'm looking for. Your code sharing will be very nice. Am Donnerstag, 18. Juni 2020 18:43:28 UTC+2 schrieb Manfred Maier: > > Hi, > a line like on my barometer chart (www.wetter-zorneding.de)? > > If so: Yes, that's possible but requires some additional lines in the > belchertown.js.tmpl > > In case this is what you are looking for, I can copy my code here. > > > Manfred > > Am Donnerstag, 18. Juni 2020 18:40:19 UTC+2 schrieb Andre: >> >> Is it possible to draw a horizontal colored line on specific yaxis value? >> I need a fixed line to show peak values. >> >> Regards Andre >> > -- 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 weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/72b9c75d-6a0a-4c73-b543-ad509f5e64f1o%40googlegroups.com.
[weewx-user] Re: Horizontal line with Highcharts
Hi, a line like on my barometer chart (www.wetter-zorneding.de)? If so: Yes, that's possible but requires some additional lines in the belchertown.js.tmpl In case this is what you are looking for, I can copy my code here. Manfred Am Donnerstag, 18. Juni 2020 18:40:19 UTC+2 schrieb Andre: > > Is it possible to draw a horizontal colored line on specific yaxis value? > I need a fixed line to show peak values. > > Regards Andre > -- 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 weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/1be847db-e13d-4c6d-bd5e-c7ef561b81ddo%40googlegroups.com.