var mockHost = {
    createSelectionIdBuilder: () => {
        return {
            withCategory: function () { return this },
            withSeries: function () { return this },
            withMeasure: function () { return this },
            createSelectionId: () => {
                return {
                    equals: () => false,
                    includes: () => false,
                    getKey: () => "fakekey",
                    getSelector: "",
                    getSelectorsByColumn: () => [],
                    hasIdentity: () => false
                }
            }
        }
    },
    createSelectionManager: () => {
        return {
            select: () => {
                return {
                    then: (fx) => fx([])
                }
            },
            hasSelection: () => false,
            clear: () => {
                return {
                    then: (fx) => fx([])
                }
            },
            getSelectionIds: () => []
        }
    },
    colors: [{ value: 'green' }, { value: 'blue' }]
}

var getJSON = function (url, callback) {
    var xhr = new XMLHttpRequest();
    xhr.open("get", url, true);
    xhr.responseType = "json";
    xhr.onload = function () {
        var status = xhr.status;
        if (status == 200) {
            callback(null, xhr.response);
        } else {
            callback(status);
        }
    };
    xhr.send();
};

function addStyleString(str) {
    var node = document.createElement('style');
    node.innerHTML = str;
    document.body.appendChild(node);
}

function load() {
    console.log('loading ...');
    getJSON('visual.json', function (e, d) {
        var content = d.content;
        var js = content.js;

        addStyleString(content.css);
        eval(content.js);

        var guid = d.visual.guid;
        console.log(guid);
        var plugin = powerbi.visuals.plugins[guid];
        var element = document.getElementById('host');
        element.className = 'visual-' + guid;
        var viz = plugin.create({
            element: element,
            host: mockHost
        });

        var vm = {
            dataPoints: [{ category: 'one', color: '#FE4365', value: 10 },
                { category: 'two', color: '#FC9D9A', value: 7 },
                { category: 'three', color: '#F9CDAD', value: 5 },
                { category: 'four', color: '#C8C8A9', value: 3 },
                { category: 'five', color: '#83AF9B', value: 2 }],
            dataMax: 10,
            settings: { enableAxis: { show: true } }
        };

        viz.update({ viewport: { height: window.innerHeight, width: window.innerWidth } }, vm)
    });
}

load();

@@ -1584,40 +1584,8 @@
 ) %7B%0A
-    console.log('loading ...');%0A
     
@@ -1595,20 +1595,17 @@
 JSON('vi
-sual
+z
 .json', 
@@ -1787,35 +1787,8 @@
 id;%0A
-        console.log(guid);%0A
     
@@ -2044,457 +2044,8 @@
 );%0A%0A
-        var vm = %7B%0A            dataPoints: %5B%7B category: 'one', color: '#FE4365', value: 10 %7D,%0A                %7B category: 'two', color: '#FC9D9A', value: 7 %7D,%0A                %7B category: 'three', color: '#F9CDAD', value: 5 %7D,%0A                %7B category: 'four', color: '#C8C8A9', value: 3 %7D,%0A                %7B category: 'five', color: '#83AF9B', value: 2 %7D%5D,%0A            dataMax: 10,%0A            settings: %7B enableAxis: %7B show: true %7D %7D%0A        %7D;%0A%0A
     
@@ -2133,13 +2133,10 @@
  %7D %7D
-, vm
 )
+;
 %0A   

Update visual.js