Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Can anyone help me how to create macro to sort Y-value in chart according user click on button (Ascending and Decending)?
Regards,
Sokkorn
HI,
Here is a macro to toogle between asc and des sort on y axis of a chart.
sub sort
set chart = ActiveDocument.GetsheetObject("CH02")
set p = chart.GetProperties
if p.SortByYValue = -1 then
p.SortByYValue = 1 'ascending
elseif p.SortByYValue = 1 then
p.SortByYValue = -1 'Desending
End if
chart.SetProperties p
end sub
Regards,
Kaushik Solanki
HI,
Here is a macro to toogle between asc and des sort on y axis of a chart.
sub sort
set chart = ActiveDocument.GetsheetObject("CH02")
set p = chart.GetProperties
if p.SortByYValue = -1 then
p.SortByYValue = 1 'ascending
elseif p.SortByYValue = 1 then
p.SortByYValue = -1 'Desending
End if
chart.SetProperties p
end sub
Regards,
Kaushik Solanki
Hi Kaushik,
Thanks for your help. It working fine.
Regards,
Sokkorn
Hi Kaushik
I need your help very very urgently. After seeing this post I thought that you can help me out in the below post.
http://community.qlik.com/message/157797#157797
Thanks
Attitude