Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a Stacked Line Chart Via Macro

This one took me a little while to track down, so just documenting in case someone else is looking for it (I couldn't find it in any other threads)...

1 Solution

Accepted Solutions
Not applicable
Author

set cp = chart.GetProperties

set title = cp.ChartProperties.Title

'Stacked line chart

cp.ChartProperties.BarModeStacked = true

cp.ChartProperties.LineChartMode = 3

chart.SetProperties cp

Use LineChartMode = 3 for "Flat" style, or 4 for 3d style.

View solution in original post

2 Replies
Not applicable
Author

set cp = chart.GetProperties

set title = cp.ChartProperties.Title

'Stacked line chart

cp.ChartProperties.BarModeStacked = true

cp.ChartProperties.LineChartMode = 3

chart.SetProperties cp

Use LineChartMode = 3 for "Flat" style, or 4 for 3d style.

rustyfishbones
Master II
Master II

Hi Graeme,

I have the following code when creating a Scatter Chart to untick the Force 0 box

cp.Expressions.Item(0).Item(0).Data.AxisData.Force0 = false

However this only does the X Axis, how can I also do this for the Y Axis?

Regards

Alan