Discussions
Categories
- 196.8K All Categories
- 2.2K Data
- 238 Big Data Appliance
- 1.9K Data Science
- 450.2K Databases
- 221.7K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 550 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 544 SQLcl
- 4K SQL Developer Data Modeler
- 187K SQL & PL/SQL
- 21.3K SQL Developer
- 295.8K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.5K Development Tools
- 107 DevOps
- 3.1K QA/Testing
- 646K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 154 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 17 Java Essentials
- 160 Java 8 Questions
- 86K Java Programming
- 80 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 436 LiveLabs
- 38 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 232 Portuguese
Scatter chart with date axis

Is there a way or a workaround to get date labels into the x-axis on a scatter chart? I searched for "scatter chart dates" for the past year and there was virtually nothing. Thanks for any help.
Bill
Best Answer
-
Create a custom renderer and turn all your "days since" labels first to javascript dates and then to strings of the required format.
Answers
-
Try to use, for example, epoch or YYYYMMDD format for your dates and then convert them to strings using a custom axis label converter. See APEX 20.1 Sample Charts applications page 46 Event Drops to see how to add a custom converter.
-
Hi Bill,
A Scatter chart does not support defining Datetime information on the x-axis. Both x and y axes expect numeric values, to view relationships between the two values.
Oleh's suggestion of rendering an Event Drops visualisation, which is essentially a customised Line chart, may suit your requirements. Alternatively, just go with the declarative option of defining a Line chart based on a Datetime x-axis, and set the following series-level attributes, to only display markers and no lines:
Regards,
Hilary
-
Thanks Hilary and Oleh. I will try these options and report my results.
Bill
-
Hilary,
I think I am out of luck. My use case involves timelines on both axes (the red line is when the x-axis date-time and y-axis date-time are equal). The blue and green lines represent the start and end of a scheduled activity, and the y-axis represents the date and time the activity was scheduled. So most of the activities depicted started at the same time they were scheduled, i.e. immediately.
My workaround, as you see, is to show the number of days since the "From Date" on both axes. Not pretty but still workable.
Maybe something for the "would be nice one day" list (which I am sure is very large). Thanks very much.
Bill
-
I believe all this "days since" can be turned to a "dates" with a custom converter but are you sure you really need a scatter chart? Because what you are showing looks more like a gantt one.
-
Yes, it's like a Gannt chart except the y-axis is also a date-time. I don't think that is an option in a Gannt chart.
I acknowledge that this is not a common chart!
Bill
-
So maybe there is no need in y-axis at all. Just create a gantt chart with one row (i.e. SAA activation) with multiple tasks in it.
-
I wish. This is a custom presentation that reveals or illustrates the scheduling of a resource in two dimensions, both in terms of the start and end date (and time) and in terms of when it was scheduled. That last element is important information that would be lost if there was only one row. This reflects a live operation and users who are scheduling the resource in real time.
Not sure how else to explain it. I think the correct answer is it can't be done in Jet.
Bill
-
Create a custom renderer and turn all your "days since" labels first to javascript dates and then to strings of the required format.
-
That sounds right but can you give me more detail? I think you're talking about writing some javascript in the Javacript Initialization Code field in the attributes panel of the chart region, correct? Could you give me some sample code? I would really appreciate it.