Page 1 of 1

Station Deviation settings

Posted: Wed Jan 03, 2018 10:55 am
by Reinhard
Is it possible to set the graph view as default view instead the Temp view? Thanks for reading.

Re: Station Deviation settings

Posted: Wed Jan 03, 2018 11:45 am
by Lespius
Thanks for asking, Reinhard. I have the same wish !

Re: Station Deviation settings

Posted: Mon Jan 08, 2018 11:58 pm
by Reinhard
Lespius,
seems like no help on this one. So here is my own try, maybe you can help me a step further. What I have done so far within stationDeviationBlock.php is:

Set the mticon-graph to Active and copy and paste it to the first position:

Code: Select all

<span class="mticon-graph stationDeviationParameterIcon stationDeviationActive tooltip" data-id="graph" title="<?php echo lang('graph','c')?>"></span>
Set the stationDeviationDivT to display none:

Code: Select all

<div id="stationDeviationDivT" class="stationDeviationDiv" style="display:none">
Removed display none from stationDeviationDivGraph:

Code: Select all

<div id="stationDeviationDivGraph" style="width:98%;height:300px;margin:0 auto;"></div>
And finally done some changes here:

Code: Select all

$(".stationDeviationParameterIcon").click(function(){
$(".stationDeviationDiv").hide();
id = $(this).attr("data-id");
$(".stationDeviationParameterIcon").removeClass("stationDeviationActive");
$(this).addClass("stationDeviationActive");
if(id=="T"){
	$("#stationDeviationDivGraph").hide();
	$("#stationDeviationDivT").show();
	$("#stationDeviationDivR").hide();
	}
else if(id=="R"){
	$("#stationDeviationDivR").show();
	$("#stationDeviationDivGraph").hide();
	$("#stationDeviationDivT").hide();
	}
else if(id=="graph"){
	$("#stationDeviationDivGraph").show();
	Highcharts.chart('stationDeviationDivGraph', options);
	$("#stationDeviationDivT").hide();
	$("#stationDeviationDivR").hide();
	}
})
Unfortunately I end up with no graph displayed, but at least with a blank block waiting on a click on the graph button. Anybody out here that can point me the way to display the graph as default?

Re: Station Deviation settings

Posted: Sun Jan 14, 2018 11:27 am
by Reinhard
Thank you for giving us the option to make the graph as default. Much appreciated!

Re: Station Deviation settings

Posted: Tue Jan 16, 2018 7:45 pm
by Lespius
yep,thx Jachym for the update !