Is it possible to add clustering to graphics layer in version 4.27 ?
featureReduction props is not available in the docs also.
Is it possible to have clustering if it has only points geometry in graphics layer ? i know Polygon and Line string is not supported
What you can do is create a feature layer client-side and add your graphics to it. Instead of specifying a URL to a feature layer or referencing a portal item, like you typically do. You can create a feature layer with a collection of graphics as the source, also you'll want to specify the geometryType and any fields you'll be using. Then you'll be able to apply the featureReduction properties. If you need to add more features to it you'd just use the applyEdits function. Here is a snippet from the SDK documentation.
const layer = new FeatureLayer({
source: graphics,
fields: [{
name: "ObjectID",
alias: "ObjectID",
type: "oid"
}, {
name: "place",
alias: "Place",
type: "string"
}],
objectIdField: "ObjectID",
geometryType: "point"
});
Better yet here is a sample:
https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-collection/