Commit 49430f75 by Marcus Efraimsson Committed by GitHub

Merge pull request #12744 from Worty/master

change units to include characters for power of 2 and 3
parents e648ed19 4fa97964
...@@ -402,7 +402,7 @@ describe('duration', function() { ...@@ -402,7 +402,7 @@ describe('duration', function() {
describe('volume', function() { describe('volume', function() {
it('1000m3', function() { it('1000m3', function() {
var str = kbn.valueFormats['m3'](1000, 1, null); var str = kbn.valueFormats['m3'](1000, 1, null);
expect(str).toBe('1000.0 m3'); expect(str).toBe('1000.0 m³');
}); });
}); });
......
...@@ -500,7 +500,7 @@ kbn.valueFormats.watt = kbn.formatBuilders.decimalSIPrefix('W'); ...@@ -500,7 +500,7 @@ kbn.valueFormats.watt = kbn.formatBuilders.decimalSIPrefix('W');
kbn.valueFormats.kwatt = kbn.formatBuilders.decimalSIPrefix('W', 1); kbn.valueFormats.kwatt = kbn.formatBuilders.decimalSIPrefix('W', 1);
kbn.valueFormats.mwatt = kbn.formatBuilders.decimalSIPrefix('W', -1); kbn.valueFormats.mwatt = kbn.formatBuilders.decimalSIPrefix('W', -1);
kbn.valueFormats.kwattm = kbn.formatBuilders.decimalSIPrefix('W/Min', 1); kbn.valueFormats.kwattm = kbn.formatBuilders.decimalSIPrefix('W/Min', 1);
kbn.valueFormats.Wm2 = kbn.formatBuilders.fixedUnit('W/m2'); kbn.valueFormats.Wm2 = kbn.formatBuilders.fixedUnit('W/m²');
kbn.valueFormats.voltamp = kbn.formatBuilders.decimalSIPrefix('VA'); kbn.valueFormats.voltamp = kbn.formatBuilders.decimalSIPrefix('VA');
kbn.valueFormats.kvoltamp = kbn.formatBuilders.decimalSIPrefix('VA', 1); kbn.valueFormats.kvoltamp = kbn.formatBuilders.decimalSIPrefix('VA', 1);
kbn.valueFormats.voltampreact = kbn.formatBuilders.decimalSIPrefix('var'); kbn.valueFormats.voltampreact = kbn.formatBuilders.decimalSIPrefix('var');
...@@ -572,9 +572,9 @@ kbn.valueFormats.accG = kbn.formatBuilders.fixedUnit('g'); ...@@ -572,9 +572,9 @@ kbn.valueFormats.accG = kbn.formatBuilders.fixedUnit('g');
// Volume // Volume
kbn.valueFormats.litre = kbn.formatBuilders.decimalSIPrefix('L'); kbn.valueFormats.litre = kbn.formatBuilders.decimalSIPrefix('L');
kbn.valueFormats.mlitre = kbn.formatBuilders.decimalSIPrefix('L', -1); kbn.valueFormats.mlitre = kbn.formatBuilders.decimalSIPrefix('L', -1);
kbn.valueFormats.m3 = kbn.formatBuilders.fixedUnit('m3'); kbn.valueFormats.m3 = kbn.formatBuilders.fixedUnit('m³');
kbn.valueFormats.Nm3 = kbn.formatBuilders.fixedUnit('Nm3'); kbn.valueFormats.Nm3 = kbn.formatBuilders.fixedUnit('Nm³');
kbn.valueFormats.dm3 = kbn.formatBuilders.fixedUnit('dm3'); kbn.valueFormats.dm3 = kbn.formatBuilders.fixedUnit('dm³');
kbn.valueFormats.gallons = kbn.formatBuilders.fixedUnit('gal'); kbn.valueFormats.gallons = kbn.formatBuilders.fixedUnit('gal');
// Flow // Flow
...@@ -605,14 +605,14 @@ kbn.valueFormats.radsvh = kbn.formatBuilders.decimalSIPrefix('Sv/h'); ...@@ -605,14 +605,14 @@ kbn.valueFormats.radsvh = kbn.formatBuilders.decimalSIPrefix('Sv/h');
// Concentration // Concentration
kbn.valueFormats.ppm = kbn.formatBuilders.fixedUnit('ppm'); kbn.valueFormats.ppm = kbn.formatBuilders.fixedUnit('ppm');
kbn.valueFormats.conppb = kbn.formatBuilders.fixedUnit('ppb'); kbn.valueFormats.conppb = kbn.formatBuilders.fixedUnit('ppb');
kbn.valueFormats.conngm3 = kbn.formatBuilders.fixedUnit('ng/m3'); kbn.valueFormats.conngm3 = kbn.formatBuilders.fixedUnit('ng/m³');
kbn.valueFormats.conngNm3 = kbn.formatBuilders.fixedUnit('ng/Nm3'); kbn.valueFormats.conngNm3 = kbn.formatBuilders.fixedUnit('ng/Nm³');
kbn.valueFormats.conμgm3 = kbn.formatBuilders.fixedUnit('μg/m3'); kbn.valueFormats.conμgm3 = kbn.formatBuilders.fixedUnit('μg/m³');
kbn.valueFormats.conμgNm3 = kbn.formatBuilders.fixedUnit('μg/Nm3'); kbn.valueFormats.conμgNm3 = kbn.formatBuilders.fixedUnit('μg/Nm³');
kbn.valueFormats.conmgm3 = kbn.formatBuilders.fixedUnit('mg/m3'); kbn.valueFormats.conmgm3 = kbn.formatBuilders.fixedUnit('mg/m³');
kbn.valueFormats.conmgNm3 = kbn.formatBuilders.fixedUnit('mg/Nm3'); kbn.valueFormats.conmgNm3 = kbn.formatBuilders.fixedUnit('mg/Nm³');
kbn.valueFormats.congm3 = kbn.formatBuilders.fixedUnit('g/m3'); kbn.valueFormats.congm3 = kbn.formatBuilders.fixedUnit('g/m³');
kbn.valueFormats.congNm3 = kbn.formatBuilders.fixedUnit('g/Nm3'); kbn.valueFormats.congNm3 = kbn.formatBuilders.fixedUnit('g/Nm³');
// Time // Time
kbn.valueFormats.hertz = kbn.formatBuilders.decimalSIPrefix('Hz'); kbn.valueFormats.hertz = kbn.formatBuilders.decimalSIPrefix('Hz');
...@@ -1021,7 +1021,7 @@ kbn.getUnitFormats = function() { ...@@ -1021,7 +1021,7 @@ kbn.getUnitFormats = function() {
{ text: 'Watt (W)', value: 'watt' }, { text: 'Watt (W)', value: 'watt' },
{ text: 'Kilowatt (kW)', value: 'kwatt' }, { text: 'Kilowatt (kW)', value: 'kwatt' },
{ text: 'Milliwatt (mW)', value: 'mwatt' }, { text: 'Milliwatt (mW)', value: 'mwatt' },
{ text: 'Watt per square metre (W/m2)', value: 'Wm2' }, { text: 'Watt per square metre (W/m²)', value: 'Wm2' },
{ text: 'Volt-ampere (VA)', value: 'voltamp' }, { text: 'Volt-ampere (VA)', value: 'voltamp' },
{ text: 'Kilovolt-ampere (kVA)', value: 'kvoltamp' }, { text: 'Kilovolt-ampere (kVA)', value: 'kvoltamp' },
{ text: 'Volt-ampere reactive (var)', value: 'voltampreact' }, { text: 'Volt-ampere reactive (var)', value: 'voltampreact' },
...@@ -1118,14 +1118,14 @@ kbn.getUnitFormats = function() { ...@@ -1118,14 +1118,14 @@ kbn.getUnitFormats = function() {
submenu: [ submenu: [
{ text: 'parts-per-million (ppm)', value: 'ppm' }, { text: 'parts-per-million (ppm)', value: 'ppm' },
{ text: 'parts-per-billion (ppb)', value: 'conppb' }, { text: 'parts-per-billion (ppb)', value: 'conppb' },
{ text: 'nanogram per cubic metre (ng/m3)', value: 'conngm3' }, { text: 'nanogram per cubic metre (ng/m³)', value: 'conngm3' },
{ text: 'nanogram per normal cubic metre (ng/Nm3)', value: 'conngNm3' }, { text: 'nanogram per normal cubic metre (ng/Nm³)', value: 'conngNm3' },
{ text: 'microgram per cubic metre (μg/m3)', value: 'conμgm3' }, { text: 'microgram per cubic metre (μg/m³)', value: 'conμgm3' },
{ text: 'microgram per normal cubic metre (μg/Nm3)', value: 'conμgNm3' }, { text: 'microgram per normal cubic metre (μg/Nm³)', value: 'conμgNm3' },
{ text: 'milligram per cubic metre (mg/m3)', value: 'conmgm3' }, { text: 'milligram per cubic metre (mg/m³)', value: 'conmgm3' },
{ text: 'milligram per normal cubic metre (mg/Nm3)', value: 'conmgNm3' }, { text: 'milligram per normal cubic metre (mg/Nm³)', value: 'conmgNm3' },
{ text: 'gram per cubic metre (g/m3)', value: 'congm3' }, { text: 'gram per cubic metre (g/m³)', value: 'congm3' },
{ text: 'gram per normal cubic metre (g/Nm3)', value: 'congNm3' }, { text: 'gram per normal cubic metre (g/Nm³)', value: 'congNm3' },
], ],
}, },
]; ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment