<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
I am working on a QGis 2.6 python plugin in which I use diagram
renderers :<br>
dr = QgsLinearlyInterpolatedDiagramRenderer()<br>
...<br>
dr.setUpperValue(myUpperValue)<br>
...<br>
myLayer.setDiagramRenderer(dr)<br>
<br>
This works well, and if my data change, I can update the renderer
this way :<br>
dr = myLayer.diagramRenderer()<br>
dr.setUpperValue(myNewUpperValue)<br>
<br>
Now here is my problem : If I modify myLayer properties from QGis
user interface, I can't access its diagram properties anymore,
because dr = myLayer.diagramRenderer() returns a
QgsDiagramRendererV2 object instead of a
QgsLinearlyInterpolatedDiagramRenderer one.<br>
So when I try to set the new upper value, I get this error :<br>
<span style=" font-family:'Courier New,courier';">AttributeError:
'QgsDiagramRendererV2' object has no attribute 'setUpperValue'<br>
</span><br>
Can someone tell me what I am doing wrong ?<br>
<br>
Any hint greatly appreciated. Thanks in advance,
<pre class="moz-signature" cols="72">--
Christophe DAMOUR
</pre>
<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
<tr>
<td style='border:none;padding:0px 15px 0px 8px'>
<a href="http://www.avast.com/">
<img border=0 src="http://static.avast.com/emails/avast-mail-stamp.png" />
</a>
</td>
<td>
<p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection <a href="http://www.avast.com/">Antivirus avast!</a> est active.
</p>
</td>
</tr>
</table>
<br />
</body>
</html>