timopu Posted January 16, 2017 Report Share Posted January 16, 2017 (edited) Hello again, I'm encountering a strange issue with setMin/setMax when using this data: [{"myinfomonitor_ts":"2016-10-17T06:03:09.770Z","FI_max":0,"shift_sum":511,"engine_number_count":539},{"myinfomonitor_ts":"2016-10-24T06:03:09.770Z","FI_max":0,"shift_sum":339,"engine_number_count":534},{"myinfomonitor_ts":"2016-10-31T07:03:09.770Z","FI_max":0,"shift_sum":307,"engine_number_count":487},{"myinfomonitor_ts":"2016-11-07T07:03:09.770Z","FI_max":0,"shift_sum":418,"engine_number_count":445},{"myinfomonitor_ts":"2016-11-14T07:03:09.770Z","FI_max":0,"shift_sum":427,"engine_number_count":445},{"myinfomonitor_ts":"2016-11-21T07:03:09.770Z","FI_max":0,"shift_sum":371,"engine_number_count":387},{"myinfomonitor_ts":"2016-11-28T07:03:09.770Z","FI_max":0,"shift_sum":565,"engine_number_count":486},{"myinfomonitor_ts":"2016-12-05T07:03:09.770Z","FI_max":0,"shift_sum":620,"engine_number_count":698},{"myinfomonitor_ts":"2016-12-12T07:03:09.770Z","FI_max":0,"shift_sum":485,"engine_number_count":485},{"myinfomonitor_ts":"2016-12-19T07:03:09.770Z","FI_max":0,"shift_sum":155,"engine_number_count":213},{"myinfomonitor_ts":"2016-12-26T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0},{"myinfomonitor_ts":"2017-01-02T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0},{"myinfomonitor_ts":"2017-01-09T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0},{"myinfomonitor_ts":"2017-01-16T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0},{"myinfomonitor_ts":"2017-01-23T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0},{"myinfomonitor_ts":"2017-01-30T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0},{"myinfomonitor_ts":"2017-02-06T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0},{"myinfomonitor_ts":"2017-02-13T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0}] 1) When the min is set to -800 and max to 800, there is an additional -1000 line drawn on the chart ( pic1.png ) 2) When min is set to 0 and max to 800, Y axis line is not drawn at all. 3) When min is set to 400 and max to 800, The chart gets inverted and stepping goes crazy. Seems that this might not be related to the dataset I'm using, because the same effect is seen with other data sets. How could I solve this? br, Timo Edited January 16, 2017 by timopu unintentional crap in post. Quote Link to comment Share on other sites More sharing options...
0 JuanC Posted January 16, 2017 Report Share Posted January 16, 2017 I was unable to duplicate the issues you describe (and are visible in the screenshots). Can you please provide the code you use to customize the chart? Regards, JuanC Quote Link to comment Share on other sites More sharing options...
0 timopu Posted January 16, 2017 Author Report Share Posted January 16, 2017 Hello JuanC, I did some further digging into this and found out that this is a classic Javascript type conversion bug - the code received the value for axes from a form field and the variable got passed to JChartFX as a string instead of being a Number. After I added explicit conversion to Number, the min/max values started to behave as expected. br, Timo Quote Link to comment Share on other sites More sharing options...
Question
timopu
Hello again,
I'm encountering a strange issue with setMin/setMax when using this data:
[{"myinfomonitor_ts":"2016-10-17T06:03:09.770Z","FI_max":0,"shift_sum":511,"engine_number_count":539},{"myinfomonitor_ts":"2016-10-24T06:03:09.770Z","FI_max":0,"shift_sum":339,"engine_number_count":534},{"myinfomonitor_ts":"2016-10-31T07:03:09.770Z","FI_max":0,"shift_sum":307,"engine_number_count":487},{"myinfomonitor_ts":"2016-11-07T07:03:09.770Z","FI_max":0,"shift_sum":418,"engine_number_count":445},{"myinfomonitor_ts":"2016-11-14T07:03:09.770Z","FI_max":0,"shift_sum":427,"engine_number_count":445},{"myinfomonitor_ts":"2016-11-21T07:03:09.770Z","FI_max":0,"shift_sum":371,"engine_number_count":387},{"myinfomonitor_ts":"2016-11-28T07:03:09.770Z","FI_max":0,"shift_sum":565,"engine_number_count":486},{"myinfomonitor_ts":"2016-12-05T07:03:09.770Z","FI_max":0,"shift_sum":620,"engine_number_count":698},{"myinfomonitor_ts":"2016-12-12T07:03:09.770Z","FI_max":0,"shift_sum":485,"engine_number_count":485},{"myinfomonitor_ts":"2016-12-19T07:03:09.770Z","FI_max":0,"shift_sum":155,"engine_number_count":213},{"myinfomonitor_ts":"2016-12-26T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0},{"myinfomonitor_ts":"2017-01-02T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0},{"myinfomonitor_ts":"2017-01-09T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0},{"myinfomonitor_ts":"2017-01-16T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0},{"myinfomonitor_ts":"2017-01-23T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0},{"myinfomonitor_ts":"2017-01-30T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0},{"myinfomonitor_ts":"2017-02-06T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0},{"myinfomonitor_ts":"2017-02-13T07:03:09.770Z","FI_max":0,"shift_sum":0,"engine_number_count":0}]
1) When the min is set to -800 and max to 800, there is an additional -1000 line drawn on the chart ( pic1.png )
2) When min is set to 0 and max to 800, Y axis line is not drawn at all.
3) When min is set to 400 and max to 800, The chart gets inverted and stepping goes crazy.
Seems that this might not be related to the dataset I'm using, because the same effect is seen with other data sets.
How could I solve this?
br,
Timo
Edited by timopu
unintentional crap in post.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.