grafana-infinity-datasource
grafana-infinity-datasource copied to clipboard
[Bug] Support for parsing Big numbers
Describe the bug
Json data value was string 9921020321007113, But result was 9921020321007112 on table
Steps to reproduce
Get json response and show on table Test data: 9921020321007111, 9921020321007112, 9921020321007113, ..... ,9921020321007119 Result: 9921020321007112, 9921020321007112, 9921020321007112, ..... ,9921020321007120
Note: bugs will be fixed only if enough information provided to reproduce the issue
Sample Data
Data:
[
{"serialNumber": "9921020321007111"},
{"serialNumber": "9921020321007112"},
{"serialNumber": "9921020321007113"},
{"serialNumber": "9921020321007114"},
{"serialNumber": "9921020321007115"},
{"serialNumber": "9921020321007116"},
{"serialNumber": "9921020321007117"},
{"serialNumber": "9921020321007118"},
{"serialNumber": "9921020321007119"}
]
Screenshots
Format as string:
Format as number:
Version Details:
- Grafana version : v8.5.6
- Plugin version : v0.8.8
Additional context
Hmm. formatting as string does produce the correct results for me at least here.
But I can confirm that parsing as number for big integers causing issue with Javascript. As you can see below screenshot browsers have limitations with javascript numbers. If the numbers are beyond range, they need to be specified as big int. ( plugin doesn't support that yet and don't have clear usecase for it ).

So suggesting you to use this as a string in your usecase. ( also suggest you to try latest 1.0.0-dev.5 from here if the string type doesn't produce desired result )
Thank you for the prompt reply.
Upgrade my grafana to v9.0.1, the result was correct.