Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT

Function to determine Chart Type

Hi Team -

Has anyone come across a function to determine which chart type we are on? Something like =ChartType('Object ID')

Best,

Sunny

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Function to determine Chart Type

12 Replies

Re: Function to determine Chart Type

Possibly by Macro?

Re: Function to determine Chart Type

Do you have a code which can be used?

Re: Function to determine Chart Type

What is the use case here?  Can't we know the chart type by simply looking at the chart?

Highlighted
smirkinaa
New Contributor III

Re: Function to determine Chart Type

Hi.

I have found suitable function in API Guid.qvw. We can create macro:

Sub GetTypeObject()

SET varObject = ActiveDocument.getsheetobject("BU03")

MsgBox(varObject.GetObjectType)

End sub

then we can connect macro with button

returning code shows type of object:

0=Unknown

1=List Box

2=Multi Box

3=Statistics Box

4=Table Box

5=Button

6=Text Object

7=Current Selections Box

8=Input Box

9=Line/Arrow Object

10=Pivot Table

11=Straight Table

12=Bar Chart

13=Pie Chart

14=Scatter Chart

15=Line Chart

16=Combo Chart

17=Custom Object

18=Bookmark Object

19=Slider/Calendar Object

20=Grid Chart

21=Radar Chart

22=Gauge Chart

23=Chart Derived

24=Sheet

25=Tabrow

26=Document

27=Block Chart

28=Funnel Chart

29=Internal Layout

30=Inter Sheet Transfer

31=Search Object

32=Bookmark

33=Report

34=Slider

35=Calendar

I hope it is useful.

Re: Function to determine Chart Type

So lets say if I use fast change to switch between straight table and pivot table. When on straight table, I want to use one dimension and when on pivot table, I would like to see 2 dimensions.

MVP
MVP

Re: Function to determine Chart Type

Re: Function to determine Chart Type

Hahaha it was just a google search away. I will test it out

MVP
MVP

Re: Function to determine Chart Type

I guess the issue will be how to trigger that macro

Re: Function to determine Chart Type

I am planning to play around with it. I will respond back if I find a way to do it