I've wrote below code for visualize precipitation changes over a year with ui.chart command in two different provinces.
var persiann = ee.ImageCollection('NOAA/PERSIANN-CDR')
.filterDate('2017-01-01', '2017-01-30');
var province1 = table2;
var province2 = table3;
var regions = ee.FeatureCollection([
ee.Feature(province1,{label : 'province1'}),
ee.Feature(province2,{label : 'province2'})]
);
var chart = ui.Chart.image.seriesByRegion(
persiann,regions,ee.Reducer.mean(),'precipitation',1000,
'system:time_start','label'
);
print(chart);
however it shows ERROR :
Error generating chart: Collection.geometry: Unable to use a collection in an algorithm that requires a feature or image. This may happen when trying to use a collection of collections where a collection of features is expected; use flatten, or map a function to convert inner collections to features. Use clipToCollection (instead of clip) to clip an image to a collection.