Charts
A library for scientific charts in JavaFX.
This is still a work in development, but here are some of the charts being worked on so far.
The charts library can be found over at maven central
A library for scientific charts in JavaFX.
This is still a work in development, but here are some of the charts being worked on so far.
The charts library can be found over at maven central
No pressure Gerrit, I showed my coworkers some of your work. One of them has asked if creating a flow circle graph is doable. This is something that would be really killer for connection-driven flow problems (e.g. transportation, trade economics, etc).
What do you think?
via setting minValue or/and maxValue at axis, axis stays at the same range. but if drag the application window - it will be updated and apply new values
Hi Gerrit!
Could you please implement a SelectionEvent for the SankeyPlot chart (like you've done for the ArcChart) so that when the user clicks a on the chart connections (or endpoints) then the event would contain the in/out connection ?
Best regards and keep up the great work ! Carstein
Image a graph displaying some data from the last X days. Where some data is not available for whatever reason.
It would be great, if we could display a "broken" line etc. indicating the data point is actually missing instead of missing either a day or set the data to a zero value, so the line just drops to the bottom - which is not the same as "there is no data".
I propose to allow to set "empty" data items that specifically exist only to allow the graph to be incomplete.
Hi there (again) :D Thanks again for the quick implementation of issue #74 . I am very happy with it :)
I have one more wish, if that's not too much to ask for. I´d like to have another StringProperty on the chartitem (and another constructor). Heres why: i got some data that i want to show on the coxcombchart that has a very long name. i´d like to show a "succintly name" on the chart and on a label (where obviously would be enough space of showing it), the "long name".
Basically all i´d need is a stringproperty on the chartitem, a constructor so i can fill it and a getter for the new StringProperty.
The constructor should look something like this:
public ChartItem(String NAME, double VALUE, String LONGNAME, Color FILL)
"LONGNAME" might not be the best choice of name, but i think you get what i mean :D
this seems more like an feature request (for which I did not find the possibility).
enhancementHello Gerrit,
In the latest Release is a Bug.
In CirularPlot.java line 674: Connection connection = getConnection(item, outgoingItem); Is trying to get a Connection that should be there but returns null.
line 704: connection.setTooltipText(tooltipText); Is now trying to set the Tooltip for null.
The Problem is reproducible in the CircularPlotTest class by enabling the currently commented out Outgoings.
@Override public void init() {
// Setup Data
// Wahlberechtigte 61_500_000
PlotItem australia = new PlotItem("AUSTRALIA", 1_250_000, Color.rgb(255, 51, 51));
PlotItem india = new PlotItem("INDIA", 750_000, Color.rgb(255, 153, 51));
PlotItem china = new PlotItem("CHINA", 920_000, Color.rgb(255, 255, 51));
PlotItem japan = new PlotItem("JAPAN", 1_060_000, Color.rgb(153, 255, 51));
PlotItem thailand = new PlotItem("THAILAND", 720_000, Color.rgb(51, 255, 51));
PlotItem singapore = new PlotItem("SINGAPORE", 800_000, Color.rgb(51, 255, 153));
// Travel flow
australia.addToOutgoing(india, 150_000);
australia.addToOutgoing(china, 90_000);
australia.addToOutgoing(japan, 180_000);
australia.addToOutgoing(thailand, 15_000);
australia.addToOutgoing(singapore, 10_000);
japan.addToOutgoing(australia, 70_000);
List<PlotItem> items = List.of(australia, india, china, japan, thailand, singapore );
// Register listeners to click on connections and items
items.forEach(item -> {
item.addItemEventListener(e -> {
switch (e.getEventType()) {
case SELECTED: System.out.println("Selected: " + e.getItem().getName()); break;
}
});
});
india.addToOutgoing(australia, 35_000);
india.addToOutgoing(china, 10_000);
india.addToOutgoing(japan, 40_000);
india.addToOutgoing(thailand, 25_000);
india.addToOutgoing(singapore, 8_000);
china.addToOutgoing(australia, 10_000);
china.addToOutgoing(india, 7_000);
china.addToOutgoing(japan, 40_000);
china.addToOutgoing(thailand, 5_000);
china.addToOutgoing(singapore, 4_000);
japan.addToOutgoing(australia, 7_000);
japan.addToOutgoing(india, 8_000);
japan.addToOutgoing(china, 175_000);
japan.addToOutgoing(thailand, 11_000);
japan.addToOutgoing(singapore, 18_000);
thailand.addToOutgoing(australia, 70_000);
thailand.addToOutgoing(india, 30_000);
thailand.addToOutgoing(china, 22_000);
thailand.addToOutgoing(japan, 120_000);
thailand.addToOutgoing(singapore, 40_000);
singapore.addToOutgoing(australia, 60_000);
singapore.addToOutgoing(india, 90_000);
singapore.addToOutgoing(china, 110_000);
singapore.addToOutgoing(japan, 14_000);
singapore.addToOutgoing(thailand, 30_000);
// Setup Chart
circluarPlot = CircularPlotBuilder.create()
.prefSize(500, 500)
.items(items)
.connectionOpacity(0.75)
.decimals(0)
.minorTickMarksVisible(false)
.build();
ConnectionEventListener connectionListener = e -> System.out.println("From: " + e.getConnection().getOutgoingItem().getName() + " -> to: " + e.getConnection().getIncomingItem().getName() + " -> Value: " + e.getConnection().getValue());
circluarPlot.getConnections().forEach(connection -> connection.addConnectionEventListener(connectionListener));
if (null != circluarPlot.getConnection(australia, japan)) {
circluarPlot.getConnection(australia, japan).setFill(Color.BLUE);
circluarPlot.getConnection(australia, india).setFill(Color.CHOCOLATE);
circluarPlot.getConnection(japan, australia).setFill(Color.POWDERBLUE);
}
circluarPlot.getConnections().forEach(connection -> {
System.out.println(connection.getOutgoingItem().getName() + " -> " + connection.getIncomingItem().getName() + " -> Value: " + connection.getValue() + " -> Color: " + connection.getFill());
});
}
Hello Gerrit,
I have a Question to the CircularPlot and PlotItems.
Example: I have 10 PlotItems and add those to the CircularPlot. The CircularPlot gets drawn with these 10 PlotItems. Now I want to click any PlotItem and trigger the ItemEvent of this specific PlotItem. This way I could Identify the specific PlotItem.
Is this already possible or is it planned?
I've got a crippling need for a Parallel Coordinates plot on our JavaFX/TornadoFX desktop application.
Parallel Coordinates Plots (PCPs) are a very simple abstraction on a standard many-column matrix. A PCP graphs each row in the table as a horizontal line across the chart. Each column is represented as a vertical axies, and where that axis intersects each horizontal line, the height of the intersection from the bottom fo the chart is proportional to that rows value at that column.
A picture is worth a thousand words:
Our applications Parallel Coordinates chart:
The corresponding Matrix:
a D3JS implementation: https://bl.ocks.org/jasondavies/1341281
Parallel Coordintes represents a superbly general chart as it allows you to graphically represent data at arbitrarily high dimensionality.
There is a long list of features such a chart might have, which I'll outline below.
Our implementation is not worth sharing primarily because its use of bindings is ~~inefficient~~ abusive. We write an optimization algorithm which can redline the CPU for prolonged periods of time, but in many cases our profiling has indicated that the actual problematic hot loop is binding updates for our PCP implementation. Thus we would very much like another one, but we simply cant afford the time it would take to re-write it.
shameless plug: find out more about this product at empowerops.com
enhancementDo you have any plans to create a Pareto Chart? This is a very common bar chart used in industry to plot the N largest items by count or percentage decreasing left to right. A line chart showing cumulative values is superimposed on the bar chart thus increasing left to right. Clicking on a bar provides an event for "drilling down" into more detail.
Hello :) I rellay like the CoxCombChart, but i see no way of customizing it (or am i wrong?!).
Basically i´d like to change the MouseEvent from MOUSE_PRESSED to MOUSE_ENTERED. I´d also like to add something to the "...%" text on the ChartItems and change the size and text on the canvas showing after the MOUSE_PRESSED-Event.
enhancementCurrently, just configuring (not executing) the Gradle build already requires credentials for publishing, as these are evaluated eagerly during configuration phase, see
https://github.com/HanSolo/charts/blob/258f877b8462ff8d3bdd36ed9ba9648654212497/build.gradle#L149-L152
and
https://github.com/HanSolo/charts/blob/258f877b8462ff8d3bdd36ed9ba9648654212497/build.gradle#L157-L160
To avoid that, it's probably better to follow the best practice of using the PasswordCredentials
class with the built-in mySecureRepositoryUsername
/ mySecureRepositoryPassword
properties.
See https://github.com/HanSolo/charts#area-line-dot-and-ring-chart / https://camo.githubusercontent.com/32dfa09a8be3401c323a7fc55fe3c6817556cdce770ffe97f38b659a50db5036/68747470733a2f2f692e6962622e636f2f326366714b38342f4368617274732d323032302d30392d30342d30372d34382d32342e706e67.
Hello, using the heatmap when I set all dots equivalent with single color, I got some view artifact of horizontal waves. For example if all dots of heat map are red ("0xff0a00ff")
I fixed the color and rangeZ bounds to be sure, but no success. I'd like to get a solid color among all dots without artifacts
hi! using heatmap matrix (version 17.1.25) from the example IDE highlights error over
import eu.hansolo.fx.heatmap.ColorMapping;
- Cannot resolve symbol 'ColorMapping'
but the jar 'heat,ap-17.0.12.jar' is in the gradle project dependencies.
Hello, if i need to clear dots in chart for a while (in case of dynamic charts building via XYSeriesBuilder
with empty items and calling clear()
on items causes
Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
at java.base/java.util.Objects.checkIndex(Objects.java:372)
at java.base/java.util.ArrayList.get(ArrayList.java:459)
at javafx.base/com.sun.javafx.collections.ObservableListWrapper.get(ObservableListWrapper.java:89)
at eu.hansolo.fx.charts.XYPane.drawLine(XYPane.java:717)
at eu.hansolo.fx.charts.XYPane.drawChart(XYPane.java:675)
at eu.hansolo.fx.charts.XYPane.redraw(XYPane.java:636)
at eu.hansolo.fx.charts.XYPane.lambda$registerListeners$8(XYPane.java:229)
at eu.hansolo.fx.charts.series.Series.fireSeriesEvent(Series.java:467)
at eu.hansolo.fx.charts.series.Series.lambda$new$0(Series.java:134)
at javafx.base/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
at javafx.base/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
at javafx.base/javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
at javafx.base/javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
at javafx.base/javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
at javafx.base/com.sun.javafx.collections.ObservableListWrapper.clear(ObservableListWrapper.java:157)
is that normal?
#Fixes
Source code(tar.gz)⚡ A powerful & easy to use chart library for Android ⚡ Charts is the iOS version of this library Table of Contents Quick Start Gradle Maven Documentat
SynchronizeFX - a library for JavaFX 2 and later that enables property bindings between different JVMs, both on a local computer and over the network.
JavaFX Custom Controls This project will show different ways on how to create custom controls in JavaFX. It will cover the following approaches: Resty
FXTrayIcon Library intended for use in JavaFX applications that makes adding a System Tray icon easier. The FXTrayIcon class handles all the messy AWT
Lib-Tile Intention Lib-Tile is a multi Maven project written in JavaFX and NetBeans IDE and provides the functionalities to use and handle easily Tile
What you’ve stumbled upon here is a project that intends to make retrieving, massaging, populating, viewing, and editing data in JavaFX UI controls ea
Dolphin Platform This repository contains all Java related sources of the Dolphin Platform. Clients for other languages can be found in seperate repos
HUAWEI 3D Modeling Kit Sample English | 中文 Introduction This project includes apps developed based on HUAWEI 3D Modeling Kit. The project directory is
Application Modernization Spring One 2021 This repository contains the projects that were demoed during the Application Modernization breakout discuss
Tic-Tac-Toe This repository contains Java based interactive Tic-Tac-Toe game. In this game you can play individual or with another player with your na
AnimateFX A library of ready-to-use animations for JavaFX Features: Custom animations Custom interpolators Play/Stop animation Play an animation after
FXGraphics2D Version 2.1, 3 October 2020. Overview FXGraphics2D is a free implementation of Java's Graphics2D API that targets the JavaFX Canvas. It m
A clean and easy way to implement this amazing native Windows taskbar-progressbar functionality in javaFX Background Since Windows 7 there is a taskba
FXyz3D FXyz3D Core: FXyz3D Client: FXyz3D Importers: A JavaFX 3D Visualization and Component Library How to build The project is managed by gradle. To
Graph Editor A library for creating and editing graph-like diagrams in JavaFX. This project is a fork of tesis-dynaware/graph-editor 1.3.1, which is n
javafx-d3 Provides a Java API for using the JavaScript library d3.js with JavaFx Applications. Many thanks to the authors of the projects gwt-d3 [1] a
Kubed: A Kotlin DSL for data visualization Kubed is a data visualization DSL embedded within the Kotlin programming language. Kubed facilitates the cr
Orson Charts (C)opyright 2013-2020, by Object Refinery Limited. All rights reserved. Version 2.0, 15 March 2020. Overview Orson Charts is a 3D chart l
TilesFX A JavaFX library containing tiles for Dashboards. Donations are welcome at Paypal Intro The Tile is a simple JavaFX Control that comes with di