draw a horizontal dashed line in Jfreechart gantt - jfreechart

Does any one know how it possible to move/draw dashed line at specific position in Gantt chart?
For example i have chart that look like this:
Link to image
and it hard to see where is tasks 1 bars and where task 2 bars and where task 3.
If it possible to draw horizontal lines not in line of 1,2,3 but after whole series to make clear visual separator.
Thanks

You probably want one of the org.jfree.chart.annotations such as CategoryLineAnnotation.

Related

Lightview chart histogram like Highcharts Stacked bar

Is there any way I can make a Lightview histogram chart with multiple values per data point, so that it looks like a Highchart stacked bar (https://www.highcharts.com/demo/bar-stacked)?
If not, is there a workaround?
I already overlay-ed two separate histograms, but that does not help, because both start at the bottom and depending on the values some points are hidden.
Unfortunately it's not possible to draw vertical histogram at the moment.

how to change thickness of two doughnut charts in chartjs

How can I change the thickness of two doughnut charts if one is nested inside the other.
Example: https://codesandbox.io/s/doughnut-chart-percentage-kqoi1?file=/src/App.tsx
I want to look it like this:
I've tried with the options 'cutout' and 'weight' and it works if I would have only one chart, but I can't change both to the same thickness.
I want to have both doughnuts as thin as in the picture.
You can define cutout: '90%' on both datasets.
cutout: The portion of the chart that is cut out of the middle. If string and ending with '%', percentage of the chart radius. number is considered to be pixels.
Please take a look on your amended Sandbox
Not sure why but I have to press the refresh button inside the Sandbox in order to have the chart drawn correctly. I guess, Sandbox is somehow remembering your original code after I forked it.

Create forest plot using JFreeChart

Does anyone have an example of how to render a forest plot using JFreeChart (or another Java-based open source charting library, but JFreeChart is preferred due to the integration with Jasper Reports)?
See https://en.wikipedia.org/wiki/Forest_plot for description of the forest plot.
I was thinking about hacking somethign together using a horizontal bar chart where left side of the axis is the categorical value, and right side is the range, but the problem is the data for a forest plot comes in a set of data like: category, min, max. Such as an odd ratio with a confidence interval that spans between -.1 to 1.2. The forrest plot would basically be a line drawn between -.1 and 1.2 with a diamond marker directly in the middle (around .55).
If anyone has experience on building this visualization in JFreeChart, it would be much appreciated!
While this is not supported directly in the current release, a reasonable facsimile should be possible. Instead of a bar chart, consider using a MinMaxCategoryRenderer having PlotOrientation.HORIZONTAL and custom icons, as shown here. Add a CategoryMarker or CategoryLineAnnotation with a dashed Stroke to the CategoryPlot for the centerline; add a CategoryItemLabelGenerator to handle the labels.

SSRS bar chart issue

I am trying to add one box and one line on x-axis. Please look at below bar chart.
I tried using stripline but I cannot set height for stripline. It goes till 100.
Is there any way I can do this?
Unfortunately, SSRS doesn't provide the functionality you're looking for. A stripline is the closest you can get to that, but like you said, you can't control its height. The only way you could simulate this behavior would be to use a Background Image for your stripline, but that may be more work than it's worth. It would require a lot of manual adjustment to get the image to line up on the chart.
I would add a series to the chart using the Stock chart (under Range). In the Series Properties I would set the High value to the height desired for your line (~52 in your example). Ideally this would come from a dataset value.
Set the Low, Open and Close values to 0.
Try two Stripe Lines. First, create the strip line which represents the vertical value you're after. In my case, I made one that was 50% of the graph height off of the Y-Axis.
Chart Properties:
Height of StripeLine:
Once the stripe line is the correct height for the chart, create a 'mask' stripe line along the X-axis that will cover the portion of the Y-axis line you want hidden.
Chart Propterites:
Width of Stripe Mask:
Using these methods, and some really clever expression writing, you should be able to make the line exactly as high, and as wide as you desire.

How to draw multiple charts on a single canvas with RGraph?

I'm trying to figure out how to draw multiple RGraph charts on a single canvas. Not overlapped charts, but, say, one chart under another. I'd prefer to do it this way (rather than have multiple canvases on the page) as should far easier to generate a png from a single canvas rather than try to stitch a bunch of pngs together.
Suggestions? Other approaches I may be missing?
There's an example of using one canvas to show multiple Gauge charts in the download archive called: demos/gauge-bank.html
and you can download the archive here:
https://www.rgraph.net/download.html
And here's a HOWTO showing a canvas again with three Gauge charts, not overlapping this time:
https://www.rgraph.net/canvas/howto-gauges.html
In the case of Bar charts or Line charts you would set a big left margin for one chart and a big right margin for the other chart, so each allows space for the other.

Resources