PDA

View Full Version : Dynamic ranges on a dial



BobN
10-24-2007, 04:54 PM
Can someone point me to an example of how to put a range on a dial, dynamically in my xml file or help me with this?

<interval>
<label>under</label>
<!-- this is the value that the range starts at -->
<minimum>-15</minimum>
<!-- this is the value that the range stops at -->
<maximum>0</maximum>
<!-- this is the color of the range -->
<color>#ffffff</color>
<!-- this is the color of the text for the range value and tick marks -->
<text-color>#40bb40</text-color>
<stroke-width>5</stroke-width>
</interval>

I'd like minimum and maximum to be determined via a query to my database and then used by the interval tag.

Thanks
Bob

ingo.klose
10-25-2007, 03:10 AM
Hi Bob,

this thread might help, it should explain how to dynamically change properties for the dial chart.

http://forums.pentaho.org/showthread.php?t=54951

Regards,
Ingo

BobN
10-25-2007, 11:17 AM
Ingo,

Here is my code in the .xaction file. Can you tell me why my dial isn't showing up, it has something to do with the intervals and me trying to dynamically set the lower and upper limits on the intervals.

Thanks
Bob

<?xml version="1.0" encoding="UTF-8"?>
<action-sequence>
<title>Yearly Gross Sales DialChart</title>
<version>1</version>
<logging-level>DEBUG</logging-level>
<documentation>
<result-type>chart</result-type>
<description>Dial Chart with the the current year sales</description>
</documentation>
<outputs>
<image-tag type="string">
<destinations>
<response>content</response>
</destinations>
</image-tag>
</outputs>
<actions>
<action-definition>
<component-name>SQLLookupRule</component-name>
<action-type>Relational</action-type>
<action-outputs>
<query-result type="result-set" mapping="query_result"/>
</action-outputs>
<component-definition>
<jndi><![CDATA[myfirst]]></jndi>
<live><![CDATA[false]]></live>
<query><![CDATA[select ROUND(SUM(DBNTPRC)/1000000,2) as value, 0 as minimum, 12 as maximum
from Dashboard_DBN_RAW
where YEAR = 2007]]></query>
</component-definition>
</action-definition>
<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<query_result type="result-set"/>
</action-inputs>
<action-outputs>
<salestot type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[salestot = query_result.getValueAt(0,0);]]></script>
</component-definition>
</action-definition>
<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<query_result type="result-set"/>
</action-inputs>
<action-outputs>
<minval type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[minval = query_result.getValueAt(0,1);]]></script>
</component-definition>
</action-definition>
<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<query_result type="result-set"/>
</action-inputs>
<action-outputs>
<maxval type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[maxval = query_result.getValueAt(0,2);]]></script>
</component-definition>
</action-definition>
<action-definition>
<component-name>ChartComponent</component-name>
<action-type>Dial Chart</action-type>
<action-inputs>
<chart-data type="result-set" mapping="query_result"/>
<salestot type="string"/>
</action-inputs>
<action-outputs>
<image-tag type="string"/>
</action-outputs>
<component-definition>
<chart-attributes>
<chart-type>DialChart</chart-type>
<border-visible>true</border-visible>
<tick-interval>1</tick-interval>
<value-color>#9999bb</value-color>
<tick-color>#808080</tick-color>
<!-- this is the color of the needle -->
<needle-color>#0000FF</needle-color>
<plot-background-color>#FFFFFF</plot-background-color>
<!-- intervals define ranges on the dial that are colored differently from the dial background -->
<interval>
<label>over</label>
<!-- this is the value that the range starts at -->
<minimum>{minval}</minimum>
<!-- this is the value that the range stops at -->
<maximum>{minval} + 3</maximum>
<!-- this is the color of the range -->
<color>#FF0000</color>
<!-- this is the color of the text for the range value and tick marks -->
<text-color>#bb4040</text-color>
<stroke-width>2</stroke-width>
</interval>
<interval>
<label>over</label>
<minimum>{minval} + 3</minimum>
<maximum>{minval} + 8</maximum>
<color>#FFFF00</color>
<text-color>#40bb40</text-color>
<stroke-width>2</stroke-width>
</interval>
<interval>
<label>over</label>
<minimum>{maxval} - 4</minimum>
<maximum>{maxval}</maximum>
<color>#00FF00</color>
<text-color>#40bb40</text-color>
<stroke-width>2</stroke-width>
</interval>
</chart-attributes>
<width><![CDATA[160]]></width>
<height><![CDATA[160]]></height>
<title>Current Year Sales ${salestot} Million </title>
<by-row>true</by-row>
</component-definition>
</action-definition>
</actions>
</action-sequence>

ingo.klose
10-26-2007, 09:42 AM
But you don't get any error, right?

Try using one of the other output targets in:

<action-outputs>
<image-tag type="string"/>
</action-outputs>

Here you'll find some help regarding this topic: http://wiki.pentaho.org/display/PentahoDoc/Chart+Component

Regards,
Ingo

BobN
10-26-2007, 11:43 AM
But you don't get any error, right?

Try using one of the other output targets in:

<action-outputs>
<image-tag type="string"/>
</action-outputs>

Here you'll find some help regarding this topic: http://wiki.pentaho.org/display/PentahoDoc/Chart+Component

Regards,
Ingo

No I don't get any errors. I've got my dial showing up correctly but the issue is that I'm trying to retrieve the minimum and maximum values from a result set and assign them to MinVal and MaxVal variables. Currently I retrieve a total sales value with no problem but when I try to retrieve the Min and Max values from that same result set that is when my dial doesn't appear. If I change my code for the salestot from

<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<query_result type="result-set"/>
</action-inputs>
<action-outputs>
<salestot type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[salestot = query_result.getValueAt(0,0);]]></script>
</component-definition>
</action-definition>

to

<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<query_result type="result-set"/>
</action-inputs>
<action-outputs>
<salestot type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[salestot = query_result.getValueAt(0,1);]]></script>
</component-definition>
</action-definition>

then I see my value of 0(minimum value based on my query) in the salestot value since I show it in the title. But the issue is that I can't get the Min and Max values into the appropriate values even though I'm doing the same thing I'm doing on the salestot variable.

Thanks
Bob

ingo.klose
10-29-2007, 07:34 AM
Sorry about the confusion, I thought you got the dial running and had problems with the output.

Well, I had a closer look and got it to work. There were two problems.

1. You did not declare minval and maxval as input variables for the chart action
2. You tried to do calculations on the minval and maxval parameters within the chart action. Any calculations should be done within the Javascript action.

Here is a working example (note SQL statement and connection are different from yours)

Regards,
Ingo


<?xml version="1.0" encoding="UTF-8"?>
<action-sequence>
<title>Yearly Gross Sales DialChart</title>
<version>1</version>
<logging-level>DEBUG</logging-level>
<documentation>
<result-type>chart</result-type>
<description>Dial Chart with the the current year sales</description>
</documentation>

<inputs/>

<outputs>
<image-tag type="string">
<destinations>
<response>content</response>
</destinations>
</image-tag>
</outputs>

<resources/>

<actions>
<action-definition>
<component-name>SQLLookupRule</component-name>
<action-type>Relational</action-type>
<action-inputs/>
<action-outputs>
<query-result type="result-set" mapping="query_result"/>
</action-outputs>
<component-definition>
<jndi><![CDATA[SampleData]]></jndi>
<live><![CDATA[false]]></live>
<query><![CDATA[select ROUND((sum(variance)/ sum(budget))*100,2) as value, -15 as minimun, 15 as maximum
from QUADRANT_ACTUALS]]></query>
</component-definition>
</action-definition>

<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<query_result type="result-set"/>
</action-inputs>
<action-outputs>
<salestot type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[salestot = query_result.getValueAt(0,0);]]></script>
</component-definition>
</action-definition>

<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<query_result type="result-set"/>
</action-inputs>
<action-outputs>
<minval type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[minval = query_result.getValueAt(0,1);]]></script>
</component-definition>
</action-definition>

<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<query_result type="result-set"/>
</action-inputs>
<action-outputs>
<maxval type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[maxval = query_result.getValueAt(0,2);]]></script>
</component-definition>
</action-definition>

<action-definition>
<component-name>ChartComponent</component-name>
<action-type>Dial Chart</action-type>
<action-inputs>
<chart-data type="result-set" mapping="query_result"/>
<salestot type="string"/>
<minval type="string"/>
<maxval type="string"/>
</action-inputs>
<action-outputs>
<image-tag type="string"/>
</action-outputs>
<component-definition>
<chart-attributes>
<chart-type>DialChart</chart-type>
<border-visible>true</border-visible>
<tick-interval>1</tick-interval>
<value-color>#9999bb</value-color>
<tick-color>#808080</tick-color>
<!-- this is the color of the needle -->
<needle-color>#0000FF</needle-color>
<plot-background-color>#FFFFFF</plot-background-color>
<!-- intervals define ranges on the dial that are colored differently from the dial background -->
<interval>
<label>over</label>
<!-- this is the value that the range starts at -->
<minimum>{minval}</minimum>
<!-- this is the value that the range stops at -->
<maximum>{maxval}</maximum>
<!-- this is the color of the range -->
<color>#FF0000</color>
<!-- this is the color of the text for the range value and tick marks -->
<text-color>#bb4040</text-color>
<stroke-width>2</stroke-width>
</interval>
<interval>
<label>over</label>
<minimum>{minval}</minimum>
<maximum>{minval}</maximum>
<color>#FFFF00</color>
<text-color>#40bb40</text-color>
<stroke-width>2</stroke-width>
</interval>
<interval>
<label>over</label>
<minimum>{maxval}</minimum>
<maximum>{maxval}</maximum>
<color>#00FF00</color>
<text-color>#40bb40</text-color>
<stroke-width>2</stroke-width>
</interval>
</chart-attributes>
<width><![CDATA[160]]></width>
<height><![CDATA[160]]></height>
<title>Current Year Sales ${salestot} Million</title>
<by-row>true</by-row>
</component-definition>
</action-definition>

</actions>
</action-sequence>

BobN
10-29-2007, 10:11 AM
Ingo,

Thanks for your help!

Bob

BobN
10-29-2007, 11:47 AM
OK, so as I thought more about this and talked with people in the office I need to have my min and max values and range values from another table. So I created a new SQL Lookup action and a new Javascript action to retrieve the min/max values from this table. My issue comes up in the Chart action, how do I declare the 2 different action inputs one for my data and one for my range values (see bolded code below). So basically what I have is that I'm getting my main data from one table for the dial and the limits of the dial from another table. Again, my dial doesn't show up but I don't get any errors. I'm assuming I can't have two separate action inputs for a Chart action or if I can, then I did them the wrong way.

Thanks
Bob




<?xml version="1.0" encoding="UTF-8"?>
<action-sequence>
<title>Yearly Gross Sales DialChart</title>
<version>1</version>
<logging-level>DEBUG</logging-level>
<documentation>
<author>Bob</author>
<result-type>chart</result-type>
<description>Dial Chart with the the current year sales</description>
</documentation>
<outputs>
<image-tag type="string">
<destinations>
<response>content</response>
</destinations>
</image-tag>
</outputs>
<actions>
<action-definition>
<component-name>SQLLookupRule</component-name>
<action-type>Relational</action-type>
<action-outputs>
<query-result type="result-set" mapping="query_result"/>
</action-outputs>
<component-definition>
<jndi><![CDATA[myfirst]]></jndi>
<live><![CDATA[false]]></live>
<query><![CDATA[select ROUND(SUM(DBNTPRC)/1000000,2) as value
from Dashboard_DBN_RAW
where YEAR = 2007]]></query>
</component-definition>
</action-definition>
<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<query_result type="result-set"/>
</action-inputs>
<action-outputs>
<salestot type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[salestot = query_result.getValueAt(0,0);]]></script>
</component-definition>
</action-definition>
<action-definition>
<component-name>SQLLookupRule</component-name>
<action-type>Relational</action-type>
<action-outputs>
<query-result type="result-set" mapping="dial_limits"/>
</action-outputs>
<component-definition>
<jndi><![CDATA[myfirst]]></jndi>
<live><![CDATA[false]]></live>
<query><![CDATA[select NumOfRanges, AbsMin, AbsMax,
Range1Max, Range2Max, Range3Max, Range4Max
from Dial_Limits
WHERE DialCode = "dial1"]]></query>
</component-definition>
</action-definition>
<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<dial_limits type="result-set"/>
</action-inputs>
<action-outputs>
<minval type="string"/>
<maxval type="string"/>
<Range1Max type="string"/>
<Range2Max type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[minval = query_result.getValueAt(0,2);]]></script>
<script><![CDATA[maxval = query_result.getValueAt(0,3);]]></script>
<script><![CDATA[Range1Max = query_result.getValueAt(0,4);]]></script>
<script><![CDATA[Range2Max = query_result.getValueAt(0,5);]]></script>
</component-definition>
</action-definition>

<action-definition>
<component-name>ChartComponent</component-name>
<action-type>Dial Chart</action-type>
<action-inputs>
<chart-data type="result-set" mapping="query_result"/>
<salestot type="string"/>
</action-inputs>
<action-inputs>
<chart-data type="result-set" mapping="dial_limits"/>
<minval type="string"/>
<maxval type="string"/>
<Range1Max type="string"/>
<Range2Max type="string"/>
</action-inputs>
<action-outputs>
<image-tag type="string"/>
</action-outputs>
<component-definition>
<chart-attributes>
<chart-type>DialChart</chart-type>
<border-visible>true</border-visible>
<tick-interval>1</tick-interval>
<value-color>#9999bb</value-color>
<tick-color>#808080</tick-color>
<!-- this is the color of the needle -->
<needle-color>#0000FF</needle-color>
<plot-background-color>#FFFFFF</plot-background-color>
<!-- intervals define ranges on the dial that are colored differently from the dial background -->
<interval>
<label>over</label>
<!-- this is the value that the range starts at -->
<minimum>{minval}</minimum>
<!-- this is the value that the range stops at -->
<maximum>{Range1Max}</maximum>
<!-- this is the color of the range -->
<color>#FF0000</color>
<!-- this is the color of the text for the range value and tick marks -->
<text-color>#bb4040</text-color>
<stroke-width>2</stroke-width>
</interval>
<interval>
<label>over</label>
<minimum>{Range1Max}</minimum>
<maximum>{Range2Max}</maximum>
<color>#FFFF00</color>
<text-color>#40bb40</text-color>
<stroke-width>2</stroke-width>
</interval>
<interval>
<label>over</label>
<minimum>{Range2Max}</minimum>
<maximum>{maxval}</maximum>
<color>#00FF00</color>
<text-color>#40bb40</text-color>
<stroke-width>2</stroke-width>
</interval>
</chart-attributes>
<width><![CDATA[160]]></width>
<height><![CDATA[160]]></height>
<title>Current Year Sales ${salestot} Million</title>
<by-row>true</by-row>
</component-definition>
</action-definition>
</actions>
</action-sequence>

ingo.klose
10-29-2007, 12:10 PM
Hi Bob,

on the first look I found a couple of issues:

1.2. Java Script:



<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<dial_limits type="result-set"/>
</action-inputs>
<action-outputs>
<minval type="string"/>
<maxval type="string"/>
<Range1Max type="string"/>
<Range2Max type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[minval = query_result.getValueAt(0,2);]]></script>
<script><![CDATA[maxval = query_result.getValueAt(0,3);]]></script>
<script><![CDATA[Range1Max = query_result.getValueAt(0,4);]]></script>
<script><![CDATA[Range2Max = query_result.getValueAt(0,5);]]></script>
</component-definition>
</action-definition>


should be




<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<dial_limits type="result-set"/>
</action-inputs>
<action-outputs>
<minval type="string"/>
<maxval type="string"/>
<Range1Max type="string"/>
<Range2Max type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[minval = query_result.getValueAt(0,2);
maxval = query_result.getValueAt(0,3);
Range1Max = query_result.getValueAt(0,4);
Range2Max = query_result.getValueAt(0,5);]]></script>
</component-definition>
</action-definition>


2. Action Inputs (only one action-inputs tag) for chart should be:



<action-inputs>
<salestot type="string"/>
<minval type="string"/>
<maxval type="string"/>
<Range1Max type="string"/>
<Range2Max type="string"/>
</action-inputs>


Hope this helps!

Regards

BobN
10-29-2007, 12:37 PM
Hi Ingo,

First off thanks for all your help!

So I made the changes you told me to try in regards to the CDATA (I didn't realize I could put multiple lines of code in one CDATA statement). 2nd with the changes to the action input as shown below...what happened to the <chart-data type="result-set" mapping="query_result"/> or is it not needed. If it is needed I'd need one for the result set that produces the Min/Max and range values too, correct? Would it be a 2nd <chart-data...> node within the action-inputs? Because that is what I have now but the dial still doesn't show up.


<action-inputs>
<salestot type="string"/>
<minval type="string"/>
<maxval type="string"/>
<Range1Max type="string"/>
<Range2Max type="string"/>
</action-inputs>

Here's what I have....

<action-inputs>
<chart-data type="result-set" mapping="query_result"/>
<salestot type="string"/>
<chart-data type="result-set" mapping="dial_limits"/>
<minval type="string"/>
<maxval type="string"/>
<Range1Max type="string"/>
<Range2Max type="string"/>
</action-inputs>

Thanks
Bob

ingo.klose
10-29-2007, 12:50 PM
Hi Bob,

first a question are you using the Pentaho Design Studio to create the action sequences or are you writting them by hand? I would advise you to use the Design Studio, it might help with some of the syntax issues.

Regarding your questions, the script CDATA contains the whole Javascript for the action no matter how many lines. To be honest I don't know how the platform handles multiple script tags. Same with the action-inputs tag. There is only one of those per action and it contains all variables you would like to pass to the action, no matter what the source action of the variables is (as long as it comes before this action). I think you don't need to pass the result sets, since you retrieved the values in the JavaSript actions and passed them in the various varables.

Regards,
Ingo

BobN
10-29-2007, 12:57 PM
Hi Bob,

first a question are you using the Pentaho Design Studio to create the action sequences or are you writting them by hand? I would advise you to use the Design Studio, it might help with some of the syntax issues.

Regarding your questions, the script CDATA contains the whole Javascript for the action no matter how many lines. To be honest I don't know how the platform handles multiple script tags. Same with the action-inputs tag. There is only one of those per action and it contains all variables you would like to pass to the action, no matter what the source action of the variables is (as long as it comes before this action). I think you don't need to pass the result sets, since you retrieved the values in the JavaSript actions and passed them in the various varables.

Regards,
Ingo

Ingo,

I am just writing them by hand trying to follow some of the examples that came with Pentaho. I will try the Design Studio.

Is there a way for me to debug what might be happening to my code since the dial still isn't appearing. What I'm getting in the source code (via View Source) is link to my pivot table but the <map...> and <image...> tags for my dial aren't being created.

On a side note, the result set does need to be passed in to the chart-type action because I have another dial that when I removed the <chart-data...> node, that dial no longer worked.

Thanks
Bob

ingo.klose
10-29-2007, 01:35 PM
Hi,

I got it working again.Here aare couple of pointers:

1. The dial requieres the following input parameter: <chart-data type="result-set" mapping="query_result"/>
2. Make sure that you use the right result set in the JavaScripts.In the second you used query-result instead of dial_limits.
3. The result set array are 0 based, dial_limits.getValueAt(0,2) is the value of the third columnin the first row.

I think that was about it. For debugging you only have the information that the server returns in the console or the error message in the frontend unless you integrate the source code etc. with Eclipse.

Regards,
Ingo



<?xml version="1.0" encoding="UTF-8"?>
<action-sequence>
<title>Yearly Gross Sales DialChart</title>
<version>1</version>
<logging-level>DEBUG</logging-level>
<documentation>
<author>Bob</author>
<result-type>chart</result-type>
<description>Dial Chart with the the current year sales</description>
</documentation>

<outputs>
<image-tag type="string">
<destinations>
<response>content</response>
</destinations>
</image-tag>
</outputs>

<actions>
<action-definition>
<component-name>SQLLookupRule</component-name>
<action-type>Relational</action-type>
<action-outputs>
<query-result type="result-set" mapping="query_result"/>
</action-outputs>
<component-definition>
<jndi><![CDATA[myfirst]]></jndi>
<live><![CDATA[false]]></live>
<query><![CDATA[select ROUND(SUM(DBNTPRC)/1000000,2) as value
from Dashboard_DBN_RAW
where YEAR = 2007]]></query>
</component-definition>
</action-definition>

<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<query_result type="result-set"/>
</action-inputs>
<action-outputs>
<salestot type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[salestot = query_result.getValueAt(0,0);]]></script>
</component-definition>
</action-definition>

<action-definition>
<component-name>SQLLookupRule</component-name>
<action-type>Relational</action-type>
<action-outputs>
<query-result type="result-set" mapping="dial_limits"/>
</action-outputs>
<component-definition>
<jndi><![CDATA[myfirst]]></jndi>
<live><![CDATA[false]]></live>
<query><![CDATA[select NumOfRanges, AbsMin, AbsMax,
Range1Max, Range2Max, Range3Max, Range4Max
from Dial_Limits
WHERE DialCode = "dial1"]]></query>
</component-definition>
</action-definition>

<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<dial_limits type="result-set"/>
</action-inputs>
<action-outputs>
<minval type="string"/>
<maxval type="string"/>
<Range1Max type="string"/>
<Range2Max type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[minval = dial_limits.getValueAt(0,2);
maxval = dial_limits.getValueAt(0,3);
Range1Max = dial_limits.getValueAt(0,4);
Range2Max = dial_limits.getValueAt(0,5);]]></script>
</component-definition>
</action-definition>

<action-definition>
<component-name>ChartComponent</component-name>
<action-type>Dial Chart</action-type>
<action-inputs>
<chart-data type="result-set" mapping="query_result"/>
<salestot type="string"/>
<minval type="string"/>
<maxval type="string"/>
<Range1Max type="string"/>
<Range2Max type="string"/>
</action-inputs>
<action-outputs>
<image-tag type="string"/>
</action-outputs>
<component-definition>
<chart-attributes>
<chart-type>DialChart</chart-type>
<border-visible>true</border-visible>
<tick-interval>1</tick-interval>
<value-color>#9999bb</value-color>
<tick-color>#808080</tick-color>
<!-- this is the color of the needle -->
<needle-color>#0000FF</needle-color>
<plot-background-color>#FFFFFF</plot-background-color>
<!-- intervals define ranges on the dial that are colored differently from the dial background -->
<interval>
<label>over</label>
<!-- this is the value that the range starts at -->
<minimum>{minval}</minimum>
<!-- this is the value that the range stops at -->
<maximum>{Range1Max}</maximum>
<!-- this is the color of the range -->
<color>#FF0000</color>
<!-- this is the color of the text for the range value and tick marks -->
<text-color>#bb4040</text-color>
<stroke-width>2</stroke-width>
</interval>
<interval>
<label>over</label>
<minimum>{Range1Max}</minimum>
<maximum>{Range2Max}</maximum>
<color>#FFFF00</color>
<text-color>#40bb40</text-color>
<stroke-width>2</stroke-width>
</interval>
<interval>
<label>over</label>
<minimum>{Range2Max}</minimum>
<maximum>{maxval}</maximum>
<color>#00FF00</color>
<text-color>#40bb40</text-color>
<stroke-width>2</stroke-width>
</interval>
</chart-attributes>
<width><![CDATA[160]]></width>
<height><![CDATA[160]]></height>
<title>Current Year Sales ${salestot} Million</title>
<by-row>true</by-row>
</component-definition>
</action-definition>

</actions>
</action-sequence>

BobN
10-29-2007, 03:57 PM
Hi Ingo,

I went ahead and made the changes that you talked about below and my dial still didn't show up. So I decided to compare our two files and they were identical but to make sure that my eyes weren't messing with me, I copied your code below into an .XACTION file ingo.xaction and I called that in place of my .xaction file. I was looking at the server and I am getting an error, sorry I didn't realize this before I'm used to errors appearing on the web page, but irregardless, what I am seeing is this error

14:20:14,309 ERROR [ChartComponent] Error end:
14:20:14,310 ERROR [RuntimeContext] f99c753a-8653-11dc-8424-fddd7cf43393:RUNTIME:context-7774442-1193685614246:ingo.xaction RuntimeContext.ERROR_0012 - ActionDefinition for ChartComponent did not execute successfully
14:20:14,311 ERROR [SolutionEngine] f99c753a-8653-11dc-8424-fddd7cf43393:SOLUTION-ENGINE:ingo.xaction: SolutionEngine.ERROR_0007 - Action sequence execution failed

I looked in the WIKI for anything on ERROR_007 and found nothing via the search.

The error message doesn't mean to much to me other than there was a problem in the Chart Component and it failed execution.

If you have any ideas again, I'd appreciate the help.

Thanks again,
Bob

BobN
10-29-2007, 04:04 PM
Ingo,

Please disregard the last message. It is now working. I stopped the Pentaho service and restarted it and everything worked fine.

Thanks
Bob