Hitachi Vantara Pentaho Community Forums
Results 1 to 37 of 37

Thread: Dial Chart and Action Squence

  1. #1
    Join Date
    Jun 2007
    Posts
    9

    Default Dial Chart and Action Squence

    Hi

    I want to run an action sequence and use the output of the action sequence as data for my Dial Chart. In the pentaho examples the data for the dial chart is hardcoded into the JSP page so I am just wondering is there a way of doing it via the action sequence output. Please any help would be greatly appreciated.

    thanks
    - Mike

  2. #2
    Join Date
    Dec 2005
    Posts
    531

    Default Example xAction

    Hi Mike,

    enclosed you will find an example xaction that creates a dial chart with the values from an SQL query.

    Hope it helps. If you have questions, just post them in this thread.

    All the best,
    Ingo
    Attached Files Attached Files

  3. #3
    Join Date
    Jun 2007
    Posts
    9

    Default

    thanks a million Ingo.

    All the best
    regards, Mike

  4. #4
    Join Date
    Jul 2007
    Posts
    4

    Default

    Hi

    Have you been able to execute it properly? I tried but i couldn't.

    I'm using a JDBC driver to connect to a Oracle databse. It connects fine because i can retrive information and dispaly it on the screen. But when i adapt this action nothing appears. It appears:

    [pt_21] Action Successful

    only.

    thank you

    ricardo

  5. #5
    Join Date
    Dec 2005
    Posts
    531

    Default

    Hi,

    do you have an valid output defined?

    Regards,
    Ingo

  6. #6
    Join Date
    Jul 2007
    Posts
    4

    Default

    the xml has this

    <outputs><image-tagtype="string"/></outputs>

    I didn't changed it

    ricardo

  7. #7
    Join Date
    Jul 2007
    Posts
    4

    Default

    Do i need any JSP to execute it??

    ricardo

  8. #8
    Join Date
    Mar 2006
    Posts
    142

    Question Where to call .xaction from

    I am unsure where to call the DepartmentDialChart.xaction file from. I have been using the PCI and modifying the SampleDashboard.jsp file to customize it for my own database connection.

    In the flow of SampleDashboard.jsp, it "hardcodes" the values of the dial based on the time and then uses the ChartHelper.DoDial method which uses sampledial.widget.xml to produce the dial.

    With the .xaction file (DepartmentDialChart.xaction) does the use of sampledial.widget.xml go away. Seems like all the dial configuaration that is contained in sampledial.wdget.xml is part of DepartmentDialChart.xaction. How should DepartmentDialChart.xaction be invoked from SampleDahboard.jsp ???? is Charthelper.DoDial not used when a dial is being fed from a SQL query via a .xaction file??????

    Could someone clarify how to use the DepartmentDialChart.xaction file in in terms of modifying SampleDashboard.jsp

    Thanks,
    Bill

  9. #9
    Join Date
    Dec 2005
    Posts
    531

    Default

    Hi Bill,

    you are right, if you define the chart in the xaction you don't need to use the widget. I created the xaction for my solution since the dial chart in the sample dashboard is faked, in terms of the value it displays.

    In regards on how to use the action sequence, you could try ChartHelper.doAction() like it is used for the report on the sample dashboard. I personally like to use the AJAX-API and not the ChartHelper class.

    Have a look at http://sourceforge.net/project/downl...uide_1.2.0.pdf
    and http://wiki.pentaho.org/display/COM/...in+progress%29

    All the best,
    Ingo

  10. #10
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    Thanks for that info, ingo, I'm also interested in that.... not having to use that undocumented widgets seem very nice.

    I need to check the docs, but I must confess I'm a but afraid of ajax yet. I found it very easy to develop some dashboards using the examples and I hope the now suggested was is as fast.
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  11. #11
    Join Date
    Dec 2005
    Posts
    531

    Default

    I personally found the AJAX-API a bit nicer and simpler to work with but that might be personal taste.

    The simple dashboard framework is supposed to get dashboard creation more in line with the overall plattform, no need to add additional JSP pages etc. all is configure within the solution repository. It also goes in the direction that the dashboard editor, as proposed in the incubation site, will take using html-templates and javascript instead of Java in JSP pages.

    Please let me know your feedback!

    Thanks,
    Ingo

  12. #12
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    Ingo, I've read the wiki page and I'm eager to test that in practice.

    Not having to build jsp pages, declare them in web.xml, not having to compile source code and restart the server sound very appealing.

    Also, if we abstract to the developer the inner (and obscure) details of ajax it would be great.

    ...

    now my 2 cents: I'm a bit afraid of writing this since all my experience with dashboards resumes to one demo where I've picked home.jsp, but no harm done trying


    On the simplest cases (and since I like to keep things simple this would mean >80% of the cases), my vision of a dashboard is just an array of contents (Rows x Columns) with parameters passed between them;

    Taken that, I think it would be *very* simple (and awesome) to extend that framework with a higher layer that generated template.html. I would imagine this kind of inputs in a Dashboard Generator:

    - Title/description/author
    - Number of rows
    - Number of columns
    - The xaction to invoke on each "cell"
    - A way to define what parameters each cell "exports" to the other cells

    Templating could be made by css or by a header/footer html snippet.

    .... or maybe this is all nonsense


    Pedro Alves
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  13. #13
    Join Date
    Dec 2005
    Posts
    531

    Default

    Hi Pedro,

    I don't think it's nonsense but exactly what is needed. With the framework you could already seperate the template from the logic. You can then use standard templates and just change the Javascript/AJAX/Logic part to define what data is shown.

    I think the Dashboard designer will go exactly that way and provide an GUI to generate Dashboard content (in the simplest form just a template and logic). I think the Pentaho folks are just waiting for community members to pick up the effort in the Incubation project.

    Ingo

  14. #14
    Join Date
    Mar 2006
    Posts
    142

    Default Still can't get this to quite work

    Ingo,
    Thanks for the help so far, but I am still having some issues getting the dial to show up in my dash board via an .xaction file. I am totally new to JSP and even HTML so this is a bit slow going. When I run my .xaction file by itself it works fine, data is retrieved from my MySQL database and I get "Action Successful" plus the dial displayed---yes!. I am getting the following text below the dial however:

    image-tag=

    I assume this is from the <output> section of my .xaction file which is a slightly edited version of the DepartmentDialChart.xaction file that you posted. Do I need to do something with this <output> ??

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


    Then in my modified version of SampleDashboard.jsp I have the following code to attempt to bring up the dial on the dashboard. I just get nothing, no errors that I can see anywhere but the dial does not display. I already have a Pie chart and bar chart displaying on the top row of my dashboard.
    I've exluded the <TABLE> and <TR>, <TD> tags that surround this code

    Code:

    <%
    content = new StringBuffer();
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    messages = new ArrayList();
    // run the action sequence 'samples/dashboard/ppro_dial.xaction'
    ChartHelper.doAction( "samples", "dashboard", "ppro_dial.xaction", "SampleDashboard", parameters, outputStream , userSession, messages, null );

    %>
    <p/>
    <% out.write( outputStream.toString() ); %>


    Am I not setting the output properly in my .xaction file or not displaying the output properly back in the SampleDashboard.jsp file ? I am not sure what ByteArrayOutputStream does but it seems related to the output processing. This was taken from the example that was invoking a report on a dashboard va a .xaction file....is soemthing different needed for a Dial ?


    Thank You,
    Bill
    Last edited by Bolek; 08-22-2007 at 03:16 PM.

  15. #15
    Join Date
    Dec 2005
    Posts
    531

    Default

    Hi,

    the JSP part looks good, but I have not tried using charts that way. You could try the different output options that the chart component offers. Have a look at the Chart component documentation in the WIKI.

    A good candidate should be CHART_OUTPUT, make sure you set the xaction output accordingly: "displays if the output destination is response and the name is content."

    Good luck,
    Ingo

  16. #16
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    I can't believe there's a wiki page for charts, I need to check that more often...

    Yesterday I posted an example of using the chart components: http://forums.pentaho.org/showthread...640#post167640
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  17. #17
    Join Date
    Dec 2005
    Posts
    531

    Default

    Yep, that WIKI is growing and growing and for me it turns out to be very useful, although it is not always 100% complete or current. But still so much better then the first set of pdf-docs that existed or are still existing.

    Sometimes I think people don't even know that it exists, when I look at some of the questions in the forum.

  18. #18
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    One thing is sure... It's a bit difficult, or at least non-intuitive, to find things in wiki.

    I spent a couple of minutes to find that page, and I knew it was there . It would be really helpful to have some kind of global index, or at least give more emphases to Actions and Component Reference
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  19. #19
    Join Date
    Dec 2005
    Posts
    531

    Default

    That's true, too. Maybe there should be a How-To-Start page with the most important links regarding to those things.

  20. #20
    Join Date
    Mar 2006
    Posts
    142

    Question Still stuck ????

    Ingo / pmalves,
    I still can't seem to get a dial to display on a dashboard via a jsp call. I know that Ingo uses the AJAX API to do this and I saw his WIKI entry on dashboad model (8/21/07)l. However, I am so new to JSP, AJAX, XML I am lost. I am trying to put together a dashboard with Dials from my own database and I need a sample this week. I feel I am so close via the JSP and xaction file interaction that I am hesistant to start off on the AJAX path because I feel I would be starting over. Basically where I am at is when I execute my xaction file on its own I get a dial to display properly with the result of a SQL qeury from my database. I then am trying to use the Charthelper.doAction function from my JSP file to disply the dial. I keep getting no result. I believe the issue may be the output settings in the xaction file. I know the sample dashboard used the Charthelper.DoDial function but based on previous replies to my questions by Ingo he seemed to indicate Charthelper.DoDial could not be used if I wanted to base the value off a SQL query.

    In my working xaction file I have the output defined as

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

    This xaction displays the proper dial but it doens have one side affect, it hase the text:

    "iamge-tag=" beneath the dial which I would not want, but I am ignoring that issue at the moment. After corresponding with Ingo I modified the output settings in the xaction file to be:

    <outputs>
    <chart-data type="content">
    <destinations>
    <response>content</response>
    </destinations>
    </chart-data>
    </outputs>


    <action-outputs>
    <chart-data type="content"/>
    <chart-output type="string" />
    </action-outputs>


    Then I was attempting to use the ChartHelper.doAction funtion to call my xaction file to display the dial on the dashboard. I wind up not getting anything displayed on the dashboard and can't see any errors getting thrown. When I attempt to execute the xaction file by itself with the newly defined output settings, I get "Action Successful" but the dial does not appear.

    So I think I still have some issues with the JSP code and/or action output definition.

    My JSP code looks like:

    <%

    // Display a dial for Gross Sales
    content = new StringBuffer();
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    messages = new ArrayList();

    // run the action sequence 'samples/dashboard/ppro_dial.xaction'
    ChartHelper.doAction( "samples", "dashboard", "ppro_dial.xaction", "SampleDashboard", parameters, outputStream, userSession, messages, null );

    %>
    </span>
    <p/>
    <% out.write( outputStream.toString() ); %>


    I use the outputStream parameter as DoAction doesn't allow me to use content. Is this wher my issue is ??? It seems like a mismatch ot me to be specifiying outputs of type "content" in my xaction file but then not using that in the parameter list to ChartHelper.doAction.

    Does anyone have a complete example of a jsp and xaction file pair that displays a dial that gets it's value from a SQL query ? I must have something mesed up.


    I attempted another path to get a working solutions by modifying the sampledial.widget.xml to use a <data> tag and call my xaction file from there, but that also didn;t work for me, I could not get the <value> property of the dial ste based on my xaction file. I tried this way because I can successfully display Pie and Bar charts on my dashboard that get data based on an xaction file. I couldn;t get this way to work either.

    Can you help ?

    Thaks,
    Bill

  21. #21
    Join Date
    Dec 2005
    Posts
    531

    Smile I got it to work

    Hi Bill,

    I got it working, at least on my machine using SampleDashboard.

    The result is only the picture when you display the xaction directly with ViewAction and it also displays when used in the sample dashboard.

    Hope it works for you, too.

    Let us know and good luck.

    Best regards,
    Ingo


    JSP - just the doAction and output
    Code:
    ...
    ChartHelper.doAction("samples", "dashboard", "ppro_dial.xaction", "SampleDashboard", parameters, outputStream, userSession, messages, null ); 
    // write the report content into this page
    %>
    </span>
    <p/>
    <% out.write( outputStream.toString() ); %>
    Chart Action - you might have different parameters and settings, important is the action-output-tag only containing <image-tag type="string"/>
    Code:
    <action-definition> 
          <component-name>ChartComponent</component-name>
          <action-type>Dial Chart</action-type>
          <action-inputs> 
            <chart-data type="result-set" mapping="query_result"/>  
            <variance type="string"/> 
          </action-inputs>
          <action-outputs> 
            <image-tag type="string"/> 
          </action-outputs>
          <component-definition> 
            ...
          </component-definition> 
        </action-definition>
    XAction outputs - the trick was to add the destination for the image-tag as response with the name content.
    Code:
    <outputs> 
        <image-tag type="string">
          <destinations>
            <response>content</response>
          </destinations>
        </image-tag> 
      </outputs>
    Last edited by ingo.klose; 08-28-2007 at 07:09 AM.

  22. #22
    Join Date
    Mar 2006
    Posts
    142

    Smile It Works!!!

    Thanks so much Ingo....the missing part was the <destination> tag in my xaction file as you suspected. Ahh...this was very frustrating but I am gald to be able to move forward again. I appreciate the assistance you gave over the last couple of weeks.

    - Bill

  23. #23
    Join Date
    Jan 2008
    Posts
    12

    Default

    Hi,

    with this Post I had it working too. Many thanks to Ingo.
    But I have three Questions:

    1)How can I format the value in the title like this 31.000 (with thousands point) ?

    2)Is it possible to show the value in the Botton of the Dialchart like the Pentaho Examples?

    3)The texture Image works not, what do I wrong? With a static Dialchart it works. Is it possible to get the texture working with dynamic values?

    It would be great if somone can help me. This very goog Tutorial from Ingo in the WIKI helps me not in this Case http://wiki.pentaho.org/display/COM/...ho+BI+Platform

    Thanks, Jochen

  24. #24
    Join Date
    Dec 2005
    Posts
    531

    Default

    Hi Jochen,

    1.) You can format the value before you pass it to the dial chart, e.g. in your SQL statement or using java script. (numeric fomats with java script)
    2.) If you have a look at the SampleDashboard.jsp, you will see that the value is not actually part of the chart, but added seperately in the JSP. Again you could try to use a JAvaScript in the Action Sequence to add some HTMl to the image-tag to display the value below the chart.
    3.) Can't help you there, have not tried it.

    Best regards,
    Ingo

  25. #25

    Default

    Jochen-

    I have some of the same issues; I notice that on the background texture, it works great if the dial is set to the "correct" size for the texture, and I leave the title/subtitle blank. For example, using the dial_03.gif that's used in the example dashboard, the dial has to be set at 105px. Otherwise, it gets skewed. I haven't taken the time to play with resizing the picture yet.

    When you say the texture doesn't work, what symptoms are you experiencing? I have mine working with dynamic values pulled from a MS-SQL database, so it can be done. Did you change the size of the dial, or did you perhaps change the texture you're using? I had a problem where I wanted to use a picture outside the solutions repository, but couldn't get the xaction to reference it.

    I'm trying, in my action sequence, to modify the image-tag per Ingo's suggestion, but as of yet, I haven't figured it out. It seems like it should be a simple matter of tacking on another action to the end, taking the image-tag and appending some HTML to it, but if someone has any better ideas, I'd love to hear them.

    -d-
    Last edited by dherzog; 02-11-2008 at 02:40 PM.
    Have you hugged your computer geek today?

  26. #26
    Join Date
    Jan 2008
    Posts
    12

    Default

    Thanks for your replies.

    I have now testet the Setiings with serveral Options.
    The Background does not work. Have set the size to 105 x 105 and set the title to zero, but no background was shown.

    In the sapmles Dashboard i have not found the place to set the img-tag for the value at the botton of the image.

    i give up at this time.
    it is not so urgent, only the javascript format of the value with thousand point
    i have to figure out.

    Get the format of the value working with this round function:
    http://javascript.jstruebig.de/javascript/37/

    jochen
    Last edited by joepent; 02-12-2008 at 04:12 AM.

  27. #27

    Default

    Jochen-

    I know you said you've given up for now, but if you have the time to post you XACTION and widget code, perhaps we can troubleshoot it from that; someone else may be having the same issue, and it could help them.

    Good luck,

    -d-
    Have you hugged your computer geek today?

  28. #28
    Join Date
    Jan 2008
    Posts
    12

    Default

    dherzog,

    sorry, sure you are right.
    Here ist the xaction with the Javascriptcode to format the Number:

    PHP Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <action-sequence>
      <title>TagUmsatzDialChart</title>
      <version>1</version>
      <logging-level>ERROR</logging-level>
      <documentation>
        <author></author>
        <result-type>chart</result-type>
        <description>Dial Chart das den durchschnittlichen Tagesumsatz anzeigt</description>
      </documentation>

      <inputs>
      </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-inputs>
          <action-outputs>
            <query-result type="result-set" mapping="query_result"/>
          </action-outputs>
          <component-definition>
              <jndi>bi-huen</jndi>
              <query><![CDATA[select ROUND(sum(pwert_arab) / (select COUNT(DISTINCT (rg_dat))FROM ums_all_gj_akt WHERE Monat = MONTH(NOW())),0 ) AS Umsatz FROM ums_all_gj_akt WHERE Monat = MONTH(NOW())]]></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>
            <umsatz type="string"/>
          </action-outputs>
          <component-definition>
            <script><![CDATA[
            var getval = query_result.getValueAt(0,0);
            umsatz = formatZahl( getval )

            // usage: format_zahl( number [, number]  [, bool]  )
            function formatZahl(zahl, k, fix)
            {
                if(!k) k = 0;
                var neu = '';
                // Runden
                var f = Math.pow(10, k);
                zahl = '' + parseInt( zahl * f + (.5 * (zahl > 0 ? 1 : -1)) ) / f ;
                // Komma ermittlen
                var idx = zahl.indexOf('.');
                // fehlende Nullen einfügen
                if(fix)
                {
                     zahl += (idx == -1 ? '.' : '' )
                     + f.toString().substring(1);
                }
                // Nachkommastellen ermittlen
                idx = zahl.indexOf('.');
                if( idx == -1) idx = zahl.length;
                else neu = ',' + zahl.substr(idx + 1, k);
                // Tausendertrennzeichen
                while(idx > 0)
                {
                    if(idx - 3 > 0)
                    neu = '.' + zahl.substring( idx - 3, idx) + neu;
                    else
                    neu = zahl.substring(0, idx) + neu;
                    idx -= 3;
                }
                return neu;
            }
            ]]>
            </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"/>
            <umsatz type="string"/>
          </action-inputs>
          <action-outputs>
            <image-tag type="string"/>
          </action-outputs>
          <component-definition>
            <chart-attributes>
              <chart-type>DialChart</chart-type>
              <border-visible>false</border-visible>
              <plot-background type="texture">
                  <texture-image>samples/portal/dial_03.gif</texture-image>
              </plot-background>
            <tick-interval>5000</tick-interval>
            <value-color>#9999bb</value-color>
            <tick-color>#808080</tick-color>
            <!--  this is the color of the needle -->
            <needle-color>#808080</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>under</label>
                <minimum>0</minimum>
                <maximum>150000</maximum>
                <color>#ffffff</color>
                <text-color>#bb4040</text-color>
                <stroke-width>5</stroke-width>
            </interval>
            <interval>
                <label>over</label>
                <!-- this is the value that the range starts at -->
                <minimum1>50000</minimum>
                <!-- this is the value that the range stops at -->
                <maximum>1100000</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>
            </chart-attributes>
            <width>125</width>
            <height>125</height>
            <title>Tag {umsatz}</title>
            <by-row>true</by-row>
          </component-definition>
        </action-definition>

      </actions>
    </action-sequence>
    There is no external widget code, the xaction is called direkt from the jsp without any reference.

    The Code in the Home.jsp:

    PHP Code:
                /* Umsatz Tacho Tag*/
                // create an output stream for the report content
                
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
                   
    messages = new ArrayList();
                
    ChartHelper.doAction("huenersdorff""homeDashboard""tagumsatzdial.xaction""Home"parametersoutputStreamuserSessionmessagesnull );
                
    dial1 outputStream.toString(); 
    Hope it helps,

    Jochen

  29. #29

    Default

    The first thing I notice is that there's an error in the "over" label:

    Code:
     <minimum1>50000</minimum>


    should read ...

    Code:
     <minimum>50000</minimum>



    Once I corrected that, the dial came up with the background perfectly.
    Have you hugged your computer geek today?

  30. #30
    Join Date
    Jan 2008
    Posts
    12

    Default

    This was my fault.
    To post the Data I had changed the levels in the Post, and was on the wrong place. I my xaction there ist no "1" in the minimum tag .


    I still have no Background. Perhaps because the xaction ist i a different folder?! It is in my solution folder in the homeDashboard folder.

    Jochen

  31. #31

    Default

    correction on my part... it wasn't working correctly for me.

    I had to do two things:

    first, remove the title from the chart.

    Replace <title>Tag {umsatz}</title> with <title/>

    Second, add a chart background to the plot background:

    <plot-background type="texture">
    <texture-image>samples/portal/dial_03.gif</texture-image>
    </plot-background>
    <chart-background type="texture">
    <texture-image>samples/portal/dial_03.gif</texture-image>
    </chart-background>
    Last edited by dherzog; 02-14-2008 at 05:40 PM. Reason: correction to code
    Have you hugged your computer geek today?

  32. #32
    Join Date
    Jan 2008
    Posts
    12

    Default

    Many thanks, now it works :-) .
    It was the </chart-background> tag .
    Silly fault by me, damn .


    Jochen

    P.S: But where can I ad now my {umsatz} Value to the dial, so that it looks as nice as in the Demo? Anyway, not so urgent...
    Last edited by joepent; 02-15-2008 at 03:32 AM.

  33. #33

    Default

    P.S: But where can I ad now my {umsatz} Value to the dial, so that it looks as nice as in the Demo? Anyway, not so urgent...
    I asked the same question in http://forums.pentaho.org/showthread.php?t=59719

    Unfortunately, I haven't gotten anywhere with it yet.

    There is supposed to be, I understand, a way to retrieve more output values from an XACTION/ChartHelper using ChartOutput.getOutputParameter(...) but I have yet to get it to work.

    If anyone has an working example of that, or has a better way of accomplishing the goal here (retrieve the value of the chart, so that the JSP page can display it below the chart), I'd love to hear it.

    -d-
    Have you hugged your computer geek today?

  34. #34
    Join Date
    Apr 2010
    Posts
    127

    Default

    Is it still true, that you can't add the value under a dial chart (defined in an action sequence)?
    Alternatively, I'm trying to put it in the title, but if I add a javascript action like
    value = query_result.getValueAt(0,0) (the query returns exactly one number)
    it fails returning a null pointer exception, while if I just use
    value = query_result
    it says it is an object of type SQLResultSet.

  35. #35
    Join Date
    Apr 2010
    Posts
    127

    Default

    Quote Originally Posted by SCP View Post
    Is it still true, that you can't add the value under a dial chart (defined in an action sequence)?
    Alternatively, I'm trying to put it in the title, but if I add a javascript action like
    value = query_result.getValueAt(0,0) (the query returns exactly one number)
    it fails returning a null pointer exception, while if I just use
    value = query_result
    it says it is an object of type SQLResultSet.
    No way out?

  36. #36
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    No clue what you're talking about, but look at cdf/components/jfreechartdial.xaction. We do a lot of operations with that, use it as a template
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  37. #37
    Join Date
    Apr 2010
    Posts
    127

    Default

    Quote Originally Posted by pmalves View Post
    No clue what you're talking about, but look at cdf/components/jfreechartdial.xaction. We do a lot of operations with that, use it as a template
    Ok, thanks.
    Turns out the problems are this:
    Code:
    <title-font> 
       <!-- 'font' and NOT 'font-family'(bug in wiki documentation) -->
       <font>{TITLE-FONT-FAMILY}</font>
    and this:
    Code:
    <domain-tick-font>
       <font>Arial</font>
       <size>10</size>
    </domain-tick-font>
    If you put font-family instead of font, or forget to specify domain-tick-font, the value won't show up.

    Makes little sense but that's it.

    Thank you.
    Last edited by SCP; 05-26-2010 at 03:33 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.