scopdrag / laravel-google-chart Goto Github PK
View Code? Open in Web Editor NEWThis package offers simple and easy integration of google charts with laravel
License: MIT License
This package offers simple and easy integration of google charts with laravel
License: MIT License
I used this package with a Laravel 5.8 application but now I want to upgrade to a newer version. Unfortunately the current version of laravel-google-chart is not updated since longer time and therefor gives an error on the dependency of the illuminate/support package.
I assume more people will encounter this issue. Are there any plans to upgrade the depencies?
My current implementation is a bit old, so I want to improve. I will not be the only one I assume
Perhaps it could be wise to validate all dependencies
My technical target context is Laravel 7 with php 7.3
I tried to add new chart - Column chart
also create blade file for that
below is my blade file code
but its generate Bar chart instead of Column chart
@include('LaravelGoogleChart::includes.package_loader')
<script type="text/javascript"> google.charts.setOnLoadCallback(function() { var data = google.visualization.arrayToDataTable({!!json_encode($data)!!}); var options = {!! json_encode($options) !!}; var material = new google.visualization.ColumnChart(document.getElementById('chart_{!! $id !!}')); material.draw(data, options); }); </script>Please help to how to add more google chart in this API,
Thanks,
Kaushik
Hello
Please help me how to add different types of controller in chart???
Thanks,
Kaushik
So I copied the candlestick example into my laravel project
this function is in my controller
public function show($id) {
$stock = Stock::find($id);
if(!$stock) {
Session::flash('message', 'The stock you requested could not be found.');
return redirect('/');
}
$rows = [
['Mon', 20, 28, 38, 45],
['Tue', 31, 38, 55, 66],
['Wed', 50, 55, 77, 80],
['Thu', 77, 77, 66, 50],
['Fri', 68, 66, 22, 15]
];
$options = [
'legend' => 'none'
];
$cols =[];
return view('stocks.show')->with([
'stock' => $stock,
'rows' => $rows,
'options' => $options,
'cols' => $cols,
]);
}
This is part of my view
<h1>{{ $stock->ticker }}</h1>
<a href='/stocks/{{ $stock->id }}'><img class='logo' src='{{ $stock->logo }}' alt='Logo for {{ $stock->ticker }}'></a>
<p>Company Website: {{ $stock->website }}</p>
<p>Added on: {{ $stock->created_at }}</p>
<p>Last updated: {{ $stock->updated_at }}</p>
{{!! ChartManager::setChartType('candlestick-chart')
->setOptions($options)
->setCols($cols)
->setRows($rows)
->render() !!}}
<a class='stockAction' href='/stocks/edit/{{ $stock->id }}'><i class='fa fa-pencil'></i></a>
<a class='stockAction' href='/stocks/{{ $stock->id }}/delete'><i class='fa fa-trash'></i></a>
</div>
Provide a detailed description of the change or addition you are proposing.
Make it clear if the issue is a bug, an enhancement or just a question.
The context is that this package doesn't seem to work after its installed.
I following the install directions and yet get this error.
Why is this change important to you? How would you use it?
How can it benefit other users?
Not obligatory, but suggest an idea for implementing addition or change.
Include as many relevant details about the environment you experienced the bug in and how to reproduce it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.