I am creating a line-graph with data having some null values, but the NULLs are getting defaulted to zero, I want create a gap when the datapoint is a null value, refer this link -https://www.highcharts.com/demo/line-basic - this demo shows that we can achieve this by configuring AdvanceFormat-HighchartsJSON by adding following configurations-plotOptions: {series: { label: { connectorAllowed: false } } },~ however this configuration is not working as I found datapoint structure have value attribute is of Decimal type,which could be the reason for defaulting the null value to zero.
I have also attached my AdvanceFormat-HighchartsJSON configurations.Expected output-
Actual Output-
I found this solution somewhere else, however I don't know if it can be applied to Outsystems:
http://jsfiddle.net/pawel_dalek/DdvGm/94/
I will be having value 0 (as datapoint) and for that I want to show drop in the graph, its the null values that I want to show a discontinued line for.
Isn't that what this function is doing?
data.forEach(function(element, index) {
if (element === 0) {
data[index] = null;
}
});
As I pointed out, I'm not sure how exactly to port it to OutSystems, but it seems like a really good candidate
Outsystems stores null value as 0 by default. I am not sure exactly what you want to implement. But i hope the below solution may help.
You can try having another attribute in the Entity as Is null(Boolean), when user enters null value OS will store is as 0 but using Javascript you can identify if the value entered is 0 or null.
On click of validate/save have the following JS and pass the input widget id as input parameter to the JS.
var inputValue = document.getElementById($parameters.InputId).value;$parameters.EmptyValue = inputValue ? true : false;
Create a new structure with the same attributes as of Datapoints and add one attribute as Isnull and handle the charts accordingly to show the disconnected lines for records which have null values.
I am not sure exactly what you want to implement.
can you use a filter when the data is empty before assigning it to a datapoint?
or in hightjson code you can use condition