Skip to content
This repository was archived by the owner on Dec 21, 2019. It is now read-only.
This repository was archived by the owner on Dec 21, 2019. It is now read-only.

Otions are not working #4

@ravikanthhtnakivar

Description

@ravikanthhtnakivar

I want to create area chart with dual y-axis with below following code.But it will return the chart with only one y-axis

$total_trans_sales_chart = array(
'labels' => array(
array('string' => 'Sample'),
array('number' => 'Total Transactions'),
array('number' => 'Total Amount')
),
'data' => array(),
'options' => array(
'vAxes' => array(
array('viewWindowMode' => 'explicit' , 'viewWindow' => array('max' => 500, 'min' => 10), 'gridlines' => array('color' => 'transparent')),
array('gridlines' => array('color' => 'transparent'))
),
'series' => array(array('targetAxisIndex' => 0),array('targetAxisIndex' => 1)),
'colors' => array('yellow', 'blue'),
'chartArea' => array('left' => 100, 'top' => 100, 'width' => 100, 'height' => 100),
),
'title' => 'Total Transactions and Sales',
'type' => 'area'
);
foreach($transaction_details as $key => $transaction){
$total_trans_sales_chart['data'][$key][0] = $this->getStartAndEndDateByWeekNumber($transaction[0]['type']);//$transaction[0]['type'];
$total_trans_sales_chart['data'][$key][1] = $transaction[0]['total'];
$total_trans_sales_chart['data'][$key][2] = $transaction[0]['total_sum'];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions