所选项目的Cognos弹出标签 [英] Cognos popout label for selected item

查看:144
本文介绍了所选项目的Cognos弹出标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想要能够显示一个数据项,仅用于我在Cognos中比较其他项目的项目。例如,如果我的图表显示佛罗里达州与美国其他国家的比较 - 佛罗里达州正在做我在图表内的比较。



所以我想只显示佛罗里达的数据标签。 Cognos中的条件格式设置将允许您打开或关闭所有项目标签。我想找到一个方法来打开它们所有的条件格式,但隐藏所有的值,除了佛罗里达值,这是我的报告的焦点与javascript。



这里是我的图表的一个例子,以及它如何显示所有数据标签:
http: //i.imgur.com/aM4gEYu.jpg
我只需要显示佛罗里达的号码。



此外,我的第二个挑战是当我的鼠标悬停在其他标签上时 - 我想显示值为他们(但只有在悬停)。所以基本上标签只会默认显示佛罗里达州的标签,但如果用户悬停在美国或世界的值,那么用户将能够看到该项目。

解决方案

不幸的是,有条件渲染并不是在任何地方都可用,因此它不是一个可行的解决方案。



是艰难的,但我认为不可能。首先,我强烈推荐Firefox的 FireBug 插件。它将允许您更容易地在Cognos中查看生成的图形的HTML。我只是看了一个示例条形图。不幸的是,没有一个元素具有单独的ID。您必须拉取区域元素按属性。栏的悬停文字和标签文字都在TITLE属性中。



我必须在这里强制的no JS语句,因为我保证这样解决方案将在Cognos和潜在浏览器的版本之间中断。



另一种方法是隐藏标准图表标签,并将Singleton放在图表下方以控制显示的信息。



如果您仍需要帮助 - 您可以截取此图表的屏幕截图吗?如果没有 - 你能详细说明什么类型的图表是什么,还有什么其他数据值存在(除了FL,美国,世界)。我想我可能没有正确地形象化。


I have two similar javascripting challenges I am looking to solve in Cognos with the help of conditional formatting.

I would like to be able to show a data item, for only the item that I am comparing other items to in Cognos. For example, If my chart shows a comparison of Florida to the rest of the US States -- Florida is what I am doing am doing the comparison to within my charts.

So I would like to show the data label for Florida only. Conditional formatting in Cognos will let you either turn all item labels on, or off. I am looking to find a way to turn them all on with conditional formatting, but hide all the values, except the Florida value which is the focus of my report with javascript.

Here is an example of my chart and how it looks with all the data labels showing: http://i.imgur.com/aM4gEYu.jpg I only need to show the number for Florida. The rest of the numbers make the chart look way too cluttered.

Also - My second challenge is when my mouse hovers over the other labels - I would like to show the values for them (but only on hover). So basically the label will default to showing the Florida label only, but if the user hovers over the United States, or the World values - then the user will be able to see that item.

解决方案

Yeah conditional rendering unfortunately is not available everywhere, so it's not a viable solution.

Writing JS against a chart is tough, but I suppose not impossible. First, I'd highly recommend the FireBug plugin for Firefox. It will allow you to more easily see the generated HTML for a graph in Cognos. I just looked at a sample bar chart. Unfortunately, none of the elements have individual IDs. You will have to pull the "area" elements by attribute. The hover text for the bars and the label text are both in the TITLE attribute.

I have to put the obligatory "no JS" statement in here as I guarantee such a solution will break between versions of Cognos and potentially browsers.

An alternative may be to hide the standard chart labels and put Singletons below the chart to control the shown information.

If you still need help - can you take a screenshot of this chart? If not - can you elaborate on what type of chart it is and what other data values exist (other than FL, US, World). I think I may not be visualizing this properly.

这篇关于所选项目的Cognos弹出标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆