Cannot set HasPlotDetails to TRUE

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;
}
 
T

Thao Moua [ms[

The property HasPlotDetails only applies when the Chartspace control is bounded to external data (excluding the Spreadsheet control.

--------------------------------------
Thao Mou
OWC Chartspace Suppor

This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.ht

----- Salil Gaitonde wrote: ----

Hi

I'm working with a 3D OWC Chart, primarily using JScript in a web pag
(a bit of VB too)

I'm having a problem setting HasPlotDetails to true (which
understand is necessary in order for the chart to recognize
timescale series)

Below is a snippet of code. If I uncomment th
"objNew2.HasPlotDetails = true;" line, I get an "Invalid Parameter
error. Does anyone have any idea on what I'm doing wrong? Any hel
is greatly appreciated

Thanks
Salil Gaitond



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 dat
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 categorie
objNew2.SetData( c.chDimSeriesNames, c.chDataLiteral, categs )

cellRange = "A2:A" + 3
objNew2.SetData( c.chDimCategories, c.chDataBound, cellRang
)

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 = tru
timeAxisConfig.GroupingType = c.chAxisGroupingManua
// timeAxisConfig.GroupingUnitType = c.chAxisUnitDa
// timeAxisConfig.GroupingType = c.chAxisGroupingNone

// timeAxisConfig.TickMarkUnitType = c.chAxisUnitDay





// set the styl
objNew2.style.width = "100%"
objNew2.style.height = "100%"

document.all.graphContainer.appendChild(objNew2)

return
 

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

Similar Threads


Top