B
Bharat
Hi,
I am trying to produce a chart using owc10, I was able to produec the
chart correctly but the problem is of the order of information on x-
axis.
My x-axis fields should be in the order Dec03,Jan03... same as the
order of the database result below, but what I am getting is
Apr04,Dec03,Feb04,mar04,Jan04.
I am unable to find proper help in internet. Please help
here is the result of my database query
yearMonth Months A B C Total
200312 Dec03 2 3 0 5
200401 Jan04 41 66 6 113
200402 Feb04 21 27 18 66
200403 Mar04 37 65 47 149
200404 Apr04 32 60 52 144
and the code I used is
Set CSpace = CreateObject("OWC10.Chartspace")
Set c = CSpace.Constants
CSpace.HasMultipleCharts = False
CSpace.DisplayFieldButtons = false
CSpace.PlotAllAggregates = c.chPlotAggregatesSeries
CSpace.HasChartSpaceTitle = True
CSpace.ChartSpaceTitle.Caption = "Member Report"
cspace.Charts(0).Axes(0).HasTitle=true
cspace.Charts(0).Axes(0).Title.caption="Monhts"
cspace.Charts(0).Axes(1).HasTitle=true
cspace.Charts(0).Axes(1).Title.caption="Count"
CSpace.SetData c.chDimCategories, c.chDataBound, "yeardate"
CSpace.SetData c.chDimValues, c.chDataBound,
Array("A","B","C","Total")
CSpace.Charts(0).HasLegend = True
cspace.Charts(0).SeriesCollection(0).DataLabelsCollection.add
cspace.Charts(0).SeriesCollection(0).DataLabelsCollection(0).HasValue=true
'Font and Color of the count of the bar can be done with the commented
code below
'cspace.Charts(0).SeriesCollection(0).DataLabelsCollection(0).Font.size=10
'cspace.Charts(0).SeriesCollection(0).DataLabelsCollection(0).Font.color=RGB(0,0,0)
'this displays the count for every bar on its top
cspace.Charts(0).SeriesCollection(1).DataLabelsCollection.add
cspace.Charts(0).SeriesCollection(1).DataLabelsCollection(0).HasValue=true
cspace.Charts(0).SeriesCollection(2).DataLabelsCollection.add
cspace.Charts(0).SeriesCollection(2).DataLabelsCollection(0).HasValue=true
cspace.Charts(0).SeriesCollection(3).DataLabelsCollection.add
cspace.Charts(0).SeriesCollection(3).DataLabelsCollection(0).HasValue=true
Thanks in advance
Bharat
I am trying to produce a chart using owc10, I was able to produec the
chart correctly but the problem is of the order of information on x-
axis.
My x-axis fields should be in the order Dec03,Jan03... same as the
order of the database result below, but what I am getting is
Apr04,Dec03,Feb04,mar04,Jan04.
I am unable to find proper help in internet. Please help
here is the result of my database query
yearMonth Months A B C Total
200312 Dec03 2 3 0 5
200401 Jan04 41 66 6 113
200402 Feb04 21 27 18 66
200403 Mar04 37 65 47 149
200404 Apr04 32 60 52 144
and the code I used is
Set CSpace = CreateObject("OWC10.Chartspace")
Set c = CSpace.Constants
CSpace.HasMultipleCharts = False
CSpace.DisplayFieldButtons = false
CSpace.PlotAllAggregates = c.chPlotAggregatesSeries
CSpace.HasChartSpaceTitle = True
CSpace.ChartSpaceTitle.Caption = "Member Report"
cspace.Charts(0).Axes(0).HasTitle=true
cspace.Charts(0).Axes(0).Title.caption="Monhts"
cspace.Charts(0).Axes(1).HasTitle=true
cspace.Charts(0).Axes(1).Title.caption="Count"
CSpace.SetData c.chDimCategories, c.chDataBound, "yeardate"
CSpace.SetData c.chDimValues, c.chDataBound,
Array("A","B","C","Total")
CSpace.Charts(0).HasLegend = True
cspace.Charts(0).SeriesCollection(0).DataLabelsCollection.add
cspace.Charts(0).SeriesCollection(0).DataLabelsCollection(0).HasValue=true
'Font and Color of the count of the bar can be done with the commented
code below
'cspace.Charts(0).SeriesCollection(0).DataLabelsCollection(0).Font.size=10
'cspace.Charts(0).SeriesCollection(0).DataLabelsCollection(0).Font.color=RGB(0,0,0)
'this displays the count for every bar on its top
cspace.Charts(0).SeriesCollection(1).DataLabelsCollection.add
cspace.Charts(0).SeriesCollection(1).DataLabelsCollection(0).HasValue=true
cspace.Charts(0).SeriesCollection(2).DataLabelsCollection.add
cspace.Charts(0).SeriesCollection(2).DataLabelsCollection(0).HasValue=true
cspace.Charts(0).SeriesCollection(3).DataLabelsCollection.add
cspace.Charts(0).SeriesCollection(3).DataLabelsCollection(0).HasValue=true
Thanks in advance
Bharat