Objective

This is the official documentation of the forestadmin/laravel-forestadmin v2+ and forestadmin/symfony-forestadmin PHP agents.

Objective Charts are very similar to Value Charts, the only difference being that two numbers should be provided to the resultBuilder: the value and the objective.

use ForestAdmin\AgentPHP\DatasourceCustomizer\Context\AgentCustomizationContext;
use ForestAdmin\AgentPHP\DatasourceCustomizer\Decorators\Chart\ResultBuilder;

$forestAgent->addChart(
    'companiesLive',
    fn(AgentCustomizationContext $context, ResultBuilder $resultBuilder) => $resultBuilder->objective(235, 300)
);

Last updated