S
Salil Gaitonde
Hi -
I'm working with a 3D OWC Chart, primarily using JScript in a web page
(a bit of VB too).
I'm having a problem setting HasPlotDetails to true (which I
understand is necessary in order for the chart to recognize a
timescale series).
Below is a snippet of code. If I uncomment the
"objNew2.HasPlotDetails = true;" line, I get an "Invalid Parameter"
error. Does anyone have any idea on what I'm doing wrong? Any help
is greatly appreciated.
Thanks,
Salil Gaitonde
function genGraph( objNew ) {
objNew2 = document.createElement("OBJECT");
objNew2.classid = "clsid:0002E556-0000-0000-C000-000000000046";
objNew2.id = "chsp";
objNew2.clear();
var c = objNew2.Constants;
//load some sample data
var ch = objNew2.Charts.Add();
objNew2.DisplayToolbar= true;
objNew2.DataSource = objNew.object;
//objNew2.HasPlotDetails = true;
objNew2.Charts(0).Type = c.chChartTypeColumn3D;
categs = new Array();
var i = 0;
categs = "gumby";
i = i + 1;
// set the categories
objNew2.SetData( c.chDimSeriesNames, c.chDataLiteral, categs );
cellRange = "A2:A" + 3;
objNew2.SetData( c.chDimCategories, c.chDataBound, cellRange
);
ch.SeriesCollection(0).SetData( c.chDimValues,
c.chDataBound,"B2:B3");
var timeAxisConfig =
objNew2.Charts(0).Axes(c.chAxisPositionTimescale);
timeAxisConfig.Font.Size = 8;
timeAxisConfig.Font.Color = "black";
// timeAxisConfig.GroupingUnit = 1;
timeAxisConfig.MajorTickMarks = c.chTickMarkNone;
timeAxisConfig.HasTickLabels = true
timeAxisConfig.GroupingType = c.chAxisGroupingManual
// timeAxisConfig.GroupingUnitType = c.chAxisUnitDay
// timeAxisConfig.GroupingType = c.chAxisGroupingNone;
// timeAxisConfig.TickMarkUnitType = c.chAxisUnitDay;
// set the style
objNew2.style.width = "100%";
objNew2.style.height = "100%";
document.all.graphContainer.appendChild(objNew2);
return;
}
I'm working with a 3D OWC Chart, primarily using JScript in a web page
(a bit of VB too).
I'm having a problem setting HasPlotDetails to true (which I
understand is necessary in order for the chart to recognize a
timescale series).
Below is a snippet of code. If I uncomment the
"objNew2.HasPlotDetails = true;" line, I get an "Invalid Parameter"
error. Does anyone have any idea on what I'm doing wrong? Any help
is greatly appreciated.
Thanks,
Salil Gaitonde
function genGraph( objNew ) {
objNew2 = document.createElement("OBJECT");
objNew2.classid = "clsid:0002E556-0000-0000-C000-000000000046";
objNew2.id = "chsp";
objNew2.clear();
var c = objNew2.Constants;
//load some sample data
var ch = objNew2.Charts.Add();
objNew2.DisplayToolbar= true;
objNew2.DataSource = objNew.object;
//objNew2.HasPlotDetails = true;
objNew2.Charts(0).Type = c.chChartTypeColumn3D;
categs = new Array();
var i = 0;
categs = "gumby";
i = i + 1;
// set the categories
objNew2.SetData( c.chDimSeriesNames, c.chDataLiteral, categs );
cellRange = "A2:A" + 3;
objNew2.SetData( c.chDimCategories, c.chDataBound, cellRange
);
ch.SeriesCollection(0).SetData( c.chDimValues,
c.chDataBound,"B2:B3");
var timeAxisConfig =
objNew2.Charts(0).Axes(c.chAxisPositionTimescale);
timeAxisConfig.Font.Size = 8;
timeAxisConfig.Font.Color = "black";
// timeAxisConfig.GroupingUnit = 1;
timeAxisConfig.MajorTickMarks = c.chTickMarkNone;
timeAxisConfig.HasTickLabels = true
timeAxisConfig.GroupingType = c.chAxisGroupingManual
// timeAxisConfig.GroupingUnitType = c.chAxisUnitDay
// timeAxisConfig.GroupingType = c.chAxisGroupingNone;
// timeAxisConfig.TickMarkUnitType = c.chAxisUnitDay;
// set the style
objNew2.style.width = "100%";
objNew2.style.height = "100%";
document.all.graphContainer.appendChild(objNew2);
return;
}