|
Chartviewer for Qt4 |
Posted by hafwil on Aug-13-2007 20:05 |
|
Hello!
I'm evaluating a few chart components, and I find your chart very interesting, and also the price is very fair. I would like to use the chart in a Qt4 framework, so I wanted to ask you, if you know an existing chartviewer for Qt4?
Best Regards
Wilfried |
Re: Chartviewer for Qt4 |
Posted by Peter Kwan on Aug-14-2007 02:30 |
|
Hi Wilfred,
In theory, ChartDirector for C++ can be used in any GUI framework. (This is only in theory because we cannot possibly test ChartDirector in all GUI framework.)
To display a chart, you may just display it as an image. ChartDirector can output charts as DIB, BMP, JPEG, PNG, etc., which should be displayable in virtually all GUI framework without using the ChartViewer at all.
The purpose of the ChartViewer is not just to display the chart, but to provide user interaction support - like tooltips for data points, hot spots, drag to scroll and drag to zoom operations, etc.. We specifically provide ChartViewer in source code format, so any interested parties can port it to the GUI framework of their choice.
Unluckily, I am not aware if anyone has already ported ChartViewer to QT4. If you need the functions of ChartViewer, I am worry you may need to port the code yourself.
Regards
Peter Kwan |
Re: Chartviewer for Qt4 |
Posted by hafwil on Aug-15-2007 00:44 |
|
Hello Peter!
I started now to port the ChartViewer to Qt4, and it works very fine! I need such user interaction support and your ChartViewer is a good reference to port... Thank you for your response!
Best Regards
Wilfried |
Re: Chartviewer for Qt4 |
Posted by Amey on Jul-28-2009 23:31 |
|
Hello, if your chartviewer for qt is working, Can u please attach it here, so myself and several other members will be able to use it without porting it manually.
Thank you. |
Re: Chartviewer for Qt4 |
Posted by Tom on Dec-01-2009 18:47 |
|
Hi there,
I would also be very interested in using ChartDirector with QT. Does anyone have any sample code? Thanks a lot in advance.
-Tom |
Re: Chartviewer for Qt4 |
Posted by Peter Kwan on Dec-02-2009 00:35 |
|
Hi Tom,
I do not really have any sample code. (I never used QT before.)
However, in general, the charting code can be separated into 3 parts.
(a) Creating the chart
(b) Displaying the chart
(c) Handles user interactions (tooltips, drag to zoom, etc).
For (a), the code is GUI toolkit independent. You can use the sample code that comes with ChartDirector. For example, the command line sample code that come with ChartDirector are code that create charts as image files. You can also create charts as images in memory.
For (b), the display method depends on the GUI toolkit, but it should be easy. ChartDirector outputs chart in standard formats (PNG, JPEG, GIF, BMP/DIB). Virtually all GUI toolkits can display charts in at least one of these formats. For QT, you may try to use QImage to display the charts generated by ChartDirector.
For (c), it is the most difficult part. You may ignore this part if you do not need to support user interactions. If you do want to support user interactions, the "tooltips" should not be difficult to support, while the "drag to zoom" functions are more difficult.
Regards
Peter Kwan |
Re: Chartviewer for Qt4 |
Posted by Tom on Dec-02-2009 18:04 |
|
Peter,
thanks a lot for your reply.
It's exactly the user interaction I am interested in. Actually, I want to be able to move some points of the curve manually with the mouse and then apply some function to fit the curve according to some predefined function. So this is just one use case. And while the I move the point with the mouse, the point should move as well, together with the rest of the curve.
Maybe your general approach with creating an image (JPG,PNG etc.) from the chart works in the simple cases where the chart itself is kind of read-only (like reports etc.). For any other use case where there is more user interaction, that approach seems very clumsy if not useless.
I have been working with ProEssentials from Gigasoft, all under MFC, and the usage of dnd and curve hotspots etc. allowed me to do that. But since it's MFC.... Well...
Regards,
-Tom |
Re: Chartviewer for Qt4 |
Posted by Fran?ois on Dec-02-2009 19:41 |
|
Considering QT4 for a project as well since the feedback on this UIT toolkit has been stellar:)
It looks like QT4 offers some support for the SVG format. I'd be glad to hear whether anyone has tested it successufly i-e used the SVG output instead of PNG and al? |
Re: Chartviewer for Qt4 |
Posted by bill on May-14-2010 03:51 |
|
Hi,
I would also like to emphasize that, ideally, it is the ChartDirector viewer that should be ported onto Qt4. Simply being able to dump an image (jpeg, gif, etc.) into a file that can then be loaded and displayed by Qt4 is not very helpful. Furthermore, interactivity is imperative for using the chart package. Static view of data through images can be extremely slow and not applicable to a wide variety of real world scenarios. |
|