<div class="content-wrapper">

    <section class="content-header">
        <?=$this->partial('layout/breadcrumb')?>

        <h1 class="pull-right">
            <a href="<?=$this->url('goods');?>" class="btn btn-default btn-sm"><i class="fa fa-arrow-left"></i> <?=$this->translate('返回商品列表')?></a>
            <?=$this->HelpUrl('goodsPriceTrend')?>
        </h1>

    </section>

    <section class="content">
        <?=$this->partial('layout/messages'); ?>

        <div class="row">
            <div class="col-xs-12">
                <div class="box box-primary">
                    <div id="main" style="width: 100%;height: 400px;margin-top: 20px;"></div>
                </div>

            </div>
        </div>

    </section>
</div>

<script type="text/javascript">
    var myChart = echarts.init(document.getElementById('main'), 'shine');
    myChart.setOption({
        title: {
            text: '<?=$this->escapeHtml($this->goodsInfo->getGoodsName())?> <?=$this->translate('采购价格走势')?>'
        },
        tooltip: {},
        xAxis: {
            data: [<?=implode(',', $this->priceArray['date'])?>]
        },
        yAxis: {},
        series: [{
            name: '价格',
            type: 'bar',
            data: [<?=implode(',', $this->priceArray['price'])?>]
        }]
    });

    myChart.setOption(option);
</script>