Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Data Works for AI is here - Join the discussion and enter to win a pair of Qlik kicks: Join the Conversation!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Asign Max Number [1-100] throught Marco

I want to asign value of Max Number [1-100] throught marco is that possible, if yes please give me example code and

Max Number [1-100] is found in chart properties- in General Tab choose Striaght Table and then Presentation Tab.

I have API example application but i didnt found above mention problem, if any detail API tutorial pdf guide also send to me.

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Hi,

You can create a variable as "NoOfBars". Right Click on the Sheet; Go to Properties--> Add input box; move the Variable("NoOfBars") to your right. Then Right Click on the chart--> to the Presentation tab;Click on the small button on right of the Max Number and enter the below code;

=$(NoOfBars)

then whatever no entered in the input box ; will be the no of bars displayed in the chart.

Regards

View solution in original post

8 Replies
Not applicable
Author

Hi,

You can create a variable as "NoOfBars". Right Click on the Sheet; Go to Properties--> Add input box; move the Variable("NoOfBars") to your right. Then Right Click on the chart--> to the Presentation tab;Click on the small button on right of the Max Number and enter the below code;

=$(NoOfBars)

then whatever no entered in the input box ; will be the no of bars displayed in the chart.

Regards

martin59
Specialist II
Specialist II

Hello,

Extract from the APIGuide :

set chart = ActiveDocument.Activesheet.CreateStraightTable
chart.AddDimension "ProductType"
chart.AddExpression "sum(Amount)"
set cp = chart.GetProperties
cp.TableProperties.MaxNumberShown = 25
chart.SetProperties cp


Martin

Not applicable
Author

Thankyou very much, I did.

Not applicable
Author

Thankyou very much, Dear Martin do you have any pdf regarding API.

martin59
Specialist II
Specialist II

You have got an application in your installation folder. By default :

C:/Program Files/QlikView/Documentation/API guide.qvw

If you have'nt got it, tell me, i'll send to you Wink

Not applicable
Author

Thanks dear I have, I want more if any in pdf format.

Not applicable
Author

Dear Martin, can u guide me regarding below problem:

for example I have a text file name abc.txt in root directory or where else, which has two columns and four rows, data is given below:

Col1 Col2

A 4

B 5

C 6

D 7

====================================

and in application I have four input box name A, B, C and D, now I want when I press the macro button

then its read abc.txt file and put the values in input boxes according to A,B,C & D, is that possible ?

Not applicable
Author

Hi,

If i understood your question properly, below is the solution for your question.

Creat 4 variables and assign them to input box.

In Inputbox under "Constraints Tab" --> "Settings for Selected Varaiable" input this following expression.

=

sum(if(Col1 = 'A',Col2))

And to check the input box behaviuor , change the value at back end and press reload button to get the new values in input box.

Check the attached application

Hope this will help you.

- Peterson