Radar/Spider/Net Charts #288

Closed
ccoupe opened this Issue Nov 2, 2016 · 64 comments

Comments

Projects
None yet
4 participants
@ccoupe
Contributor

ccoupe commented Nov 2, 2016

Here's the latest view on radar charts. Just draws the radial axes and the label of max value of that column. It draws the label poorly but we talk about 'better' after the image.
radar-2

In gruft and other source code I've looked at, our chart_series is equivalent to a row and the value inside the rows are columns. Radar and the like, like to draw/compute down columns. Shoes currently has no API to specify some things for that orientation that users might find useful. In the example above, the labels shown are the computed max (down the columns) but before we can scale and and draw some data points and connected lines, they need to be scaled between min and max. What's the value at the center for each? Compute min? 0? Something else? Can it be specified by the user and if so, how?

@ccoupe ccoupe added the Enhancement label Nov 2, 2016

@ccoupe ccoupe added this to the 3.3.2 milestone Nov 2, 2016

@ccoupe ccoupe self-assigned this Nov 2, 2016

ccoupe added a commit that referenced this issue Nov 2, 2016

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 3, 2016

Contributor

Sadly, we do need add an extra arg to plot creation when creating a radar. The most natural is an array of arrays. Ick! Do I have good name - of course not! Let's call it "column_settings:" until someone suggests a better name and it only applies to certain chart types and it is mandatory for radar (and perhaps some new chart types in the future).

plot {...., chart: "radar", column_settings: [ <column 0 settings>, <column 1 settings>, ...]}
What's in a 'column setting'? I think it should be another array or a hash - users choice. Hash is more descriptive but it gets wordy so both should be acceptable { label: <string>, min: <number>, max: <number>, format: <printf_format_string> } .You might wonder about the format: string. If not given then it defaults to "%4.2f" which is not optimal for anyone who cares about their graph. I could even imagine other options like alpha: 0.5 if you want the damn things dimmer (I would).

seeking opinions @BackOrder , @passenger94 .

Contributor

ccoupe commented Nov 3, 2016

Sadly, we do need add an extra arg to plot creation when creating a radar. The most natural is an array of arrays. Ick! Do I have good name - of course not! Let's call it "column_settings:" until someone suggests a better name and it only applies to certain chart types and it is mandatory for radar (and perhaps some new chart types in the future).

plot {...., chart: "radar", column_settings: [ <column 0 settings>, <column 1 settings>, ...]}
What's in a 'column setting'? I think it should be another array or a hash - users choice. Hash is more descriptive but it gets wordy so both should be acceptable { label: <string>, min: <number>, max: <number>, format: <printf_format_string> } .You might wonder about the format: string. If not given then it defaults to "%4.2f" which is not optimal for anyone who cares about their graph. I could even imagine other options like alpha: 0.5 if you want the damn things dimmer (I would).

seeking opinions @BackOrder , @passenger94 .

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 3, 2016

Collaborator

What this new parameters for? It is normally possible to create radar graph with same kind of plot data as any other graphs. For example, see this tutorial for Microsoft Office.

Now it might be a good idea to support optional parameters for plot. I'm just confused why it would be mandatory for radar graph...

Collaborator

BackOrder commented Nov 3, 2016

What this new parameters for? It is normally possible to create radar graph with same kind of plot data as any other graphs. For example, see this tutorial for Microsoft Office.

Now it might be a good idea to support optional parameters for plot. I'm just confused why it would be mandatory for radar graph...

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 3, 2016

Collaborator

Also as reference another tutorial.

Collaborator

BackOrder commented Nov 3, 2016

Also as reference another tutorial.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 3, 2016

Contributor

Excel and the like have the labels for rows and columns (because they have to be there, or you have to add them later in the wizard) Shoes does not have a wizard for creating charts. Suppose the two values in column 0 are [80, 180]. Are those 0 based? Or should that 80 be the dot in the center? What if another radial/column on the same chart ranges from 20 to -10. Since Shoes adds and draws (chart_series) row by row and does not know how many rows will be added later. It draws what it has and for radar/spider it needs to know the min/max of the radial axis to draw. Review some of those example you posted on the old thread and your see some very "unigue" things about the labels/xaxis/radials.

Contributor

ccoupe commented Nov 3, 2016

Excel and the like have the labels for rows and columns (because they have to be there, or you have to add them later in the wizard) Shoes does not have a wizard for creating charts. Suppose the two values in column 0 are [80, 180]. Are those 0 based? Or should that 80 be the dot in the center? What if another radial/column on the same chart ranges from 20 to -10. Since Shoes adds and draws (chart_series) row by row and does not know how many rows will be added later. It draws what it has and for radar/spider it needs to know the min/max of the radial axis to draw. Review some of those example you posted on the old thread and your see some very "unigue" things about the labels/xaxis/radials.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 3, 2016

Collaborator

My understanding is that radar graph is based on its given values, using minimum and maximum values and evenly stepped. Minimum value is the centre. We may offer optional parameters (unit, scale, step, etc.) for customization. Does it make sense to you?

Collaborator

BackOrder commented Nov 3, 2016

My understanding is that radar graph is based on its given values, using minimum and maximum values and evenly stepped. Minimum value is the centre. We may offer optional parameters (unit, scale, step, etc.) for customization. Does it make sense to you?

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 3, 2016

Contributor

It make sense in some cases. And lacking for others. In the [80, 180] case, you only get two dots when it gets around to drawing the lines and dots - center and the outer radius. What to do if you know that 180 is not the max score on the test and 80 isn't the worst. Maybe 250 is the best (outer ting and 50 is the worst (center) . How to specify that?

Contributor

ccoupe commented Nov 3, 2016

It make sense in some cases. And lacking for others. In the [80, 180] case, you only get two dots when it gets around to drawing the lines and dots - center and the outer radius. What to do if you know that 180 is not the max score on the test and 80 isn't the worst. Maybe 250 is the best (outer ting and 50 is the worst (center) . How to specify that?

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 3, 2016

Collaborator

Would you mind sharing a sample code of radar graph in Gruff or any other related API (slash language)? Maybe we could learn something from it.

Collaborator

BackOrder commented Nov 3, 2016

Would you mind sharing a sample code of radar graph in Gruff or any other related API (slash language)? Maybe we could learn something from it.

@ccoupe ccoupe removed this from the 3.3.2 milestone Nov 3, 2016

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 3, 2016

Contributor

Crux => matter. Excel is an interactive tool for creating charts. Shoes is declarative. So is gruff (clone it and look at the test cases) or pycha and look at the test cases (hard to find). Look at what gnuplot uses for a DSL (bonus points if if you can find a radar/net/spider example that makes sense). Matlib? Wolfram? Some Adobe Thing?. Shoes can't be all of the above. Use them if Shoes is too much trouble.

Contributor

ccoupe commented Nov 3, 2016

Crux => matter. Excel is an interactive tool for creating charts. Shoes is declarative. So is gruff (clone it and look at the test cases) or pycha and look at the test cases (hard to find). Look at what gnuplot uses for a DSL (bonus points if if you can find a radar/net/spider example that makes sense). Matlib? Wolfram? Some Adobe Thing?. Shoes can't be all of the above. Use them if Shoes is too much trouble.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 3, 2016

Collaborator

Take a look at Chart.js and rgraph. They both have a very clean API. Please, notice Chart.js has an options argument for the special case(s) you are referring to. Otherwise, they both proceed as I stated before.

Collaborator

BackOrder commented Nov 3, 2016

Take a look at Chart.js and rgraph. They both have a very clean API. Please, notice Chart.js has an options argument for the special case(s) you are referring to. Otherwise, they both proceed as I stated before.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 4, 2016

Contributor

There's no doubt that my bottoms up approach is problematic. Originally, all I wanted was the timeseries chart that I could append RT data to and add and delete series. And then it grew from there. It's not a goal for Shoes to replace dedicated charting applications (or spreadsheets). Just something simple. Now, it's not so simple.

I'm considering (just thinking aloud) that the existing Time series chart and RT stuff should be a different widget (and api) from all the other charts or perhaps an alternative api for all the other other chart types. For now, I'll probably bumble ahead just to finish up and learn some things.

Contributor

ccoupe commented Nov 4, 2016

There's no doubt that my bottoms up approach is problematic. Originally, all I wanted was the timeseries chart that I could append RT data to and add and delete series. And then it grew from there. It's not a goal for Shoes to replace dedicated charting applications (or spreadsheets). Just something simple. Now, it's not so simple.

I'm considering (just thinking aloud) that the existing Time series chart and RT stuff should be a different widget (and api) from all the other charts or perhaps an alternative api for all the other other chart types. For now, I'll probably bumble ahead just to finish up and learn some things.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 4, 2016

Collaborator

It would ideally be implemented in Ruby/Shoes level for maximum extensibility but this approach has its challenges.

Regardless of the current flaws or original intents, I assure you this is a very desirable feature. Charting feature is surpringly difficult to find in any language.

Collaborator

BackOrder commented Nov 4, 2016

It would ideally be implemented in Ruby/Shoes level for maximum extensibility but this approach has its challenges.

Regardless of the current flaws or original intents, I assure you this is a very desirable feature. Charting feature is surpringly difficult to find in any language.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 4, 2016

Contributor

It would ideally be implemented in Ruby/Shoes level for maximum extensibility but this approach has its challenges.

#266 + gruff for a template. Maybe we can talk @passenger94 into implementing the text_shape.He know more about that place inside Shoe than I.

Regardless of the current flaws or original intents, I assure you this is a very desirable feature. Charting feature is surpringly difficult to find in any language.

I also observed that empty spot in the OSS desktop universe. It's why I'd like to get this feature 'good enough' for fun and exploration without getting too complex or detailed.

  @values1 = [80,        160,          145,     75,          80] # in k$
  @values2 = [180,        90,           95,     90,          90]
  @columns = [ ["Internet", 0, 250, "%4.0f k"], 
               ["Television", 0, 200],
               {label: "Radio", min: 0, max: 200, format: "%3.3f"},
               #["radio", 0, 200],
               ["Newspaper", 0, 200],
               ["Magazine", 0, 200]
             ]

...
       @grf = plot widget_width, widget_height, title: "Advertising", caption: 
          "Budget Spend" , font: "Helvetica", auto_grid: true,
          default: "skip", background: white, chart: "radar", column_settings: @columns
      end

Not completely awful. Extensible at the C level (sort of).

[updated sample on 2016-11-05]

Contributor

ccoupe commented Nov 4, 2016

It would ideally be implemented in Ruby/Shoes level for maximum extensibility but this approach has its challenges.

#266 + gruff for a template. Maybe we can talk @passenger94 into implementing the text_shape.He know more about that place inside Shoe than I.

Regardless of the current flaws or original intents, I assure you this is a very desirable feature. Charting feature is surpringly difficult to find in any language.

I also observed that empty spot in the OSS desktop universe. It's why I'd like to get this feature 'good enough' for fun and exploration without getting too complex or detailed.

  @values1 = [80,        160,          145,     75,          80] # in k$
  @values2 = [180,        90,           95,     90,          90]
  @columns = [ ["Internet", 0, 250, "%4.0f k"], 
               ["Television", 0, 200],
               {label: "Radio", min: 0, max: 200, format: "%3.3f"},
               #["radio", 0, 200],
               ["Newspaper", 0, 200],
               ["Magazine", 0, 200]
             ]

...
       @grf = plot widget_width, widget_height, title: "Advertising", caption: 
          "Budget Spend" , font: "Helvetica", auto_grid: true,
          default: "skip", background: white, chart: "radar", column_settings: @columns
      end

Not completely awful. Extensible at the C level (sort of).

[updated sample on 2016-11-05]

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 6, 2016

Contributor

Getting closer.
radar-3

There are many things to improve but basics are not awful.

Contributor

ccoupe commented Nov 6, 2016

Getting closer.
radar-3

There are many things to improve but basics are not awful.

ccoupe added a commit that referenced this issue Nov 6, 2016

on #288, radar chart works (within limits and known bugs)
* remove useless code or comments - (still more to do)
@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 6, 2016

Collaborator

Looking good!

Collaborator

BackOrder commented Nov 6, 2016

Looking good!

ccoupe added a commit that referenced this issue Nov 8, 2016

for #288 - code clean up and more for radar
* don't need radar_pole or radar_slice structures.
* axis and value are drawn in grey (70% black) - less ugly.
* draws text labels - imperfectly
@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 8, 2016

Contributor

Slightly more appealing. Incorrect label positions but improving.
radar-4

Contributor

ccoupe commented Nov 8, 2016

Slightly more appealing. Incorrect label positions but improving.
radar-4

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 10, 2016

Collaborator

Are measurement lines also implemented? It seems to go really well so far.

Good news is that features you have implemented lately, radar graph included, will allow me to port one of my prototypes on Shoes and implement a fully functional prototype. Thanks for your continuous efforts!

Collaborator

BackOrder commented Nov 10, 2016

Are measurement lines also implemented? It seems to go really well so far.

Good news is that features you have implemented lately, radar graph included, will allow me to port one of my prototypes on Shoes and implement a fully functional prototype. Thanks for your continuous efforts!

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 10, 2016

Contributor

Many, many and more details need to be added. I assume measurement lines are the lines drawn round the axis connecting the xaxis labels. In the tiny chart above there is room for an outer ring connecting all 200 end points and say one 'ring' at 100' since the examples all start with 0 at the center point.

Remember, all five of the above axis can have different scales so you need value labels on each of those points which can make for a very busy chart. And of course, someone will want options to not do that or only draw two when the room for 10. Or maybe they just want little 'tick' marks instead of labels. Another API challenge! There really is no end to possible enhancements and feature creep to this and many others charts all of which are very difficult to (re)implement incrementally in C. (wouldn't be that much easier in Ruby)

If you can provide a screen shot of what you really need (and the test date), that would help.

Contributor

ccoupe commented Nov 10, 2016

Many, many and more details need to be added. I assume measurement lines are the lines drawn round the axis connecting the xaxis labels. In the tiny chart above there is room for an outer ring connecting all 200 end points and say one 'ring' at 100' since the examples all start with 0 at the center point.

Remember, all five of the above axis can have different scales so you need value labels on each of those points which can make for a very busy chart. And of course, someone will want options to not do that or only draw two when the room for 10. Or maybe they just want little 'tick' marks instead of labels. Another API challenge! There really is no end to possible enhancements and feature creep to this and many others charts all of which are very difficult to (re)implement incrementally in C. (wouldn't be that much easier in Ruby)

If you can provide a screen shot of what you really need (and the test date), that would help.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 11, 2016

Collaborator

Statistics Feature for Humintell Products is how I use radar chart in general. This is how OpenOffice/LibreOffice generate basic radar charts.

You may notice the scale is in percent from 0% (center of the chart) to 100% (outward). The scale is the same for every item (7 universal emotions in this case). Each coloured line represent percentage obtained at a precise moment in time (pre-test score, practice score, post-test score). In this document, the pre-test never change once taken, practice is updated as practice goes, post-test is created once post-test in taken (and possibly updated if taken again).

In a nutshell, basic features are fully sufficient for most case scenarios. The extra features you are suggested are fine but as long as the basic ones are fully implemented, I can use your radar graphs.

Let me check if I could get some data for you... stay tunes.

Collaborator

BackOrder commented Nov 11, 2016

Statistics Feature for Humintell Products is how I use radar chart in general. This is how OpenOffice/LibreOffice generate basic radar charts.

You may notice the scale is in percent from 0% (center of the chart) to 100% (outward). The scale is the same for every item (7 universal emotions in this case). Each coloured line represent percentage obtained at a precise moment in time (pre-test score, practice score, post-test score). In this document, the pre-test never change once taken, practice is updated as practice goes, post-test is created once post-test in taken (and possibly updated if taken again).

In a nutshell, basic features are fully sufficient for most case scenarios. The extra features you are suggested are fine but as long as the basic ones are fully implemented, I can use your radar graphs.

Let me check if I could get some data for you... stay tunes.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 11, 2016

Collaborator

image

Collaborator

BackOrder commented Nov 11, 2016

image

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 11, 2016

Contributor

Thanks. I'll use that for a for another test case (gr7.rb). We can get pretty close today. South of your border, an number of people appear to need help handling their emotions after the recent election.

Contributor

ccoupe commented Nov 11, 2016

Thanks. I'll use that for a for another test case (gr7.rb). We can get pretty close today. South of your border, an number of people appear to need help handling their emotions after the recent election.

ccoupe added a commit that referenced this issue Nov 11, 2016

issue #288 - add gr7.rb to Tests/plot/
* much still needs to be done.
@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 11, 2016

Contributor

I do like other peoples tests. This one demonstrates just how much work remains.
radar-5

There is a Windows beta that (hopefully) can draw that if you get the Tests/plot/gr7.rb from github.

Contributor

ccoupe commented Nov 11, 2016

I do like other peoples tests. This one demonstrates just how much work remains.
radar-5

There is a Windows beta that (hopefully) can draw that if you get the Tests/plot/gr7.rb from github.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 11, 2016

Collaborator

Indeed, indeed. The data in your recent commit seems to be on point with my table. Unfortunately, the radar graph is incorrect. It seems some data is mixed up internally. Also, notice my example starts with Anger on top as it is the first item.

image

Collaborator

BackOrder commented Nov 11, 2016

Indeed, indeed. The data in your recent commit seems to be on point with my table. Unfortunately, the radar graph is incorrect. It seems some data is mixed up internally. Also, notice my example starts with Anger on top as it is the first item.

image

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 11, 2016

Contributor

There are many bugs on the to do list. That's one of them.

Contributor

ccoupe commented Nov 11, 2016

There are many bugs on the to do list. That's one of them.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 11, 2016

Contributor

Also note that Shoes and Your example are the difference between clockwise and anti-clockwise. Either way will convey the same knowledge, right? (another reason I don't love radar/spider)

Contributor

ccoupe commented Nov 11, 2016

Also note that Shoes and Your example are the difference between clockwise and anti-clockwise. Either way will convey the same knowledge, right? (another reason I don't love radar/spider)

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 11, 2016

Collaborator

The main objection is that every other engine, API and office/drawing suites is drawing radar graph the same way. It means anyone who used it before will complain and likely to shuffle their own data (at great inconvenience) to get same result as others.

Basically, might as well do the same.

Collaborator

BackOrder commented Nov 11, 2016

The main objection is that every other engine, API and office/drawing suites is drawing radar graph the same way. It means anyone who used it before will complain and likely to shuffle their own data (at great inconvenience) to get same result as others.

Basically, might as well do the same.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 11, 2016

Contributor

Back in the days when I managed Software Engineers, They would have said the same thing when I proposed a different way forward. Convention is paramount! They would push back and sometimes they were correct and sometimes they pushed back, just because it wasn't done their way . Now, I'm just a SE of dubious skills on a collaborative OSS project and sometimes I'm the self appointed manager of this "new way to write Ruby GUI's that doesn't it do the conventional way".

Contributor

ccoupe commented Nov 11, 2016

Back in the days when I managed Software Engineers, They would have said the same thing when I proposed a different way forward. Convention is paramount! They would push back and sometimes they were correct and sometimes they pushed back, just because it wasn't done their way . Now, I'm just a SE of dubious skills on a collaborative OSS project and sometimes I'm the self appointed manager of this "new way to write Ruby GUI's that doesn't it do the conventional way".

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 11, 2016

Collaborator

Haha! You know I earn a living doing different way from others? It however has to make sense, has a rationale behind the change.

So what does your current implementation bring that the conventional way doesn't?

Collaborator

BackOrder commented Nov 11, 2016

Haha! You know I earn a living doing different way from others? It however has to make sense, has a rationale behind the change.

So what does your current implementation bring that the conventional way doesn't?

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 12, 2016

Contributor

So what does your current implementation bring that the conventional way doesn't?

We've gone through this before. Real Time updating (timeseries charts), add and delete series of data from displayed charts (varies by chart type), very large data sets that would take weeks or months to type by hand and mostly, 2800 lines of C code and partially finished documentation and many man hours that are not amenable to 'just redo it this way'.

Once we get #266 implemented then anybody else can write many many lines of Ruby/Shoes that does it 'their' way for their api and it won't interfere with the minimalistic C plot widget.

Contributor

ccoupe commented Nov 12, 2016

So what does your current implementation bring that the conventional way doesn't?

We've gone through this before. Real Time updating (timeseries charts), add and delete series of data from displayed charts (varies by chart type), very large data sets that would take weeks or months to type by hand and mostly, 2800 lines of C code and partially finished documentation and many man hours that are not amenable to 'just redo it this way'.

Once we get #266 implemented then anybody else can write many many lines of Ruby/Shoes that does it 'their' way for their api and it won't interfere with the minimalistic C plot widget.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 12, 2016

Collaborator

Well, doesn't the radar graph just need rotation? Shouldn't be a big deal..

Collaborator

BackOrder commented Nov 12, 2016

Well, doesn't the radar graph just need rotation? Shouldn't be a big deal..

ccoupe added a commit that referenced this issue Nov 12, 2016

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 12, 2016

Contributor

Depends on the C code whether it is a big deal or not. I'd like to have the outer labels rotate in the same direction (known bug) before I care about which direction they rotate. It makes no difference in user comprehension of what is displayed. You don't have to look very hard to find that is there is no convention for your chosen direction. Useless Quibbblles.

Contributor

ccoupe commented Nov 12, 2016

Depends on the C code whether it is a big deal or not. I'd like to have the outer labels rotate in the same direction (known bug) before I care about which direction they rotate. It makes no difference in user comprehension of what is displayed. You don't have to look very hard to find that is there is no convention for your chosen direction. Useless Quibbblles.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 15, 2016

Contributor

It should be possible to support true/false without having them meaning 0 or 1. Then the integer would actually be meaningful. Also, it would allow to actually use 0 or 1 as number of rings.

It checks for false or true. if neither it checks for integer. internally it's an stored in one C int, no matter what was used in Shoes/Ruby.

grid_lines is fine with me.

Contributor

ccoupe commented Nov 15, 2016

It should be possible to support true/false without having them meaning 0 or 1. Then the integer would actually be meaningful. Also, it would allow to actually use 0 or 1 as number of rings.

It checks for false or true. if neither it checks for integer. internally it's an stored in one C int, no matter what was used in Shoes/Ruby.

grid_lines is fine with me.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 15, 2016

Collaborator

It checks for false or true. if neither it checks for integer. internally it's an stored in one C int, no matter what was used in Shoes/Ruby.

I was under the impression it was possible to check for True or False class, as it would in Ruby.

grid_lines is fine with me.

Sure, let's go with grid_lines. It should be alright as most people will never use it, if the default value is reasonable. Ruby traditionally favours underscore method names instead of camel case. Also, lines would be shorter, shorter is normally better, but it seems too broad of a meaning to use it here.

Collaborator

BackOrder commented Nov 15, 2016

It checks for false or true. if neither it checks for integer. internally it's an stored in one C int, no matter what was used in Shoes/Ruby.

I was under the impression it was possible to check for True or False class, as it would in Ruby.

grid_lines is fine with me.

Sure, let's go with grid_lines. It should be alright as most people will never use it, if the default value is reasonable. Ruby traditionally favours underscore method names instead of camel case. Also, lines would be shorter, shorter is normally better, but it seems too broad of a meaning to use it here.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 15, 2016

Contributor

It is possible to check for class names but its more wordy (plus a function call) compared to checking if its Qfalse or Qtrue C constants.

Contributor

ccoupe commented Nov 15, 2016

It is possible to check for class names but its more wordy (plus a function call) compared to checking if its Qfalse or Qtrue C constants.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 15, 2016

Collaborator

It is possible to check for class names but its more wordy (plus a function call) compared to checking if its Qfalse or Qtrue C constants.

It's not really worth all the troubles, isn't it? So your way is the way.

Collaborator

BackOrder commented Nov 15, 2016

It is possible to check for class names but its more wordy (plus a function call) compared to checking if its Qfalse or Qtrue C constants.

It's not really worth all the troubles, isn't it? So your way is the way.

ccoupe added a commit that referenced this issue Nov 16, 2016

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 16, 2016

Contributor

Getting Closer on the outer labels and same rotation. Obvious problems - not so obvious how to fix.
radar-8

Contributor

ccoupe commented Nov 16, 2016

Getting Closer on the outer labels and same rotation. Obvious problems - not so obvious how to fix.
radar-8

ccoupe added a commit that referenced this issue Nov 16, 2016

for #288 - draws outer lables, mo' betta.
* not correct, just better.
@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 17, 2016

Collaborator

Here is some pointers for a proper label alignment. I drew an imaginary circle and guide lines that would be bigger than the radar graph. The point between a line and the circle is the anchor. The anchor should be use to center text on. Hope this helps.

image

Collaborator

BackOrder commented Nov 17, 2016

Here is some pointers for a proper label alignment. I drew an imaginary circle and guide lines that would be bigger than the radar graph. The point between a line and the circle is the anchor. The anchor should be use to center text on. Hope this helps.

image

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 17, 2016

Collaborator

The following one use the same principle but the anchor is used as a left/right alignment rather than centering, depending on which side of the graph the text is on. It is right alignment for those on the left sided quadrants and left alignment for those on the right sided quadrants.

image

Collaborator

BackOrder commented Nov 17, 2016

The following one use the same principle but the anchor is used as a left/right alignment rather than centering, depending on which side of the graph the text is on. It is right alignment for those on the left sided quadrants and left alignment for those on the right sided quadrants.

image

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 17, 2016

Collaborator

Here is another alignment you might be interested in. Hopefully it inspires you.

image

Collaborator

BackOrder commented Nov 17, 2016

Here is another alignment you might be interested in. Hopefully it inspires you.

image

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 17, 2016

Contributor

Currently, you last example is close to what I'm attempting. I'm using the quad calculations from the pie chart where things look ok. One issue is that the first, top most Anger is quad 0, as is Contempt but they connect to the imaginary text box in different locations. I can special case that.

Contributor

ccoupe commented Nov 17, 2016

Currently, you last example is close to what I'm attempting. I'm using the quad calculations from the pie chart where things look ok. One issue is that the first, top most Anger is quad 0, as is Contempt but they connect to the imaginary text box in different locations. I can special case that.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 17, 2016

Contributor

This one looks good enough (for Shoes)
radar-9

There are issues exposed with Test/lplot/gr6.rb which needs some quadrant hints for positioning inner labels.

Contributor

ccoupe commented Nov 17, 2016

This one looks good enough (for Shoes)
radar-9

There are issues exposed with Test/lplot/gr6.rb which needs some quadrant hints for positioning inner labels.

@ccoupe ccoupe closed this Nov 17, 2016

@ccoupe ccoupe reopened this Nov 17, 2016

@ccoupe ccoupe added this to the 3.3.2 milestone Nov 17, 2016

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 17, 2016

Contributor

Tests/plot/gr6 requires multiple inner labels at the because not all things are scaled the the same. This is damn close to as much as I'm willing to do for Shoes 3.3.2 release.
radar-10

Contributor

ccoupe commented Nov 17, 2016

Tests/plot/gr6 requires multiple inner labels at the because not all things are scaled the the same. This is damn close to as much as I'm willing to do for Shoes 3.3.2 release.
radar-10

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 17, 2016

Collaborator

Very good! Take note the space between anger and the radar graph vs space between joy/fear and the radar graph seems different on Test/lplot/gr6.rb. Most likely joy/fear are too close. Other than that, the rest seems on point.

Collaborator

BackOrder commented Nov 17, 2016

Very good! Take note the space between anger and the radar graph vs space between joy/fear and the radar graph seems different on Test/lplot/gr6.rb. Most likely joy/fear are too close. Other than that, the rest seems on point.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 18, 2016

Contributor

Funny you should mention that. The code is

// TODO: user specified radius multipler
double radius = chart->radius * 1.15; // extend it to draw outside

I think it was set to 1.10 for the gr7 plot. So, another something: has to be added to the API. sigh.

Contributor

ccoupe commented Nov 18, 2016

Funny you should mention that. The code is

// TODO: user specified radius multipler
double radius = chart->radius * 1.15; // extend it to draw outside

I think it was set to 1.10 for the gr7 plot. So, another something: has to be added to the API. sigh.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 18, 2016

Collaborator

By the way, I also notice labels/data are drawn clockwise. It seems every engine draw counter-clockwise. What do you think?

Collaborator

BackOrder commented Nov 18, 2016

By the way, I also notice labels/data are drawn clockwise. It seems every engine draw counter-clockwise. What do you think?

ccoupe added a commit that referenced this issue Nov 18, 2016

on #288, add label_radius: to plot api
* its a multiplier (default is 1.15) which is mostly OK for
  the tests we have.
* 1.20 is probably as high as one would try to use. You can go small
  like 0.5 too if you like them drawn inside. I don't but it's
  users choice.
@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 18, 2016

Contributor

labels/data are drawn clockwise

We've been here before - dueling conventions.
Oddly enough, I use the most common C idiom of for (i = 0; i < max; i++) instead of the error prone for (i= max; i > 1; i--) or is it for (i = max-1; i >=0; i--)?

What do you think?

I think I'll wait for someone else to cross that mine field and show me their C code.

Contributor

ccoupe commented Nov 18, 2016

labels/data are drawn clockwise

We've been here before - dueling conventions.
Oddly enough, I use the most common C idiom of for (i = 0; i < max; i++) instead of the error prone for (i= max; i > 1; i--) or is it for (i = max-1; i >=0; i--)?

What do you think?

I think I'll wait for someone else to cross that mine field and show me their C code.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 18, 2016

Collaborator

for (i = max-1; i >=0; i--) seems to be correct.

Collaborator

BackOrder commented Nov 18, 2016

for (i = max-1; i >=0; i--) seems to be correct.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 18, 2016

Collaborator

What is label_radius ? It seems to mean label margin, as in the margin around the label, which would be consistent with other Shoes styling names.

Collaborator

BackOrder commented Nov 18, 2016

What is label_radius ? It seems to mean label margin, as in the margin around the label, which would be consistent with other Shoes styling names.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 18, 2016

Contributor

Read the commit comment . It is not a margin (measured in pixels). It's subtle and debatable which is better - a radius* multiplier or a radius+margin. I'm fairly certain that people that need this tweaking of position can handle a multiplier. Using a margin would on depend their font choice size (a future feature it we keep digging deeper and deeper) Inconvenient. Drawing a larger chart size would require tweaking of label_radius to get them where wanted, Inconvenient.

Perhaps we can have both with a few extra days of work.. At the moment, I'd prefer to ship something soon, and find out if anyone cares enough to complain with practical usage.

Contributor

ccoupe commented Nov 18, 2016

Read the commit comment . It is not a margin (measured in pixels). It's subtle and debatable which is better - a radius* multiplier or a radius+margin. I'm fairly certain that people that need this tweaking of position can handle a multiplier. Using a margin would on depend their font choice size (a future feature it we keep digging deeper and deeper) Inconvenient. Drawing a larger chart size would require tweaking of label_radius to get them where wanted, Inconvenient.

Perhaps we can have both with a few extra days of work.. At the moment, I'd prefer to ship something soon, and find out if anyone cares enough to complain with practical usage.

ccoupe added a commit that referenced this issue Nov 18, 2016

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 19, 2016

Collaborator

I did read the commit comment but it only made sense after you explain it here. Always some concern about future backward compatibility and naming convention but label_radius could do for now.

It should be noted that we should have a label_margin in the future that is actually independent of chart size as you mention larger chart means tweaking label_radius. It could be inconvenient if one simply maximize a window, Shoes code redrawing bigger but then also need to adjust label_radius.

At the moment, I'd prefer to ship something soon, and find out if anyone cares enough to complain with practical usage.

Agreed.

Collaborator

BackOrder commented Nov 19, 2016

I did read the commit comment but it only made sense after you explain it here. Always some concern about future backward compatibility and naming convention but label_radius could do for now.

It should be noted that we should have a label_margin in the future that is actually independent of chart size as you mention larger chart means tweaking label_radius. It could be inconvenient if one simply maximize a window, Shoes code redrawing bigger but then also need to adjust label_radius.

At the moment, I'd prefer to ship something soon, and find out if anyone cares enough to complain with practical usage.

Agreed.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 19, 2016

Contributor

Updated the wiki. Getting everything into the manual will be challenge.

Contributor

ccoupe commented Nov 19, 2016

Updated the wiki. Getting everything into the manual will be challenge.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 20, 2016

Collaborator

Updated the wiki.

The wiki page is very good.

Getting everything into the manual will be challenge.

Maybe someday #213 will see the day of light and we can use markdown directly, where wiki and manual will be totally compatible. 🍔

Collaborator

BackOrder commented Nov 20, 2016

Updated the wiki.

The wiki page is very good.

Getting everything into the manual will be challenge.

Maybe someday #213 will see the day of light and we can use markdown directly, where wiki and manual will be totally compatible. 🍔

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 20, 2016

Contributor

Considering, #293, it would be nice if we did have the e-book thing. We can get more a modern mingw for Windows so we can get better full_text gem, if we give up RubyInstaller /devkit compatibility. RubyInstaller is a pretty low key project.

We've got to face Ruby 2.3 and ruby 2.4 changes at the C level and the relentless march of updated dependent libraries. Probably Shoes 3.3.3.

Contributor

ccoupe commented Nov 20, 2016

Considering, #293, it would be nice if we did have the e-book thing. We can get more a modern mingw for Windows so we can get better full_text gem, if we give up RubyInstaller /devkit compatibility. RubyInstaller is a pretty low key project.

We've got to face Ruby 2.3 and ruby 2.4 changes at the C level and the relentless march of updated dependent libraries. Probably Shoes 3.3.3.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 20, 2016

Collaborator

Considering, #293, it would be nice if we did have the e-book thing.

I've been busy and no free time to work on this. It's actually not overly difficult. Though some concerns about the Picky: it is working well but not actively maintained. One of the many problems with so many API these days, isn't it?

We can get more a modern mingw for Windows so we can get better full_text gem, if we give up RubyInstaller /devkit compatibility. RubyInstaller is a pretty low key project.

My understanding is that RubyInstaller has alternatives as far as using Ruby goes but it is the only one to provide a fully working devkit on Windows. It would come to sense that if we would not rely on RubyInstaller Devkit, we come with a solution that can survive us, ensuring Shoes future (or at least easy for anyone to pick up where Shoes will be left off).

If you feel strongly against RubyInstaller, open an issue and let's talk about pros, cons, and potential solutions.

Collaborator

BackOrder commented Nov 20, 2016

Considering, #293, it would be nice if we did have the e-book thing.

I've been busy and no free time to work on this. It's actually not overly difficult. Though some concerns about the Picky: it is working well but not actively maintained. One of the many problems with so many API these days, isn't it?

We can get more a modern mingw for Windows so we can get better full_text gem, if we give up RubyInstaller /devkit compatibility. RubyInstaller is a pretty low key project.

My understanding is that RubyInstaller has alternatives as far as using Ruby goes but it is the only one to provide a fully working devkit on Windows. It would come to sense that if we would not rely on RubyInstaller Devkit, we come with a solution that can survive us, ensuring Shoes future (or at least easy for anyone to pick up where Shoes will be left off).

If you feel strongly against RubyInstaller, open an issue and let's talk about pros, cons, and potential solutions.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Nov 21, 2016

Contributor

Actually, there is an earlier about Rubyinstaller, #281.

Contributor

ccoupe commented Nov 21, 2016

Actually, there is an earlier about Rubyinstaller, #281.

@dredknight

This comment has been minimized.

Show comment
Hide comment
@dredknight

dredknight Nov 27, 2016

Contributor

Here is a fun custom chart that I did by using progress bar. Is there a way to make progress bar go vertical instead of horizontal?

Shoes.app do

	def bar bar, dif
		anim=every(0.025) do |count|
			bar.fraction=count*(dif/(20-(15-0.75*count)))
			count == 20 ? anim.stop : nil
		end
	end
	
	flow width: 30, height: 200 do
		subtitle "Y", top: 90
	end
	for i in 0..9 do
		bar ( progress left: 30, top: 20+20*i, width: 150, height: 5 ), (rand(100).to_f/100)
	end
	stack top: 200, left: 0, width: 200 do
		subtitle "X", align: "center"
	end
end
Contributor

dredknight commented Nov 27, 2016

Here is a fun custom chart that I did by using progress bar. Is there a way to make progress bar go vertical instead of horizontal?

Shoes.app do

	def bar bar, dif
		anim=every(0.025) do |count|
			bar.fraction=count*(dif/(20-(15-0.75*count)))
			count == 20 ? anim.stop : nil
		end
	end
	
	flow width: 30, height: 200 do
		subtitle "Y", top: 90
	end
	for i in 0..9 do
		bar ( progress left: 30, top: 20+20*i, width: 150, height: 5 ), (rand(100).to_f/100)
	end
	stack top: 200, left: 0, width: 200 do
		subtitle "X", align: "center"
	end
end
@passenger94

This comment has been minimized.

Show comment
Hide comment
@passenger94

passenger94 Nov 27, 2016

Contributor

Yes !! Cool !!
No vertical progress bar that i'm aware of but you can probably create some funky ones from scratch with shapes for example

Contributor

passenger94 commented Nov 27, 2016

Yes !! Cool !!
No vertical progress bar that i'm aware of but you can probably create some funky ones from scratch with shapes for example

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Nov 28, 2016

Collaborator

@dredknight very nice sample!

What do you need vertical progress bar for? If you feel strongly about it, open a new issue with a detailed description and tag it with enhancement. Otherwise you may give a try to @passenger94 's idea. Shouldn't be too hard - it's a box in a box. :)))

Collaborator

BackOrder commented Nov 28, 2016

@dredknight very nice sample!

What do you need vertical progress bar for? If you feel strongly about it, open a new issue with a detailed description and tag it with enhancement. Otherwise you may give a try to @passenger94 's idea. Shouldn't be too hard - it's a box in a box. :)))

@dredknight

This comment has been minimized.

Show comment
Hide comment
@dredknight

dredknight Nov 28, 2016

Contributor

Thanks @BackOrder and @passenger94 ! I was just messing with it nothing too special for the moment.
I will definitely check the forms sometimes.

Contributor

dredknight commented Nov 28, 2016

Thanks @BackOrder and @passenger94 ! I was just messing with it nothing too special for the moment.
I will definitely check the forms sometimes.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Jan 21, 2017

Contributor

Closed in Shoes 3.3.2

Contributor

ccoupe commented Jan 21, 2017

Closed in Shoes 3.3.2

@ccoupe ccoupe closed this Jan 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment