Hi,
I have a query that returns three properties, name | code | count…see below:
<valueCollectionDatasource id="itemCountDs">
<query>
<![CDATA[select e.item.code as itemCode, e.item.name as itemName, count(e) as productCount from ppm$Products e where e.status = :custom$status group by e.item, e.item.name]]>
</query>
<properties>
<property datatype="string"
name="itemCode"/>
<property datatype="string"
name="itemName"/>
<property datatype="int"
name="productCount"/>
</properties>
</valueCollectionDatasource>
I want to use the item name on the balloon text and the item code on the axis, the name is a bit long so having it as the category axis will make the graph unreadable. Can anyone help?
See graph xml below:
<groupBox id="itemCountgroupBox"
caption="Item Breakdown">
<chart:serialChart id="itemSerialChart"
autoMargins="false"
categoryField="itemCode"
datasource="itemCountDs"
height="300px"
marginBottom="32"
marginLeft="55"
marginRight="18"
marginTop="10"
plotAreaFillAlphas="0.1"
responsive="true"
rotate="false"
startDuration="1"
width="100%">
<chart:categoryAxis gridPosition="START"/>
<chart:valueAxes>
<chart:axis position="LEFT"
title="No. of Products"/>
</chart:valueAxes>
<chart:graphs>
<chart:graph balloonText="[[category]]: <strong>[[value]]</strong>"
fillAlphas="0.57"
lineAlpha="0.8"
type="COLUMN"
valueField="productCount"/>
</chart:graphs>
<chart:export/>
</chart:serialChart>
</groupBox>
This is how the graph shows at the moment.
Thanks in advance.