Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

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

1 Solution

Accepted Solutions
Highlighted
MVP
MVP

12 Replies
Highlighted
MVP
MVP

Possibly by Macro?

Highlighted

Do you have a code which can be used?

Highlighted
MVP
MVP

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

Highlighted
Contributor III
Contributor III

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.

Highlighted

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.

Highlighted
MVP
MVP

Highlighted

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

Highlighted
MVP
MVP

I guess the issue will be how to trigger that macro

Highlighted

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