0

I use Highcharts for my ThingSpeak IoT project.

All is fine except these things, which just makes me angry (I cannot find a solution on my own... I have been trying with my frind Google for last 3 days without any success).

Here is my project page: http://net.cekuj.net/

There are my issues: 1) I cannot see the most top number next to the Y axes (I can see only the tick, not the number - if you check browser console, it is there but it has wrong X and Y coordinates) 2) I cannot align "tick mark" for all Y axes according to the manual - I would like to align them "on" mark, but now there are still "between"... and yes I use added a var for this :( 3) I would like to use decimalplace setting independently for every series of data - for example - Temperature will have 1 decimal place, humidex will have 0 decimal place etc. is that possible? 4) I added major ticks, but no succes with adding minor ticks :(

I would be really happy if any of these 4 issues would be solved, thank you for your help and time!

EDIT: Also autorefresh is not working, but it seems to be because of wrong URL pattern, will be fixed later :)

Eldenroot
  • 37
  • 9

1 Answers1

1
  1. Try to set the yAxis.showLastLabel options to true

    Demo: https://jsfiddle.net/BlackLabel/hqv97ws0/

    yAxis: {
        showLastLabel: true,
    },
    

    API: https://api.highcharts.com/highstock/yAxis.showLastLabel


  1. You can set how many decimal values should be shown in the tooltip for each series:

    API: https://api.highcharts.com/highcharts/series.line.tooltip.valueDecimals


  1. I don't understand here - could you reproduce this issue as a really simple chart with sample data? You can use the above demo.

  1. That's weird, ticks should be applied with setting the yAxis.minorTicks to true. Could you reproduce this issue also?

    Demo: https://jsfiddle.net/BlackLabel/dLy6x59q/

Community
  • 1
  • 1
Sebastian Wędzel
  • 11,417
  • 1
  • 6
  • 16
  • Hi, first of all I wanna thank you fro your reply! I have fixed the issue number #1 and #4. Only two remains: #2 - check my graph, I will add a jsfiddle code ASAP. #3 - please, could you edit my jsfiddle and show me how? Because I have tried to add valueDecimals to yaxis wothout any success. – Eldenroot Mar 24 '20 at 21:29
  • Here is the link for jsfiddle: https://jsfiddle.net/Eldenroot/qbes63fr/1/ – Eldenroot Mar 24 '20 at 21:34
  • 1
    #2 Please notice that `tickmarkPlacement` feature applies only to the category type and it is implemented only in Highcharts - not Highstock. https://api.highcharts.com/highstock/yAxis however, I think that you can achieve a wanted result by changing the `yAxis.labels.y` value, demo: https://jsfiddle.net/BlackLabel/s0t4r9gp/ – Sebastian Wędzel Mar 25 '20 at 09:05
  • 1
    #3 your series are rendered dynamically and proposal solutions from my site are: 1. after 430 line add a condition to check which series should have a different `valueDecimals` 2. do an series.update in the chart.events.load callback, when the series will be already applied, demo: https://jsfiddle.net/BlackLabel/hsLj78xc/ – Sebastian Wędzel Mar 25 '20 at 09:09
  • #2 - OK, but my data are dynamic, does it have any side-effect? And for #3 - need to check, because I can set global valueDecimals to all series right now, with your proposal it should be working, good idea, I hope that I will handle it :) I will let you know later today when I get back to home. – Eldenroot Mar 25 '20 at 11:44
  • 1
    #2 there shouldn't be any side-effect - this option just sets the label positions. – Sebastian Wędzel Mar 25 '20 at 12:17
  • OK, great! Thank you! Can I ask you with a last not issue but an advice? I would like to implement date picker into my existing code but I am not a JS guy - this is a tutorial, but I have hard times to implement it - not working at all. – Eldenroot Mar 25 '20 at 21:33
  • OK, here is my latest working code: https://jsfiddle.net/Eldenroot/qbes63fr/6/ I would like to add last thing - date picker selector - accroding to this tutorial - https://www.highcharts.com/forum/viewtopic.php?t=38934 I am not sure where to put it into the CODE (I am not a JS guy, giving me a blank page with no data). Thank you! BTW - is possible to use this more efficient method for hide/show all series? http://jsfiddle.net/pGuEv/ – Eldenroot Mar 25 '20 at 22:21
  • 1
    Here is a demo with implemented `dataPicker` in the `chart.events.load callback` : https://jsfiddle.net/BlackLabel/3qtvmgk6/ The method for hide/show I think that the approach which you have shared is a really good one – Sebastian Wędzel Mar 27 '20 at 11:55
  • Thank you very much! All is solved and working! Here is my site: http://net.cekuj.net/ – Eldenroot Mar 27 '20 at 14:57
  • Thank you! Without you it would not be even possible! – Eldenroot Mar 28 '20 at 20:43
  • Just my last question about tooltips dateformat - https://github.com/highcharts/highcharts/issues/13219 what do you think? I use my custom date formats for tooltips, it works fine but it is ignored where you group the data. – Eldenroot Mar 28 '20 at 20:44
  • Could you ask this question as a separate topic? This one is overflowed I think. And please simplified the demo as much as you can to show the issue. – Sebastian Wędzel Mar 30 '20 at 11:45