2 Replies Latest reply: Mar 23, 2015 12:46 PM by prabhu appu RSS

    Help Needed to Create Treemap using Qliksense SDK !!!

    prabhu appu

      Hi All,

       

      I'm trying to create Treemap using Qliksense SDK. I'm using the below code,

       

      var LibraryDimension = application.CreateDimension("Dim2", new DimensionProperties { Dim = new NxLibraryDimensionDef { FieldDefs = new[] { "Year" } }, Title = "Dimension1 " });
      
      
      var LibraryExpression = application.CreateMeasure("Sum(SalesAmount)", new MeasureProperties { Measure = new NxLibraryMeasureDef { Def = "Sum(SalesAmount)" }, Title = "Measure1" });
      
      var treeChart = Sheet.CreateTreemap("MyNewChart", new TreemapProperties { Title = "MyBar" });
      
      
      treeChart.SuspendLayout();
      treeChart.Properties.HyperCubeDef = new Qlik.Sense.Client.Visualizations.VisualizationHyperCubeDef
      {
        Dimensions = new List<HyperCubeDimensionDef>(){
        new HyperCubeDimensionDef(){
        LibraryId=LibraryDimension.Info.Id, IncludeElemValue=false, NullSuppression=true
        }
        },
        Measures = new List<HyperCubeMeasureDef>(){
        new HyperCubeMeasureDef(){
        LibraryId=LibraryExpression.Info.Id, 
        }
        }, 
        InterColumnSortOrder = new[] {1, 0},
        InitialDataFetch = new List<NxPage> { new NxPage { Height = 10, Left = 0, Top = 0, Width = 2 } }.ToArray()
      };
      
      
      treeChart.ResumeLayout();
      

       

      But i'm not getting the chart. I'm able to create other charts using the same code, just by changing the Createchart method.

       

      Is there any Properties i'm missing for TreeMap?

       

      Thanks in Advance

       

      Prabhu Appu