Docker called the Voting App.

In this section, we will learn about Docker Compose, its file, and its commands, using a sample application developed by Docker called the Voting App.

  1. Introduction
  2. Docker File
  3. Basic Docker Commands
  4. Port and Volume Mapping
  5. Docker Networking
  6. Docker Storage
  7. Docker Compose (You are here!)
  8. Deleting Docker Entities

The Voting App is a Flask application written in Python to vote between Cats and Dogs.

Image for post

This vote is then transferred to Redis, which acts as an in-memory DB here. The worker application, written in .NET, then processes this vote and inserts it in the persistent database — the Postgres container here.

Image for post

Finally, the result of the vote is displayed via a web application that is written in NodeJS.

Image for post

Web Application in NodeJS

I highly encourage you to clone this application and play around with it, even if you do not know anything about Docker Compose yet. If you can appreciate the fact that these services are running on 5 different containers you already have your motivation to continue reading.

git clone git@github.com:dockersamples/example-voting-app.git

cd example-voting-app/
docker-compose up

#docker-compose #docker #docker-networking #design-systems #dockerfiles

What is GEEK

Buddha Community

Docker called the Voting App.
Saul  Alaniz

Saul Alaniz

1643374800

Cree Un Gráfico Circular, De Barras, De Líneas Y De Puntos Usando CSS

¡No es para preocuparse! A menudo, todo lo que necesita hacer es una lista o tabla simple, luego agregue un poco de CSS para transformarla en un gráfico.

Digamos que hicimos una encuesta sobre si hacer o no un reinicio de Firefly con un nuevo elenco. Este podría ser nuestro conjunto de datos:

Sí: 35 %
No: 55 %
En blanco: 10 %;

¡Brillante! Ahora bien, no todos los tipos de gráficos son apropiados para estos datos. Por ejemplo, un gráfico de líneas debería mostrar una serie, no categorías, pero lo haremos de todos modos, solo para demostrar cómo hacerlo.

No entraré en demasiados detalles sobre el CSS, explicando cómo funciona un atributo específico. Úselo tal como está, o ajústelo y, en el proceso, tal vez aprenda un atributo CSS que no conocía antes. También tenga en cuenta que estos son gráficos simples ; si necesita información sobre herramientas, animaciones o funciones avanzadas, entonces una biblioteca de gráficos puede ser más adecuada.

También puede encontrar el código en GitHub .

El marcado

Supongamos que hemos cargado los datos, pero aún no hemos decidido cómo mostrarlos. En lugar de retrasar el proceso, simplemente lo representamos en una lista HTML, lo decoramos con algunas variables CSS que describen los datos y se lo entregamos a los diseñadores.

Estableceremos estas variables CSS:

  • etiqueta : El tipo de voto (Sí, No, En blanco)
  • value : Los porcentajes de cada voto.
  • value-text : El valor como texto.
  • anterior-valor : valor del elemento de datos anterior.
  • anterior-sum : Suma de todos los valores anteriores.
  • recuento : el número de elementos de datos.
  • color : El color deseado.

Los valores de estas variables son fáciles de obtener a partir de los datos. Accedemos a ellos en CSS usandovar(--my-variable)

Si ya sabe qué gráfico va a hacer, probablemente no necesite la lista completa de variables.

Usando nuestro marco favorito o Vanilla JS, creamos un elemento de lista para cada elemento de datos y configuramos las variables como estilos en línea, lo que da como resultado el siguiente marcado:


<ul id="votes" style="--count: 3;">
  <li style="
    --label: 'Yay'; --value: 35%; --value-text: '25%'; 
    --previous-value: 0%; --previous-sum: 0%;
    --color: green;"></li>
  <li style="
    --label: 'Nay'; --value: 55%; --value-text: '55%'; 
    --previous-value: 35%; --previous-sum: 35%;
    --color: red;"></li>
  <li style="
    --label: 'Blank'; --value: 10%; --value-text: '10%'; 
    --previous-value: 55%; --previous-sum: 90%;
    --color: blue;"></li>
</ul>

¡Ahora tenemos algo que podemos diseñar, y eso nos hace poderosos!

Estilo general

Comencemos agregando un estilo básico para eliminar el 'aspecto de lista' y establecer un tamaño general de los gráficos:

#votes {
  padding: 0;
  list-style-type: none;
  height: 10em;
  width: 10em;
}

No pasa nada interesante aquí, de verdad.

Gráfico circular

El primer gráfico que hacemos es el gráfico circular. Esto es apropiado ya que nuestros datos representan fracciones de un total. Cada elemento de la lista se dibujará como un círculo uno encima del otro, con una parte coloreada que representa el valor y una parte transparente que es el resto.

#votes {
  position: relative;
}
#votes > li {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  border-radius: 50%;
  background: conic-gradient(transparent var(--previous-sum), var(--color) var(--previous-sum));
}

El fondo cónico establece que hasta el previous-sumtodo debe ser transparente; después de eso, todo debería tener nuestro color elegido. Debido a que los círculos están uno encima del otro, ocultan la parte de color superflua. Podríamos haber hecho transparente la parte superflua también, pero realmente no es necesario. Recuerde, nuestro objetivo es un gráfico simple.

Gráfico circular de la lista HTML

Gráfico de barras

Para el gráfico de barras queremos barras verticales. Las barras deben comenzar en la parte inferior y sus alturas deben coincidir con los valores de los votos.

#votes {
  display: flex;
  align-items: end;
}
#votes > li {
  background-color: var(--color);
  height: var(--value);
  width: calc(100% / var(--count));
}

Estamos usando display: flexy align-items: endpara poner cosas en la parte inferior del área del gráfico. La altura se establece en el valor de cada elemento y el ancho se establece en 'ancho completo dividido por el número de elementos de datos'.

Gráfico de barras de la lista HTML

Gráfico de puntos

Para el gráfico de puntos, queremos mostrar los puntos en el medio del intervalo. Queremos que sean redondos y queremos que tengan un tamaño decente.

#votes {
  display: flex;
}
#votes > li {
  border-radius: 100%;
  background-color: lightgray;
  width: calc(20% / var(--count));
  height: calc(20% / var(--count));
  margin: auto auto var(--value) auto;
}

Los puntos se posicionan usando margin, porque en este caso esa es la solución más simple. El tamaño de los puntos se calcula a partir de un ancho dividido por el número de elementos de datos. Encuentre un buen ancho por prueba y error; Encontré que el 20% se ve bien para mi conjunto de datos.

Para que el gráfico de puntos sea más legible, vamos a agregar algunas líneas horizontales. Lo hacemos agregando lo siguiente:

#votes {
  ... other styling ...
  position: relative;
}
#votes::after {
  content: '';
  height: 100%;
  width: 100%;
  position: absolute;
  background-size: 100% 20%;
  background-image:
    linear-gradient(transparent, transparent),
    linear-gradient(to top, black 1px, transparent 1px);
}

Gráfico de puntos de la lista HTML

Gráfico de líneas rellenas

El siguiente es el gráfico de líneas rellenas. Es una mezcla del gráfico de barras y el gráfico de líneas (el último de los cuales aún no hemos hecho). Es en cierto modo más sencillo que el gráfico de líneas, como veremos en un momento.

Los diferentes colores en el fondo rara vez son significativos para este tipo de gráfico, por lo que solo le daremos un gris claro uniforme.

#votes {
  display: flex;
}
#votes > li {
  background-color: lightgray;
  height: 100%;
  width: calc(100% / var(--count));
  clip-path: polygon(
    0 100%, 
    0 calc(100% - var(--previous-value)), 
    100% calc(100% - var(--value)), 
    100% 100%);
}

Este gráfico dibuja cada elemento de la lista como un polígono: el borde superior está definido por los valores anteriores y actuales de los datos y será diagonal (a menos, por supuesto, que los valores anteriores y actuales sean los mismos). El resto del polígono será rectangular.

El polígono se crea mediante pares de coordenadas (xy). Dado que la coordenada goram y es 0 en la parte superior y 100% en la parte inferior, tenemos que hacer j100% — <our value>para obtener el valor y correcto.

Puede ser apropiado aquí agregar las líneas horizontales que también usamos en el gráfico de puntos.

Gráfico de líneas rellenas de la lista HTML

Gráfico de linea

El gráfico de líneas es como el gráfico de líneas rellenas excepto en un punto: no estamos dibujando hasta el final del gráfico. En cambio, estamos dibujando algunos polígonos muy delgados, por lo que termina pareciendo líneas.

#votes {
  display: flex;
}
#votes > li {
  background-color: black;
  height: 100%;
  width: calc(100% / var(--count));
  clip-path: polygon(
    0 calc(100% - var(--previous-value)), 
    100% calc(100% - var(--value)), 
    100% calc(100% - var(--value) + 2px), 
    0 calc(100% - var(--previous-value) + 2px));  
}

Gráfico de líneas de la lista HTML

Tabla de texto

Mostrar los datos como una tabla utilizando el enfoque de CSS en realidad requiere la mayor cantidad de CSS. Y, debido a que CSS no permite cambiar lo que no es texto (como el 35 %) a texto, necesitamos usar la value-textvariable para mostrar el valor.

#votes {
  border: solid 1px black;
  height: auto;
}
#votes:before {
  content: 'Votes:';
  display: inline-block;
  width: 9em;
  padding-left: 1em;
}
#votes > li::before, #votes > li::after {
  border-top: solid 1px black;
  display: inline-block;
}
#votes > li::before {
  border-right: none;
  content: var(--label);
  width: 5em;
  padding-left: 1em;
}
#votes > li::after {
  border-left: none;
  content: var(--value-text);
  width: 3em;
  padding-right: 1em;
  text-align: right;
}

Tabla de texto de la lista HTML

Conclusión

Aquí tienes una breve lista de gráficos simples que se pueden lograr con unas pocas líneas de HTML y CSS.

Hay muchos otros gráficos que podrían hacerse de la misma manera. ¿Qué hay de los gráficos de anillos, los gráficos de líneas apiladas o los gráficos de áreas? ¿Qué pasa si queremos etiquetas que muestren los valores, o un eje x e y? Con los ejemplos de este artículo como inspiración, no debería resultarle difícil hacer sus gráficos completamente suyos.

Si te ha gustado este artículo, considera seguirme. Entonces serás parte de mi equipo. 

Enlace: https://betterprogramming.pub/build-a-pie-bar-line-and-point-chart-using-css-799983a6ab3d

#css 

Build a Pie, Bar, Line, and Point Chart Using CSS

Not to worry! Often all you need to make is a simple list or table, then add a bit of CSS to transform it into a chart.

Let us say we did a poll on whether or not to do a Firefly reboot with a new cast. This could be our dataset:

Yay:   35%
Nay:   55%
Blank: 10%;

Shiny! Now, not all chart types are appropriate for these data . A line chart should for example display a series, not categories — but we are going to do it anyway, just to demonstrate how to do it.

I will not go into too many details on the CSS, explaining how a specific attribute works. Use it as-is, or adjust it and in the process maybe learn a CSS attribute you did not know before. Also note that these are simple charts; if you need tooltips, animations, or advanced functionality, then a chart library may be more suited.

You can find the code as well at GitHub.

The Markup

Let us assume that we have loaded the data, but we have not yet decided on how to display it. Instead of delaying the process, we simply render it at a HTML list, decorate it with some CSS variables that describe the data, and hand it over to the designers.

We will set these CSS variables:

  • label: The type of vote (Yay, Nay, Blank)
  • value: The percentages for each vote.
  • value-text: The value as text.
  • previous-value: Value of the previous data item.
  • previous-sum: Sum of all previous values.
  • count: The number of data items.
  • color: The desired color.

The values for these variables are easy to get from the data. We access them in CSS using var(--my-variable)

If you already know which chart you are going to make, you probably don’t need the full list of variables.

Using our favorite framework or vanilla JS we create a list item for each data item and set the variables as inline styles, resulting in the following markup:


<ul id="votes" style="--count: 3;">
  <li style="
    --label: 'Yay'; --value: 35%; --value-text: '25%'; 
    --previous-value: 0%; --previous-sum: 0%;
    --color: green;"></li>
  <li style="
    --label: 'Nay'; --value: 55%; --value-text: '55%'; 
    --previous-value: 35%; --previous-sum: 35%;
    --color: red;"></li>
  <li style="
    --label: 'Blank'; --value: 10%; --value-text: '10%'; 
    --previous-value: 55%; --previous-sum: 90%;
    --color: blue;"></li>
</ul>

We now have something we can style, and that makes us mighty!

Overall Styling

Let us start by adding a basic styling to remove the ‘list-look’, and set an overall size of the charts:

#votes {
  padding: 0;
  list-style-type: none;
  height: 10em;
  width: 10em;
}

Nothing exiting going on here, really.

Pie Chart

First chart we make is the pie chart. This is appropriate as our data represents fractions of a total. Each list item will be drawn as a circle on top of each other, with a colored part that represents the value, and a transparent part that is the rest.

#votes {
  position: relative;
}
#votes > li {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  border-radius: 50%;
  background: conic-gradient(transparent var(--previous-sum), var(--color) var(--previous-sum));
}

The conic background states that up to the previous-sum everything should be transparent; after that everything should have our chosen color. Because the circles are on top of each other they hide the superfluous colored part. We could have made the superfluous part transparent as well, but we don’t really need to. Remember, we are aiming for a simple chart.

Pie chart from HTML list

Bar Chart

For the bar chart we want vertical bars. The bars should start at the bottom, and their heights should match the vote values.

#votes {
  display: flex;
  align-items: end;
}
#votes > li {
  background-color: var(--color);
  height: var(--value);
  width: calc(100% / var(--count));
}

We are using display: flex and align-items: endto put stuff at the bottom of the chart area. The height is set to the value of each element, and the width is set to ‘full width divided by the number of data items’.

Bar chart from HTML list

Point Chart

For the point chart we want to display the points in the middle of the interval. We want them to be round, and we want them to have a decent size.

#votes {
  display: flex;
}
#votes > li {
  border-radius: 100%;
  background-color: lightgray;
  width: calc(20% / var(--count));
  height: calc(20% / var(--count));
  margin: auto auto var(--value) auto;
}

The points are positioned using margin, because in this case that is the simplest solution. The size of the points are calculated from some width divided by the number of data items. Find a nice width by trial-and-error; I found 20% to look nice for my dataset.

To make the point chart more legible we are going to add some horizontal lines. We do that by adding the following:

#votes {
  ... other styling ...
  position: relative;
}
#votes::after {
  content: '';
  height: 100%;
  width: 100%;
  position: absolute;
  background-size: 100% 20%;
  background-image:
    linear-gradient(transparent, transparent),
    linear-gradient(to top, black 1px, transparent 1px);
}

Point chart from HTML list

Filled Line Chart

Next up is the filled line chart. It is a mix of the bar chart and the line chart (the later of which we have not made yet). It is in a way simpler that the line chart, as we will see in a moment.

Different colors in the background is rarely meaningful for this type of chart, so we are just going to give it a uniform light gray.

#votes {
  display: flex;
}
#votes > li {
  background-color: lightgray;
  height: 100%;
  width: calc(100% / var(--count));
  clip-path: polygon(
    0 100%, 
    0 calc(100% - var(--previous-value)), 
    100% calc(100% - var(--value)), 
    100% 100%);
}

This chart draws each list item as a polygon: The top edge is defined by the previous and current values of the data and will be diagonal (unless of course the previous and current values are the same). The rest of the polygon will be rectangular.

The polygon is created by pairs of (x y) coordinates. Since the goram y-coordinate is 0 at the top and 100% at the bottom, we have to do the j100% — <our value> to get the correct y-value.

It may be appropriate here to add the horizontal lines we also used in the point chart.

Filled line chart from HTML list

Line Chart

The line chart is like the filled line chart except on one point: We are not drawing all the way to the bottom of the chart. Instead we are drawing some very thin polygons, so it ends up looking like lines.

#votes {
  display: flex;
}
#votes > li {
  background-color: black;
  height: 100%;
  width: calc(100% / var(--count));
  clip-path: polygon(
    0 calc(100% - var(--previous-value)), 
    100% calc(100% - var(--value)), 
    100% calc(100% - var(--value) + 2px), 
    0 calc(100% - var(--previous-value) + 2px));  
}

Line chart from HTML list

Text Table

Displaying the data as a table using the CSS approach actually requires the most CSS. And, because CSS does not allow changing non-text (such as 35%) to text, we need to use the value-text variable to display the value.

#votes {
  border: solid 1px black;
  height: auto;
}
#votes:before {
  content: 'Votes:';
  display: inline-block;
  width: 9em;
  padding-left: 1em;
}
#votes > li::before, #votes > li::after {
  border-top: solid 1px black;
  display: inline-block;
}
#votes > li::before {
  border-right: none;
  content: var(--label);
  width: 5em;
  padding-left: 1em;
}
#votes > li::after {
  border-left: none;
  content: var(--value-text);
  width: 3em;
  padding-right: 1em;
  text-align: right;
}

Text table from HTML list

Conclusion

Here you have a short list of simple charts that can be achieved with a few lines of HTML and CSS.

There are many other charts that could be made the same way. How about donut charts, stacked line charts, or area charts? What if we want labels displaying the values, or a x- and y-axis? With the examples in this article as inspiration, you should not find it difficult to make your charts completely your own.

If you liked this article, consider following me. Then you will be part of my crew. 

Link: https://betterprogramming.pub/build-a-pie-bar-line-and-point-chart-using-css-799983a6ab3d

#css 

山本  洋介

山本 洋介

1643605200

CSSを使用して円、棒、線、および点のグラフを作成する

心配無用!多くの場合、作成する必要があるのは単純なリストまたはテーブルだけです。次に、CSSを少し追加してチャートに変換します。

新しいキャストでFireflyの再起動を行うかどうかについて投票を行ったとしましょう。これは私たちのデータセットである可能性があります:

イェーイ:35%イェーイ:
55%
空白:10%;

ピカピカ!現在、すべてのグラフタイプがこれらのデータに適しているわけではありません。折れ線グラフは、たとえば、カテゴリではなくシリーズを表示する必要がありますが、それを行う方法を示すために、とにかくそれを行います。

CSSについてはあまり詳しく説明せず、特定の属性がどのように機能するかを説明します。そのまま使用するか、調整して、その過程で、これまで知らなかったCSS属性を学習する可能性があります。また、これらは単純なチャートであることに注意してください。ツールチップ、アニメーション、または高度な機能が必要な場合は、チャートライブラリの方が適している場合があります。

コードはGitHubにもあります。

マークアップ

データをロードしたと仮定しますが、データの表示方法はまだ決定していません。プロセスを遅らせる代わりに、HTMLリストでレンダリングし、データを説明するいくつかのCSS変数で装飾して、デザイナーに渡します。

これらのCSS変数を設定します。

  • ラベル:投票の種類(Yay、Nay、Blank)
  • :各投票のパーセンテージ。
  • value-text:テキストとしての値。
  • previous-value:前のデータ項目の値。
  • previous-sum:以前のすべての値の合計。
  • count:データ項目の数。
  • :希望の色。

これらの変数の値は、データから簡単に取得できます。CSSを使用してそれらにアクセスしますvar(--my-variable)

作成するチャートがすでにわかっている場合は、変数の完全なリストはおそらく必要ありません。

お気に入りのフレームワークまたはバニラJSを使用して、データ項目ごとにリスト項目を作成し、変数をインラインスタイルとして設定して、次のマークアップを作成します。


<ul id="votes" style="--count: 3;">
  <li style="
    --label: 'Yay'; --value: 35%; --value-text: '25%'; 
    --previous-value: 0%; --previous-sum: 0%;
    --color: green;"></li>
  <li style="
    --label: 'Nay'; --value: 55%; --value-text: '55%'; 
    --previous-value: 35%; --previous-sum: 35%;
    --color: red;"></li>
  <li style="
    --label: 'Blank'; --value: 10%; --value-text: '10%'; 
    --previous-value: 55%; --previous-sum: 90%;
    --color: blue;"></li>
</ul>

私たちは今、私たちがスタイリングできるものを手に入れました、そしてそれは私たちを強力にします!

全体的なスタイリング

基本的なスタイルを追加して「list-look」を削除し、グラフの全体的なサイズを設定することから始めましょう。

#votes {
  padding: 0;
  list-style-type: none;
  height: 10em;
  width: 10em;
}

本当に、ここで何も起こっていません。

円グラフ

最初に作成するグラフは円グラフです。私たちのデータは全体の一部を表しているので、これは適切です。各リストアイテムは、値を表す色付きの部分と残りの部分である透明な部分で、互いの上に円として描画されます。

#votes {
  position: relative;
}
#votes > li {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  border-radius: 50%;
  background: conic-gradient(transparent var(--previous-sum), var(--color) var(--previous-sum));
}

円錐曲線の背景には、previous-sumすべてが透明である必要があると記載されています。その後、すべてが選択した色になるはずです。円は互いに重なり合っているため、余分な色の部分を隠します。余分な部分も透明にすることもできますが、そうする必要はありません。シンプルなチャートを目指していることを忘れないでください。

HTMLリストからの円グラフ

棒グラフ

棒グラフには、縦棒が必要です。バーは下部から開始し、高さは投票値と一致する必要があります。

#votes {
  display: flex;
  align-items: end;
}
#votes > li {
  background-color: var(--color);
  height: var(--value);
  width: calc(100% / var(--count));
}

チャート領域の下部にあるものを使用display: flexして配置しています。align-items: end高さは各要素の値に設定され、幅は「全幅をデータ項目の数で割った値」に設定されます。

HTMLリストの棒グラフ

ポイントチャート

ポイントチャートでは、間隔の中央にポイントを表示します。私たちはそれらを丸くしたい、そして私たちはそれらがまともなサイズを持っていることを望んでいます。

#votes {
  display: flex;
}
#votes > li {
  border-radius: 100%;
  background-color: lightgray;
  width: calc(20% / var(--count));
  height: calc(20% / var(--count));
  margin: auto auto var(--value) auto;
}

marginこの場合、これが最も簡単な解決策であるため、ポイントはを使用して配置されます。ポイントのサイズは、ある幅をデータ項目の数で割って計算されます。試行錯誤で適切な幅を見つけます。20%が自分のデータセットに適していることがわかりました。

ポイントチャートを読みやすくするために、いくつかの水平線を追加します。これを行うには、次を追加します。

#votes {
  ... other styling ...
  position: relative;
}
#votes::after {
  content: '';
  height: 100%;
  width: 100%;
  position: absolute;
  background-size: 100% 20%;
  background-image:
    linear-gradient(transparent, transparent),
    linear-gradient(to top, black 1px, transparent 1px);
}

HTMLリストからのポイントチャート

塗りつぶされた折れ線グラフ

次は、塗りつぶされた折れ線グラフです。これは、棒グラフと折れ線グラフを組み合わせたものです(後者はまだ作成していません)。すぐにわかるように、折れ線グラフよりも簡単です。

このタイプのグラフでは、背景の色が異なることはめったに意味がないため、均一なライトグレーを使用します。

#votes {
  display: flex;
}
#votes > li {
  background-color: lightgray;
  height: 100%;
  width: calc(100% / var(--count));
  clip-path: polygon(
    0 100%, 
    0 calc(100% - var(--previous-value)), 
    100% calc(100% - var(--value)), 
    100% 100%);
}

このグラフは、各リストアイテムをポリゴンとして描画します。上端は、データの以前の値と現在の値によって定義され、対角線になります(もちろん、以前の値と現在の値が同じでない場合)。ポリゴンの残りの部分は長方形になります。

ポリゴンは、(xy)座標のペアによって作成されます。ゴラムのy座標は、上部が0、下部が100%であるj100% — <our value>ため、正しいy値を取得するためにを実行する必要があります。

ここで、ポイントチャートでも使用した水平線を追加するのが適切な場合があります。

HTMLリストからの塗りつぶされた折れ線グラフ

折れ線グラフ

折れ線グラフは、1つの点を除いて、塗りつぶされた折れ線グラフに似ています。グラフの一番下まで描画していません。代わりに、非常に細いポリゴンを描画しているため、線のように見えます。

#votes {
  display: flex;
}
#votes > li {
  background-color: black;
  height: 100%;
  width: calc(100% / var(--count));
  clip-path: polygon(
    0 calc(100% - var(--previous-value)), 
    100% calc(100% - var(--value)), 
    100% calc(100% - var(--value) + 2px), 
    0 calc(100% - var(--previous-value) + 2px));  
}

HTMLリストからの折れ線グラフ

テキストテーブル

CSSアプローチを使用してデータをテーブルとして表示するには、実際にはほとんどのCSSが必要です。また、CSSでは非テキスト(35%など)をテキストに変更できないため、value-text変数を使用して値を表示する必要があります。

#votes {
  border: solid 1px black;
  height: auto;
}
#votes:before {
  content: 'Votes:';
  display: inline-block;
  width: 9em;
  padding-left: 1em;
}
#votes > li::before, #votes > li::after {
  border-top: solid 1px black;
  display: inline-block;
}
#votes > li::before {
  border-right: none;
  content: var(--label);
  width: 5em;
  padding-left: 1em;
}
#votes > li::after {
  border-left: none;
  content: var(--value-text);
  width: 3em;
  padding-right: 1em;
  text-align: right;
}

HTMLリストからのテキストテーブル

結論

ここに、数行のHTMLとCSSで実現できる簡単なグラフの短いリストがあります。

同じ方法で作成できるチャートは他にもたくさんあります。ドーナツチャート、積み上げ折れ線グラフ、または面グラフはどうですか?値、またはx軸とy軸を表示するラベルが必要な場合はどうなりますか?この記事の例を参考にして、チャートを完全に独自のものにするのは難しいことではありません。

この記事が気に入ったら、私をフォローすることを検討してください。その後、あなたは私の乗組員の一部になります。 

リンク:https ://betterprogramming.pub/build-a-pie-bar-line-and-point-chart-using-css-799983a6ab3d

#css 

Carmen  Grimes

Carmen Grimes

1595491178

Best Electric Bikes and Scooters for Rental Business or Campus Facility

The electric scooter revolution has caught on super-fast taking many cities across the globe by storm. eScooters, a renovated version of old-school scooters now turned into electric vehicles are an environmentally friendly solution to current on-demand commute problems. They work on engines, like cars, enabling short traveling distances without hassle. The result is that these groundbreaking electric machines can now provide faster transport for less — cheaper than Uber and faster than Metro.

Since they are durable, fast, easy to operate and maintain, and are more convenient to park compared to four-wheelers, the eScooters trend has and continues to spike interest as a promising growth area. Several companies and universities are increasingly setting up shop to provide eScooter services realizing a would-be profitable business model and a ready customer base that is university students or residents in need of faster and cheap travel going about their business in school, town, and other surrounding areas.

Electric Scooters Trends and Statistics

In many countries including the U.S., Canada, Mexico, U.K., Germany, France, China, Japan, India, Brazil and Mexico and more, a growing number of eScooter users both locals and tourists can now be seen effortlessly passing lines of drivers stuck in the endless and unmoving traffic.

A recent report by McKinsey revealed that the E-Scooter industry will be worth― $200 billion to $300 billion in the United States, $100 billion to $150 billion in Europe, and $30 billion to $50 billion in China in 2030. The e-Scooter revenue model will also spike and is projected to rise by more than 20% amounting to approximately $5 billion.

And, with a necessity to move people away from high carbon prints, traffic and congestion issues brought about by car-centric transport systems in cities, more and more city planners are developing more bike/scooter lanes and adopting zero-emission plans. This is the force behind the booming electric scooter market and the numbers will only go higher and higher.

Companies that have taken advantage of the growing eScooter trend develop an appthat allows them to provide efficient eScooter services. Such an app enables them to be able to locate bike pick-up and drop points through fully integrated google maps.

List of Best Electric Bikes for Rental Business or Campus Facility 2020:

It’s clear that e scooters will increasingly become more common and the e-scooter business model will continue to grab the attention of manufacturers, investors, entrepreneurs. All this should go ahead with a quest to know what are some of the best electric bikes in the market especially for anyone who would want to get started in the electric bikes/scooters rental business.

We have done a comprehensive list of the best electric bikes! Each bike has been reviewed in depth and includes a full list of specs and a photo.

Billy eBike

mobile-best-electric-bikes-scooters https://www.kickstarter.com/projects/enkicycles/billy-were-redefining-joyrides

To start us off is the Billy eBike, a powerful go-anywhere urban electric bike that’s specially designed to offer an exciting ride like no other whether you want to ride to the grocery store, cafe, work or school. The Billy eBike comes in 4 color options – Billy Blue, Polished aluminium, Artic white, and Stealth black.

Price: $2490

Available countries

Available in the USA, Europe, Asia, South Africa and Australia.This item ships from the USA. Buyers are therefore responsible for any taxes and/or customs duties incurred once it arrives in your country.

Features

  • Control – Ride with confidence with our ultra-wide BMX bars and a hyper-responsive twist throttle.
  • Stealth- Ride like a ninja with our Gates carbon drive that’s as smooth as butter and maintenance-free.
  • Drive – Ride further with our high torque fat bike motor, giving a better climbing performance.
  • Accelerate – Ride quicker with our 20-inch lightweight cutout rims for improved acceleration.
  • Customize – Ride your own way with 5 levels of power control. Each level determines power and speed.
  • Flickable – Ride harder with our BMX /MotoX inspired geometry and lightweight aluminum package

Specifications

  • Maximum speed: 20 mph (32 km/h)
  • Range per charge: 41 miles (66 km)
  • Maximum Power: 500W
  • Motor type: Fat Bike Motor: Bafang RM G060.500.DC
  • Load capacity: 300lbs (136kg)
  • Battery type: 13.6Ah Samsung lithium-ion,
  • Battery capacity: On/off-bike charging available
  • Weight: w/o batt. 48.5lbs (22kg), w/ batt. 54lbs (24.5kg)
  • Front Suspension: Fully adjustable air shock, preload/compression damping /lockout
  • Rear Suspension: spring, preload adjustment
  • Built-in GPS

Why Should You Buy This?

  • Riding fun and excitement
  • Better climbing ability and faster acceleration.
  • Ride with confidence
  • Billy folds for convenient storage and transportation.
  • Shorty levers connect to disc brakes ensuring you stop on a dime
  • belt drives are maintenance-free and clean (no oil or lubrication needed)

**Who Should Ride Billy? **

Both new and experienced riders

**Where to Buy? **Local distributors or ships from the USA.

Genze 200 series e-Bike

genze-best-electric-bikes-scooters https://www.genze.com/fleet/

Featuring a sleek and lightweight aluminum frame design, the 200-Series ebike takes your riding experience to greater heights. Available in both black and white this ebike comes with a connected app, which allows you to plan activities, map distances and routes while also allowing connections with fellow riders.

Price: $2099.00

Available countries

The Genze 200 series e-Bike is available at GenZe retail locations across the U.S or online via GenZe.com website. Customers from outside the US can ship the product while incurring the relevant charges.

Features

  • 2 Frame Options
  • 2 Sizes
  • Integrated/Removable Battery
  • Throttle and Pedal Assist Ride Modes
  • Integrated LCD Display
  • Connected App
  • 24 month warranty
  • GPS navigation
  • Bluetooth connectivity

Specifications

  • Maximum speed: 20 mph with throttle
  • Range per charge: 15-18 miles w/ throttle and 30-50 miles w/ pedal assist
  • Charging time: 3.5 hours
  • Motor type: Brushless Rear Hub Motor
  • Gears: Microshift Thumb Shifter
  • Battery type: Removable Samsung 36V, 9.6AH Li-Ion battery pack
  • Battery capacity: 36V and 350 Wh
  • Weight: 46 pounds
  • Derailleur: 8-speed Shimano
  • Brakes: Dual classic
  • Wheels: 26 x 20 inches
  • Frame: 16, and 18 inches
  • Operating Mode: Analog mode 5 levels of Pedal Assist Thrott­le Mode

Norco from eBikestore

norco-best-electric-bikes-scooters https://ebikestore.com/shop/norco-vlt-s2/

The Norco VLT S2 is a front suspension e-Bike with solid components alongside the reliable Bosch Performance Line Power systems that offer precise pedal assistance during any riding situation.

Price: $2,699.00

Available countries

This item is available via the various Norco bikes international distributors.

Features

  • VLT aluminum frame- for stiffness and wheel security.
  • Bosch e-bike system – for their reliability and performance.
  • E-bike components – for added durability.
  • Hydraulic disc brakes – offer riders more stopping power for safety and control at higher speeds.
  • Practical design features – to add convenience and versatility.

Specifications

  • Maximum speed: KMC X9 9spd
  • Motor type: Bosch Active Line
  • Gears: Shimano Altus RD-M2000, SGS, 9 Speed
  • Battery type: Power Pack 400
  • Battery capacity: 396Wh
  • Suspension: SR Suntour suspension fork
  • Frame: Norco VLT, Aluminum, 12x142mm TA Dropouts

Bodo EV

bodo-best-electric-bikes-scootershttp://www.bodoevs.com/bodoev/products_show.asp?product_id=13

Manufactured by Bodo Vehicle Group Limited, the Bodo EV is specially designed for strong power and extraordinary long service to facilitate super amazing rides. The Bodo Vehicle Company is a striking top in electric vehicles brand field in China and across the globe. Their Bodo EV will no doubt provide your riders with high-level riding satisfaction owing to its high-quality design, strength, breaking stability and speed.

Price: $799

Available countries

This item ships from China with buyers bearing the shipping costs and other variables prior to delivery.

Features

  • Reliable
  • Environment friendly
  • Comfortable riding
  • Fashionable
  • Economical
  • Durable – long service life
  • Braking stability
  • LED lighting technology

Specifications

  • Maximum speed: 45km/h
  • Range per charge: 50km per person
  • Charging time: 8 hours
  • Maximum Power: 3000W
  • Motor type: Brushless DC Motor
  • Load capacity: 100kg
  • Battery type: Lead-acid battery
  • Battery capacity: 60V 20AH
  • Weight: w/o battery 47kg

#android app #autorent #entrepreneurship #ios app #minimum viable product (mvp) #mobile app development #news #app like bird #app like bounce #app like lime #autorent #best electric bikes 2020 #best electric bikes for rental business #best electric kick scooters 2020 #best electric kickscooters for rental business #best electric scooters 2020 #best electric scooters for rental business #bird scooter business model #bird scooter rental #bird scooter rental cost #bird scooter rental price #clone app like bird #clone app like bounce #clone app like lime #electric rental scooters #electric scooter company #electric scooter rental business #how do you start a moped #how to start a moped #how to start a scooter rental business #how to start an electric company #how to start electric scooterrental business #lime scooter business model #scooter franchise #scooter rental business #scooter rental business for sale #scooter rental business insurance #scooters franchise cost #white label app like bird #white label app like bounce #white label app like lime

Carmen  Grimes

Carmen Grimes

1595494844

How to start an electric scooter facility/fleet in a university campus/IT park

Are you leading an organization that has a large campus, e.g., a large university? You are probably thinking of introducing an electric scooter/bicycle fleet on the campus, and why wouldn’t you?

Introducing micro-mobility in your campus with the help of such a fleet would help the people on the campus significantly. People would save money since they don’t need to use a car for a short distance. Your campus will see a drastic reduction in congestion, moreover, its carbon footprint will reduce.

Micro-mobility is relatively new though and you would need help. You would need to select an appropriate fleet of vehicles. The people on your campus would need to find electric scooters or electric bikes for commuting, and you need to provide a solution for this.

To be more specific, you need a short-term electric bike rental app. With such an app, you will be able to easily offer micro-mobility to the people on the campus. We at Devathon have built Autorent exactly for this.

What does Autorent do and how can it help you? How does it enable you to introduce micro-mobility on your campus? We explain these in this article, however, we will touch upon a few basics first.

Micro-mobility: What it is

micro-mobility

You are probably thinking about micro-mobility relatively recently, aren’t you? A few relevant insights about it could help you to better appreciate its importance.

Micro-mobility is a new trend in transportation, and it uses vehicles that are considerably smaller than cars. Electric scooters (e-scooters) and electric bikes (e-bikes) are the most popular forms of micro-mobility, however, there are also e-unicycles and e-skateboards.

You might have already seen e-scooters, which are kick scooters that come with a motor. Thanks to its motor, an e-scooter can achieve a speed of up to 20 km/h. On the other hand, e-bikes are popular in China and Japan, and they come with a motor, and you can reach a speed of 40 km/h.

You obviously can’t use these vehicles for very long commutes, however, what if you need to travel a short distance? Even if you have a reasonable public transport facility in the city, it might not cover the route you need to take. Take the example of a large university campus. Such a campus is often at a considerable distance from the central business district of the city where it’s located. While public transport facilities may serve the central business district, they wouldn’t serve this large campus. Currently, many people drive their cars even for short distances.

As you know, that brings its own set of challenges. Vehicular traffic adds significantly to pollution, moreover, finding a parking spot can be hard in crowded urban districts.

Well, you can reduce your carbon footprint if you use an electric car. However, electric cars are still new, and many countries are still building the necessary infrastructure for them. Your large campus might not have the necessary infrastructure for them either. Presently, electric cars don’t represent a viable option in most geographies.

As a result, you need to buy and maintain a car even if your commute is short. In addition to dealing with parking problems, you need to spend significantly on your car.

All of these factors have combined to make people sit up and think seriously about cars. Many people are now seriously considering whether a car is really the best option even if they have to commute only a short distance.

This is where micro-mobility enters the picture. When you commute a short distance regularly, e-scooters or e-bikes are viable options. You limit your carbon footprints and you cut costs!

Businesses have seen this shift in thinking, and e-scooter companies like Lime and Bird have entered this field in a big way. They let you rent e-scooters by the minute. On the other hand, start-ups like Jump and Lyft have entered the e-bike market.

Think of your campus now! The people there might need to travel short distances within the campus, and e-scooters can really help them.

How micro-mobility can benefit you

benefits-micromobility

What advantages can you get from micro-mobility? Let’s take a deeper look into this question.

Micro-mobility can offer several advantages to the people on your campus, e.g.:

  • Affordability: Shared e-scooters are cheaper than other mass transportation options. Remember that the people on your campus will use them on a shared basis, and they will pay for their short commutes only. Well, depending on your operating model, you might even let them use shared e-scooters or e-bikes for free!
  • Convenience: Users don’t need to worry about finding parking spots for shared e-scooters since these are small. They can easily travel from point A to point B on your campus with the help of these e-scooters.
  • Environmentally sustainable: Shared e-scooters reduce the carbon footprint, moreover, they decongest the roads. Statistics from the pilot programs in cities like Portland and Denver showimpressive gains around this key aspect.
  • Safety: This one’s obvious, isn’t it? When people on your campus use small e-scooters or e-bikes instead of cars, the problem of overspeeding will disappear. you will see fewer accidents.

#android app #autorent #ios app #mobile app development #app like bird #app like bounce #app like lime #autorent #bird scooter business model #bird scooter rental #bird scooter rental cost #bird scooter rental price #clone app like bird #clone app like bounce #clone app like lime #electric rental scooters #electric scooter company #electric scooter rental business #how do you start a moped #how to start a moped #how to start a scooter rental business #how to start an electric company #how to start electric scooterrental business #lime scooter business model #scooter franchise #scooter rental business #scooter rental business for sale #scooter rental business insurance #scooters franchise cost #white label app like bird #white label app like bounce #white label app like lime