Comments (3)
did you mean?
$datatable = Lava::DataTable();
$datatable->addStringColumn('Label'); // this
$datatable->addNumberColumn('Total'); // and this
foreach($records as $key => $item){
$datatable->addRow([$key, $item]);
}
from lavacharts.
actually.... I hacked together your example and it seems that maybe the serialization of the options is losing the 0
index...
In:
[
'title' => $title,
'height' => 500,
'chartArea' => [
'top' => 35,
'bottom' => 100,
'height' => '100%',
],
'vAxis' => [
'format' => '0'
],
'titlePosition' => 'none',
'legend' => [
'position' => 'bottom'
],
'trendlines' => [
0 => [
'type' => 'exponential',
'color' => 'green',
'pointsVisible' => true,
'pointSize' => 3,
'lineWidth' => 10
]
]
]
Out:
{
"title": "Title!",
"height": 500,
"chartArea": {
"top": 35,
"bottom": 100,
"height": "100%"
},
"vAxis": {
"format": "0"
},
"titlePosition": "none",
"legend": {
"position": "bottom"
},
"trendlines": [
{
"type": "exponential",
"color": "green",
"pointsVisible": true,
"pointSize": 3,
"lineWidth": 10
}
]
}
from lavacharts.
I think you need to have the X
axis as a date/datetime column and use the second for the data. I was able to create a trendline loosely based on what you gave me...
from lavacharts.
Related Issues (20)
- Cannot read property isHtml of null, Unspecified chart type HOT 9
- lavacharts.com is down HOT 15
- Chart to wkhtmltopdf not working HOT 4
- Piecharts have stopped working HOT 1
- Google Charts version "current" is breaking things HOT 4
- Use of <script type="text/javascript"> not right according to validator.w3.org HOT 1
- How to use addTimeOfDayColumn method? HOT 2
- Khill\Lavacharts\Exceptions\InvalidStringValue: Invalid argument, must be a non-empty string
- while installing on ide-helper:generate an error occurs HOT 1
- Refused to load the script 'https://www.gstatic.com/charts/loader.js' because it violates the following Content Security Policy HOT 1
- Adding data descriptions on the X axis HOT 1
- OrgChart is included but not enabled. Why? HOT 1
- Cannot read property 'style' of null× HOT 3
- Dashboard / ChartWrapper missing functionality HOT 1
- Call to undefined method Khill\Lavacharts\DataTables\DataTable::DataTabe()
- OrgChart.php references trait "PngOutputTrait" instead of "PngRenderableTrait"
- Event is not defined
- Undefined type "Lava" error
- is this chart package still compatible with Laravel version 10? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lavacharts.