Skip to content

Commit f719e5d

Browse files
ignatvilesovuve
authored andcommitted
High contrast mode (#26)
* 27410 Migrate to API 1.13.0 [Update LineDot Chart to support high contrast mode] * 27414 Refactor source code by removing useless functions [Update LineDot Chart to support high contrast mode] * 27411 Update to support high contrast mode [Update LineDot Chart to support high contrast mode] * 27412 Cover changes by UTs [Update LineDot Chart to support high contrast mode]
1 parent 9c3d189 commit f719e5d

21 files changed

Lines changed: 11483 additions & 494 deletions

.travis.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ sudo: required
44
dist: trusty
55
language: node_js
66
node_js:
7-
- "7"
8-
before_install:
9-
- sudo apt-get install -y chromium-browser
10-
- export CHROME_BIN=chromium-browser
11-
- export DISPLAY=:99.0
12-
- sh -e /etc/init.d/xvfb start
7+
- "10"
138
install:
149
- npm install
1510
script:

.vscode/settings.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"editor.tabSize": 4,
3+
"editor.insertSpaces": true,
4+
"files.eol": "\n",
5+
"files.watcherExclude": {
6+
"**/.git/objects/**": true,
7+
"**/node_modules/**": true,
8+
".tmp": true
9+
},
10+
"files.exclude": {
11+
".tmp": true,
12+
"coverage": true
13+
},
14+
"search.exclude": {
15+
".tmp": true,
16+
"dist": true,
17+
"coverage": true
18+
},
19+
"json.schemas": [
20+
{
21+
"fileMatch": [
22+
"/pbiviz.json"
23+
],
24+
"url": "./.api/v1.13.0/schema.pbiviz.json"
25+
},
26+
{
27+
"fileMatch": [
28+
"/capabilities.json"
29+
],
30+
"url": "./.api/v1.13.0/schema.capabilities.json"
31+
}
32+
]
33+
}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.5.0
2+
* High contrast mode
3+
* API 1.13.0
4+
15
## 1.4.1
26
* Fixed chart animation for descending order of dates
37

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ Use the LineDot chart to engage your audience when presenting data. The size of
1111

1212
Use the counter to show a running total as the chart animates. Format options are provided for Lines, Dots, and Animation.
1313

14-
See also [LineDot Chart at Microsoft Office store](https://store.office.com/en-us/app.aspx?assetid=WA104380766&sourcecorrid=e631dfc3-2bda-4830-84a7-9fb39892648f&searchapppos=0&ui=en-US&rs=en-US&ad=US&appredirect=false)
14+
See also [LineDot Chart at AppSource](https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104380766)

capabilities.json

Lines changed: 70 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"dataRoles": [
3-
{
2+
"dataRoles": [{
43
"name": "Date",
54
"kind": "Grouping",
65
"displayName": "Date",
@@ -19,60 +18,53 @@
1918
"displayNameKey": "Visual_Counter"
2019
}
2120
],
22-
"dataViewMappings": [
23-
{
24-
"conditions": [
25-
{
26-
"Date": {
27-
"min": 0,
28-
"max": 1
29-
},
30-
"Values": {
31-
"min": 0,
32-
"max": 1
33-
},
34-
"Counter": {
35-
"min": 0,
36-
"max": 1
37-
},
38-
"Labels": {
39-
"min": 0,
40-
"max": 1
21+
"dataViewMappings": [{
22+
"conditions": [{
23+
"Date": {
24+
"min": 0,
25+
"max": 1
26+
},
27+
"Values": {
28+
"min": 0,
29+
"max": 1
30+
},
31+
"Counter": {
32+
"min": 0,
33+
"max": 1
34+
},
35+
"Labels": {
36+
"min": 0,
37+
"max": 1
38+
}
39+
}],
40+
"categorical": {
41+
"categories": {
42+
"select": [{
43+
"for": {
44+
"in": "Date"
45+
}
46+
}],
47+
"dataReductionAlgorithm": {
48+
"top": {
49+
"count": 10000
4150
}
4251
}
43-
],
44-
"categorical": {
45-
"categories": {
46-
"select": [
47-
{
48-
"for": {
49-
"in": "Date"
50-
}
52+
},
53+
"values": {
54+
"select": [{
55+
"bind": {
56+
"to": "Values"
5157
}
52-
],
53-
"dataReductionAlgorithm": {
54-
"top": {
55-
"count": 10000
58+
},
59+
{
60+
"bind": {
61+
"to": "Counter"
5662
}
5763
}
58-
},
59-
"values": {
60-
"select": [
61-
{
62-
"bind": {
63-
"to": "Values"
64-
}
65-
},
66-
{
67-
"bind": {
68-
"to": "Counter"
69-
}
70-
}
71-
]
72-
}
64+
]
7365
}
7466
}
75-
],
67+
}],
7668
"supportsHighlight": true,
7769
"objects": {
7870
"lineoptions": {
@@ -106,7 +98,7 @@
10698
"percentile": {
10799
"displayName": "Opacity",
108100
"displayNameKey": "Visual_Opacity",
109-
"type": {
101+
"type": {
110102
"numeric": true
111103
}
112104
},
@@ -163,7 +155,7 @@
163155
"displayName": "Text Size",
164156
"displayNameKey": "Visual_TextSize",
165157
"type": {
166-
"numeric": true
158+
"numeric": true
167159
}
168160
}
169161
}
@@ -194,7 +186,7 @@
194186
"displayName": "Text Size",
195187
"displayNameKey": "Visual_TextSize",
196188
"type": {
197-
"numeric": true
189+
"numeric": true
198190
}
199191
},
200192
"isDuplicated": {
@@ -210,12 +202,37 @@
210202
"displayName": "Counter",
211203
"displayNameKey": "Visual_Counter",
212204
"properties": {
205+
"show": {
206+
"displayName": "Show",
207+
"displayNameKey": "Visual_Show",
208+
"type": {
209+
"bool": true
210+
}
211+
},
213212
"counterTitle": {
214213
"displayName": "Title",
215214
"displayNameKey": "Visual_Title",
216215
"type": {
217216
"text": true
218217
}
218+
},
219+
"color": {
220+
"displayName": "Fill",
221+
"displayNameKey": "Visual_Fill",
222+
"type": {
223+
"fill": {
224+
"solid": {
225+
"color": true
226+
}
227+
}
228+
}
229+
},
230+
"textSize": {
231+
"displayName": "Text Size",
232+
"displayNameKey": "Visual_TextSize",
233+
"type": {
234+
"numeric": true
235+
}
219236
}
220237
}
221238
},
@@ -247,4 +264,4 @@
247264
}
248265
}
249266
}
250-
}
267+
}

karma.conf.js

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,15 @@
2626

2727
'use strict';
2828

29-
const recursivePathToTests = 'test/**/*.ts'
30-
, srcRecursivePath = '.tmp/drop/visual.js'
31-
, srcCssRecursivePath = '.tmp/drop/visual.css'
32-
, srcOriginalRecursivePath = 'src/**/*.ts'
33-
, coverageFolder = 'coverage';
29+
const recursivePathToTests = 'test/**/*.ts';
30+
const srcRecursivePath = '.tmp/drop/visual.js';
31+
const srcCssRecursivePath = '.tmp/drop/visual.css';
32+
const srcOriginalRecursivePath = 'src/**/*.ts';
33+
const coverageFolder = 'coverage';
3434

3535
module.exports = (config) => {
36-
const browsers = [];
37-
38-
if (process.env.TRAVIS) {
39-
browsers.push('ChromeTravisCI');
40-
} else {
41-
browsers.push('Chrome');
42-
}
43-
4436
config.set({
45-
browsers,
46-
customLaunchers: {
47-
ChromeTravisCI: {
48-
base: 'Chrome',
49-
flags: ['--no-sandbox']
50-
}
51-
},
37+
browsers: ['ChromeHeadless'],
5238
colors: true,
5339
frameworks: ['jasmine'],
5440
reporters: [
@@ -90,9 +76,12 @@ module.exports = (config) => {
9076
},
9177
coverageReporter: {
9278
dir: coverageFolder,
93-
reporters: [
94-
{ type: 'html' },
95-
{ type: 'lcov' }
79+
reporters: [{
80+
type: 'html'
81+
},
82+
{
83+
type: 'lcov'
84+
}
9685
]
9786
},
9887
remapIstanbulReporter: {
@@ -103,4 +92,4 @@ module.exports = (config) => {
10392
}
10493
}
10594
});
106-
};
95+
};

0 commit comments

Comments
 (0)