OWC ChartSpace.PrintQuality3D not working

D

dustbort

Has anyone successfully gotten the PrintQuality3D property to actually make
charts print better? I have a chartspace object embedded (not an image) in a
Web page, and neither setting the property in client-side script nor setting
it in a <param> tag in the HTML is producing any result. I am trying to
determine if the fact that it is in a Web page instead of in a windows
application is causing the problem. Can anyone help?

Listing: Test.html
-----------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<script type="text/vbscript" src="ChartUtility.vbs"></script>
</HEAD>
<body onload="vbscript:MakeCharts">
<form id="Form1" method="post" runat="server">
<p>Low-Quality Print</p>
<OBJECT id="ChartSpace1" style="WIDTH: 100%; HEIGHT: 350px"
classid="CLSID:0002E55D-0000-0000-C000-000000000046"
VIEWASTEXT>
<PARAM NAME="ScreenUpdating" VALUE="-1">
<PARAM NAME="EnableEvents" VALUE="-1">
</OBJECT>
<p>High-Quality Print</p>
<OBJECT id="ChartSpace2" style="WIDTH: 100%; HEIGHT: 350px"
classid="CLSID:0002E55D-0000-0000-C000-000000000046"
VIEWASTEXT>
<PARAM NAME="ScreenUpdating" VALUE="-1">
<PARAM NAME="EnableEvents" VALUE="-1">
<param name="PrintQuality3D" value="1.0">
</OBJECT>
</form>
</body>
</HTML>


Listing: ChartUtility.vbs
---------------------------------------
sub MakeChart(chartspace)

dim chart1
set chart1 = chartspace.Charts.add
dim constants
set constants = chartspace.constants

dim series(1)
series(0) = "Greek Alphabet"

dim data(5)
data(0) = 34
data(1) = 13
data(2) = 6
data(3) = 47

dim labels(5)
labels(0) = "Alpha"
labels(1) = "Beta"
labels(2) = "Gamma"
labels(3) = "Delta"

chart1.type = Constants.chChartTypePieExploded3D

chart1.SetData Constants.chDimSeriesNames, Constants.chDataLiteral, series
Chart1.SeriesCollection(0).SetData Constants.chDimCategories,
Constants.chDataLiteral, labels
Chart1.SeriesCollection(0).SetData Constants.chDimValues,
Constants.chDataLiteral, data
Chart1.SeriesCollection(0).DataLabelsCollection.Add
chart1.haslegend = true

end sub

sub MakeCharts()

dim chartspace
set chartspace = document.getElementById("chartspace1")
MakeChart chartspace
set chartspace = document.getElementById("chartspace2")
MakeChart chartspace
chartspace.printQuality3D = 1.0

end sub
 
D

dustbort

Has anyone successfully gotten the PrintQuality3D property to actually make
charts print better? I have a chartspace object embedded (not an image) in a
Web page, and neither setting the property in client-side script nor setting
it in a <param> tag in the HTML is producing any result. I am trying to
determine if the fact that it is in a Web page instead of in a windows
application is causing the problem. Can anyone help?

Listing: Test.html
-----------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<script type="text/vbscript" src="ChartUtility.vbs"></script>
</HEAD>
<body onload="vbscript:MakeCharts">
<form id="Form1" method="post" runat="server">
<p>Low-Quality Print</p>
<OBJECT id="ChartSpace1" style="WIDTH: 100%; HEIGHT: 350px"
classid="CLSID:0002E55D-0000-0000-C000-000000000046"
VIEWASTEXT>
<PARAM NAME="ScreenUpdating" VALUE="-1">
<PARAM NAME="EnableEvents" VALUE="-1">
</OBJECT>
<p>High-Quality Print</p>
<OBJECT id="ChartSpace2" style="WIDTH: 100%; HEIGHT: 350px"
classid="CLSID:0002E55D-0000-0000-C000-000000000046"
VIEWASTEXT>
<PARAM NAME="ScreenUpdating" VALUE="-1">
<PARAM NAME="EnableEvents" VALUE="-1">
<param name="PrintQuality3D" value="1.0">
</OBJECT>
</form>
</body>
</HTML>


Listing: ChartUtility.vbs
---------------------------------------
sub MakeChart(chartspace)

dim chart1
set chart1 = chartspace.Charts.add
dim constants
set constants = chartspace.constants

dim series(1)
series(0) = "Greek Alphabet"

dim data(5)
data(0) = 34
data(1) = 13
data(2) = 6
data(3) = 47

dim labels(5)
labels(0) = "Alpha"
labels(1) = "Beta"
labels(2) = "Gamma"
labels(3) = "Delta"

chart1.type = Constants.chChartTypePieExploded3D

chart1.SetData Constants.chDimSeriesNames, Constants.chDataLiteral, series
Chart1.SeriesCollection(0).SetData Constants.chDimCategories,
Constants.chDataLiteral, labels
Chart1.SeriesCollection(0).SetData Constants.chDimValues,
Constants.chDataLiteral, data
Chart1.SeriesCollection(0).DataLabelsCollection.Add
chart1.haslegend = true

end sub

sub MakeCharts()

dim chartspace
set chartspace = document.getElementById("chartspace1")
MakeChart chartspace
set chartspace = document.getElementById("chartspace2")
MakeChart chartspace
chartspace.printQuality3D = 1.0

end sub
 

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