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
Related
I want to plot bars composed of a small but variable number of colored regions, with the same (three) colors appearing multiple times per bar. I'm aware of stacked bar charts in chart.js, but this uses the same number of colored regions (datasets) for each bar. Hacking it to plot a bunch of zero-length datasets to get the right number of colored regions in each bar feels wrong. That said, the tooltips, etc. in chart.js are nice, so if there's no more natural solution, maybe zero-length datasets are the way to go. Any thoughts?
So, instead of using chart.js, I think I'll use d3.js. Won't be hard to just plot the individual rectangles using d3.
For reference, an example that only has one bar per entry, but won't be hard to extend is the horizontal barplot shown here. (There's a simple intro to d3.js on the same site.)
I want to display the labels and datasets of pie & doughnut charts on their sides. I searched for many options on the internet including stackoverflow, but couldn't find a relative solution for my case. Maybe I missed something.
Now I have:
I need to display the chart data on its side like this: (For my pie and doughnut charts above)
First of all, I dont see any bar chart here. Second, what library are you using for making charts? If you couldn't find proper option to display label in that library, I can recommend you to use Amcharts, its more flexible. Let me know if you get your desired results
I am new to JavaScript and d3.
My requirement is to draw grouped category bar chart. Initially, I didn't know how to take domain and range for grouped bar chart. However with the help of this post, I am able to draw grouped category bar chart of different levels.
My challenge now is to display tool tip when mouse hovers over the bars. Can anyone please suggest how to display the tool tip for the above bar chart?
I also tried following this guide, but have had no success.
You may want to try foxToolTip.js
https://github.com/MichaelRFox/foxToolTip.js
Read the README.md and check out the bl.ock in the d3.js section.
I couldn't find any jquery library that can plot 2 dimensional bar charts (if i name it true). I want to plot a graph like this;
As you can see there are 2 variable for each bar. Width and height. But i can only change height of the bar charts in every library i tried.
I want to give 2 interval for each variable and plot a rectangle.
Can you help me to find a library that can plot it or share some information about it?
Thank you.
I found the answer with luck. It is called Marimekko graphs and you can plot it with this javascript library.
http://www.mekkographics.com/free-trial/ or
http://www.fusioncharts.com/charts/marimekko_2/
It solves many problems to know its name. You can search for marimekko charts. Also there are lots of free codes in internet like;
http://bl.ocks.org/mbostock/1005090
https://gist.github.com/mbostock/1005090
d3.js how do I add text to Marimekko chart
http://www.jqplot.com/deploy/dist/examples/mekkoCharts.html
Looking through the documentation for Highstocks, I found this example:
Shown here is two series on the same chart, therefore with a linked range selector - this is really really useful, but I wish to display something different which is proving to be very difficult.
What I'm looking for is a normal line graph on the top series, representing data plotted onto time (almost like in this example), but a bar chart or horizontal candle chart in the lower graph, representing one or more timelines.
I've drawn an image of what I'm looking for:
I apologise for the crude drawing, but hopefully it shows what I am aiming to achieve: standard graph on top, bar/candle on bottom.
I have attempted various techniques to render this, but I can't find a way to have both series drawn on the same timescale, linked with the same range selector.
In case it helps, here's a starting point on JSFiddle, with all the unnecessary code removed: http://jsfiddle.net/g105b/8JhXv/
and a link to the original demo: http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/stock/demo/candlestick-and-volume/
Answer taken from official Highcharts forum
it is possible, but with some limitations. In the fact you want to show gantt chart. Bar charts aren't possible in your case - bar chart = inverted whole chart (yAxis becames xAxis, etc). Instead take a look at example for gantt chart: http://jsfiddle.net/highcharts/r6emu/
You can combine them into one, ane effect: http://jsfiddle.net/8JhXv/1/
About limits:
tooltip fo bottom chart is availabe only when you mouseover start and end date
bars are on lines, not between them