简体   繁体   English

Oracle APEX - 如何在堆积条形图中隐藏一个系列的工具提示

[英]Oracle APEX - How to hide tooltip for one series in a stacked bar chart

I am using Oracle APEX 19.1.0.00.15 and I have a question regarding tooltips for a stacked bar chart.我正在使用 Oracle APEX 19.1.0.00.15,我对堆叠条形图的工具提示有疑问。 I have created a stacked bar chart that consists of three series, but I would only like for the tooltip to be rendered for two of the series.我创建了一个包含三个系列的堆叠条形图,但我只想为其中两个系列呈现工具提示。 I see that there is an option in the chart's Attributes section to hide or show the tooltip for the chart as a whole, but not for individual series within the chart.我看到图表的“属性”部分中有一个选项可以隐藏或显示整个图表的工具提示,但不适用于图表中的单个系列。 I have tried to find the relevant JavaScript for the tooltip in the Oracle JavaScript Extension Toolkit API Reference http://https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojChart.html but I was not able to find anything useful. I have tried to find the relevant JavaScript for the tooltip in the Oracle JavaScript Extension Toolkit API Reference http://https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojChart.html but I was not能够找到任何有用的东西。 Does anyone have any advice for how to achieve this?有人对如何实现这一目标有任何建议吗?

Thank you.谢谢你。

You need to set shortDesc attribute for each item of the series to an empty string.您需要将系列中每个项目的 shortDesc 属性设置为空字符串。

You can do that in initialization phase using the following code:您可以使用以下代码在初始化阶段执行此操作:

function( options ){
    options.dataFilter = function( data ) {
        var l_items = data.series[ 0 ].items
        for (var i=0; i<l_items.length; i++) {
            l_items[i].shortDesc = "";
        }        
        return data;
    };    
    return options;
}

The above code will disable tooltip for the items of the first series.上面的代码将禁用第一个系列项目的工具提示。

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

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