Skip to content

Instantly share code, notes, and snippets.

View jongio's full-sized avatar

Jon Gallant jongio

View GitHub Profile
"dataRoles": [
{
"displayName": "Value",
"name": "value",
"kind": "Measure"
}
]
{
"dataRoles": [
{
"displayName": "Category Data",
"name": "category",
"kind": "Grouping"
},
{
"displayName": "Measure Data",
"name": "measure",
/*
* Power BI Visual CLI
*
* Copyright (c) Microsoft Corporation
* All rights reserved.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the ""Software""), to deal
* in the Software without restriction, including without limitation the rights
{
"compilerOptions": {
"allowJs": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "ES5",
"sourceMap": true,
"out": "./.tmp/build/visual.js"
},
"files": [
declare namespace lfg {
export function loadLiquidFillGauge(svg: any, value: any, settings: any): any;
export function liquidFillGaugeDefaultSettings(): any;
}
declare module 'lfg' {
export = lfg;
}
@jongio
jongio / lfgload
Created September 25, 2016 01:36
function loadLiquidFillGauge(element, value, config) {
if(config == null) config = liquidFillGaugeDefaultSettings();
var gauge = element;
var fillCircleGroup = gaugeGroup.append("g")
.attr("clip-path", "url(" + location.href + "#clipWave" + element.className + ")");
module powerbi.extensibility.visual {
export class Visual implements IVisual {
private target: HTMLElement;
private settings: VisualSettings;
private svg: d3.Selection<SVGElement>;
constructor(options: VisualConstructorOptions) {
let svg = this.svg = d3.select(options.element)
.append('svg').classed('liquidFillGauge', true);
@jongio
jongio / d3dec
Created September 25, 2016 01:33
private svg: d3.Selection<SVGElement>;
@jongio
jongio / npmi
Created September 25, 2016 01:33
npm i