Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
643 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...