public function map(callable $mapDefinitionCallback) : ChartViewsDefiner
    {
        $chartDataSource = $this->tableSource->asChart($mapDefinitionCallback);

        return new ChartViewsDefiner($this->name, $this->callback, $chartDataSource);
    }
public function map(callable $mapDefinitionCallback) : ChartViewsDefiner
    {
        $chartDataSource = $this->tableSource->asChart($mapDefinitionCallback);

        return new ChartViewsDefiner($this->name, $this->callback, $chartDataSource);
    }
public function map ( callable $ mapDefinitionCallback ) : ChartViewsDefiner { $ chartDataSource = $ this -> tableSource -> asChart ( $ mapDefinitionCallback ) ; return new ChartViewsDefiner ( $ this -> name , $ this -> callback , $ chartDataSource ) ; }
Defines the structure of the chart and the data to load from the
table data source.

Example:
<code>
->map(function (ChartTableMapperDefinition $map) {
$map->structure(new LineChart(
$map->column('some.table-component')->toAxis(),
$map->column('some.other-component')->toAxis()
));
});
</code>

@param callable $mapDefinitionCallback

@return ChartViewsDefiner
Defines the structure of the chart and the data to load from the table data source .