Skip to content

Commit

Permalink
Add OnObject functionality (#102)
Browse files Browse the repository at this point in the history
* Add OnObject for "Category labels"

* Add OnObject for axis formatting

* Add OnObject for "colors" formatting settings

* Enable subselection for "Bullet" rects

* Remove repeating "displayName", "displayNameKey" from capabilities.json

* Move OnObject references to formatting model

* Fix tests checking measureUnits value and color

* Update packages and version to 2.4.1.0

* Remove redundant dependency 'coveralls'
  • Loading branch information
adiletelf authored Feb 27, 2024
1 parent ef34348 commit b846f80
Show file tree
Hide file tree
Showing 14 changed files with 1,105 additions and 834 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 2.4.1
* Packages update
* Fixed tests with measureUnits
* Fixed eslint errors

# 2.4.0
* Update powerbi packages, API to 5.7.0
* Migrate from tslint to eslint
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# powerbi-visuals-bulletchart
![Build](https://github.com/microsoft/powerbi-visuals-bulletchart/workflows/build/badge.svg)[![Coverage Status](https://coveralls.io/repos/github/Microsoft/powerbi-visuals-bulletchart/badge.svg?branch=main)](https://coveralls.io/github/Microsoft/powerbi-visuals-bulletchart?branch=main)
[![build status](https://github.com/microsoft/powerbi-visuals-bulletchart/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/microsoft/powerbi-visuals-bulletchart/actions/workflows/build.yml)

> A bullet chart that includes four orientations and a few customization options. Use to feature a single measure against a qualitative range.
Expand Down
136 changes: 39 additions & 97 deletions capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,110 +63,76 @@
],
"objects": {
"values": {
"displayName": "Data values",
"displayNameKey": "Visual_DataValues",
"properties": {
"targetValue": {
"displayName": "Target Value",
"displayNameKey": "Visual_DataValues_TargetValue",
"type": {
"numeric": true
}
},
"targetValue2": {
"displayName": "Target Value 2",
"displayNameKey": "Visual_DataValues_TargetValue2",
"type": {
"numeric": true
}
},
"minimumPercent": {
"displayName": "Minimum %",
"displayNameKey": "Visual_DataValues_MinimumPercent",
"type": {
"numeric": true
}
},
"needsImprovementPercent": {
"displayName": "Needs Improvement %",
"displayNameKey": "Visual_DataValues_NeedsImprovementPercent",
"type": {
"numeric": true
}
},
"satisfactoryPercent": {
"displayName": "Satisfactory %",
"displayNameKey": "Visual_DataValues_SatisfactoryPercent",
"type": {
"numeric": true
}
},
"goodPercent": {
"displayName": "Good %",
"displayNameKey": "Visual_DataValues_GoodPercent",
"type": {
"numeric": true
}
},
"veryGoodPercent": {
"displayName": "Very Good %",
"displayNameKey": "Visual_DataValues_VeryGoodPercent",
"type": {
"numeric": true
}
},
"maximumPercent": {
"displayName": "Maximum %",
"displayNameKey": "Visual_DataValues_MaximumPercent",
"type": {
"numeric": true
}
}
}
},
"tooltips": {
"displayName": "Tooltips",
"displayNameKey": "Visual_Tooltips",
"properties": {
"valueCustomName": {
"displayName": "\"Value\" custom name",
"displayNameKey": "Visual_ValueCustomName",
"type": {
"text": true
}
},
"targetCustomName": {
"displayName": "\"Target Value\" custom name",
"displayNameKey": "Visual_TargetValueCustomName",
"type": {
"text": true
}
},
"target2CustomName": {
"displayName": "\"Target Value 2\" custom name",
"displayNameKey": "Visual_TargetValue2CustomName",
"type": {
"text": true
}
}
}
},
"labels": {
"displayName": "Category labels",
"displayNameKey": "Visual_CategoryLabels",
"properties": {
"show": {
"displayName": "Show",
"displayNameKey": "Visual_Show",
"type": {
"bool": true
}
},
"labelColor": {
"displayName": "color",
"displayNameKey": "Visual_Color",
"description": "Select color for data labels",
"descriptionKey": "Visual_Description_Color",
"type": {
"fill": {
"solid": {
Expand All @@ -175,61 +141,57 @@
}
}
},
"maxWidth": {
"type": {
"numeric": true
}
},
"fontSize": {
"displayName": "Text Size",
"displayNameKey": "Visual_TextSize",
"type": {
"formatting": {
"fontSize": true
}
}
},
"maxWidth": {
"displayName": "Maximum width",
"displayNameKey": "Visual_MaxWidth",
"fontFamily": {
"type": {
"numeric": true
"formatting": {
"fontFamily": true
}
}
},
"fontBold": {
"type": {
"bool": true
}
},
"fontItalic": {
"type": {
"bool": true
}
},
"fontUnderline": {
"type": {
"bool": true
}
}
}
},
"orientation": {
"displayName": "Orientation",
"displayNameKey": "Visual_Orientation",
"properties": {
"orientation": {
"displayName": "Orientation",
"displayNameKey": "Visual_Orientation",
"type": {
"enumeration": [
{
"value": "HorizontalLeft",
"displayNameKey": "Visual_Orientation_HorizontalLeft",
"displayName": "Horizontal Left"
},
{
"value": "HorizontalRight",
"displayNameKey": "Visual_Orientation_HorizontalRight",
"displayName": "Horizontal Right"
},
{
"value": "VerticalTop",
"displayNameKey": "Visual_Orientation_VerticalTop",
"displayName": "Vertical Top"
},
{
"value": "VerticalBottom",
"displayNameKey": "Visual_Orientation_VerticalBottom",
"displayName": "Vertical Bottom"
}
{ "value": "HorizontalLeft" },
{ "value": "HorizontalRight" },
{ "value": "VerticalTop" },
{ "value": "VerticalBottom" }
]
}
}
}
},
"colors": {
"displayName": "Colors",
"displayNameKey": "Visual_Colors",
"properties": {
"minColor": {
"type": {
Expand All @@ -238,9 +200,7 @@
"color": true
}
}
},
"displayName": "Minimum color",
"displayNameKey": "Visual_Colors_MinimumColor"
}
},
"needsImprovementColor": {
"type": {
Expand All @@ -249,9 +209,7 @@
"color": true
}
}
},
"displayName": "Needs Improvement color",
"displayNameKey": "Visual_Colors_NeedsImprovementColor"
}
},
"satisfactoryColor": {
"type": {
Expand All @@ -260,9 +218,7 @@
"color": true
}
}
},
"displayName": "Satisfactory color",
"displayNameKey": "Visual_Colors_SatisfactoryColor"
}
},
"goodColor": {
"type": {
Expand All @@ -271,9 +227,7 @@
"color": true
}
}
},
"displayName": "Good color",
"displayNameKey": "Visual_Colors_GoodColor"
}
},
"veryGoodColor": {
"type": {
Expand All @@ -282,9 +236,7 @@
"color": true
}
}
},
"displayName": "Very Good color",
"displayNameKey": "Visual_Colors_VeryGoodColor"
}
},
"bulletColor": {
"type": {
Expand All @@ -293,19 +245,13 @@
"color": true
}
}
},
"displayName": "Bullet color",
"displayNameKey": "Visual_Colors_BulletColor"
}
}
}
},
"axis": {
"displayName": "Axis",
"displayNameKey": "Visual_Axis",
"properties": {
"axis": {
"displayName": "Axis",
"displayNameKey": "Visual_Axis",
"type": {
"bool": true
}
Expand All @@ -317,16 +263,12 @@
"color": true
}
}
},
"displayName": "Axis color",
"displayNameKey": "Visual_AxisColor"
}
},
"measureUnits": {
"type": {
"text": true
},
"displayName": "Measure Units",
"displayNameKey": "Visual_MeasureUnits"
}
},
"unitsColor": {
"type": {
Expand All @@ -335,9 +277,7 @@
"color": true
}
}
},
"displayName": "Units color",
"displayNameKey": "Visual_UnitsColor"
}
}
}
},
Expand Down Expand Up @@ -456,6 +396,8 @@
"privileges": [],
"supportsHighlight": true,
"supportsKeyboardFocus": true,
"supportsOnObjectFormatting": true,
"enablePointerEventsFormatMode": true,
"sorting": {
"default": {}
},
Expand Down
6 changes: 6 additions & 0 deletions karma.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ module.exports = (config) => {
mode: "development",
browserNoActivityTimeout: 10000,
browsers: ["ChromeHeadless"],
customLaunchers: {
ChromeDebugging: {
base: "ChromeHeadless",
flags: ["--remote-debugging-port=9333"]
}
},
colors: true,
frameworks: ["jasmine"],
reporters: ["progress", "junit"],
Expand Down
Loading

0 comments on commit b846f80

Please sign in to comment.