diff --git a/htdocs/frontend/index.html b/htdocs/frontend/index.html
index c34e272..43f4db9 100644
--- a/htdocs/frontend/index.html
+++ b/htdocs/frontend/index.html
@@ -106,7 +106,6 @@
-
|
diff --git a/htdocs/frontend/javascripts/options.js b/htdocs/frontend/javascripts/options.js
index 8e9d6ad..ee0d9a3 100644
--- a/htdocs/frontend/javascripts/options.js
+++ b/htdocs/frontend/javascripts/options.js
@@ -30,7 +30,7 @@ vz.options = {
backendUrl: '../backend.php', // TODO default backend, store backend urls in cookies
tuples: 300,
precission: 2, // TODO update from backend capabilities?
- render: 'steps',
+ render: 'lines',
refresh: false,
defaultInterval: 24*60*60*1000, // 1 day
timezoneOffset: -(new Date().getTimezoneOffset() * 60000) // TODO add option with timezone dropdown
@@ -39,10 +39,8 @@ vz.options = {
vz.options.plot = {
colors: ['#579D1C', '#7E0021', '#FFD320', '#FF420E', '#004586', '#0084D1', '#C5000B', '#FF950E', '#4B1F6F', '#AECF00', '#314004', '#83CAFF'],
series: {
- lines: { show: true },
shadowSize: 0,
points: {
- show: false,
radius: 1,
//symbol: 'square'
symbol: function(ctx, x, y, radius, shadow) { // just draw simple pixels
diff --git a/htdocs/frontend/javascripts/wui.js b/htdocs/frontend/javascripts/wui.js
index 88b2f9d..674fa82 100644
--- a/htdocs/frontend/javascripts/wui.js
+++ b/htdocs/frontend/javascripts/wui.js
@@ -102,7 +102,6 @@ vz.wui.init = function() {
// plot rendering
$('#render-lines').attr('checked', (vz.options.render == 'lines'));
$('#render-points').attr('checked', (vz.options.render == 'points'));
- $('#render-steps').attr('checked', (vz.options.render == 'steps'));
$('input[name=render][type=radio]').change(function() {
if ($(this).attr('checked')) {
vz.options.render = $(this).val();
@@ -511,29 +510,32 @@ vz.entities.loadData = function() {
vz.wui.drawPlot = function () {
vz.wui.updateHeadline();
- var data = new Array;
+ var series = new Array;
vz.entities.each(function(entity) {
if (entity.active && entity.data && entity.data.tuples && entity.data.tuples.length > 0) {
- data.push({
+ var serie = {
data: entity.data.tuples,
- color: entity.color
- });
+ color: entity.color,
+ lines: {
+ show: (vz.options.render == 'lines'),
+ steps: (entity.definition.interpreter == 'Volkszaehler\\Interpreter\\MeterInterpreter')
+ },
+ points: { show: (vz.options.render == 'points') }
+ };
+
+ series.push(serie);
}
});
- if (data.length == 0) {
+ if (series.length == 0) {
$('#overlay').html('
nothing to plot...
');
- data.push({}); // add empty dataset to show axes
+ series.push({}); // add empty dataset to show axes
}
else {
$('#overlay').empty();
}
- vz.options.plot.series.lines.show = (vz.options.render == 'lines' || vz.options.render == 'steps');
- vz.options.plot.series.lines.steps = (vz.options.render == 'steps');
- vz.options.plot.series.points.show = (vz.options.render == 'points');
-
- vz.plot = $.plot($('#flot'), data, vz.options.plot);
+ vz.plot = $.plot($('#flot'), series, vz.options.plot);
};
/*