Home forums Chart Support How to view chart on button click in yii2

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #29059

    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'],
    
                'Device_ID',
                'Customer_ID',
                'MSN',
                'kWh',
                'Data_Date_Time',
    
            ];
            $this->render('_kwhChart', [
                'dataProvider' => $dataProvider,
            ]) ;
        }
    #29089

    @fasi,

    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?

    —-
    Manoj Mohan
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.