Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
602 views
in Technique[技术] by (71.8m points)

oracle11g - Oracle SQL Developer plot scatter graph

I'm attempting to use the report function within Oracle SQL Developer to plot a scatter graph of my data. The scatter graph should be fairly simple: one field on the X-axis again the second on the Y-axis. This is the query I'm using to pull the required data and group it together:

SELECT
    customer_x_coord,
    customer_y_coord
FROM
    customers
GROUP BY
    customer_x_coord,
    customer_y_coord

The data type of both fields is 'NUMBER'.

I'm using this as the SQL for the report and changed the style to chart and the chart type to scatter. But then I can't get the data map correctly. I'm presented with mapping options: 'Group' 'Series' and 'Value'. How do I use these options to create a graph that plots customer_x_coord on the X-Axis against customer_y_coord on the Y-Axis?

question from:https://stackoverflow.com/questions/65876708/oracle-sql-developer-plot-scatter-graph

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As SQL Developer said, you need to have 3 values returned by your query. If there's none, make it! For example:

select 
  'My graph' as series,         --> this
  customer_x_coord as group,
  customer_y_coord as value
from customers
group by customer_x_coord,
         customer_y_coord

series value won't change (its is a constant) but it doesn't matter; now you have 3 columns, so use them to plot the graph.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.8k users

...