don't show zero values in owc10 line chart

K

konsti

does anyone know an equivalent of excels
"Charts("Chart1").DisplayBlanksAs = xlNotPlotted" for owc-line-charts
(especialy for chart type "ScatterSmoothLineMarkers") ?



thanks a lot

konsti
 
T

Thao Moua [ms]

No, you can't do this. However you can use custom
drawing to draw your own markers and use the following
code to disable drawing the line for the zero-value
marker.
--------------------------
set c=webchart.constants
for x=0 to webchart.charts(0).seriescollection
(0).points.count-1
set oPoint=webchart.charts(0).seriescollection(0).points
(x)
if oPoint.Getvalue(2)=0 then
webchart.charts(0).seriescollection(0).points
(x).line.color=c.chcolornone
webchart.charts(0).seriescollection(0).points
(x+1).line.color=c.chcolornone
end if
next
---------------------------

Thao Moua
OWC Webchart Support

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.htm
 
K

konsti

thanks so much thao.



your hint helps me a lot and is very valuable for me, especialy because
it led me to a completely new approach for building up my charts, since
the lines consist of two parts (a part with known data and a part with
estimated data) shown as continuus lines, changing theyr colors in the
middle of the chart.



thanks again

konsti
 
K

konsti

Hi everybody,



the problem i told of in my above question is partialy solved thanks to
Thao. But the .Getvalue(2)-method didn't work for me in conjunction with
the ScatterSmoothLineMarkers-style-chart. So i tried .Getvalue(3)
instead and now it works fine.



I can now suppress all "unnessesary" line segments. But i still have the
problem with the markers, who are still visible.



Is there an attribute of the .charts(0).seriescollection(0).points-
object that allows markers to be suppressed individualy or can i only
deactivate them for the whole line?



I tried the (for me) obvious combination
.charts(0).seriescollection(0).points(x).Marker.Color=c.chcolornone



But it didn't work.



Does anyone know how to do it?



Thanks a lot

Konsti
 

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