Closed aagge closed 7 years ago
@aagge do you mind trying with this?
<?= ChartJs::widget([
'type' => 'line',
'options' => [
'height' => 400,
'width' => 400
],
datasets:
[
{
label:
"My First dataset",
backgroundColor: "rgba(179,181,198,0.2)",
borderColor: "rgba(179,181,198,1)",
pointBackgroundColor: "rgba(179,181,198,1)",
pointBorderColor: "#fff",
pointHoverBackgroundColor: "#fff",
pointHoverBorderColor: "rgba(179,181,198,1)",
data: [65, 59, 90, 81, 56, 55, 40]
},
{
label:
"My Second dataset",
backgroundColor: "rgba(255,99,132,0.2)",
borderColor: "rgba(255,99,132,1)",
pointBackgroundColor: "rgba(255,99,132,1)",
pointBorderColor: "#fff",
pointHoverBackgroundColor: "#fff",
pointHoverBorderColor: "rgba(255,99,132,1)",
data: [28, 48, 40, 19, 96, 27, 100]
}
]
]);
?>
Also, what is the chrome development console shows? any issues there?
When using my original code I get the following:
Also the code you sent to my has a syntax error by datasets.
@aagge thats strange... what version are you using?
@aagge use this https://github.com/2amigos/yii2-chartjs-widget/issues/22#issuecomment-264306591
My code was simply copy paste from JS.
I have the same issue today, after composer update. I solve the problem change type value to lower case like this: 'type' => 'Line'
to 'type' => 'line'
Hi,
My chart is not showing on my view screen. There is a space where the chart should show but it doesn't.
In my script I also have a Highchart chart working.