wxIshiko / wxCharts

A library to create charts in wxWidgets applications
https://www.wxishiko.com/wxCharts/
MIT License
131 stars 51 forks source link

example files on website missing #192

Open micro-g opened 3 years ago

micro-g commented 3 years ago

linking to the example files in github, and going to your website leads to an empty html page. Id love to see some exsmples on how to use these charts

Kvaz1r commented 3 years ago

You can found examples with build files in samples folder - https://github.com/wxIshiko/wxCharts/tree/main/samples

dittydingo commented 2 years ago

Just started looking at this the first time today.

Would be nice to have the samples included in CMake as well. Managed to build them of master, but they don't actually seems to display anything so far. Will keep experimenting.

Seems to be various warnings about the header #defines not being the same:

/wx/wxCharts//include/wx/charts/wxareachartctrl.h:37:9: note: '_WX_CHARTS_WXAREACHARTCTRL_H' is defined here; did you mean '_WX_CHARTS_WXAREACHARTCTRLH'?

define _WX_CHARTS_WXAREACHARTCTRL_H

    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    _WX_CHARTS_WXAREACHARTCTRL_H_

The ifdef and defs don't match up.

xleclercq commented 2 years ago

You are correct, This seems to be an isolated occurrence in wxareachartctrl.h. The others seem fine. I'm doing a quick commit for this now. I can't check the example right now but will have a look later today. I'd recommend trying column charts or line charts first. These are the ones I play with most.

xleclercq commented 2 years ago

Header guard fixed in 632f2771dfad9465022be8e1f2c76c98b4b516e5

dittydingo commented 2 years ago

Thanks for responding so quickly. I noticed this while compiling on MacOS trying out for the first time.

I can build all the samples, but out of all the samples only the following actually display something:

But they look good, so I assume there is some small difference in the start up code that misbehaving on OSX. The others all run and show a menu, but don’t seem to open the window. I will have a compare to see what’s different.

For the warnings:

wxmath2dplotctrl.h:36:9: warning: '_WX_CHARTS_WXMATH2DPLOTCTRLH' wxareachartctrl.h:36:9: warning: '_WX_CHARTS_WXAREACHARTCTRLH'

There are a few warnings about not using override from Clang:

wxpiechartctrl.h:73:25: warning: 'GetChart' overrides a member function but is not marked ‘override' wxpiechart.h:41:41: warning: 'GetCommonOptions' overrides a member function but is not marked 'override' wxdoughnutchartctrl.h:47:30: warning: 'GetChart' overrides a member function but is not marked ‘override' wxdoughnutchart.h:43:41: warning: 'GetCommonOptions' overrides a member function but is not marked ‘override'

xleclercq commented 2 years ago

Ah unfortunately I don't have an OSX machine on which I can test so errors are more likely there. But I'll fix the warnings mentioned here.

dittydingo commented 2 years ago

Got all the samples compiling and running on MacOS on ARM built against wxWidgets-3.1.6.

At the end of each frame constructor just had to add:

Centre(); wxSize sz(400, 300); this->SetClientSize(sz);

The main window was opening, but the sizers for some reason where making the window width/height to 0.

I noticed the PolarArea axes labels do not scale with rest of the chart when resized. Also am I right in thinking the time series sample does not do anything as yet?

dittydingo commented 2 years ago

Thanks for responding so quickly. I noticed this while compiling on MacOS trying out for the first time.

I can build all the samples, but out of all the samples only the following actually display something: pie chart column chart shared charts categorical data But they look good, so I assume there is some small difference in the start up code that misbehaving on OSX. The others all run and show a menu, but don’t seem to open the window. I will have a compare to see what’s different.

For the warnings:

wxmath2dplotctrl.h:36:9: warning: '_WX_CHARTS_WXMATH2DPLOTCTRLH' wxareachartctrl.h:36:9: warning: '_WX_CHARTS_WXAREACHARTCTRLH'

There are a few warnings about not using override from Clang:

wxpiechartctrl.h:73:25: warning: 'GetChart' overrides a member function but is not marked ‘override' wxpiechart.h:41:41: warning: 'GetCommonOptions' overrides a member function but is not marked 'override' wxdoughnutchartctrl.h:47:30: warning: 'GetChart' overrides a member function but is not marked ‘override' wxdoughnutchart.h:43:41: warning: 'GetCommonOptions' overrides a member function but is not marked ‘override'

Thanks,

Giles

On 4 Jun 2022, at 13:14, Xavier Leclercq @.***> wrote:

Header guard fixed in 632f277 https://github.com/wxIshiko/wxCharts/commit/632f2771dfad9465022be8e1f2c76c98b4b516e5 — Reply to this email directly, view it on GitHub https://github.com/wxIshiko/wxCharts/issues/192#issuecomment-1146598107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEDCHCPFKRGXLN7MZFVPNALVNNCDLANCNFSM5BWFCFTA. You are receiving this because you commented.