how to pass dynamic value in highchart (bar chart/pie chart)
my code but not work
echo Highcharts::widget([
'scripts' => [
'modules/exporting',
'themes/grid-light',
],
'options' => [
'title' => [
'text' => 'Revenue Chart ',
],
'xAxis' => [
'categories' => $data1,
],
'labels' => [
'items' => [
[
'html' => 'Revenue chart',
'style' => [
'left' => '50px',
'top' => '18px',
'color' => new JsExpression('(Highcharts.theme && Highcharts.theme.textColor) || "black"'),
],
],
],
],
'series' => array(
array(
'type' => 'column',
'name' => 'Jane',
'data' => $listData,
),
),
],
]);
query ans:
list data
array
(
[1] => 10
[2] => 20
)
$data= show the month