19 declare(strict_types=1);
30 class Bar implements C\Chart\Bar\Bar
52 public function __construct(
string $title,
Dataset $dataset, array $bar_configs = [], array $group_configs = [])
56 throw new \LogicException(
57 "Dataset must not be empty." 64 throw new \InvalidArgumentException(
65 "Expected parameter to be a CardinalDimension or RangeDimension." 101 $clone = clone $this;
113 $clone = clone $this;
125 $clone = clone $this;
137 $clone = clone $this;
149 if (!in_array($legend_position, self::ALLOWED_POSITIONS)) {
150 throw new \InvalidArgumentException(
151 "Position must be 'bottom', 'top', 'left' or 'right'." 154 $clone = clone $this;
166 $clone = clone $this;
withTitleVisible(bool $title_visible)
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
withGroupConfigs(array $group_configs)
withLegendVisible(bool $legend_visible)
__construct(string $title, Dataset $dataset, array $bar_configs=[], array $group_configs=[])
withBarConfigs(array $bar_configs)
withDataset(Dataset $dataset)
withLegendPosition(string $legend_position)
withTooltipsVisible(bool $tooltips_visible)