<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unable to print chart on the fly visualization in mashup in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-print-chart-on-the-fly-visualization-in-mashup/m-p/1807905#M14932</link>
    <description>&lt;P&gt;You should try adding the&amp;nbsp; class="qvobject" to the div element&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 May 2021 00:39:25 GMT</pubDate>
    <dc:creator>Christopher_prem</dc:creator>
    <dc:date>2021-05-14T00:39:25Z</dc:date>
    <item>
      <title>Unable to print chart on the fly visualization in mashup</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-print-chart-on-the-fly-visualization-in-mashup/m-p/1805565#M14916</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;unfortunatelly I'm back again!&amp;nbsp; I have developed a mashup creating all the objects on the fly by using APIs and/or hypercubes.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="mashup.jpg" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54367iAE6F71417E95EBA1/image-size/large?v=v2&amp;amp;px=999" role="button" title="mashup.jpg" alt="mashup.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see the mashup contains a charts section. The problem is when I try to print this section. I think the image below can better explain what I get from chrome browser printing tool:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="mashup_print.jpg" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54369i1D2C53CD03BAEF3E/image-size/large?v=v2&amp;amp;px=999" role="button" title="mashup_print.jpg" alt="mashup_print.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do not consider the position or the size of the DIVs these can be easily adjusted but pay attention to the charts inside those DIVs. They are oversized and I can't find the way to reduce the size. It is emabarassing!&amp;nbsp; I was able to prepare a css template for printing all the rest of the objects in the mashup but charts are out of my controll.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following you can find the code I used to create and style these object:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;app.visualization.create(
  'linechart',
  [
    {
      "qDef": {
        "qGrouping": "N",
        "qFieldDefs": ["MonthName"],
        "qFieldLabels": ["2021"]
      },
      "qNullSuppression": true
    },
    {
      "qDef": {
        "qLabel": "Service Score",
        "qGrouping": "N",
        "qDef": "=expression",
        "qNumFormat": {
          "qType": "U",
          "qnDec": 1,
          "qUseThou": 0
        }
      }
    },
	{
      "qDef": {
        "qLabel": "Parts Score",
        "qGrouping": "N",
        "qDef": "=expression",
        "qNumFormat": {
          "qType": "U",
          "qnDec": 1,
          "qUseThou": 0
        }
      }
    },
	{
      "qDef": {
        "qLabel": "TK Score",
        "qGrouping": "N",
        "qDef": "=expression",        
		"qNumFormat": {
          "qType": "U",
          "qnDec": 1,
          "qUseThou": 0
        }
      }
    }	
  ],
  {
    "showTitles": false,
    "title": "Service Score Trend",
	"nullMode": "connect",
	"dataPoint": {
      "show": true,
      "showLabels": true
	},
	"measureAxis": {
		"show": "label",
		"dock": "near",
		"spacing": 0.5,
		"minMax": "max",
		"max":"1",
  	},
	"legend": {
      "show": true,
	  "showTitle": false,
	  "dock":"top"
    },
	"components": [
    {
      "key": "line",
      "style": {
        "dataPointSize": 6,
        "lineThickness": 3,
        "lineType": "solid",
        "lineCurve": "linear"
      }
    }
  ]
  }
  
).then(function(vis){
  vis.show("ServTrendPrint");
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the object is then inserted in a DIV :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div id="ServTrendPrint" class="chart"&amp;gt;&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this is the class definition inserted in the "@media print" section of my CSS file:&lt;/P&gt;&lt;LI-CODE lang="css"&gt;.subsection{
	width:95%;
	margin:auto;
	color: #dcddde;
	text-align: center;
	font-size: 1.3vw;
	font-weight: bold;
	text-shadow:none;
	box-shadow:none;
	border-radius:3px;
	border:1px solid cyan;
}
.chart{
	height:35vw;
	width: 100%;
	border-radius:3px;
	border:1px solid red;
}&lt;/LI-CODE&gt;&lt;P&gt;where class "subsection" belongs to the DIV container of the chart object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me to understand where I failed?&lt;/P&gt;&lt;P&gt;thank you so much!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 17:09:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-print-chart-on-the-fly-visualization-in-mashup/m-p/1805565#M14916</guid>
      <dc:creator>kikko</dc:creator>
      <dc:date>2021-05-05T17:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to print chart on the fly visualization in mashup</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-print-chart-on-the-fly-visualization-in-mashup/m-p/1807905#M14932</link>
      <description>&lt;P&gt;You should try adding the&amp;nbsp; class="qvobject" to the div element&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 00:39:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-print-chart-on-the-fly-visualization-in-mashup/m-p/1807905#M14932</guid>
      <dc:creator>Christopher_prem</dc:creator>
      <dc:date>2021-05-14T00:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to print chart on the fly visualization in mashup</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-print-chart-on-the-fly-visualization-in-mashup/m-p/1808936#M14963</link>
      <description>&lt;P&gt;Hi Christopher,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you!&lt;/P&gt;&lt;P&gt;I've tried with your suggestion but I cannot get the correct resize of the canvas. However I found a trick to temporarly solve this issue using the "zoom" CSS property. I'll produce a more detailed reply to exaplain what I have done to solve it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 09:29:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-print-chart-on-the-fly-visualization-in-mashup/m-p/1808936#M14963</guid>
      <dc:creator>kikko</dc:creator>
      <dc:date>2021-05-19T09:29:42Z</dc:date>
    </item>
  </channel>
</rss>

