Error generating chart: Computation timed out showing in Google Earth Engine - charts

I'm trying to generate a chart of my NDVI values, but I'm getting this error:
Error generating chart: Computation timed out.
This is my code..any help-advice would be really helpful!!
It's important to mention that my AOI file contains more than 500 polygons, that have been converted to a multipolygon..I don't know if this is a problem..
Thanks a lot!
\\Select the ndvi from an Image Collection
var selectNDVI_2020 = getNDVI_2020.select(['NDVI']);
\\Plots NDVI
var plot_index= ui.Chart.image.seriesByRegion(selectNDVI_2020, aoi, ee.Reducer.median(),'NDVI',5000,'system:time_start','system:index')
.setChartType('LineChart').setOptions({
title: 'Δείκτης NDVI για ' + metavliti +' για το έτος 2020',
hAxis: {title: 'Date'},
vAxis: {title: 'NDVI'},
viewWindow : {max : 1, min : 0},
colors: ['blue'],
curveType:'function',
pointSize: 4
});
print(plot_index,'NDVI_2020');

Maybe the AOI is too large for computing.
I change my parameter "scale" from 30 to 300, and find that it was okay.

Related

Is it possible to display in a chart the axis in reverse, from example the x axis from right to left and the y from left to right? React-chart-js

I am trying to reverse the axis in a chart,what i want is to have to line of the chart running from left to right and the date.now() from right to left? How can i accomplish that?
I have tried to do x: {
reverse: true
},
y:{
reverse: false
}
Actually, you can reverse to arrays. In addition, depending on the situation, You can add new items in reverse.
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'].reverse(),
data: [65, 59, 80, 81, 56, 55, 40].reverse(),

'x' must be numeric bins

I'm trying to create bins for a large data set.
First I made breaks and tags:
breaks <- c(0,250,500,750,1000,1250,1500,1750,2000,2250, 2500, 2750, 3000, 3250, 3500, 3750, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 15000, 20000, 25000, 30000, 300000)
tags <- c("[0-250)","[250-500)", "[500-750)", "[750-1000)", "[1000-1250)", "[1250-1500)","[1500-1750)", "[1750-2000)","[2000-2750)", "[2750-3500)", "[3500-5000)" , "[5000-7000)" , "[7000-9000)" , "[9000-15000)" , "[15000-25000)" , "[25000-30000)" , "[30000-300000)")
and then I ran this:
group_tags <- cut(AOPerm2$accum_km2,
breaks=breaks,
include.lowest=TRUE,
right=FALSE,
labels=tags)
and received: Error in cut.default(AOPerm2$accum_km2, breaks = breaks, include.lowest = TRUE, :
'x' must be numeric.
AOPerm2 is the name of my data, accum_km2 is the name of the x-value/what I'm trying to sort into bins. I've already set my accum_km2 as.numeric, and this is how it appears in the environment. My tags is in chr, and I can't change it to numeric/don't understand how this would be possible, as it's a range. I've also tried increasing the number of tags, but nothing changes.

how to linegraph using result from the previous page

Can i create line graph which is the data get from previous page. I have done a calculation on my previous page. I would like to create line graph using the result and times. I face the problem to adjust the coding below because the coding below show the data was fix.
series: <LineSeries<SalesData, String>>[
LineSeries<SalesData, String>(
dataSource: <SalesData>[
SalesData('Jan', 35),
SalesData('Feb', 28),
SalesData('Mar', 34),
SalesData('Apr', 32),
SalesData('May', 40)
],

Some questions as for vue-chartjs

In Laravel 5.6 / vuejs 2.5 application I use vue-chartjs, but my charts looks like :
https://imgur.com/a/ru1dXlm
I want some more:
having several items(artists in my case) I want to see them half-transparent, just as in first example here http://demo.vue-chartjs.org/
having points with values shown as in first example at link above
I need to see all labels in x-direction( I fill labels parameter ) for here
If there source code of demo examples of link above > I searched and did not find...
Thanks!
Well, you should find everything you need in the documentation of chart.js and vue-chart.js
http://www.chartjs.org/docs/latest/
http://vue-chartjs.org/#/home?id=resources
You can add rgb values as a background color to make them transparent.
You can also use gradients as its just a canvas element.
Here is a tutorial:
https://hackernoon.com/creating-stunning-charts-with-vue-js-and-chart-js-28af584adc0a?source=user_profile---------5----------------
Here is the source code of the vue-chartjs demo page:
https://github.com/apertureless/vue-chartjs-demo
(It's a bit outdated as with v3 the creation of chart components changed a bit)
It seems you did not filled the labels correctly.
{
labels: ['Here', 'are', 'your', 'x-axis', 'labels'],
datasets: [
{
label: 'artist 1',
backgroundColor: 'rgba(75, 192, 192, 0.2)',
data: [0, 1, 2, 3, 4],
},
{
label: 'artist 2',
backgroundColor: 'rgba(255, 99, 132, 0.2)',
data: [0, 1, 2, 3, 4],
},
],
}

Google Charts multiple colors in axis title

Is there any way to set multiple colors in an axis title in google charts? Through the charts options or jQuery?
For instance, I have this graph:
I set the Orange Y-axis title to orange with {title:'Orange', minValue: 0, titleTextStyle:{color: 'orange'}}. I would like to set the other Y-axis title so that green is the color green and blue is the color blue. Seems simple but is it possible?
You can just fix it like this:
hAxis: {title: 'Date de Prélévement',titleTextStyle:{color: '#FFF'}, textStyle: {color: '#FFF' , fontSize: 10} },
vAxis: {title: 'Heures de sommeil',titleTextStyle:{color: '#FFF'}, textStyle: {color: '#FFF' , fontSize: 10} },