Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello QV Experts,
Below code I am using for drawing combo charts. How do I change default Chart bar colors by writing code?
Manually I configure this way => Chart properties -> Colors -> Data Appearance -> Colors 1-6. But how do I automate this?
Any help highly appreciated.
set chart = ActiveDocument.Sheets(0).CreateComboChart
set p = chart.GetProperties
p.GraphLayout.WindowTitle.v = chartName
p.GraphLayout.Frame.TextAdjustHorizontal = 1
chart.SetProperties p
Thanks
Hello QV
I found a way to achive this below is the code, this might help other. hence sharing
set colors = p.ChartProperties.ColorMap
colors(0).PrimaryCol.Col = RGB(0,73,147)
colors(1).PrimaryCol.Col = RGB(178,36,36)
chart.SetProperties p
Hello QV
I found a way to achive this below is the code, this might help other. hence sharing
set colors = p.ChartProperties.ColorMap
colors(0).PrimaryCol.Col = RGB(0,73,147)
colors(1).PrimaryCol.Col = RGB(178,36,36)
chart.SetProperties p