0

I need to draw very simple horizontal bar charts in SWT. For example, giving 50 items and with those items oscillating between the value 0 and 100, I want to display a horizontal chart with vertical bars. One for each item.

Something similar to this:

https://a.fsdn.com/con/app/proj/bakesale-java/screenshots/155071.jpg/245/183/1

It whould be very great to draw it without using libraries, but any help will be very grated.

I found this post: Libraries for pretty charts in SWT?

But the problem is that on this post they are using restrictive license libraries and also are very old libraries.

halfer
  • 19,824
  • 17
  • 99
  • 186
NullPointerException
  • 36,107
  • 79
  • 222
  • 382
  • "Old" doesn't automatically equal bad. Which license are you finding to be restrictive? – nitind Nov 25 '18 at 21:18
  • @nitind I need to use it in commercial apps without linking, so EPL is not valid for me. Also JFreeChart is super complex and huge and requires huge dependence. So I'm searching for something smaller, simpler and compatible with commercial use – NullPointerException Nov 25 '18 at 21:20
  • 1
    The EPL is absolutely compatible with commercial use. https://www.eclipse.org/legal/epl-2.0/faq.php#h.n9g0wv1ltlut – nitind Nov 25 '18 at 21:23
  • @nitind thank you but after reading the license I'm not comfortable using it, I'm searching for something less restrictive like Apache License 2.0 or Lesser – NullPointerException Nov 25 '18 at 21:28
  • 1
    IBM Rational Application Developer is one commercial product which extends Eclipse and consequently comes under the EPL. If the IBM lawyers are happy it has to be OK (I used to work for IBM and the lawyers are extremely touchy about licenses). I use [SWTChart](http://www.swtchart.org/) but this is EPL. In any case SWT itself is EPL – greg-449 Nov 25 '18 at 21:35
  • thank you @greg-449 and ntind I will listen your advice and I will check SWTChart. – NullPointerException Nov 27 '18 at 00:04

1 Answers1

0

The "Graphics Context - Quick on the draw "article section covering drawing lines and shapes might help for something very basic.

nitind
  • 19,089
  • 4
  • 34
  • 43