Apex Charts
I have created a apex chart but i want to set gradient on alternate bar
only on golden bar
protected function getOptions(): array
{
return [
'chart' => [
'type' => 'bar',
'height' => 300,
'toolbar' => [
'show' => false,
],
],
'bar'=>[
'distributed'=> true
],
'series' => [
[
'name' => 'Total Members ',
'data' => [7, 20, 6, 10, 14, 7, 5, 9, 10, 15, 13, 18],
],
],
'plotOptions'=>[
'bar'=>[
'borderRadius' => 6,
'columnWidth'=>"14%",
'distributed'=> true,
]
],
'xaxis' => [
'categories' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
],
"grid"=>[
'show'=>false
],
'legend'=>[
'show'=>false
],
'dataLabels'=>[
'enabled'=>false
],
'colors' => ['#101828',"#9B7B0A"],
'fill' => [
'type' => 'gradient',
'gradient' => [
'shade'=> 'light',
'type' => 'vertical',
'shadeIntensity' => 0.1,
'opacityFrom' => 0.7,
'opacityTo' => 1,
'stops' => [0,50, 100],
],
],
];
}
4 Replies
#apex-charts
For plugin help please use the designated channel for the plugin
posted on that
solved!
thank you π