Browse Source

add color and min max

Thomas Buck 5 years ago
parent
commit
71840bdac4
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      index.html

+ 4
- 0
index.html View File

15
         <script type="text/javascript">
15
         <script type="text/javascript">
16
             var colorFromIndex = function(index) {
16
             var colorFromIndex = function(index) {
17
                 var colors = [
17
                 var colors = [
18
+                    '129, 38, 204',
19
+                    '48, 181, 36',
18
                     '255, 99, 132',
20
                     '255, 99, 132',
19
                     '54, 162, 235',
21
                     '54, 162, 235',
20
                     '255, 206, 86',
22
                     '255, 206, 86',
136
                     weight_append.setAttribute('type', 'number');
138
                     weight_append.setAttribute('type', 'number');
137
                     weight_append.setAttribute('name', 'weight');
139
                     weight_append.setAttribute('name', 'weight');
138
                     weight_append.setAttribute('step', '0.1');
140
                     weight_append.setAttribute('step', '0.1');
141
+                    weight_append.min = 42.0;
142
+                    weight_append.max = 999.9;
139
                     weight_append.setAttribute('placeholder', 'Weight');
143
                     weight_append.setAttribute('placeholder', 'Weight');
140
                     weight_append.required = true;
144
                     weight_append.required = true;
141
                     addToForm(form_append, weight_append, 'Weight:');
145
                     addToForm(form_append, weight_append, 'Weight:');

Loading…
Cancel
Save