{"id":13777465,"url":"https://github.com/jasrodis/javafx-dataviewer-wrapper","last_synced_at":"2025-05-11T11:33:41.717Z","repository":{"id":182121766,"uuid":"131001111","full_name":"jasrodis/javafx-dataviewer-wrapper","owner":"jasrodis","description":"📊 Exposing charts from Java to JavaFX and the Web! ","archived":false,"fork":false,"pushed_at":"2018-10-23T16:51:43.000Z","size":863,"stargazers_count":59,"open_issues_count":6,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-02-12T17:02:50.945Z","etag":null,"topics":["charts","java","javafx","javascript","jetty","web","websocket"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jasrodis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-04-25T12:12:56.000Z","updated_at":"2024-01-21T03:41:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"eb3880f6-7a1a-4821-9010-6a10a84f1552","html_url":"https://github.com/jasrodis/javafx-dataviewer-wrapper","commit_stats":null,"previous_names":["jasrodis/javafx-dataviewer-wrapper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasrodis%2Fjavafx-dataviewer-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasrodis%2Fjavafx-dataviewer-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasrodis%2Fjavafx-dataviewer-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasrodis%2Fjavafx-dataviewer-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasrodis","download_url":"https://codeload.github.com/jasrodis/javafx-dataviewer-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225043136,"owners_count":17411932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["charts","java","javafx","javascript","jetty","web","websocket"],"created_at":"2024-08-03T18:00:43.849Z","updated_at":"2024-11-17T13:30:47.691Z","avatar_url":"https://github.com/jasrodis.png","language":"Java","funding_links":[],"categories":["Libraries, Tools and Projects"],"sub_categories":[],"readme":" \n\u003cp align=\"center\"\u003e\n\t\u003cimg align=\"center\" src=\"DataviewerDocumentation/images/javafx-dataviewer.png?raw=true\"/\u003e\n\u003c/p\u003e\n\n\n\u003ch2 align=\"center\"\u003eExposing charts from Java to JavaFX and to the Web!\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003e\n  JavaFX\n  · Charts\n  · Websockets\n  · Jetty\n  · Web\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://travis-ci.org/jasrodis/javafx-dataviewer-wrapper\"\u003e\n    \u003cimg alt=\"travis\" src=\"https://img.shields.io/travis/jasrodis/javafx-dataviewer-wrapper.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://jitpack.io/#jasrodis/javafx-dataviewer-wrapper\"\u003e\n    \u003cimg alt=\"jitpack\" src=\"https://jitpack.io/v/jasrodis/javafx-dataviewer-wrapper.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n    \u003cimg alt=\"licence\" src=\"https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n\n\nJavaFxDataviewer is an open-source data visualization tool for JavaFX. \n\n\u003e It is a JavaFX wrapper of the Dataviewer project : https://github.com/jasrodis/dataviewer. It is based on [Plotly.js](https://plot.ly/javascript/), [JavaFx](http://docs.oracle.com/javase/8/javase-clienttechnologies.htm), [Jetty](http://www.eclipse.org/jetty/) and Websockets.\n\n\n## Examples\n\nExtensive usage of the JavaFxDataViewer with examples can be found : [http://github.com/jasrodis/javafx-dataviewer-example](http://github.com/jasrodis/javafx-dataviewer-example)\n\n## Requirements\n\n*   Recent version of Java installed supporting JavaFX.\n\n## To install the library to your project\n\nMaven JitPack installation :\n    \n```xml    \n\u003cdependency\u003e\n   \u003cgroupId\u003ecom.github.jasrodis\u003c/groupId\u003e\n   \u003cartifactId\u003ejavafx-dataviewer-wrapper\u003c/artifactId\u003e\n   \u003cversion\u003e-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n#Documentation\n\n## API\n\n*   `JavaFxDataViewer` (extends DataViewer, JavaFX Wrapper)\n*   `DataViewerConfiguration`\n*   `Trace`\n*   `TraceConfiguration`\n*   `PlotData`\n\n#### DataViewer \u0026 DataViewerConfiguration\n\nDataViewer is the main plotting window. It is configured by the DataViewerConfiguration.\n\nWith DataViewer you can :\n\n1.  Update your Plot Configuration\n2.  Update your Plot Data\n3.  Reset your Plot Data\n4.  Get the exposed URL\n\n##### DataViewer\n```java\n    updatePlot(PlotData data);                               // Updates the plot\n    updatePlotConfiguration(DataViewerConfiguration config); // Updates the dataviewer (window) configuration.\n    getUniqueID(); // Get the unique ID of the dataviewer -  // navigate http://localhost:8090/view/UNIQUE_ID/\n```\n##### DataViewerConfiguration\n```java\n    setPlotTitle(String title);              // plot title\n    setxAxisTitle(String title);             // x axis title\n    setyAxisTitle(String title);             // x axis title\n    setMarginTop(int margin);               // margin top\n    setMarginBottom(int margin);            // margin bottom\n    setMarginRight(int margin);             // margin right\n    setMarginLeft(int margin);              // margin left\n    setPadding(int padding);                // padding\n    setxRange(double min, double max);     // Set the range of the x axis of the dataviewer\n    setyRange(double min, double max);     // Set the range of the x axis of the dataviewer\n    setxAxisType(AxisType type);             // Set the axis type of x axis (log or linear)\n    setyAxisType(AxisType type);             // Set the axis type of y axis (log or linear)\n    showLegend(boolean set);                // Show/hide Legend\n    setLegendInsidePlot(boolean inside);    // Show legend inside plot\n```\nSee usage example below:\n```java\n    // Create dataviewer\n    DataViewer dataviewer = new DataViewer();\n\n    // Create dataviewer configuration\n    DataViewerConfiguration config = new DataViewerConfiguration();\n    // Plot title\n    config.setPlotTitle(\"Line Trace Example\");\n    // X axis title\n    config.setxAxisTitle(\"X Example 1\");\n    // Y axis title\n    config.setyAxisTitle(\"Y Example 1\");\n\n    // Update the configuration\n    dataviewer.sendConfiguration(config);\n\n    // Container of traces\n    PlotData plotData = new PlotData(new LineTrace\u003cFloat\u003e());\n\n    // Plot all traces in the container.\n    dataviewer.updatePlot(plotData);\n```\nResetting the dataviewer example:\n```java\n    JavaFxDataViewer dataviewer = new JavaFxDataViewer();\n    DataViewerConfiguration config = new DataViewerConfiguration();\n    dataviewer.sendConfiguration(config);\n    PlotData plotData = new PlotData();\n    dataviewer.updatePlot(plotData);\n\n    // Reset your Plot (removes all trace from the dataviewer)\n    dataviewer.resetPlot();\n```\n#### Traces\n\nTraces are the different kind of plots that are going to be drawed in the DataViewer. Provided Traces:\n\n*   `GenericTrace\u003cT\u003e`\n*   `LineTrace\u003cT\u003e`\n*   `ScatterTrace\u003cT\u003e`\n*   `BarTrace\u003cT\u003e`\n*   `TimeSeriesTrace\u003cT\u003e`\n*   `HistogramTrace\u003cT\u003e`\n*   `ContourTrace\u003cT\u003e`\n\nMore to be provided..\n\n##### GenericTrace\n\n`GenericTrace` is an abstract class that all traces inherit from.\n\nIt can be used as a container when the type of the trace is not known.\n\nSee usage example below:\n```java\n    Methods:\n    // Config\n    setTraceName(String traceName);                          // Updates the plot\n    setConfiguration(TraceConfiguration traceConfig)         // Set the trace configuration\n    setTraceColour(TraceColour colour);                      // Set trace Colour\n    setTraceMode(TraceMode mode);                            // Set the trace mode (LINES, MARKERS, MARKERS_AND_LINES)\n    setTraceType(TraceType traceType);                       // Set the trace Type (BAR, LINE, SCATTER, CONTOUR ...)\n    setTraceVisibility(TraceVisibility visibility);          // Visibility of the trace(TRUE, FALSE, LEGENDONLY)\n\n    // Data\n    setxAxis(T[] xAxis);\n    setyAxis(T[] xAxis);\n    setzAxis(T[] zAxis);\n```\n\n##### GenericTrace Example - abstract class ( should not be used like this! )\n```java\n    GenericTrace\u003cDouble\u003e genericTrace = new LineTrace\u003c\u003e();\n    genericTrace.setxArray(new Double[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 });\n    genericTrace.setyArray(new Double[]  { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 });\n    genericTrace.setTraceColour(TraceColour.PURPLE);\n    genericTrace.setTraceName(\"Line Trace\");\n    genericTrace.setTraceType(TraceType.LINE);\n    genericTrace.setTraceMode(TraceMode.LINES);\n    genericTrace.setTraceVisibility(TraceVisibility.TRUE);\n```\n##### LineTrace\n\n![Smaller icon](DataviewerDocumentation/images/Line.png?raw=true \"LineTrace example\")\n\nExample:\n```java\n    LineTrace\u003cDouble\u003e lineTrace = new LineTrace\u003c\u003e();\n    lineTrace.setTraceName(\"MyLineTrace\");\n    lineTrace.setxArray(new Double[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 });\n    lineTrace.setyArray(new Double[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 });\n    lineTrace.setTraceColour(TraceColour.PURPLE);\n```\nExample with configuration object:\n```java\n    LineTrace\u003cDouble\u003e lineTrace = new LineTrace\u003c\u003e();\n    lineTrace.setTraceName(\"MyLineTrace\");\n\n    lineTrace.setxArray(new Double[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 });\n    lineTrace.setyArray(new Double[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 });\n\n    TraceConfiguration lineConfig = new TraceConfiguration();\n    lineConfig.setTraceColour(TraceColour.RED);\n    lineTrace.setConfiguration(lineConfig);\n```\n##### BarTrace\n\n![Smaller icon](DataviewerDocumentation/images/Bar.png?raw=true \"BarTrace example\")\n\nExample:\n```java\n    BarTrace\u003cObject\u003e barTrace = new BarTrace\u003c\u003e();\n    barTrace.setTraceName(\"MyBarTrace\");\n    barTrace.setxArray(new String[] { \"one\", \"two\", \"three\", \"four\", \"five\", \"six\" });\n    barTrace.setyArray(new Double[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 });\n    barTrace.setTraceColour(TraceColour.PURPLE);\n```\nExample with configuration object:\n```java\n    BarTrace\u003cObject\u003e barTrace = new BarTrace\u003c\u003e();\n    barTrace.setTraceName(\"MyBarTrace\");\n\n    barTrace.setxArray(new String[] { \"one\", \"two\", \"three\", \"four\", \"five\", \"six\" });\n    barTrace.setyArray(new Double[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 });\n\n    TraceConfiguration barConfig = new TraceConfiguration();\n    barConfig.setTraceColour(TraceColour.RED);\n    barTrace.setConfiguration(barConfig);\n```\n##### ScatterTrace\n\n![Smaller icon](DataviewerDocumentation/images/Scatter.png?raw=true \"ScatterTrace example\")\n\nExample:\n```java\n    Scatter\u003cFloat\u003e scatterTrace = new ScatterTrace\u003c\u003e();\n    scatterTrace.setTraceName(\"MyScatterTrace\");\n    scatterTrace.setxArray(new Float[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 });\n    scatterTrace.setyArray(new Float[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 });\n    scatterTrace.setTraceColour(TraceColour.PURPLE);\n```\nExample with configuration object:\n```java\n    ScatterTrace\u003cDouble\u003e scatterTrace = new ScatterTrace\u003c\u003e();\n    scatterTrace.setTraceName(\"MyScatterTrace\");\n\n    scatterTrace.setxArray(new Double[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 });\n    scatterTrace.setyArray(new Double[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 });\n\n    TraceConfiguration scatterConfig = new TraceConfiguration();\n    scatterConfig.setTraceColour(TraceColour.RED);\n    scatterTrace.setConfiguration(scatterConfig);\n```\n##### TimeSeriesTrace\n\n![Smaller icon](DataviewerDocumentation/images/TimeSeries.png?raw=true \"ScatterTrace example\")\n\nExample:\n```java\n    TimeSeries\u003cObject\u003e timeSeriesTrace = new TimeSeriesTrace\u003c\u003e();\n    timeSeriesTrace.setTraceName(\"MyTimeSeriesTrace\");\n\n    timeSeriesTrace.setxArray(new String[] { \"2013-10-04 22:23:00\", \"2013-10-05 22:23:01\", \"2013-10-06 22:23:02\", \"2013-10-07   22:23:03\", \"2013-10-08 22:23:04\", \"2013-10-09 22:23:05\", \"2013-10-10 22:23:06\" });\n    timeSeriesTrace.setyArray(new Float[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 });\n\n    timeSeriesTrace.setTraceColour(TraceColour.PURPLE);\n```\nExample with configuration object:\n```java\n    TimeSeriesTrace\u003cDouble\u003e timeSeriesTrace = new TimeSeriesTrace\u003c\u003e();\n    timeSeriesTrace.setTraceName(\"MyTimeSeriesTrace\");\n\n    timeSeriesTrace.setxArray(new String[] { \"2013-10-04 22:23:00\", \"2013-10-05 22:23:01\", \"2013-10-06 22:23:02\", \"2013-10-07   22:23:03\", \"2013-10-08 22:23:04\", \"2013-10-09 22:23:05\", \"2013-10-10 22:23:06\" });\n    timeSeriesTrace.setyArray(new Float[] { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 });\n\n    TraceConfiguration timeSeriesConfig = new TraceConfiguration();\n    timeSeriesTrace.setTraceColour(TraceColour.RED);\n    timeSeriesTrace.setConfiguration(timeSeriesConfig);\n```\n##### CountourTrace\n\n![Smaller icon](DataviewerDocumentation/images/Contour.png?raw=true \"Contour example\")\n\nExample:\n```java\n    ContourTrace\u003cDouble\u003e contourTrace = new ContourTrace\u003c\u003e();\n\n    contourTrace.setxArray(new Double[] { -0.2, 0.0, 0.1, 0.1, 0.3, 0.4, 0.5, 0.5, 0.6, 1.6 });\n    contourTrace.setyArray(new Double[] { -0.2, 0.0, 0.1, 0.1, 0.3, 0.4, 0.5, 0.5, 0.6, 1.6 });\n    contourTrace.setzArray(new Double[] { -0.2, 0.0, 0.1, 0.1, 0.3, 0.4, 0.5, 0.5, 0.6, 1.6 });\n\n    contourTrace.setTraceName(\"ContourTrace\");\n```\nExample with configuration object:\n```java\n    ContourTrace\u003cDouble\u003e contourTrace = new ContourTrace\u003c\u003e();\n\n    contourTrace.setxArray(new Double[] { -0.2, 0.0, 0.1, 0.1, 0.3, 0.4, 0.5, 0.5, 0.6, 1.6 });\n    contourTrace.setyArray(new Double[] { -0.2, 0.0, 0.1, 0.1, 0.3, 0.4, 0.5, 0.5, 0.6, 1.6 });\n    contourTrace.setzArray(new Double[] { -0.2, 0.0, 0.1, 0.1, 0.3, 0.4, 0.5, 0.5, 0.6, 1.6 });\n\n    TraceConfiguration contourConfig = new TraceConfiguration();\n    contourConfig.setTraceName(\"ContourTrace\");\n\n    contourTrace.setConfiguration(contourConfig);\n```\n##### Histogram\n\n![Smaller icon](DataviewerDocumentation/images/Histogram.png?raw=true \"HistogramTrace example\")\n\nExample:\n```java\n    HistogramTrace\u003cDouble\u003e histogramTrace = new HistogramTrace\u003c\u003e();\n    histogramTrace.setxArray(new Double[] { -0.2, 0.0, 0.1, 0.1, 0.3, 0.4, 0.5, 0.5, 0.6, 1.6 });\n    histogramTrace.setTraceName(\"MyHistogramTrace\");\n    histogramTrace.setTraceColour(TraceColour.BLUE);\n```\nExample with configuration object:\n```java\n    HistogramTrace\u003cDouble\u003e histogramTrace = new HistogramTrace\u003c\u003e();\n    histogramTrace.setxArray(new Double[] { 0.0, 1.0, 200.0, 3.0, 4000.0, 5.0 });\n\n    TraceConfiguration histogramConfig = new TraceConfiguration();\n    histogramConfig.setTraceName(\"HistogramTrace\");\n    histogramConfig.setTraceColour(TraceColour.RED);\n\n    histogramTrace.setConfiguration(histogramConfig);\n```\n## Features\n\n### plotly.js features\n\nYou can find plotly features here: [http://help.plot.ly/getting-to-know-the-plotly-modebar/](http://help.plot.ly/getting-to-know-the-plotly-modebar/)\n\n### JavaFxDataViewer features\n\nAdditional Features have been added so far :\n\n![Smaller icon](DataviewerDocumentation/images/Topmenu.png?raw=true \"HistogramTrace example\")\n\n*   Change in logarithmic scales.\n*   Data visualization in table.\n*   Show/Move legend.\n*   Export data to CSV.\n*   Change trace type.\n*   Date \u0026 time of the latest plot udpate\n\n## Architecture Overview\n\nDataViewer uses the embedded Jetty Server in order to create Websocket Endpoints and Serve Static Html \u0026 Javascript pages. These pages will be loaded in the JavaFX WebView that the library is using.\n\n**Overview of the architecture:**\n\n![Smaller icon](DataviewerDocumentation/images/Architecture.png \"Local Catalog Configuration\")\n\n#### Sequence diagram\n\n![Smaller icon](DataviewerDocumentation/images/Architecture2.png \"Local Catalog Configuration\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasrodis%2Fjavafx-dataviewer-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasrodis%2Fjavafx-dataviewer-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasrodis%2Fjavafx-dataviewer-wrapper/lists"}