Put labels on points on the y-axis and on points on a column parallel to the y-axis

I want to put (to the left of the point) j = 1 to the point (0,0), j = 2 to the point (0,1/149), j = 3 to the point (0,2/149) and j = N to the point (0,3/149).

Also put (to the right of the point) j = 1 to the point (1,0), j = 2 to the point (1,1/149), j = 3 to the point (1,2/149) and j = N to the point (1,3/149).

Also put the three points “…” vertically instead of horizontally.

It doesn’t matter if it’s not framed.

I tried it as follows:

data = Transpose@Table[{i - 1, (j - 1)/149}, {i, 1, 2}, {j, 4}]; c1 = ListPlot[data, PlotStyle -> Black,PlotMarkers -> {"\[FilledCircle]", 7}, AspectRatio -> 1]; c2 = ListLinePlot[{{{0, 0}, {0, 1}}, {{1, 0}, {1, 1}}}, PlotStyle -> Black, AspectRatio -> 1]; c = Show[c1, c2, Ticks -> None, Frame -> True, FrameTicks -> {{{{0, "j=1"}, {1/149, "j=2"}, {2/149,     "j=3"}, {(2/149) + (1/298), "..."}, {3/149, "j=N"}},   Automatic}, {Automatic, Automatic}}] 

Ordenar data y labels de mayor a menos de una grafica chartJs

Necesito ordernar de mayor a menos los datos de mi grafica en chartJs

Este es mi codigo con el cual consumo el api que viene de una consulta

getEps(){         self = this       this.$  http.get("epsCollaborators").then(res => {         this.eps = res.data.eps         for(let i = 0; i < self.eps.length; i++){           if(self.eps[i].visible ==1){             self.chartDataEps[i] = self.eps[i].total             self.chartLabelsEps[i] = self.eps[i].fund           }else {             var j = i             self.chartDataEps[j] = 0             while( i < self.eps.length){               self.chartDataEps[j] += self.eps[i].total                 self.chartLabelsEps[j]= "OTROS"               i++             }           }         } 

Esta es la consulta

SELECT  pr_employees.eps_id, pr_funds.fund, COUNT(*) AS total,        IF(count(*)>40,1,0) AS visible       FROM pr_employees       INNER JOIN pr_funds ON pr_funds.id = pr_employees.eps_id       WHERE pr_employees.status = 1       GROUP BY pr_employees.eps_id       ORDER BY total DESC 

Este es el resultado de la consulta

introducir la descripción de la imagen aquí

Esta es mi grafica chartJs la cual desde el backend viene ordenada DESC pero en la parte de “OTROS” estoy poneindo el resultado de una suma con los que tenga menos de 40 colaboradores como lo vemos en la consulta sql

introducir la descripción de la imagen aquí

Form layout. Vertical Labels vs Horizontal Labels. Images inside

After reading http://www.lukew.com/ff/entry.asp?1502 and http://www.uxmatters.com/mt/archives/2006/07/label-placement-in-forms.php Placing labels above input fields is preferable, but if you choose to place them to the left of input fields, at least make them right aligned.

I have to design a form for a user to create customers records; I mean, a lot of fields and the user has to do this operation several times a day on his day a day.

First I use horizontal labels, centering the form on the screen enter image description here

Then I decide to use the maximum horizontal size of the screen so I went with this enter image description here

And after reading the articles I tested this enter image description here

After all, I think the 1 is the best and the 3 is the worst, what do you think? Please could you give me any advice about the layout of a form with a lot of controls and will be used by a user-worker several hours everyday.

chart.js poner labels encima de barras o dentro de ellas

introducir la descripción de la imagen aquíBuen día quiero poner los labels dentro de las barras o de preferencia encima de ellas, pongo solo una parte del código ya que este se extiende demasiado por las variables y las condicionales en estas, esta chart de barras lo trabajé en horizontal.

                 var ctx =  document.getElementById("myChart2").getContext("2d");                    var myChart2 = new Chart(ctx, {                      type: 'horizontalBar',                      data: {                         labels: [""],                        datasets: [{                          label: 'Condiciones en el ambiente de trabajo',                           backgroundColor: [                            colorm,                          ],                          data: [m]                        }                        }                    options:{                      responsive: true,                      legend:{                        display:true,                        position:'left',                        padding:{                            bottom:0,                          top:90,                        },                         labels:{                          fontColor:'#313131',                          fontSize: 18,                          position:'left',                         }                      },                      layout:{                        padding:{                          left:50,                          right:50,                          bottom:20,                          top:70,                          cornerRadiusTopLeft: 15,                          cornerRadiusTopRight: 15                        }                      },                      scales : {                               yAxes : [{                                 ticks : {                                     min : 0                                 },                          hoverBackgroundColor:'#393939'                             }]                         },                    }                    });                  </script> 

desde el options se introducen los valores para lograr lo que quiero pero desconozco como y y busque información.

Should labels in forms follow the same grammar rules as titles


At the company I work at, we follow certain rules for capitalization in titles.
But currently, we’re having a discussion whether these rules also apply to labels above input fields in forms.

First name – or – First Name
Last name – or – Last Name
Arrival date – or – Arrival Date
Departure date – or – Departure Date

Opinions are divided and I can’t find any articles or grammar rules to rule in favour of one opinion or the other.

I also can’t fall back on convention when looking at what other big players do.
Amazon doesn’t treat labels as titles and only capitalizes the first word. BestBuy does treat labels as titles and implements the grammar rules linked above.
In the quick search I did, I’ve seen more companies that don’t treat labels as titles than companies that do treat label as titles. But the difference is not that significant to finalize our discussion.

I know the grammar rules mentioned above are more like guidelines, and since it isn’t about some important report where the right grammar really matters. Any rule, guideline or strong argument in favour of one of the options is helpful.

So… does anybody know of any rule or guideline. Or have a strong argument that could push us passed this tedious discussion?

Based on what criteria do you add/not add icons to labels within a toolbar?

Some toolbars have icons for each label, and some toolbars do not have icons for any label. There is enough discussion about that.

However, some toolbars will attach icons to label selectively, and on that I cannot find any type of discussion. Here is an example from Intellij:

enter image description here

The leftmost toolbar attaches only few labels with icons, while the rightmost toolbar almost attaches all the labels with icons.

The majority of the discussion is about whether to rely only on icons, only on labels, or combine them. There is no discussion or reasearch about selective use of icons in the same toolbar.

While it could be argued that “save all”, “print” and “open” are “iconified” due to these actions being ubiquitous with easily relateable visualizations, “project structure” does not satisfy that idea. There are also many other features like “export” and “import” with easy visualizations that can be iconified.

I wonder if there is a practice that guides when to add an icon to a text label, and the extent to which one could add iconfs to labels before there is clutter (if there is such a limitation).

Do menu option lists (and similar labels) belong in the database?

I am moving in the direction from database-centric design to entity-centric design (say, starting with class definitions instead of starting with a ERD), and am questioning things:

Often in a database design I’ll have tables that are nothing more than value/name pairs. The classic example is “type” or “genre”, that sort of thing. These are of course used by a foreign key column (say for the genre of a book) and give a “label” to the value. In the UI, they’re simply used to fill in a drop-down menu in a form or make a human-readable label appear on a page.

My question is, if I have similar objects in my class model…do they even need to be persisted? Should they just live in code and not go to the repository, or the repository not bother to retrieve them from the database, and have the values in code or config files? If they are essentially static (lets say they change substantially less often than new releases of the software are created), do they belong in the software and not in the database/persistent store? (Maybe they shouldn’t be classes at all, just i18n system keys or something.)

Clearly I can think of a few reasons they might should be in the DB. If they are actually dynamic and not more static than the code, for one. Or if I need to generate reports directly from the DB layer (outside the software) and I want to display human-readable values in the report without duplicating the mapping, they need to be in the DB. Or perhaps if there are more fields that are more dynamic (deprecated bit, validity dates, other values). But if not, should they just stay in code? Now I have “magic numbers” in the DB, is that worse?

If there’s modern conventional wisdom on this I’m having trouble Googling it.

Porque meus Labels não aparecem no swing?

Alguém pode me ajudar? é um erro bem de novato, porque meus labels não estão aparecendo no swing?

import javax.swing.*;  public class first{  public static void main(String[] args){      JFrame f = new JFrame();      JLabel c = new JLabel("Seja bem-vindo!");     f.add(c);     JButton b = new JButton("CLICK");     b.setBounds(130,100,100,40);      f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     f.add(b);     f.setSize(400,500);     f.setLayout(null);     f.setVisible(true);     } }