Home › forums › Using CanvasJS › How to view chart on button click in yii2
Tagged: canvasjs, partialview, yii2
I am trying to render chart using canvasjs. I am working on yii2. I am following an if..else condition and on the basis of it I am trying to render the chart. The chart view is a partial view which should only be seen when a particular condition is true. The condition is dependent upon the user’s choice that what he wants to see. The user will press the query button and then that condition will be checked and when the condition is true I am trying to render that partial view in which I have added my chart code. Can anyone please help me it that?
if($type == "403")
$columns = [
['class' => 'yii\grid\SerialColumn'],
'dataProvider' => $dataProvider,
Can you kindly create a sample project and share it with us over Google-Drive or OneDrive along with sample data so that we can look into your code, understand your scenario better and help you out?
You must be logged in to reply to this topic.