<div class="content-wrapper">

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

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

    </section>

    <section class="content">
        <?php echo $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: '<?php echo $this->escapeHtml($this->goodsInfo->getGoodsName()); ?> <?php echo $this->translate('采购价格走势'); ?>'
        },
        tooltip: {},
        xAxis: {
            data: [<?php echo implode(',', $this->priceArray['date']); ?>]
        },
        yAxis: {},
        series: [{
            name: '价格',
            type: 'bar',
            data: [<?php echo implode(',', $this->priceArray['price']); ?>]
        }]
    });

    myChart.setOption(option);
</script>