莫里斯图设计

时间:2014-08-14 09:30:06

标签: javascript graph morris.js

我最近购买了模板Centaurus,我想使用作为模板一部分的图形设计,但是当我使用带有Javascript的Morris时,它会破坏图形的颜色。

代码: JS:

<script>
$(function () {
    // Fuel per 100k data //
    var fuel_data = <?php echo $fuelData; ?>;
    Morris.Line({
      element: 'graph-line',
      hideHover: 'auto',
      data: fuel_data,
      xkey: 'date',
      xLabels: 'Date',
      ykeys: ['views'],
      labels: ['Views'],
      resize: true,
      lineColors: ['white'],
      pointFillColors: ['white'],

    });

  });
</script>

HTML:

<div class="graph" id="graph-line" style="max-height: 335px; position: relative; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">
                        </div>

想要的布局: The wanted layout http://oi59.tinypic.com/2lmp8id.jpg

目前的布局: The current layout http://oi58.tinypic.com/2rorqxz.jpg

正如你所看到的,我设法改变了线条和点颜色,但是没有改变标签和背线。

0 个答案:

没有答案