I'd like to use a part of d3 server-side in a Meteor app. Specifically, d3's CSV utilities. However, the package.js file only provides d3 to clients.
Does it make sense to use the d3 CSV utilities server-side? If yes, what's the canonical way to make this happen?
Crossposted on forums.meteor.com here.
You can make your own package or just download and drop the d3.js into your project in a way that makes it accessible server side, as in don't put it in the client or public directories.
You could give D3-Node a try. https://github.com/bradoyler/d3-node
Related
I want to use a chart package to create a chart using real time data from my database. I tried a package.The link i am providing bellow.But i am not successful.Can anyone provide me a full tutorial about this ?
https://charts.erik.cat/getting_started.html#screenshots
If you want to use charts in your laravel app, I believe you will need to do this in blade view (frontend)
Here are very good JS chat libraries with good documentation
I am currently using
https://www.chartjs.org/
Another good one
http://morrisjs.github.io/morris.js/
Chart solely for laravel http://lavacharts.com
Check these examples on adminlte
https://adminlte.io/themes/AdminLTE/pages/charts/chartjs.html
Another thing, you will need to learn how to use their API. This is universal, everyone has to learn. However, there are a lot of examples you could extract and use as a baseline.
Hope This helped you.
All:
I am pretty new to React and Redux, what I am trying to build is a linechart (currently with D3.js).
The general UI structure of linechart is :
Main linechart area: several lines and X-Axis(date), Y-Axis(value),
Legend area: text label(with according color according to line)
I wonder could anyone give me ANY example with explaination how to implement this in React+Redux?
My currently confuse mainly is about two things:
How do I plan the container components and presentational components(from Redux tutorial, it seems that I need to build a lot of container components to wrap every presentational components which make things compilicated)
How to implement the initial start up of App(like what is the best way to do AJAX to get initial data and rendering, from Redux, it talks something like middleware, but I just can not get why and how to use that)
Thanks
My advice would be to keep it simple and add tools to your toolbox when you need the extra features and understand the implications.
I would advise you to only use React for now and try and see how far you can get without all the fancy React ecosystem features. It gets very frustrating if you don't have a clear understanding of how React works. Once you get familiar with React, you can look at Flux-like implementations like Redux and the problems they might solve for you.
If you choose this route, you can use your favorite ajax library (e.g. fetch) to get remote data into your components. You can do this fetching using the different component lifecycles that React provides (see https://facebook.github.io/react/docs/component-specs.html).
I already have previously made charts with D3.js that I'm trying to transfer into Meteor, but it's not working at the moment.
I placed the D3 code in the helper and then render it in HTML via the {{helper}} syntax. I tried placing it in the onRendered and onCreated spaces, but not sure how that would be transferred to the HTML itself.
Any help on how to render these graphs on Meteor would be appreciated.
I use c3 package instead of d3. It's easier.
I made an iOS app that has my favorite quotes in it by category. I wanted to turn this into a dashboard widget that notifies me of a quote of the day. I've never made a dashboard widget and only read the hello world example on apple site.
Can anyone suggest a good tutorial or help me understand the following:
What is the best way to take my SQLite database of quotes and make it available through a dashboard widget?
Thank you.
Dashboard is, like, really old... it has the look of a technology that's barely clinging to life support.
But if you want to fool around with it anyway, the way to access SQLite from a widget would be to implement a native widget plug-in that uses the SQLite library, exposing methods that your widget JavaScript code can call to fetch the info you need.
Or, as you seem to have done, repackage the data in a different form that you can access more conveniently from widget JavaScript.
I ended up using NerdTools and implemented an awk script to pull a random quote from a text file on my computer. So this was solved a different way.
I would like to create a mysql form for comments and display them as well in html.
I am able to use the MySQL package to read out data in the terminal but am struggling to output on the html/template engine any pointers welcome.
If I understand your question correctly, you are looking for a way to create dynamic webpages that have user input. You are going to need to learn some HTML/CSS to make it look nice (Even if you do use templates you can find online).
In terms of generating the dynamic content, Golang provides a builtin templating library [http://golang.org/pkg/text/template/]. Or if you like, you can look into other templating languages like Mustache or Handlebars, which have libraries in Go if you want to go that route.
For collecting user input, you're going to want to create a form that POSTs the data to a particular endpoint of your server. In making your server, I would look into both Golang's net/http package, which is fully featured, or you could look into Gorilla, another Go library that has a lot of nice features for making more powerful webapps and such.
A couple resources for you to check out:
https://golang.org/doc/articles/wiki/
http://www.gorillatoolkit.org/
Hope this helps!
Thanks I have understanding to do this with php and html I'm just trying to translate over too go Lang for the submitting and rendering out from mysql. I will look at creating a simple go form using the template engine.