Comments (17)
If you could provide a gist for me, I'd be happy to take a look. I might have overlooked applying formats within the redraw method in lava.js
from lavacharts.
Okay check it out. I am focusing on the javascript function "drawSales()" which calls the "getAllStoresWeekSales()" function in the controller. The initial "getAllStoreSalesGraph()" function in the controller results in perfect formatting on the first draw.
https://gist.github.com/farr433/23a8b77febcf539976c9
from lavacharts.
hmmmmm, so I am seeing that the format blocks are added only on the first draw. When the you call the toJson() method on the datatable, the formats are not even included! You have found a bug I never thought to try and test. I will start looking into how to pass the formats along with the data and options so the lava.loadData() method can add them to the redraw.
from lavacharts.
You are awesome man, thanks for all of your hard work. I couldn't imagine testing a public package with all of weird combinations users would try!
from lavacharts.
So I got the formats to work on the ajax reload.... But broke the initial render in doing so. XD
I'm not guaranteeing a resolution tonight, or soon, as I am currently slammed at my real job, but I will keep working when I can.
from lavacharts.
Yeah no worries... I've got plenty of other things to work on in the meantime and wouldnt consider a "$" and "," formatting a high priority haha. Thanks again.
from lavacharts.
Actually, I think I got it. I'm going to push up a branch in a little bit with my fixes so you can test it in your app.
from lavacharts.
Yeah i have trouble walking away from a bug or unworking code too lol. Just let me know. I'll be up.
from lavacharts.
Alrighty, if you want to switch your composer dep to dev-master and give it an update, it should be working. If it does, then I'll bump the version and tag it for all to enjoy :)
from lavacharts.
I also noticed a couple of things that I'd like to point out:
When a chart is created, via Lava::ColumnChart or others, it is stored internally in the volcano class (get it?) so you don't have to return it. When using the blade extensions, it pulls the charts from the volcano, or when using the Lava::render() method. It doesn't hurt anything, but saves some typing.
/* No need to assign this var */ $column = Lava::ColumnChart();
/* No need to return */ return $column
Also, in your json returning ajax methods, you don't need to recreate the chart. You can just create the datatable, create the columns and rows, and return it with toJson()
.
(as I wrote that last senence, I just got the idea to add a method to clear the table. Then maybe you only have to define its structure once, and assign rows as need via different ajax methods.)
from lavacharts.
Ah yes, it applied the formatting very nicely now. I had to make one small modification to get it to work. I had to add a closing </script> tag after "@columnchart('weekSales', 'chart_div'). Yeah sometimes when my code isn't working as expected I get flustered and start spitting code out and then go back and clean things up once it all makes sense. Thanks for everything!
from lavacharts.
- closing script tag. The comments keep deleting it.
from lavacharts.
did this commit not fix it? I realized I accidentally deleted the closing script tag.
from lavacharts.
I'll re-update real quick and check. I might of grabbed it a little early.
from lavacharts.
This is what I have currently though
from lavacharts.
Ah, yup I'm good now. I grabbed in between you closing the post and the post about updating composer. Awesome man, I can't thank you enough!
from lavacharts.
hahaha, no worries, I was quite puzzled. Happy to help! :)
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
- Trendlines with ColumnChart doesn't work. HOT 3
- 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 2
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.