# weightScale

Word cloud: weight→fontSize curve — `linear` (default) / `sqrt` / `log`.

Canonical: https://chart.syidax.com/docs/options/weightScale/

<a id="definition"></a>

## Definition

| Item | Value |
| --- | --- |
| JavaScript property | `weightScale` |
| HTML attribute | `weight-scale` |
| Type | `WordCloudWeightScale` |
| Default | `undefined` |
| Allowed values | `linear`, `sqrt`, `log` |

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

- [WordCloudWeightScale](https://chart.syidax.com/docs/types/WordCloudWeightScale.md) — Type definition

<a id="example"></a>

## Configuration example

```javascript
// Register sy-word-cloud and create the element before configuring it.
chart.weightScale = "sqrt";
```

- [Word Cloud · Complete examples and API](https://chart.syidax.com/docs/components/word-cloud.md)

<a id="related"></a>

## Related documentation

A property with the same name may have different types and defaults across charts. When using a direct tag, follow that chart's documentation below.

- [Shared facade and direct tags](https://chart.syidax.com/docs/concepts.md)
- [sy-word-cloud](https://chart.syidax.com/docs/components/word-cloud.md#property-weightScale)
