techcyclist/highstock 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

techcyclist/highstock

Composer 安装命令:

composer require techcyclist/highstock

包简介

Laravel Highstock Packages

README 文档

README

Total Downloads Latest Stable Version

Highstock Package for Laravel 5

Forked from Laravel Highcharts (julles/laravel-highcharts) and modified for Highstock.

Installation

Add Package to composer.json

composer require techcyclist/highstock:dev-master

Add provider to app.php:

Provider :

Techcyclist\Highstock\Provider::class,

then publish the config

php artisan vendor:publish

Usage

Your controller could look something like this:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Techcyclist\Highstock\Highstock;

class HighStockController extends Controller
{
    public function modelReturnsChart($data)
    {

        $stockchart = new Highstock();

        $modelreturnschart = $stockchart->chart([
                'type'     => 'line',
                'renderTo' => 'chartDiv',
            ])
            ->rangeSelector([
                'selected'  => 1,
            ])
            ->series(
                [
                    [
                        'name'  => 'New Chart',
                        'data'  => $data,
                        'tooltip'   => [
                            'valuedecimals' => 2,
                        ],
                    ],
                ]
            )
            ->title([
                'text' => 'New Chart',
            ])

            ->display();

        return $modelreturnschart;

    }

}

You could return to a view with the object, or do this in a view:

$highstockcontroller = new \App\Http\Controllers\HighStockController();
$modelreturnschart = $highstockcontroller->modelReturnsChart($data);

Finally, show the chart in the view:

<div id="chartDiv" style="height: 400px; min-width: 310px"></div>

{!! $modelreturnschart !!}

And you'll get a chart looking something like this:

Highstock Chart

License

https://mit-license.org/

统计信息

  • 总下载量: 3.24k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-03-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固