I want to make a bar chart in JFreeChart that has a structure similar to the following:
As you can see, it starts with "Clay", then "Sand", then "Clay" again, and so on.
I did not find in the whole internet a similar chart for JFreeChart. Is there any possibility to do something like this in this tool?
Related
I would like to use JavaFX to assemble a line chart such that when there is no data to plot in a series, the space is empty. Something like that:
Chart
Notice that I would like to keep myself in the same series, just by changing your style in one part. But any help is welcome. Thank you.
How can I show chart shown in below image in my App? It is shown in Settings->Apps->Running. I tried Microcharts but it isn't possible using it. I want to show it for storage space. I know how to get the storage space values but don't know how to plot chart like in the image.
You mean a stacked bar diagram. It is possible with NumAndroidCharts Library, in this example they make a horizontal one. Maybe you are able to use it vertical as well:
https://www.numetriclabz.com/android-stacked-bar-chart-using-numandroidcharts-tutorial/
But i don't now if you can hide the X and Y coord description, so it would look like in your picture. Maybe it is easier for you to draw it on your own, the diagram are simple rectangles.
Update
Found the horinzontal one:
https://www.numetriclabz.com/android-horizontal-stacked-bar-using-numandroidcharts-tutotrial/
I want to draw a range column chart for my data, something similar to this.
Any suggestion?
GraphViz isn't suitable for this sort of chart - it draws graphs of the "nodes and edges" type, rather than this sort of style.
It looks like the "range column" chart is essentially a stacked bar chart with four elements in each stack, with the bottom element and third element drawn without borders and with a transparent fill. So, I'd suggest trying to use a conventional graphing library that gives enough flexibility of control over bar charts to produce what you want.
I'm not a UI person, so I'm hoping to get some suggestions for how to draw this in Swing. I want to end up with something like the figure below.
It's showing availability over time (time axis not shown in image, but it'd be at the bottom or top). The vertical bar represents the current time. I looked at libraries like JFreeChart, but I don't see anything that can easily be turned into this, or did I miss something? It's easy enough to draw something like this manually by overriding paint() in a JPanel or something, but I don't want to have to manually handle the collapsing/expanding logic over elements on the left. My next thought was maybe a JTree with custom cells where I could draw the availability bars. This way I won't have to deal with the collapse/expand logic.
Any suggestions? Is there a charting/graphing library I could use? Should I do it from scratch? Extend some existing Swing component?
Thanks
JFreeChart can do everything except the outline, for which I'd use outline and a suitable table cell renderer.
The term you are looking for is a "Gantt chart". JFreeChart does have a chart for that, but it's not interactive. There are some free Java library (e-gantt is one), but not in combination with a tree table (as far as I know).
So if that is required, you could build something of a tree table as suggested in the other answers or go with a commercial library (JGantt, Jide Gantt (disclaimer I worked on that one ;))
I am using JFreeChart in my java application.
Problem
I want to plot a XYAreaChart whose domain axis (x-axis) should scroll horizontally automatically when we start plotting the data.
I saw the same thing in TimeSeriesCharts but I don't want any timeSeriesChart. I just want the scrolling x-axis.
You'll need to create your own SlidingXYDataset that implements XYDataset in a manner similar to how SlidingCategoryDataset implements CategoryDataset.
Addendum: As noted in a comment, a typical implementation can be found here.