In Google Earth Engine i am trying to find scatter between elevation and occurrence but i am getting common number of array vectors
'''
var data=ee.Image("JRC/GSW1_3/GlobalSurfaceWater").clipToBoundsAndScale(geometry);
var dem=ee.Image("USGS/SRTMGL1_003").clipToBoundsAndScale(geometry);
var mask = data.select(['occurrence']).gt(0);
var data = data.updateMask(mask);
var dem = dem.updateMask(mask);
Map.addLayer(dem,'','dem');
Map.addLayer(data,'','data');
Map.addLayer(mask,'','Mask');
var pixelValsY = data.reduceRegion(
{reducer: ee.Reducer.toList(), geometry: geometry, scale: 30});
var pixelValsX = dem.reduceRegion(
{reducer: ee.Reducer.toList(), geometry: geometry, scale: 30});
var x = ee.List(pixelValsX.get('elevation'));
var y = ee.List(pixelValsY.get('occurrence'));
var chart = ui.Chart.array.values({array: y, axis: 0, xLabels: x});
print(chart);
'''
Erroe msg is 'Error generating chart: xLabels must be the same length as the 1-D vectors from the array.'
please help me out