简体   繁体   English

Oracle APEX-自定义条形图

[英]Oracle APEX - customizing bar chart

Is it possible to make a bar chart a double y-axis? 可以将条形图做成双Y轴吗?

I have a bar chart with 4 bars, generated by the query, returning 4 rows. 我有一个由查询生成的4条条形图,返回4行。

Is there a way for me to make each bar a different color and on the right-hand side, instead of series name, specify colors along with labels for each bar? 有没有一种方法可以使每个条形具有不同的颜色,并且在右侧而不是系列名称中为每个条形指定颜色以及标签?

Click on one of the chart series and look for the 'Assign to Y-Axis' attribute 单击图表系列之一,然后查找“分配给Y轴”属性

在此处输入图片说明

Not how this is next to a 'Color' attribute. 这不是“颜色”属性旁边的方式。 You can source this colour from your SQL , substituting your value using the using &COLUMN_ALIAS. 您可以使用&COLUMN_ALIAS 从您的SQL中获取该颜色,用您的值替换。 syntax. 句法。

An example from the sample charts application in the linked form post shows how colour can be row based (with column alias adjusted to match my screenshot) 链接表单中的示例图表应用程序示例显示了颜色如何基于行(调整了列别名以匹配我的屏幕截图)

select a.product_name, 
       b.quantity, 
       b.customer,
       -- This is the column you're looking for
       case when b.quantity > 50 then 'gold'
            when b.quantity <= 30 then 'red' 
         when b.quantity > 30 then 'green'
         else 'blue'
       end as colour
from eba_demo_chart_products a, eba_demo_chart_orders b
where a.product_id = b.product_id
and customer = 'Store A'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM