Skip to content

Commit bc8b56d

Browse files
EugeneElkinignatvilesov
authored andcommitted
Support of string values for X -axis and bew options (#16)
* Support of string values for X -axis and bew options
1 parent cf42cc4 commit bc8b56d

11 files changed

Lines changed: 328 additions & 105 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 1.2.1
2+
* UPD: Using the version 1.5.1 of powerbi-visuals-utils-chartutils
3+
4+
## 1.2.0
5+
* ADD: X-axis and Y-axis option groups that let to show or hide axes and set color with font size
6+
* REM: Axis properties option group was removed
7+
* ADD: Possibility to use string labels in X-axis
8+
* ADD: Using of a new version 1.5 of Chart utils
9+
110
## 1.1.2
211
* Fixed blank window issue in Internet Explorer
312

capabilities.json

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,13 @@
137137
}
138138
}
139139
},
140-
"axisOptions": {
141-
"displayName": "Axes properties",
142-
"displayNameKey": "Visual_AxisProperties",
140+
"xAxis": {
141+
"displayName": "X-Axis",
142+
"displayNameKey": "Visual_XAxis",
143143
"properties": {
144144
"show": {
145+
"displayName": "Show",
146+
"displayNameKey": "Visual_Show",
145147
"type": {
146148
"bool": true
147149
}
@@ -156,6 +158,51 @@
156158
}
157159
}
158160
}
161+
},
162+
"textSize": {
163+
"displayName": "Text Size",
164+
"displayNameKey": "Visual_TextSize",
165+
"type": {
166+
"numeric": true
167+
}
168+
}
169+
}
170+
},
171+
"yAxis": {
172+
"displayName": "Y-Axis",
173+
"displayNameKey": "Visual_YAxis",
174+
"properties": {
175+
"show": {
176+
"displayName": "Show",
177+
"displayNameKey": "Visual_Show",
178+
"type": {
179+
"bool": true
180+
}
181+
},
182+
"color": {
183+
"displayName": "Color",
184+
"displayNameKey": "Visual_Color",
185+
"type": {
186+
"fill": {
187+
"solid": {
188+
"color": true
189+
}
190+
}
191+
}
192+
},
193+
"textSize": {
194+
"displayName": "Text Size",
195+
"displayNameKey": "Visual_TextSize",
196+
"type": {
197+
"numeric": true
198+
}
199+
},
200+
"isDuplicated": {
201+
"displayName": "Duplicated",
202+
"displayNameKey": "Visual_Duplicated",
203+
"type": {
204+
"bool": true
205+
}
159206
}
160207
}
161208
},

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "powerbi-visuals-linedotchart",
33
"description": "LineDot Chart",
4-
"version": "1.1.2",
4+
"version": "1.2.1",
55
"author": {
66
"name": "Microsoft",
77
"email": "pbicvsupport@microsoft.com"
@@ -41,7 +41,7 @@
4141
"karma-typescript-preprocessor": "0.3.0",
4242
"lodash": "4.16.2",
4343
"powerbi-visuals-tools": "1.7.1",
44-
"powerbi-visuals-utils-chartutils": "1.2.0",
44+
"powerbi-visuals-utils-chartutils": "1.5.1",
4545
"powerbi-visuals-utils-dataviewutils": "1.2.0",
4646
"powerbi-visuals-utils-testutils": "1.0.1",
4747
"powerbi-visuals-utils-tooltiputils": "1.0.0",

pbiviz.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"displayName": "LineDot Chart",
55
"guid": "LineDotChart1460463831201",
66
"visualClassName": "LineDotChart",
7-
"version": "1.1.2",
7+
"version": "1.2.1",
88
"description": "The LineDot chart is an animated line chart with fun animated dots. Use the LineDot chart to engage your audience especially in a presentation context. The bubbles size can be dynamic based on data you provide. A counter is provided that you can use to show a running value as the chart animates. Format options are provided for Lines, Dots, and Animation.",
99
"supportUrl": "http://community.powerbi.com",
1010
"gitHubUrl": "https://github.com/Microsoft/powerbi-visuals-linedotchart"

src/dataInterfaces.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,14 @@ module powerbi.extensibility.visual {
3030
import IAxisProperties = powerbi.extensibility.utils.chart.axis.IAxisProperties;
3131
import IValueFormatter = powerbi.extensibility.utils.formatting.IValueFormatter;
3232

33-
export interface DateValue {
34-
date?: Date;
33+
export class DateValue {
34+
label: string;
3535
value: number;
36+
37+
constructor(label: string, value: number) {
38+
this.label = label;
39+
this.value = value;
40+
}
3641
}
3742

3843
export interface LineDotPoint extends SelectableDataPoint {
@@ -65,11 +70,10 @@ module powerbi.extensibility.visual {
6570
valuesMetadataColumn: DataViewMetadataColumn;
6671
dateColumnFormatter: IValueFormatter;
6772
dataValueFormatter: IValueFormatter;
68-
isDateTime: boolean;
69-
minDate: number;
70-
maxDate: number;
71-
minValue: number;
72-
maxValue: number;
73+
dateValues: DateValue[];
74+
isOrdinal: boolean;
75+
yMinValue: number;
76+
yMaxValue: number;
7377
sumOfValues: number;
7478
hasHighlights: boolean;
7579
}

src/settings.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,22 @@ module powerbi.extensibility.visual {
2929

3030
export class LineDotChartSettings extends DataViewObjectsParser {
3131
public isCounterDateTime: CounterDateTime = new CounterDateTime();
32-
public axisOptions: AxisSettings = new AxisSettings();
3332
public lineoptions: LineSettings = new LineSettings();
3433
public dotoptions: DotSettings = new DotSettings();
3534
public counteroptions: CounterSettings = new CounterSettings();
3635
public misc: MiscSettings = new MiscSettings();
36+
public xAxis: AxisSettings = new AxisSettings();
37+
public yAxis: YAxisSettings = new YAxisSettings();
3738
}
3839

3940
export class AxisSettings {
4041
public show: boolean = true;
4142
public color: string = "black";
43+
public textSize: number = 9;
44+
}
45+
46+
export class YAxisSettings extends AxisSettings {
47+
public isDuplicated: boolean = true;
4248
}
4349

4450
export class LineSettings {

0 commit comments

Comments
 (0)