/**
 * Set Chart element display style.
 *
 * @param string $value Chart display value.
 *
 * @return self Returns instance of the Chart element class.
 *
 * @access public
 */
public function d(string $value): self

Examples

Set Chart element display using fluent interface

use function Thermage\chart;
use function Thermage\render;

// ...

$data = [
    'apple' => [
        'label' => 'Apple',
        'value' => 100,
        'color' => 'red',
    ],
    'orange' => [
        'label' => 'Orange',
        'value' => 270,
        'color' => 'orange',
    ],
    'lime' => [
        'label' => 'Lime',
        'value' => 220,
        'color' => 'green',
    ],
];

render (
    chart()
        ->data($data)
        ->horizontal()
        ->showPercents()
        ->showValues()
        ->dBlock()
);

render (
    chart()
        ->data($data)
        ->inline()
        ->showPercents()
        ->showValues()
        ->dBlock()
);
Terminal
$ php thermage.php
Apple17% (100)
Orange46% (270)
Lime37% (220)


Apple 17% (100) Orange 46% (270) Lime 37% (220)

By default Chart element display state is block, but you can change it to none.