Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Radar Chart with high Charts.

  1. #1
    Join Date
    May 2017
    Posts
    11

    Default Radar Chart with high Charts.

    Hello, i can plot a radar chart with highcharts.
    I'm using a Query Component, i'm checking a datasource and returning it's value to a variable, using resultVar = "resultado";


    as thedata source i'm using.
    Code:
    select 20 as valorVenda union allselect 20 as valorVenda union all
    select 20 as valorVenda union all
    select 20 as valorVenda union all
    select 20 as valorVenda union all
    select 20 as valorVenda

    and in the postExecution atribute function i'm using this code.


    Code:
    function (){    
        Highcharts.chart('container', {
    
    
        chart: {
            polar: true,
            type: 'line'
        },
    
    
        title: {
            text: 'Budget vs spending',
            x: -80
        },
    
    
        pane: {
            size: '80%'
        },
    
    
        xAxis: {
            categories: ['Sales', 'Marketing', 'Development', 'Customer Support',
                    'Information Technology', 'Administration'],
            tickmarkPlacement: 'on',
            lineWidth: 0
        },
    
    
        yAxis: {
            gridLineInterpolation: 'polygon',
            lineWidth: 0,
            min: 0
        },
    
    
        tooltip: {
            shared: true,
            pointFormat: '<span style="color:{series.color}">{series.name}: <b>${point.y:,.0f}</b><br/>'
        },
    
    
        legend: {
            align: 'right',
            verticalAlign: 'top',
            y: 70,
            layout: 'vertical'
        },
    
    
        series: [{
            name: 'Allocated Budget',
            data: resultado,
            pointPlacement: 'on'
        }, {
            name: 'Actual Spending',
            data: [20,30,40,50],
            pointPlacement: 'on'
        }]
    
    
    });}



    how can i pass another list of values, to this queryComponent, from another select to use instead of the data [20,30,40,50].
    So i can plot other values?
    since i need to plot other values?

  2. #2
    Join Date
    May 2017
    Posts
    11

    Default

    i got a solution, i made a compound query.
    like select val1,val2 from table1 where filter1=value1 UNION ALL select val1,val2 from table2 where filter2=value2 and then accessed the rows like
    resultfromquerycomponent[0][0] , what this syntax means is that i'm accessing the result from select the row 0 and column 0 , in this way u can use differrent tables in the same graph in the d3 or highcharts components.

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.