Javascript Charting - Stacked Bar-Chart + Tree Chart combined - javascript

So I'm working on a project that requires me to graph the cummulative amount of days a certain record has spent in each of it's life cycle stages. The tricky part is, the relationship between parent and child records cause the data to branch out like a tree as one moves through the process. I'm trying to figure out the best chart type to visualize this data. Currently I have the parent and child records in separate charts, both stacked bar charts. Is there a way to make a chart that works like a stacked bar chart for it's pieces but grows like a tree as a whole? See diagrams below. In a sense, it is a an overly complicated Gantt Chart where each record is a sub-project.
Current
Desired

Related

Javascript discontinuous stacked bar graph

I am trying to plot daily tasks in what i would describe as a discontinuous stacked bar graph. Another description would be a vertical gantt chart of past events.
If the description is lacking, the result i want is something like that shown in the image below (made in paint).
All task have a duration (from-to time) and can have different categories which results in different colours with belonging legends.
I have been playing around with two javascript plotting libraries; chart.js and plotly.js, and looking at others but i haven't found anything that can do what i want to achieve. Both chart.js and plotly have stacked bar graphs, but i see no way of getting spaces in between the bars and getting the legends right.
Do anyone have an idea if this is possible in any these two libraries? If not is there an alternative library where this can be done?
Regards

Best way of manipulating data in d3/Canvas JS?

I am working in visualization dashboard, I am facing few problems
I am quite confused with what to choose among d3js and canvasjs. Though d3js has rich functionality in terms of good visuals I prefer canvas because its easy to create charts, if you still have any ideas for me to proceed further in choose among these(d3js & canvasjs) please help it.
Purpose :
I want to create a interactive dashboard with lot of cross filters over the visuals any suggestion ?
The mode of data call from API; should I get the data completely from the server and work on the data in the java script or should I get data for each and every chart separately.
If I get the whole joined data from database the data size is too huge (more than 2 MB) for a dashboard and if i get a precise data for the specific chart its less. An example might help for better understanding.
Consider I have data for sales view which contains multiple columns joined from different table and my dashboard has 4 charts
chart 1: Bar chart for sales by item group
chart 2: Pie chart for sales by sales person
chart 3: Line Graph showing the sales by hours (week days): trend of the sales at the shop
chart 4: Total Sales, Total Orders KPI
Data Collection : I can get data for each and every charts separately by REST API which will only contain data for that chart (or) I can get the data as a whole from the JOIN of the tables which will be huge (MORE than 2 MB, it grows as the sales grows).
Interactivity : As i click on the chart 1 (bar chart's) any item group the rest of the charts should get filtered according to the selected item group: (writing a filter js code will help, am curious about the preferred way)
Which method i should prefer for data obtaining and cross filtering.
Answering the above question will invoke more doubts
Thanks
CanvasJs is more of creating charts using canvas element of HTML5 and D3 uses svg. Which gives advantage to canvasJs over D3 as CanvasJs have quick response time, thus rendering is fast in CanvasJs. If you want quick response time and not much calculation/filters on data then you can go with CanvasJs.
D3 is more of filtering charts based on filters, which can be used in your case. And though you'll be dealing with sales data. You will be needing filters, so that once you apply filter to one chart the changes related to that filter should reflect to other charts. D3 uses crossfilters and has ability to filter out all the related information and render the other charts accordingly.
Canvas and D3 both support Arrays, Json and CSV formats.

Interactive BIRT Pie Chart with Drill down using Data Cube

I have 3 levels categories in which many items are divided.
Like in level 1 i have a pie chart.. if i click on any slice of that chart it should go to level 2 of that particular slice category and then again to the third level.
Everything should happen on same pie chart.
eg.. I have a pie chart which shows number of animals in 2 categories.. i.e. mammals and birds. If i click on mammals it should change pie chart to show number of mammals in herbivorous and carnivorous category.
I my real scenario i made a data set which has all the data through a query.
Then i made a data cube having 3 dimensions and a measuring count.
I displayed the 1st level on pie chart but i am unable to move to next level. New to BIRT i am.
And I don't need to jump from one report to other using hyperlinks to other report.. Everything is happening in same report.
I am using:
Actuate BIRT Designer Professional
Version: 4.4.0
This can be achieved by using a drill-through hyperlink. A drill-through does not necessarily jump to another report: it is definitely possible to drill to the same report, and set a report parameter controlling the dimension level.
A straight solution is to design three charts (one per level) based on the same datacube, and make use of a report parameter to keep only the chart of the current level. This allows to optimize chart views for each level: change the title, legends, chart type, font size etc.
There are a couple of ways to disable / enable a chart from a report parameter, the most efficient is to drop it by script in beforeFactory such below. Visit this topic
var design=reportContext.getDesignHandle();
if (params["level"].value!="1"){
design.findElement("chartLevel1").drop();
}
if (params["level"].value!="2"){
design.findElement("chartLevel2").drop();
}
if (params["level"].value!="3"){
design.findElement("chartLevel3").drop();
}

Linking dygraphs.js to d3 charts

I'm currently working on building a charting web application, and I've chosen dygraphs for my time series data (Two weeks of data at an hourly level, if anyone finds this information relevant). On the same page, I also have a couple of customized d3.js charts that pull metrics from the same database as the trendline.
I want to know if I will be able to link the selection on my dygraph line (Supposing I zoom in on 3 hours worth of data, i.e., 3 rows) - to my d3 charts, so that the data in the d3 charts also get filtered down to the date range chosen by zooming in?
I'm quite the amateur here, and apologize if my question seems vague, but any sense of direction would be helpful.
I'm guessing I should be able to do this by modifying some class in the dygraphs source code, or reference the same from my d3 chart.
Thanks.
You shouldn't have any trouble doing this. There's no need to modify the dygraphs source. You can implement handlers on the dygraph object (zoomHandler or drawCallback, most likely) which update the D3 chart.
See this demo for an example of synchronization between multiple dygraphs.

interaction between d3.js graph and dc.js graph

I am working on d3.js and dc.js libraries from few weeks. I have created scatter plot in d3.js and bar graph in dc.js. I want to know that is there possibility to interact between these two different graphs created in two different javascripts. In short, is it possible to interact between two different graphs created in d3.js and dc.js?
thank you.
Not going to give you the codes, sorry.
You'll want to use crossfilter as the bridge between the graphs, though:
create a dimension which is for the scatterplot (different from the dimensions used in the dc.js charts, but same crossfilter instance)
react to the interaction in d3 and set the filter on that dimension
Often when creating a dimension for a scatterplot, you will use a key that is unique for each row, or barring that, the row index itself. If you search around for dc.js scatterplot or bubblechart, you ought to find examples.
Also dc.js has a scatterplot now. It needs some love and is not as feature-rich as the bubble plot, but it exists.

Categories