Currently, the below chart is being created using JFreeChart library. The code to generate the above image is as follows: However, even though, I set the plot as black color using: plot.getRenderer().setSeriesPaint(2,new Color(0, 0, 0) ); The graph always appears red. How do I change the color from red to black and how do I remove/hide the “square data points”,
Tag: charts
Creating a XYChart on button click
The purpose of the program is to display chart on click of the button with given parameters. However displayChart uses invokeAndWait, which cannot be executed inside ActionListener which makes sense. What is the proper way to solve this issue? I am using swing with XChart library Answer You have to create the frame and its content panel by yourself, note
Second Line in an Apache-POI chart with seperate axis
Hi this code taken from the answer here is working as expected, but I want exactly the same Chart but in an Excel-Sheet So I modified the code like this to get an XLSX document, but the Chart isn’t the same Answer The problem is that for a Word (XWPF) chart, the data are stored in a Excel workbook which
Create Java Apache POI Line Chart where Dates appear on the horizontal X-axis
I’m trying to create a simple line chart using the Java Apache POI which is essentially a time series, consisting of a Date and a numeric value: I would like for the dates to appear on the x-axis. However, this seems to be difficult to achieve. I can do it manually in Excel but not via the API. Answer This
JavaFX Use Chart Legend to toggle show/hide Series possible?
Is it possible to use a chart’s legend to toggle show/hide a series? I got a LineChart with a legend and there are too many Series so you can’t read out the information well. I was wondering if there is a possibility to use the legend to toggle the series to show/hide? Most of the names of my Series are
Create stylish charts in Java eg with JFreeChart
What’s the best way to create great looking charts in Java? It looks like the main option for charting is JFreeChart, but unfortunately by default they come out looking quite plain. Compare a sample of JFreeChart: http://www.jfree.org/jfreechart/images/PriceVolumeDemo1.png with one of the Javascript charting libraries, eg http://www.highcharts.com/demo/spline-symbols/grid or http://people.iola.dk/olau/flot/examples/graph-types.html The javascript ones look nicer – they have smooth lines, nice font