Is it solvable to get line's values in chart.js? - javascript

I am relatively new at data visualization. I have a line chart, however I know only few points on chart, and these points are linked with Cubic interpolation. I have built a similar chart like that: https://www.chartjs.org/samples/latest/charts/line/interpolation-modes.html. My question is that, is it solvable to find the line's values, for example when x is 4.5? I haven't really found any information about my issue, so I thought maybe somebody dealt with similar task.
I am open for any other solutions and for any other Javascipt libraries.
Thank you very much!

Related

Javascript bar chart, where bar is split into triangles

I am having kinda a hard time to find a solution for a special type of bar chart.
The graph:
https://i.stack.imgur.com/wIHWz.png
After a long time of searching the web, I wasn't able to find a good solution for this. I was using chart.js and the first thing I tried was to fill a bar with .svg, but sadly it is possible to fill it only with pattern. Another thing I thought may work was to design my own bar via two separate stacked line graphs, but there I wasn't successful becouse of the dependency on xAxis (to create a triangle I would need three labels, and the result was still total ****).
I would really appreciate if anybody would be helpful and suggest an idea how to go around this as I am absoulutely out of ideas.

Creating a force directed graph in Babylon.js

I am attempting to create a force directed graph in my Babylon.js project and was wondering if anyone had suggestions as to how I should go about that. I am looking into the barycentric method and the Barnes-Hut method but am wondering if there are any simpler ways of doing so (such as how it is done in d3.js by typing d3.layout.force) or if I should continue on with one of those methods above. I need to add the nodes on top of a plane within a 3D area but the y values of the nodes will remain constant so it is more of a 2D problem.
I also looked into Springy (http://getspringy.com/) but I am not sure if it would be possible to implement that into Babylon.js due to the 3D nature of Babylon.
If anybody has a suggestion to solve this problem I would greatly appreciate it.
Thank you.
I would break this problem into multiple pieces.
Wrangle the data using an off-the-shelf algorithm into coordinates, then feed the coordinates into Babylon.
A really cheesy way to do it would be to let d3-force do its magic in a hidden SVG, then feed the graph data into Babylon.
Yes, it's a hack, but it would seem to be fast and easy!

Pivot with Markers as Muticolored Circles

I am trying to create in d3 a chart that looks like this:
I am not even sure what kind of chart this would be in D3. Its basically a bar chart, but each dot represents a unique entity. The color represents its score.
Any help or guidance would be appreciated. An example would be fantastic.
Technically speaking, this is a pictogram. Very easy to build in Tableau, as I see you did here, but not that easy with D3.
Have a look at this example (they provide the code) and see if you can understand how they did it:
http://nandayadav.github.io/nfldrafts_visualization/

Population pyramid in dc.js

I'd like to implement a population pyramid in dc.js.
The goal is to benefit from all advantages of dc.js in terms of integration of d3 & crossfilter (i.e. my population pyramid would interact with all the other dimensions of my viz. I have already seen pretty good examples in d3 (for instance here: Creating Population Pyramid with D3.js ) put I am looking for a solution within dc.js.
My dataset has columns for each age & sex group.
I was initially thinking of using a "one bar rowchart" for each of those groups, use exactly the same axis scale and bring them together in what could look like a population pyramid.
Though this approach seems like not the right one as I will not be able to have a "one bar row chart" (i.e. I will always get at least 2 bars in my rowchart.
Any hints, ideas, suggestions or examples would be really appreciated.
Thanks!
It might be easier to "simply" write a new graph type to dc. If you install dc.js from git and install grunt, you will be able to add a new pyramid graph in the src source file and get it into your dc.js
It's less scary that it sounds, have a look at existing graphs (rowchart or barchart are probably the closest to start for your own need).
Good luck and probably a good idea to join the dc mailing list, you might want to discuss the idea and get help if you get stuck somewhere

Using nvd3.js to draw a chart having stacked bar and line?

For the nvd3 library, I can find bar and line combo but not a Stacked bar and line combo. Actually i can't find any example done with other JavaScript library except for Google Visualization which I also try to avoid.
Any advise, sample code would be appreciated
Thank you
For all those searching for the nvd3 answer to this question in the future, I was able to do this using the code laid out in this discussion.
https://github.com/novus/nvd3/issues/341
Your best bet would be to turn to D3.js. NVD3 is a framework/wrapper for D3. D3 is super powerful. Just about anything you can imagine you can accomplish. I found that it sometimes comes with a bit of a steep learning curve - especially for things that are a bit out of the ordinary.
You can see from examples on their site that they have a lot of options. You will probably even be able to find the exact chart you're looking for. But going this route will require a bit more learning than what NVD3 requires.

Categories

Resources