Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sunny_talwar

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
12 Replies
Kushal_Chawda

Possibly by Macro?

sunny_talwar
Author

Do you have a code which can be used?

Kushal_Chawda

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

smirkinaa
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.

sunny_talwar
Author

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.

swuehl
MVP
MVP

Maybe have a look at topic 31:

Useful Qlikview Macros

sunny_talwar
Author

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

swuehl
MVP
MVP

I guess the issue will be how to trigger that macro

sunny_talwar
Author

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