[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kchart/shape
From: Sebastian Sauer <mail () dipe ! org>
Date: 2010-04-29 11:34:21
Message-ID: 20100429113421.C7704AC7E4 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1120596 by sebsauer:
show at least something on loading a bubble chart
M +38 -0 Axis.cpp
--- trunk/koffice/kchart/shape/Axis.cpp #1120595:1120596
@@ -62,6 +62,7 @@
#include <KDChartThreeDBarAttributes>
#include <KDChartThreeDPieAttributes>
#include <KDChartThreeDLineAttributes>
+#include <KDChartDataValueAttributes>
// KChart
#include "PlotArea.h"
@@ -839,7 +840,44 @@
kdBubbleDiagram = new KDChart::Plotter( plotArea->kdChart(), kdPlane );
kdBubbleDiagram->setModel( kdBubbleDiagramModel );
+
registerDiagram( kdBubbleDiagram );
+
+ kdPlane->addDiagram( kdBubbleDiagram );
+
+ if ( !plotArea->kdChart()->coordinatePlanes().contains( kdPlane ) )
+ plotArea->kdChart()->addCoordinatePlane( kdPlane );
+
+ //foreach ( Axis *axis, plotArea->axes() ) {
+ // if ( axis->isVisible() )
+ // kdBubbleDiagram->addAxis( axis->kdAxis() );
+ //}
+
+ // disable the connecting line
+ //kdBubbleDiagram->setPen( QPen( Qt::black, 0.0 ) );
+ kdBubbleDiagram->setPen( Qt::NoPen );
+
+ KDChart::DataValueAttributes dva( kdBubbleDiagram->dataValueAttributes() );
+ dva.setVisible( true );
+
+ KDChart::TextAttributes ta( dva.textAttributes() );
+ ta.setVisible( false );
+ dva.setTextAttributes( ta );
+
+ KDChart::MarkerAttributes ma( dva.markerAttributes() );
+ ma.setVisible( true );
+ ma.setMarkerStyle( KDChart::MarkerAttributes::MarkerRing );
+ ma.setMarkerSize( QSizeF(30.0,30.0) ); // );
+ dva.setMarkerAttributes( ma );
+
+ //KDChart::RelativePosition pos( dva.positivePosition() );
+ //pos.setAlignment( Qt::AlignCenter );
+ //pos.setHorizontalPadding(0);
+ //dva.setPositivePosition( pos );
+
+ kdBubbleDiagram->setDataValueAttributes( dva );
+
+ plotArea->parent()->legend()->kdLegend()->addDiagram( kdBubbleDiagram );
}
void Axis::Private::createSurfaceDiagram()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic