chart and TotalOrientation

M

mrtoper

Hi,

I am playing with chartspace component.
I would like to get the [Totals] field that is created internally by
chart component to be under 'Client' field (categories) but it is
displayed under 'TradeType' (SeriesName) field.
Is it possible to do it programatically?
I tried to set
chartspace.InternalPivotTable.ActiveView.TotalOrientation but it didnt
help..
Please advise.
Regards,
Mike

Here is my piece of code:

dim cs
set cs = document.getElementById("OWCChart1")
if not cs is nothing then
dim chConstants, av
set chConstants = cs.Constants
cs.ConnectionString = "provider=MSPersist"
cs.CommandText = "http://localhost:4792/GetOwcData.aspx?
DataSourceName=sp_TEST"
set av = cs.InternalPivotTable.ActiveView
cs.HasMultipleCharts = false
cs.PlotAllAggregates = chConstants.chPlotAggregatesSeries
cs.Charts(0).Type = chConstants.chChartTypeBarStacked100
av.TotalOrientation = 1
call av.AddTotal("Sum of Trans", av.FieldSets("Trans").Fields(0), 1)
call av.AddTotal("Count of Trans", av.FieldSets("TranID").Fields(0),
2)
call cs.SetData(chConstants.chDimValues, chConstants.chDataBound,
Array("Sum of Trans", "Count of Trans"))
call cs.SetData(chConstants.chDimCategories,
chConstants.chDataBound, "Client"))
call cs.SetData(chConstants.chDimSeriesNames,
chConstants.chDataBound, "TradeType")
end if
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top