nightmeister / nightcharts Goto Github PK
View Code? Open in Web Editor NEWClass for drawing histogram, pies and pseudo 3D pies on QT Framework.
Class for drawing histogram, pies and pseudo 3D pies on QT Framework.
Hi there,
We experience a bug once the pie chart was drawn.
Whenever the window gets re-sized or a user tabs in and out, the pie chart seems to 'spin' as it eventually gets re-drawn.
Is there a way to prevent this effect?
Below is our code.
Thanks in advance!
void NightchartsWidget::paintEvent(QPaintEvent * e)
{
QWidget::paintEvent(e);
if(!_chart.pieceCount()) return ;
QPainter painter;
QFont font;
painter.begin(this);
int w = (this->width() - _margin_left - 150);
int h = (this->height() - _margin_top - 100);
//int size = (w<h)?w:h;
//_chart.setCords(_margin_left, _margin_top,size, size);
_chart.setCords(50,50,this->width()/1.5,this->height()/1.5);
_chart.draw(&painter);
_chart.drawLegend(&painter);
//painter.end();
}
Nightcharts::Nightcharts()//QPainter *painter)
{
font.setFamily("verdana");
font.setPixelSize(15);
//painter = painter;
//painter->setFont(font);
ctype = Nightcharts::Dpie;
cltype = Nightcharts::Vertical;
cX = 0;
cY = 0;
cW = 100;
cH = 100;
lX = cX+cW+20;
lY = cY;
shadows = true;
}
Hi Nightmeister,
to create a dll + lib with Visual Studio 2013 I had to incorporate the following changes:
The patch file and the header probably show what i mean.
It suffices to add the defines (line 4 to 21) in nightcharts.h (the linked header was auto-generated by cmake).
Thank you in advance,
iord
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.