Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fast Change State

Hi

Does anyone know of a way of finding out which option of a fast change chart is currently in use. I want to be able to be able to identify this in the actual chart expression, so that it can be manipulated depending on type of chart.

Thanks

Andrew

3 Replies
matt_crowther
Luminary Alumni
Luminary Alumni

Not entirely sure of a 100% solution for that but something that may be a useful starting point is to control the Fast Change / Chart Types manually, the following code covers both areas:

set chart = ActiveDocument.Sheets("Main").CreateBarChart

chart.AddDimension "ProductType"

chart.AddExpression "sum(Amount)"

set p = chart.GetProperties

p.GraphLayout.FastChange.Bar = true

p.GraphLayout.FastChange.Line = true

p.GraphLayout.FastChange.Combo = true

p.GraphLayout.FastChange.Pie = true

p.GraphLayout.FastChange.Scatter = false

p.GraphLayout.FastChange.Straight = false

p.GraphLayout.FastChange.Pivot = false

p.ChartProperties.FastChangeInChart = true

chart.SetProperties p

chart.SetChartType  4       'line

Hopefully that will be of some use.

All the best,

Matt - Visual Analytics Ltd

@QlikviewBI

Not applicable
Author

Thanks Matt

Unfortunately I don't know of an event that would be able to be used to fire off a macro call to check the ChartType.

Interestingly the SetChartType property is not defined in the API guide, but is referred to in one of the examples, so not sure if there is an actual GetChartType property anyway?

Andrew

Not applicable
Author

You can use the GetObjectType method of the chart.

chart.GetObjectType