2014-09-30 45 views
0

我正嘗試在Application Express Anychart Flash圖表中格式化圖例。下面是相關的XML部分:Application Express附帶的Anychart格式圖例

<legend enabled="true" position="Right" align="Near" elements_layout="Vertical"> 
<title enabled="true"> 
<text>Legend</text> 
<font family="Tahoma" size="10" color="0x000000" /> 
</title> 
<icon> 
<marker enabled="true" /> 
</icon> 
<font family="Tahoma" size="10" color="0x000000" /> 
</legend> 

我只是想補充兩個行項目,銷售和門票,來形容我的圖表線用正確的彩色線條圖標,而是我得到兩個通用的條目 - 價值和價值。任何人都可以幫我理清這個XML的正確代碼嗎?

當我將其更改爲以下:

<legend enabled="true" position="Right" align="Near" elements_layout="Vertical" ignore_auto_item="True"> 
<title enabled="true"> 
<text>Legend</text> 
<font family="Tahoma" size="10" color="0x000000" /> 
</title> 
<items> 
<item> 
<text>This is a test</text> 
</icon></item> 
<item><text>Item 2</text> 
</item> 
</items> 
<icon> 
<marker enabled="true" /> 
</icon> 
<font family="Tahoma" size="10" color="0x000000" /> 
</legend> 

這給了我兩個系列我想,但沒有圖標。

請原諒我的無知。我仍然沒有得到我想要的簡單傳奇。我使用兩個系列的查詢,TOTAL_SALES和Total_Tickets:

SELECT NULL Link, 
trunc(tix.timestamp) AS label, 
sum(tixp.Price) AS value 
FROM LS_tickets tix LEFT OUTER JOIN 
    LS_ticket_prices tixP 
    ON tixp.series_prefix = tix.ticket_series 
WHERE tix.event_id = :P145_event_id 
and tix.event_id = tixp.event_id 
and tix.voided_flag != 'Y' 
GROUP BY trunc(tix.timestamp) 
ORDER BY trunc(tix.timestamp) ASC 

而且

SELECT NULL Link, 
trunc(tix.timestamp) AS label, 
sum(tixp.quantity) AS value 
FROM LS_tickets tix LEFT OUTER JOIN 
    LS_ticket_prices tixP 
    ON tixp.series_prefix = tix.ticket_series 
WHERE tix.event_id = :P145_event_id 
and tix.event_id = tixp.event_id 
and tix.voided_flag != 'Y' 
GROUP BY trunc(tix.timestamp) 
ORDER BY 1 

但我得到一個空的傳說每當我嘗試添加圖標信息針對每個標籤如下:

<legend enabled="true" position="Right" align="Near" elements_layout="Vertical" ignore_auto_item="True"> 
<title enabled="true"> 
<text>Legend</text> 
<font family="Tahoma" size="10" color="0x000000" /> 
</title> 
<icon><marker enabled="true" /></icon> 
<items> 
<item source="Series" series="Total_Sales"> 
<text>{%Icon} Sales</text> 
</item> 
<item source="Series" series="Total_Tickets"><text>{%Icon} Tickets</text> 
</item> 
</items> 
<font family="Tahoma" size="10" color="0x000000" /> 
</legend> 

回答

1

這取決於您使用的是什麼數據結構。您可以使用這些xml設置指定應在圖例中顯示哪些數據。

每個自動項目有屬性源可以是「點」或「系列」和系列,指定的系列名稱: http://www.anychart.com/products/anychart/docs/users-guide/index.html?legend-text-formatting.html#automatic-items

在自定義行項目的情況下,你可以用任何信息添加自己的項目: http://www.anychart.com/products/anychart/docs/users-guide/index.html?legend-text-formatting.html#custom-items

這裏是您可以使用格式化的項目值的所有關鍵字的列表: http://www.anychart.com/products/anychart/docs/users-guide/index.html?legend-text-formatting.html#keywords

它看起來像問題時,同時與頂點工作系列,所有這些都是使用名稱設置爲「VALUE」創建的。這裏是類似的問題的解決方案: https://community.oracle.com/message/12637203#12637203

+0

我欣賞hlp,但我已經通過所有的文件和我已經作出的任何嘗試調整圖例項目結束刪除相關的圖形,並沒有改變事實它說的是VALUE代替圖例項目名稱。 – Halifernus 2014-10-01 02:04:45

+0

對不起,沒有注意到您正在使用apex,所以根據這個 – 2014-10-01 09:59:59

+0

更新了答案。這裏添加的最後一個鏈接鏈接到我在otn論壇上的一個帖子。接下來的線程應該有助於解決這個問題。我想指出,我的評估是真實的和虛假的。如果不在查詢中對列進行別名,則意味着系列名稱將默認爲VALUE,但別名會將該名稱作爲系列名稱傳遞。然後可以用它來連接圖例項目。 – Tom 2014-10-01 12:47:32