• MattFox

    I take my hat off to you.
    Will happily check and test for you.

    Fox

    posted in Mango feedback read more
  • MattFox

    Thanks Jared, greatly appreciated. Happy to test and assist in debugging for you as required if needed

    Fox

    posted in Mango feedback read more
  • MattFox

    Have given up and reverted to the 3.2.4 serial chart in the overrides folder. Multiple column charts disappear so have had to use line chart for hourly and column for daily data.

    posted in Mango feedback read more
  • MattFox

    Looking at it now, I get the feeling it throws a wobbly because I'm pulling the same datapoint twice to try and have a point for daily and a point for hourly...

    posted in Mango feedback read more
  • MattFox

    From my experience, version control for files is straightforward, and yes you will want to maintain changes in the overrides folder. Can't really version control a database easily as you need to have the inverse command to reverse changes/modifications that you made to data/file structure.
    Filestore directories will at least give you a means to back up data and you can save/load via the Api (assuming your files are not getting stupidly large). Secondly if you are using a JSON store to host all of your settings/configuration then most likely the best thing you can do off the top of my head is to backup and push into a repo to log your changes.

    So that's my ten cents worth....

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • MattFox

    no, am just using series-x-values and their respective series-x-point attributes. I'm half inclined to agree that it could be to do with modifying the point values to match for cumulative day counts of the first hourly values. I'm running out of ideas on how to do this with the tools I have. I wonder if I should just manually create an AmCharts instance and populate it with javascript functions rather than using the directive. Who knows...
    I'll get there somehow..

    posted in Mango feedback read more
  • MattFox

    NO luck, it works for a while then throws a tizzy. The other thing that happens which is bizarre is the style applied for a given width is slightly out. I'll go for the last day, then go to last week. the columns are set to the width as if it were a last day setting. same if I go from a week to a fortnight, then back again. Hope that makes a sense.
    0_1518137066480_2139c6fd-1d45-4d9a-99f0-71c657e1fc9e-image.png
    0_1518137090689_b5de0d05-fb00-46b0-9f51-e2df451c6a2c-image.png

    So it looks like i'm not passing some necessary info to tell the chart what size the columns should be...
    I swear I'm starting to go slightly crazy here. I can console log the components. I can see the data being pushed out. the chart then goes yep, yep, yep, oh on second thought something's broken. can't tell you why. crunch...

    Wonder if I should see about trying to get the unminified serial chart if it exists to debug further...

    posted in Mango feedback read more
  • MattFox

    @jared-wiltshire said in ma-serial-chart 3.3.0 Uncaught TypeError:

    This should not be necessary and is probably the source of your woes:
    AmCharts.charts[AmCharts.charts.length-1].validateData();

    Yes I added that yesterday after noticing that I could change between 1 and 2 weeks and the chart would not update unless I forced it... I'll apply your suggestion, as we can all tell, I'm far from competent with Angular.. I'm learning a lot though,

    posted in Mango feedback read more
  • MattFox

    Don't know if starting a new thread is required but I can at least show you my component directives that are supposed to convert data as it receives it.

    App.component('getDailyRainfall', {
        bindings: {
            input: '<',
            daily: '=',
        },
        controller: function() {
            this.$onChanges = function() {
    			/* console.log(this); */
                if (angular.isArray(this.input) ) {
    				 this.daily = [];
    				console.log(this.input);
    				var dates = {};
    				var time = " 23:59:00";
    				var todaysDate = moment().date();
    				for(var i=0; i<this.input.length; i++)
    				{
    					var ts = moment(this.input*.timestamp);
    					
    					var val = this.input*.value;
    					var self = this;
    					if(ts.date()!==todaysDate)
    					{
    						if( dates.hasOwnProperty( ts.year()+'-'+(ts.month()+1)+'-'+ts.date()+time ) )
    						{						
    							dates[ ts.year()+'-'+(ts.month()+1)+'-'+ts.date()+time ] +=val*0.2;
    							//dates[ ts.year()+'-'+(ts.month()+1)+'-'+ts.date()+time ] = dates[ ts.year()+'-'+(ts.month()+1)+'-'+ts.date()+time ];
    						}
    						else
    						{
    							dates[ ts.year()+'-'+(ts.month()+1)+'-'+ts.date()+time ] =val;
    							//dates[ ts.year()+'-'+(ts.month()+1)+'-'+ts.date()+time ] = dates[ ts.year()+'-'+(ts.month()+1)+'-'+ts.date()+time ];
    						}
    					}
    				}
    				
    				for(var i in dates)
    				{					
    					var ts = moment(i,"YYYY-MM-DD HH:mm::ss");
    					this.daily.push({
    						timestamp: ts.valueOf(),
    						value: dates*.toFixed(2),
    						rendered: '' + dates* + ''
    					});					
    				}
    				/* // console.log(this.output); */
                }
    			try{
    			AmCharts.charts[AmCharts.charts.length-1].validateData();
    			}catch(e){}
            }
        }
    });
    

    The values are obtained by pulling the first value in the hour which gives me the last hour's number of pulses before the logger resets and starts counting rain pulses again. So i need to take this values, combine them and make them a daily-like rollover for the cumulative rainfall.. Here is my other component which I'd use to apply the 0.2 modifier. I would use a $scope function but it seems to keep being applied multiple times giving ridiculously small values.

    App.component('convertToRainfall', {
        bindings: {
            input: '<',
            output: '='
        },
        controller: function() {
            this.$onChanges = function() {
    			/* console.log(this); */
                if (angular.isArray(this.input) ) {
    				 this.output = [];
    				console.log(this.input);
    				for(var i=0; i<this.input.length; i++)
    				{				
    					this.output* = this.input*;
    					this.output*.value = this.input*.value * 0.2;
    				}
                }
    			console.log(this.output);
    			try{
    			AmCharts.charts[AmCharts.charts.length-1].validateData();
    			}catch(e){}    
    			}
    			
        }
    });
    

    So yes, these were what I was using to either modify then sum or modify and sum in one go. If you've any suggestions I'm all for it.

    Thanks!

    posted in Mango feedback read more

Looks like your connection to Mango Automation Forum was lost, please wait while we try to reconnect.