kamil.m wrote:
I am really sorry for the late reply. Your use case is quite extensive, so let's divide it into separate parts.
Thanks for the answer, timing is no problem. I understand what you are saying, I simplified my
jsfiddle and explain below.
The data is public and you can access it through the links given in the jsfiddle code. I would like to stay as close to the original code as possible as it is all legal use of highcharts (I think)
I left the structure of the code untouched, you have to believe me: that is unrelated to my question, it is only related to loading the data. Examining the loaded data in the debugger shows that is not an issue.
So I reduced the code, leaving only one datafile and the windbarb data file to be read and displayed. I removed all redundant axis and attributes. That which remains may even be further reduced but it does not complicate the code. Datafiles are read only once, not during switching of the windbarbs.
kamil.m wrote:
1) Windbarbs axis position toggle
I have created a simple selection menu, where you can choose where to render your wind barbs. You can achieve it by finding the wind barbs series and updating its xAxis value with the series.update method.
Thank you, I implemented it in my fiddle
kamil.m wrote:
2) Different values when toggling Axis
Since your code is quite complicated, it's hard to quickly tell what is causing the issue with the data values. I would start with debugging it with hardcoded data (instead of the JSON one) so that you will be able to tell if it's a code problem or a data problem.
Remember that you can always use our Highcharts.getJSON method, and access your data in the enclosing function scope. That could greatly simplify your code.
I hope we can reach each other on this:
1) the data can be inspected publicly by using the URL's as found in the code so I did not change to the highcharts method of getting the data. The straightforward ajax calls do work and yes I debugged this and the variables show what I expect. So the data for the series are correct.
2) the reason to use this amount of data is that the effect can only be clearly seen with large series of data where the data for the windbarbs get 'compressed' to fit the with of the windbarb icon. Using this amount of data hardcoded makes the fiddle unreadable, which I hope you agree.
kamil.m wrote:
3) Alignment of the xAxis ticks
In the demo provided in the first post, the tick on both axes are perfectly aligned in my JSFidlle. Could you post a screenshot of that issue, if it still occurs?
I am sorry for the confusion, my second reply 'to self' confirms I managed to align both the xAxis by using the
linkedTo attribute so afaics this part if the question is solved.
So what is the leftover issue?
If the WindBarbs are on top, you see the temperature curve (with a five minute resolution in the JSON) displayed as a ten minute resolution (check the xAxis tooltip time range).
If the WindBarbs are at the bottom, you see the temperature curve as a smooth curve with a two hour resolution between points (five minutes between points in the JSON) which apparently is caused by the WindBarbs which require space of 2 or 3 hours between points, a space which is then forced upon the temperature dataseries.
So my questions are:
1) why are the WindBarbs apparently dominant for the distance between datapoints of the temperature series (blue)
2) how can I have the windbarbs at the bottom and still have the temperature (blue) series be displayed with as many points as possible.