Open EHJ-52n opened 10 years ago
The problem is solved if all required properties are defined. The required properties are documented in the TS API documentation:
The enhancement should be, that partially defined rendering hints should work, too. As a user I want to define only the color and nothing more. Hence, the client should use a default style and update it with the values from the rendering hints. The according code section is here:
var style = {};
if(meta.hasOwnProperty('renderingHints')) {
var chartType = meta.renderingHints.chartType;
var width = meta.renderingHints.properties.width;
var color = meta.renderingHints.properties.color;
var interval = meta.renderingHints.properties.interval;
var lineType = meta.renderingHints.properties.type;
style = new TimeseriesStyle(chartType, width, color, interval, lineType);
} else {
style = TimeseriesStyle.createDefault(tsId);
}
I am adding some renderingHints in the TS API in the file
WEB-INF/classes/config-rendering-hints.json
like thisAfter relaunching the TS API and the js-sensorweb-client, the according time series gets rendered using the defined color in the legend but not in the diagram anymore.
When requesting the timeseries details from the TS API directly, the rendering hints are present like this:
In the Chart View the timeseries is not drawn.
In chrome, the console and network tab show no error according data retrieval or something similar.