| Author |
Message |
![[Post New]](/jforum/templates/default/images/icon_minipost_new.gif) 14/09/2012 10:37:00
|
pietrotower.spw
![[Avatar]](/jforum/images/avatar/28267ab848bcf807b2ed53c3a8f8fc8a.jpg)
Joined: 14/09/2012 10:24:16
Messages: 7
Location: Milan, Italy
Offline
|
I am wondering whether it is possible to define the same colors for the same categories both in the outer and in the inner pie. In Fact, I would like to create a double pie with an explicit connection between the outer and the inner pie, while I am getting two series with different colors and the connection is not so clear.
I found some older posts where they said that by defining a set of colors and using them in both series would have fixed the issue, but I don't agree with that: you have the same colours of course, but not linked to the same cathegories.
If anyone had solved this issue please tell me how. If this is not possible with the current document structure I'd like to ask Spago developers to think about this.
This message was edited 3 times. Last update was at 20/09/2012 08:59:54
|
|
|
 |
![[Post New]](/jforum/templates/default/images/icon_minipost_new.gif) 14/09/2012 11:27:23
|
giachino
SpagoBI supporter
![[Avatar]](/jforum/images/avatar/4e732ced3463d06de0ca9a15b6153677.jpg)
Joined: 05/07/2010 15:41:54
Messages: 240
Location: Turin, Italy
Offline
|
Hi Pietrotower,
what you want is already possible.
You can see the demo document at http://spagobi.eng.it/SpagoBI/servlet/AdapterHTTP?PAGE=LoginPage&NEW_SESSION=TRUE (choose 'Charts | HighCharts | Double Pie' menu).
As you can see both pies use the same colors for each category (the tooltip confirm this).
A similar document is too available in the AllInOne package, so I suggest you to see it because you can found the chart template and the dataset example.
Hope this help,
Antonella
|
Antonella Giachino
SpagoBI Consultant |
|
|
 |
![[Post New]](/jforum/templates/default/images/icon_minipost_new.gif) 14/09/2012 12:10:48
|
pietrotower.spw
![[Avatar]](/jforum/images/avatar/28267ab848bcf807b2ed53c3a8f8fc8a.jpg)
Joined: 14/09/2012 10:24:16
Messages: 7
Location: Milan, Italy
Offline
|
Hi giachino,
thank you for your reply. I have seen the template you are suggesting me, and although I actually see the same categories for both inner and outer pies (and actually the template is simpler than mine), if I use that template with my data I still don't get this result.
For instance, I am using spagoBI studio 3.5 for deploying the document. Could it be some kind of incompatibility or some configuration errors between spagoBI studio and spagoBI server?
thanks again,
pietroTower
This message was edited 2 times. Last update was at 14/09/2012 12:11:38
|
|
|
 |
![[Post New]](/jforum/templates/default/images/icon_minipost_new.gif) 14/09/2012 12:23:23
|
pietrotower.spw
![[Avatar]](/jforum/images/avatar/28267ab848bcf807b2ed53c3a8f8fc8a.jpg)
Joined: 14/09/2012 10:24:16
Messages: 7
Location: Milan, Italy
Offline
|
For instance,
this is the template that I am using:
<HIGHCHART width="100%" height="100%">
<CHART margin='[50, 0, 0, 0]' plotBackgroundColor='none' plotBorderWidth='0' plotShadow='false' />
<TITLE text="Incassi per Area Commerciale $F{AC} / $F{AP}"/>
<LEGEND/>
<SUBTITLE text='Anello interno: $F{AC}, anello esterno: $F{AP}'>
</SUBTITLE>
<X_AXIS showLastLabel="false">
<TITLE/>
</X_AXIS>
<Y_AXIS showLastLabel="false">
<TITLE/>
</Y_AXIS>
<PLOT_OPTIONS>
<PIE enableMouseTracking="true" shadow="true" stickyTracking="true" visible="true">
<DATA_LABELS enabled="true"/>
</PIE>
</PLOT_OPTIONS>
<DRILL document="chartRicaviFamProd">
<PARAM_LIST>
<PARAM name="AREA_COMM" type="CATEGORY"/>
</PARAM_LIST>
</DRILL>
<SERIES_LIST>
<SERIES name='$F{AC}' alias="AREA_COMM,IncassoAC" type="pie" size="80%" innerSize="45%">
<DATA_LABELS enabled='true' color='#000000' connectorColor='#000000'/>
</SERIES>
<SERIES name='$F{AP}' alias="AREA_COMM,IncassoAP" type="pie" size="45%" innerSize="20%">
<DATA_LABELS enabled='false' />
</SERIES>
</SERIES_LIST>
<!-- tooltip object properties -->
<TOOLTIP backgroundColor='#FFFFFF' enabled='true' shadow='true'>
<STYLE color='#4572A7' fontSize='8px' />
</TOOLTIP>
</HIGHCHART>
and this is the dataset from which I get my data:
select EXTRACT(YEAR FROM sysdate) as AC,EXTRACT(YEAR FROM sysdate)-1 as AP,NVL(a.AreaComm,'ND') as AREA_COMM, a.incasso_year_to_date_AC as IncassoAC,b.incasso_year_to_date_AP as IncassoAP from
(select EXTRACT(YEAR FROM sysdate) as AC,b.AREA_COMM_DES as AreaComm, sum(IMPORTO_GL_VAL) as incasso_year_to_date_AC
from tbdwdm_ricavi a join vw_board_clienti b on a.sito_id = b.cliente_pdc_id
WHERE SUBSTR(FATTURA_DAT,0,4) = EXTRACT(YEAR FROM sysdate)
group by b.AREA_COMM_DES) a
join
(select EXTRACT(YEAR FROM sysdate)-1 as AP, b.AREA_COMM_DES as AreaComm, sum(IMPORTO_GL_VAL) as incasso_year_to_date_AP
from tbdwdm_ricavi a join vw_board_clienti b on a.sito_id = b.cliente_pdc_id
WHERE SUBSTR(FATTURA_DAT,0,4) = EXTRACT(YEAR FROM sysdate)-1
and FATTURA_DAT <= cast(to_char(CURRENT_DATE-365,'YYYYMMDD') AS INT)
group by b.AREA_COMM_DES) b
on a.AreaComm = b.AreaComm
one subquery for the inner pie and one for the outer pie.
|
|
|
 |
![[Post New]](/jforum/templates/default/images/icon_minipost_new.gif) 14/09/2012 12:26:03
|
giachino
SpagoBI supporter
![[Avatar]](/jforum/images/avatar/4e732ced3463d06de0ca9a15b6153677.jpg)
Joined: 05/07/2010 15:41:54
Messages: 240
Location: Turin, Italy
Offline
|
Hi,
probably depends by your dataset. In demo test it simple and returns a row for each category with both values:
Could you post your dataset example and template?
Anto
|
Antonella Giachino
SpagoBI Consultant |
|
|
 |
![[Post New]](/jforum/templates/default/images/icon_minipost_new.gif) 14/09/2012 12:38:33
|
giachino
SpagoBI supporter
![[Avatar]](/jforum/images/avatar/4e732ced3463d06de0ca9a15b6153677.jpg)
Joined: 05/07/2010 15:41:54
Messages: 240
Location: Turin, Italy
Offline
|
Hi,
I saw your template and dataset.
The first thing that I see is that in your template missing the COLOUR_SERIES definition:
Example:
Can you try to add this by hand if the studio doesn't manage it correctly.
I saw your query , it seems correct.
Anto
|
Antonella Giachino
SpagoBI Consultant |
|
|
 |
![[Post New]](/jforum/templates/default/images/icon_minipost_new.gif) 14/09/2012 12:48:02
|
pietrotower.spw
![[Avatar]](/jforum/images/avatar/28267ab848bcf807b2ed53c3a8f8fc8a.jpg)
Joined: 14/09/2012 10:24:16
Messages: 7
Location: Milan, Italy
Offline
|
Hi again,
yes I tried, and with no results. Actually I prefer using raw text XML than spagoBI studio visual editor.. At least I see what the template says exactly .
For instance, the template you suggested me doesn't use <COLORS_LIST>.. and even if I add it to my template I still don't have its result. (I get the two series painted with the same set of colours, yes, but not joined to the same categories )
any other ideas? this is driving me mad
tnx,
pietroTower
This message was edited 1 time. Last update was at 14/09/2012 12:49:22
|
|
|
 |
![[Post New]](/jforum/templates/default/images/icon_minipost_new.gif) 14/09/2012 12:55:32
|
giachino
SpagoBI supporter
![[Avatar]](/jforum/images/avatar/4e732ced3463d06de0ca9a15b6153677.jpg)
Joined: 05/07/2010 15:41:54
Messages: 240
Location: Turin, Italy
Offline
|
The last idea is about the dataset.
The query seems correct but I don't know the real final result. Are you using a pivot transformation?
Check it and eventually simplify it for a test (for example you can use a static dataset like the demo and than dynamic it with real instructions.)
Anto
|
Antonella Giachino
SpagoBI Consultant |
|
|
 |
|
|