<?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 set Chart Type in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-Chart-Type/m-p/659227#M1063636</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hava a Chart CH04 which is a line Chart now from an example i found on the forum i can change the type using&amp;nbsp; a button with the following macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub SetChartType&lt;/P&gt;&lt;P&gt;&amp;nbsp; set chart = ActiveDocument.GetSheetObject("CH04")&lt;/P&gt;&lt;P&gt;&amp;nbsp; intObjectType = chart.GetObjectType&lt;/P&gt;&lt;P&gt;&amp;nbsp; if intObjectType = 15 then&amp;nbsp;&amp;nbsp;&amp;nbsp; 'is currently a line chart&lt;/P&gt;&lt;P&gt;&amp;nbsp; chart.SetChartType&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp; chart.SetChartType&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;&amp;nbsp; end if&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it works fine&lt;/P&gt;&lt;P&gt;but my issue is i have a ist on chart names in a listbox the chart have different type&lt;/P&gt;&lt;P&gt;now i want to b able to change the Chart type based on the selection in the ChartName list box&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Charts:&lt;/P&gt;&lt;P&gt;ChartName,ChartType,ChartTypeID&lt;/P&gt;&lt;P&gt;Billing,LineChart,15&lt;/P&gt;&lt;P&gt;Sales,PivotTable,10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a variables that picks the ChartType&amp;nbsp; and ChartTypeID on selecting a ChartName&lt;/P&gt;&lt;P&gt;vChartType:&lt;/P&gt;&lt;P&gt;=only(ChartType)&lt;/P&gt;&lt;P&gt;vChartTypeID:&lt;/P&gt;&lt;P&gt;=only(ChartTypeID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my problem now is i want to select CahrtName ,- Billing then set the ChartType for CH01&amp;nbsp; to the value of the vChartTypeID variable&lt;/P&gt;&lt;P&gt;thanx in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Sep 2014 08:28:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-09-22T08:28:44Z</dc:date>
    <item>
      <title>set Chart Type</title>
      <link>https://community.qlik.com/t5/QlikView/set-Chart-Type/m-p/659227#M1063636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hava a Chart CH04 which is a line Chart now from an example i found on the forum i can change the type using&amp;nbsp; a button with the following macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub SetChartType&lt;/P&gt;&lt;P&gt;&amp;nbsp; set chart = ActiveDocument.GetSheetObject("CH04")&lt;/P&gt;&lt;P&gt;&amp;nbsp; intObjectType = chart.GetObjectType&lt;/P&gt;&lt;P&gt;&amp;nbsp; if intObjectType = 15 then&amp;nbsp;&amp;nbsp;&amp;nbsp; 'is currently a line chart&lt;/P&gt;&lt;P&gt;&amp;nbsp; chart.SetChartType&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp; chart.SetChartType&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;&amp;nbsp; end if&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it works fine&lt;/P&gt;&lt;P&gt;but my issue is i have a ist on chart names in a listbox the chart have different type&lt;/P&gt;&lt;P&gt;now i want to b able to change the Chart type based on the selection in the ChartName list box&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Charts:&lt;/P&gt;&lt;P&gt;ChartName,ChartType,ChartTypeID&lt;/P&gt;&lt;P&gt;Billing,LineChart,15&lt;/P&gt;&lt;P&gt;Sales,PivotTable,10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a variables that picks the ChartType&amp;nbsp; and ChartTypeID on selecting a ChartName&lt;/P&gt;&lt;P&gt;vChartType:&lt;/P&gt;&lt;P&gt;=only(ChartType)&lt;/P&gt;&lt;P&gt;vChartTypeID:&lt;/P&gt;&lt;P&gt;=only(ChartTypeID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my problem now is i want to select CahrtName ,- Billing then set the ChartType for CH01&amp;nbsp; to the value of the vChartTypeID variable&lt;/P&gt;&lt;P&gt;thanx in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 08:28:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-Chart-Type/m-p/659227#M1063636</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-22T08:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: set Chart Type</title>
      <link>https://community.qlik.com/t5/QlikView/set-Chart-Type/m-p/659228#M1063638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like what you are trying to do but I am having another issue where trying to set the chart type doesn't always work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, when I try to set a chart value, it doesn't adhere to the values I have found online. The values appear to be correct--I know this because I used a msgbox to tell me the object type and it matched what I've found online.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;sub SetChartType&lt;/P&gt;&lt;P&gt;&amp;nbsp; set chart = ActiveDocument.GetSheetObject("adhoc")&lt;/P&gt;&lt;P&gt;&amp;nbsp; intObjectType = chart.GetObjectType&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim ChartValue&lt;/P&gt;&lt;P&gt;&amp;nbsp; ChartValue = ActiveDocument.Variables("vSetChartType").GetContent().String&lt;/P&gt;&lt;P&gt;&amp;nbsp; intObjectType = chart.GetObjectType&lt;/P&gt;&lt;P&gt;&amp;nbsp; msgbox (intObjectType)&lt;/P&gt;&lt;P&gt;&amp;nbsp; intTest = 12&lt;/P&gt;&lt;P&gt;&amp;nbsp; if ChartValue = "1" then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Straight Table&lt;/P&gt;&lt;P&gt;&amp;nbsp; chart.SetChartType&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; elseif ChartValue = "2" then 'pivot table&lt;/P&gt;&lt;P&gt;&amp;nbsp; chart.SetChartType 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;elseif ChartValue = "3" then 'bar chart --- DOES NOT WORK, set's it to a mekko chart...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; chart.SetObjectType 12&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; elseif ChartValue = "4" then 'line chart&lt;/P&gt;&lt;P&gt;&amp;nbsp; chart.SetChartType 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; elseif ChartValue = "5" then 'bar/line chart&lt;/P&gt;&lt;P&gt;&amp;nbsp; chart.SetChartType 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; end if&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Troubleshooting:&lt;BR /&gt;Set chart to bar chart, added msgbox to tell me the object value. The msgbox reads the bar chart as 12. As soon as it executes "chart.SetObjectType 12", it switches to a mekko chart. When I use msgbox to read the chart type selected, it tells me 37--what the heck?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the list I have:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;0=Unknown&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;1=List Box&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;2=Multi Box&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;3=Statistics Box&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;4=Table Box&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;5=Button&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;6=Text Object&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;7=Current Selections Box&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;8=Input Box&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;9=Line/Arrow Object&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;10=Pivot Table&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;11=Straight Table&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;12=Bar Chart&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;13=Pie Chart&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;14=Scatter Chart&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;15=Line Chart&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;16=Combo Chart&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;17=Custom Object&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;18=Bookmark Object&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;19=Slider/Calendar Object&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;20=Grid Chart&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;21=Radar Chart&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;22=Gauge Chart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 23:33:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-Chart-Type/m-p/659228#M1063638</guid>
      <dc:creator />
      <dc:date>2016-03-02T23:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: set Chart Type</title>
      <link>https://community.qlik.com/t5/QlikView/set-Chart-Type/m-p/659229#M1063640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it should more look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub SetChartType&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim ChartValue&lt;/P&gt;&lt;P&gt;&amp;nbsp; ChartValue = ActiveDocument.Variables("vSetChartType").GetContent().String&lt;/P&gt;&lt;P&gt;&amp;nbsp; set chart = ActiveDocument.GetSheetObject("adhoc")&lt;/P&gt;&lt;P&gt;&amp;nbsp; intObjectType = chart.GetObjectType&lt;/P&gt;&lt;P&gt;&amp;nbsp; if ChartValue &amp;lt;&amp;gt; intObjectType then chart.SetChartType = ChartValue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But why didn't you use the feature of fast chart-type change (object properties in tab general)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 12:03:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-Chart-Type/m-p/659229#M1063640</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-03-03T12:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: set Chart Type</title>
      <link>https://community.qlik.com/t5/QlikView/set-Chart-Type/m-p/659230#M1063642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are many users of this dashboard and honestly, the fast switch button is extremely tiny. It's easily missed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...I was just informed that macro's don't work on the ajax website of Qlik.... so scrap all this &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose the alternative would be conditional show/hide with different flavors of the chart. Gosh, I wish there was an elegant way to manage show/hide variables and triggers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 14:33:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-Chart-Type/m-p/659230#M1063642</guid>
      <dc:creator />
      <dc:date>2016-03-03T14:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: set Chart Type</title>
      <link>https://community.qlik.com/t5/QlikView/set-Chart-Type/m-p/659231#M1063644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand what you mean and it's really a pity that the icons are not customizable. But maybe something like this could be used to emphasize the icon:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/116847_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;There are probably more elegant solutions possible - it should only demonstrate what I mean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 16:14:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-Chart-Type/m-p/659231#M1063644</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-03-03T16:14:23Z</dc:date>
    </item>
  </channel>
</rss>

