@extends('admin.layout')

@section('content')

    <div class="row">
        <div class="col-sm-12">
            <div class="ibox-content">
                <div class="row">
                    <div class="col-md-10 col-md-offset-2">
                        <div class="row" style="font-weight: 600">

                            <div class="col-md-3">{{$newgoods->comments_field_1}} <span style="color: orange">{{$comments_field_1['field']}}</span></div>
                            <div class="col-md-3">{{$newgoods->comments_field_2}} <span style="color: orange">{{$comments_field_2['field']}}</span></div>
                            <div class="col-md-3">{{$newgoods->comments_field_3}} <span style="color: orange">{{$comments_field_3['field']}}</span></div>
                            <div class="col-md-3">{{$newgoods->comments_field_4}} <span style="color: orange">{{$comments_field_4['field']}}</span></div>
                        </div>
                    </div>
                </div>

                <div class="row" style="margin-top: 50px">
                    <div class="col-md-8 col-md-offset-2" >
                        <div class="flot-chart">
                            <div class="flot-chart-content" id="flot-bar-chart"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="/base/js/plugins/flot/jquery.flot.js"></script>
    <script src="/base/js/plugins/flot/jquery.flot.tooltip.min.js"></script>
    <script src="/base/js/plugins/flot/jquery.flot.resize.js"></script>
    <script src="/base/js/plugins/flot/jquery.flot.pie.js"></script>
    <script>
        $(function () {
            var e = {
                series: {bars: {show: !0, barWidth: .2, fill: !0, fillColor: {colors: [{opacity: .8}, {opacity: .8}]}}},
                bars: {
                    align: "center",
                    barWidth: 0.2
                },
                xaxis: {tickDecimals: 0, ticks: [[1, '{{$newgoods->comments_field_1}}'], [2, '{{$newgoods->comments_field_2}}'], [3, '{{$newgoods->comments_field_3}}'], [4, '{{$newgoods->comments_field_4}}']]},
                colors: ["#1ab394"],
                grid: {color: "#999999", hoverable: !0, clickable: !0, tickColor: "#D4D4D4", borderWidth: 0},
                legend: {show: !1},
                tooltip: !0,
                tooltipOpts: {content: ""}
            }, o = {label: "bar", data: [[1, {{$comments_field_1['field']}}], [2, {{$comments_field_2['field']}}], [3, {{$comments_field_3['field']}}], [4, {{$comments_field_4['field']}}]]};
            $.plot($("#flot-bar-chart"), [o], e)
        })
    </script>
@endsection