Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: CDF dashboards - How I can create charts using ccc component in CDF

  1. #1
    Join Date
    May 2014
    Posts
    13

    Question CDF dashboards - How I can create charts using ccc component in CDF

    Hi All,

    I am working on CDF dashboard , I want use CCC charts instead of jfree and flash chart.

    I got struck in result and metadata, I don't want to give that hardcoded values in result and metadat . i want to use mdx query, like in Jfreecharts component we are using

    HTML Code:
    queryType: 'mdx', 
    		jndi: "SteelWheels", 
    		catalog: "solution:steel-wheels/analysis/steelwheels.mondrian.xml"
    But When I am trying to use the same jnd,catalog in ccc chart , its not working.

    So how we can call query in cdf using ccc component.

    Is there any way to define query with calling a cda file?

    Can you give me one example on this.

  2. #2
    Join Date
    May 2014
    Posts
    13

    Default I have tried by using the below code but nothiing is coming

    Quote Originally Posted by Dashboard View Post
    Hi All,

    I am working on CDF dashboard , I want use CCC charts instead of jfree and flash chart.

    I got struck in result and metadata, I don't want to give that hardcoded values in result and metadat . i want to use mdx query, like in Jfreecharts component we are using

    HTML Code:
    queryType: 'mdx', 
            jndi: "SteelWheels", 
            catalog: "solution:steel-wheels/analysis/steelwheels.mondrian.xml"
    But When I am trying to use the same jnd,catalog in ccc chart , its not working.

    So how we can call query in cdf using ccc component.

    Is there any way to define query with calling a cda file?

    Can you give me one example on this.
    Code:
    pieChart = 
    {
      name: "pieChart",
      type: "CccPieChartComponent",
      listeners:[],
      chartDefinition: MetaLayerCharts.pieChartDefinition,
      htmlObject: "container1",
      executeAtStart: true
    }
    
    var components = [pieChart];
    
    <script language="javascript" type="text/javascript">
    
    function load(){
        Dashboards.init(components);
    }
    
    load();
    
    </script>
    Code:
    MetaLayerCharts =  {
    
    
        pieChartDefinition : {
            width: 400,
            height: 450,
            chartType: "PieChart",
            title:   "Rich Pie",
            titleSize: { width: '100%' },
            titlePaddings: '4%',
            titleFont:     'bold 16px sans-serif',
                
            legend: true,
            legendShape: 'circle',
            legendSize: { width: '100%' },
            
            animate:    false,
            selectable: true,
            hoverable:  true,
            valuesVisible: true,
            explodedSliceIndex:  1,
            explodedSliceRadius: '10%',
            
            colors: ['#FF7F0E', '#D62728', '#568000', 
                     '#2CA02C', '#7F7F7F', '#F5F4F2','#1F77B4'],
            extensionPoints: {
                legendArea_fillStyle: 'lightgray',
                title_fillStyle:      'lightblue'
            },
            jndi: "SampleData",
            catalog: "solution:steel-wheels/analysis/SampleData.mondrian.xml",    
            query: function(){
            
            var query = "Select [Measures].[Actual] on columns,[Department].[Department].Members on rows From [Quadrant Analysis]";
                
                return query;
            }
        },
            
            
        
        
        
    };


    Can anyone help me on this.
    I am new at cdf so I dont know how to use CCC charts with CDF .

    If anyone has done this before ,kindly give me some guidance So that I can finish this ASAP.

    Thanks in Advance

  3. #3
    Join Date
    Jun 2012
    Posts
    19

    Default

    I think you are missing a queryType in your chartDefinition. Can you start by adding:
    queryType: 'mdx'
    to the chart definition object?

  4. #4
    Join Date
    May 2014
    Posts
    13

    Default

    Quote Originally Posted by gundisalwa View Post
    I think you are missing a queryType in your chartDefinition. Can you start by adding:
    queryType: 'mdx'
    to the chart definition object?

    Thanks for your response gundisalwa
    but I have tried with adding queryType then also its not working .

    Check the below mentioned code:-

    Code:
    pieChart = 
    {
      name: "pieChart",
      type: "CccPieChartComponent",
      listeners:[],
      chartDefinition: MetaLayerCharts.pieChartDefinition,
      htmlObject: "container2",
      executeAtStart: true
    }
    Code:
    pieChartDefinition : {
            width: 500,
            height: 450,
            animate:    false,
            selectable: true,
            hoverable:  true,
            ignoreNulls:true,
            valuesVisible: true,
            valuesLabelStyle: 'inside',
            valuesMask: "{category}",
            valuesFont: '25px sans-serif',
            valuesOverflow: 'trim',
            valuesOptimizeLegibility: true,
            extensionPoints: {
               slice_strokeStyle: 'white' 
            },
            queryType: 'mdx',
            jndi: "SteelWheels",
            catalog: "solution:steel-wheels/analysis/steelwheels.mondrian.xml",    
            title: "CCC Pie Chart Example",
            query: function(){
            
            var query = "select [Measures].[Quantity] on columns,non empty([Markets].[Territory].Members) on rows from [SteelWheelsSales]";
                
                return query;
            }
        }
    Can you suggest me where I am doing mistake?

    I need to solve this problem because I have some commitments with my manager.I will really appreciate if someone can help me in this.

    Thanks

Tags for this Thread

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.