Skip to content

Trendlines with ColumnChart doesn't work. #333

@DeeSouza

Description

@DeeSouza

What Version?

3.1

Issue

Trendlines with ColumnChart doens't work.

Controller Code (chart creation code)

$lavaChart = Lava::ColumnChart($idChart, $datatable, [
    'title' => $title,
    'height' => 500,
    'chartArea' => [
    	'top' => 35,
    	'bottom' => 100,
    	'height' => '100%',
    ],
    'vAxis' => [
    	'format' => '0'
    ],
    'titlePosition' => 'none',
    'legend' => [
        'position' => 'bottom'
    ],
    'trendlines' => [ 
    	0 => [
	    'type' => 'exponential',
            'color' => 'green',
            'pointsVisible' => true,
            'pointSize' => 3,
            'lineWidth' => 10
        ] 
    ]
]);

View Code

$datatable = Lava::DataTable();
$datatable->addStringColumn('Total');
$datatable->addNumberColumn('Label');

foreach($records as $key => $item){
     $datatable->addRow([$key, $item]);
}

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions