icodealot / sqlcl-chart Goto Github PK
View Code? Open in Web Editor NEWAdd Oracle JET charts to SQLcl
License: Other
Add Oracle JET charts to SQLcl
License: Other
When running the command under Java 1.8 the event handlers attached to the JavaFX stage throw a type error. This doesn't seem to affect the operation of the chart
command but its annoying. Need to do some additional testing against Java 1.8 and look at integrating some test cases.
Here is the particular code block were the current TypeError occurs.
ojChart.setupStage = function(stage) {
...
ojChart.stage.setOnCloseRequest(new EventHandler() {
...
});
...
}
Add some logic and error handling to detect when screenshots would be written to a folder that is read-only. When this happens currently, the script will generate a Java exception. (work can continue on however so this is minor.)
The current oj-chart command supports a specific query format and expectation to align the query results with the JET chart data set. The data must be queried with the assumption that Column 1 = Chart Series, Column 2 - N = Group values. (labels for columns 2 - N are used as the Group labels by default.) You can of course use pivot/un-pivot to make your data fit this format however, it would be nice to support some additional column setups when running sql> chart data select....
For example:
sql> chart data select series_col, group_col, numeric_value_col from table
This would also allow the group labels to be a little more dynamic. If some additional logic is required, such as when using a case statement or joining from a fact to a dimension table.
Not really sure if this is possible yet, just adding it here to keep track of the idea.
Upgrading to JET 4.0.0 stops the JET chart from working in JavaFX WebView in JDK 9.
Need to research this more. The HTML file for the Oracle JET chart stops working in JavaFX WebView once the libraries and HTML elements are converted to JET 4.0.0. There is an example file called oj-chart4.html in this project for reference. I originally thought it was an issue with JavaFX support for shadow DOMs but this seems to be working correctly elsewhere. More research is required.
Here are some links for future reference:
It appears that WebKet in JavaFX does support a shadow DOM but for some reason the pages still isn't rendering correctly (but works fine in all other browsers).
Add support to call a REST endpoint from ORDS to populate a JET chart with data. This would probably look something like the following:
sql> chart data https://apex.oracle.com/pls/apex/oraclejet/emp/
This will allow charts to be generated from custom REST endpoints.
If you botch your select statement the JS helpers are not currently smart enough to figure that out and you will likely get some exceptions when things go wrong. This will get better over time so adding this placeholder here to incorporate some additional exception handling.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.