Is it possible to use normal html (Further Vue/React components) to send data to a Bokeh plot? - bokeh

I've been trying almost everything from Bokeh documentation and I don't know if this is possible.
What I want is to use regular html (input/textbox/table and later a Vue/React component) to get the data to be used by the bokeh server application, however I don't want to embed the bokeh and use http requests, I would like them to run together. Ideally selecting something on the Vue component, would fire a callback to my bokeh server on python, so it would update a plot. So far it seems to me it that this is only doable through Bokeh widgets.
Is there a way to do this?
Thanks

Related

Having problem with Next.js while adding additional script

Image
I'm working with next js for a digital agency website. There are several scripts that we should use in our next app. Firstly we tried to use script in _document.js file. Then we tried to create a component with those scripts and import it where it is needed. But unfortunately we failed in both cases. The scripts doesn't work. We also tried to use Script component from next. It’s also not working. But while we use those scripts directly to the component, as shown in the image, surprisingly it works. But we don’t want to use them every time with every components directly. We want to use it for one time but should work for every components that rendered. Is there any way to do this? I'm a new bee in this programing world. So I'm expecting help from my elders. Thanks in advance.
I'm trying to write those scripts for one time and expecting from them to do work for all the pages that rendered in the UI.

Displaying multiple feature modules that use router in the same view in Angular

I have an use case in which I need to have multiple modules loaded in the view at the same time. Thing is, each of those modules might be as simple as a component, or a complex Angular module with a router and everything. I guess you could call it a plugable framework.
The number of modules I have to show or who they are is dynamic (I'm getting them from a server).
My first idea is that it would be good for this case if the feature module's router wouldn't be a singleton with the main one and also if they wouldn't update the url completly.
Each of the feature module should be able to be launched as a stand-alone app if bootstrapped (therefore, I do need it to be able incorporate all Angular 4 features including the router).
I managed to get something working by playing with the router and with named router outlets (secondary routes) but not sure how good that is in the long run.
How should I approach this?
I am in the early stages of attacking a somewhat similar scenario. In my app, the UI is organized in panels that are designed to stand alone on smaller displays, or side by side on larger. I find this approach works well for my routes, as my app is designed to edit a complex, highly hiegraphical document with many inter-related sections. e.g. User follows link on list to open detail, new detail panel appears to right... follows link on detail to related node... etc.
The solution I'm noodling with now is attempting to use an ngrx store that interacts with the router (and router-store) to dynamically create panels based upon router data. Well, technically it does not create the panels, it only serves the data that tells a component what to create and render.
I know my situ is not exactly the same as yours, but perhaps there's something in my approach that may help you find usefull or at least thought provoking.

Share live graph from Graphite Server

I have a requirement to share live (timely updating) graphs from Graphite in form of a HTML tag (inline). I know that, Graphite provides a static URL, representing snapshot, of the graph.
How I can achieve this with Graphite? Is there any open-source plugin for this?
Thanks to all.
This could be achieved with a little bit of JavaScript and the default Graphite PNG output. If you're comfortable with JavaScript there are other frameworks (D3, Rickshaw, etc) that will automatically refresh the data but you'll have to perform the initial coding.

Best practices approach to multiple views in meteor?

Every tutorial/example i can find for meteor shows a single view application. I would like to build something a little more complex. I'm unclear how to approach multiple views...preferably in a way that's somewhat scalable?
The iron-router package lets you access different views (layouts) by nice, REST-ful human-friendly clean URLs. It supports parameters in the URL, "loading" templates, waiting for subscriptions to finish loading, before and after hooks etc.
At this point you can only create Single Page applications with Meteor. Note that Single Page, doesn't mean you can't have several views - use iron-router for that.
But by design, Meteor serves a big fat unique JavaScript/HTML/CSS application down to the browser, though there's a feature request to allow incremental loading. It is then up to the application (or more precisely, the JavaScript framework), to dynamically render its views in order to display different "pages".
I was wondering the same thing and it took me way too much time getting something started. I finally got a paged app working solidly by using Backbone views and routes, so I created a simple boilerplate project to make setting up an app like this easier in the future.
Live demo here: backbone-boilerplate.meteor.com
Source code here: github.com/justinmc/meteor-backbone-boilerplate
Have you looked at madewith.meteor.com?
A bunch of apps there have multiple views using Backbone also Jonathan Kingston who created britto has started simple meteor framework called Stellar
At this stage of the game not sure if there really are best practices. But these two seem to be the current flow.
You can also make a tabbed interface for multiple views. There is a package project "Smart package for generating a tabbed interface with pushState" github project here: https://github.com/possibilities/meteor-tabs
The best solution right now is using a routing package (router is basic but works). The workflow is something like this:
declare routes; return a template name for each route
place the reactive helper provided by the package in your body tag
the reactive helper will return the template associated to that route
you create a template for each route and optionally set custom publish functions
Router will give you browser history (client side).
Note that at this time there are some limitation on the way Meteor handles html/js. They are load all at the same time. The bright side is that once the app is loaded, page transitions will be instant.

Create graph in ASP based on the values from database

does anyone know how to create a bar/pie graph based on the value from database in ASP? For example, i would to create a graph based on the number of people who went for vacation in certain state..I would like to retrieve the value directly from database..need help..thanks..
You could check out Google Charts.
There are a number of great javascript libraries which can take datasets and convert them into graphs.
canvasgraph
flot
are two of the big ones. The plus of javascript is that the processing is done client side and you don't have to send over images, just JSON.
Dojo also works well, though documentation is a little scarce.
Microsoft's Office Web components (OWC11) also works on the server side, and it's fairly easy to use.
Third option is to use plain old HTML. Works well sometimes if you want a simple chart, like a horizontal bar chart. You can use a table, with div / span tags set to correct widths ad colors for the bars. Free, easy and requires no plugins of any kind to work.

Resources