You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By using the [`position`](../api/chart/titleSettings/#position) property in [`titleStyle`](../api/chart/#titlestyle), you can position the [`title`](../api/chart/#title-string) at left, right, top or bottom of the chart. The title is positioned at the top of the chart, by default.
377
-
378
-
{% if page.publishingplatform == "typescript" %}
379
-
380
-
{% tabs %}
381
-
{% highlight ts tabtitle="index.ts" %}
382
-
{% include code-snippet/chart/chart-appearance-cs21/index.ts %}
383
-
{% endhighlight %}
384
-
{% highlight html tabtitle="index.html" %}
385
-
{% include code-snippet/chart/chart-appearance-cs21/index.html %}
The custom option helps you to position the title anywhere in the chart using [`x`](../api/chart/titleSettings/#x) and [`y`](../api/chart/titleSettings/#y) coordinates.
406
-
407
-
{% if page.publishingplatform == "typescript" %}
408
-
409
-
{% tabs %}
410
-
{% highlight ts tabtitle="index.ts" %}
411
-
{% include code-snippet/chart/chart-appearance-cs22/index.ts %}
412
-
{% endhighlight %}
413
-
{% highlight html tabtitle="index.html" %}
414
-
{% include code-snippet/chart/chart-appearance-cs22/index.html %}
The `textStyle` property of chart title provides options to customize the `size`, `color`, `fontFamily`, `fontWeight`, `fontStyle`, `opacity`, `textAlignment` and `textOverflow`.
468
-
469
-
{% if page.publishingplatform == "typescript" %}
470
-
471
-
{% tabs %}
472
-
{% highlight ts tabtitle="index.ts" %}
473
-
{% include code-snippet/chart/getting-started-cs1/index.ts %}
474
-
{% endhighlight %}
475
-
{% highlight html tabtitle="index.html" %}
476
-
{% include code-snippet/chart/getting-started-cs1/index.html %}
The `lastValueLabel` in a chart allows you to easily display the value of the last data point in a series. This feature provides an intuitive way to highlight the most recent or last data value in a series on your chart.
357
+
358
+
### Enable last value label
359
+
360
+
To show the last value label, make sure the `enable` property inside the `lastValueLabel` settings is set to `true` within the series configuration.
361
+
362
+
{% if page.publishingplatform == "typescript" %}
363
+
364
+
{% tabs %}
365
+
{% highlight ts tabtitle="index.ts" %}
366
+
{% include code-snippet/chart/last-value-label/index.ts %}
367
+
{% endhighlight %}
368
+
{% highlight html tabtitle="index.html" %}
369
+
{% include code-snippet/chart/last-value-label/index.html %}
>Note: To use the last value label feature, we need to inject `LastValueLabel` module using Chart.Inject(LastValueLabel).
390
+
391
+
### Customization
392
+
393
+
The appearance of the last value label can be customized using style properties such as `font`, `background`, `border`, `dashArray`, `lineWidth`, `lineColor`, `rx`, and `ry` in the lastValueLabel property of the chart series. These settings allow you to tailor the label’s look to align with your desired visual presentation.
394
+
395
+
{% if page.publishingplatform == "typescript" %}
396
+
397
+
{% tabs %}
398
+
{% highlight ts tabtitle="index.ts" %}
399
+
{% include code-snippet/chart/last-value-label-customization/index.ts %}
400
+
{% endhighlight %}
401
+
{% highlight html tabtitle="index.html" %}
402
+
{% include code-snippet/chart/last-value-label-customization/index.html %}
0 commit comments