Skip to content

Commit

Permalink
All changes to complete the visual for part 1 of the tutorial.
Browse files Browse the repository at this point in the history
  • Loading branch information
dm-p committed Aug 12, 2019
1 parent f360b99 commit 76e0176
Show file tree
Hide file tree
Showing 15 changed files with 2,226 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -59,3 +59,6 @@ typings/

# next.js build output
.next

.tmp
webpack.statistics.dev.html
13 changes: 13 additions & 0 deletions .vscode/launch.json
@@ -0,0 +1,13 @@
{
"version": "0.1.0",
"configurations": [
{
"name": "Debugger",
"type": "chrome",
"request": "attach",
"port": 9222,
"sourceMaps": true,
"webRoot": "${cwd}/"
}
]
}
37 changes: 37 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,37 @@
{
"editor.tabSize": 4,
"editor.insertSpaces": true,
"files.eol": "\n",
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/node_modules/**": true,
".tmp": true
},
"files.exclude": {
".tmp": true
},
"search.exclude": {
".tmp": true,
"typings": true
},
"json.schemas": [
{
"fileMatch": [
"/pbiviz.json"
],
"url": "./.api/v1.6.0/schema.pbiviz.json"
},
{
"fileMatch": [
"/capabilities.json"
],
"url": "./.api/v1.6.0/schema.capabilities.json"
},
{
"fileMatch": [
"/dependencies.json"
],
"url": "./.api/v1.6.0/schema.dependencies.json"
}
]
}
24 changes: 23 additions & 1 deletion README.md
@@ -1,2 +1,24 @@
# powerbi-visuals-example-simple-line-chart
Very simple demonstration of migrating a regular d3.js line chart into the Power BI Custom Visuals SDK

This is a very simple demonstration of migrating a regular d3.js line chart into the Power BI Custom Visuals SDK, and is documented in these online posts:

* [Lifting and Shifting a Simple d3.js Line Chart into A Power BI Custom Visual (Part 1)](https://coacervo.co/examples/d3-line-chart-1)
* Lifting and Shifting a Simple d3.js Line Chart into A Power BI Custom Visual (Part 2) - TBC

Please refer to these articles for further details.

To work with this repository, you will need the Power BI Custom Visuals SDK installed. [Refer here for instructions on setting up your developer environment](https://docs.microsoft.com/en-us/power-bi/developer/custom-visual-develop-tutorial#setting-up-the-developer-environment).

Once checked out, and the pre-requisites set up, you just need to run:

```
npm i
```

From the root of the checkout, and then:

```
pbiviz start
```

To run the visual server. You can then test in the Power BI service.
Binary file added Simple Line Chart Custom Visual.pbix
Binary file not shown.
Binary file added assets/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions capabilities.json
@@ -0,0 +1,50 @@
{
"dataRoles": [
{
"displayName": "Category Data",
"name": "category",
"kind": "Grouping"
},
{
"displayName": "Measure Data",
"name": "measure",
"kind": "Measure"
}
],
"objects": {},
"dataViewMappings": [
{
"conditions": [
{
"category": {
"max": 1
},
"measure": {
"max": 1
}
}
],
"categorical": {
"categories": {
"for": {
"in": "category"
},
"dataReductionAlgorithm": {
"top": {
"count": 2000
}
}
},
"values": {
"select": [
{
"bind": {
"to": "measure"
}
}
]
}
}
}
]
}

0 comments on commit 76e0176

Please sign in to comment.