#17202 fix - LineDotChart 0.3.4: Visual doesn't display lines when animation is disabled (#7)

UnitTests update
Changelog add
This commit is contained in:
Aleksei Tkach 2017-06-29 08:52:41 +03:00 коммит произвёл Ignat Vilesov
Родитель 5718ae9cec
Коммит 82e6d877ec
5 изменённых файлов: 36 добавлений и 12 удалений

3
CHANGELOG.md Normal file
Просмотреть файл

@ -0,0 +1,3 @@
## 1.0.1
* Fix bug: "Visual doesn't display lines when animation is disabled"
* Add changelog.md

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "powerbi-visuals-linedotchart",
"description": "LineDot Chart",
"version": "0.3.5",
"version": "1.0.1",
"author": {
"name": "Microsoft",
"email": "pbicvsupport@microsoft.com"
@ -22,15 +22,16 @@
"url": "git+https://github.com/Microsoft/PowerBI-visuals-linedotchart.git"
},
"devDependencies": {
"@types/jasmine": "2.5.37",
"@types/jasmine-jquery": "1.5.28",
"@types/lodash": "4.14.43",
"coveralls": "2.11.15",
"@types/d3": "3.5.36",
"@types/jasmine": "2.5.47",
"@types/jasmine-jquery": "1.5.30",
"@types/jquery": "2.0.46",
"@types/lodash": "4.14.55",
"coveralls": "2.13.1",
"d3": "3.5.5",
"globalize": "0.1.0-a2",
"jasmine": "2.5.2",
"jasmine-jquery": "2.1.1",
"jquery": "3.1.1",
"karma": "1.3.0",
"karma-chrome-launcher": "2.0.0",
"karma-coverage": "1.1.1",

Просмотреть файл

@ -4,7 +4,7 @@
"displayName": "LineDot Chart",
"guid": "LineDotChart1460463831201",
"visualClassName": "LineDotChart",
"version": "0.3.5",
"version": "1.0.1",
"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.",
"supportUrl": "http://community.powerbi.com",
"gitHubUrl": "https://github.com/Microsoft/powerbi-visuals-linedotchart"

Просмотреть файл

@ -608,11 +608,7 @@ module powerbi.extensibility.visual {
.attr('width', line_right - line_left)
.attr("height", this.layout.viewportIn.height);
} else {
clipPath
.selectAll("rect")
.interrupt()
.attr('x', line_left)
.attr('width', line_right - line_left);
linePathSelection.selectAll("clipPath").remove();
}
}

Просмотреть файл

@ -100,6 +100,30 @@ namespace powerbi.extensibility.visual.test {
});
});
describe("Animation off test", () => {
it("should not render lineClip", (done) => {
visualBuilder.viewport.width = 300;
dataView.metadata.objects = {
misc: {
isAnimated: false,
duration: 20,
isStopped: true
},
counteroptions: {
counterTitle: "Counter: "
}
};
visualBuilder.updateFlushAllD3Transitions(dataView);
debugger;
helpers.renderTimeout(() => {
expect(visualBuilder.mainElement.find("clipPath").get(0)).toBe(undefined);
done();
});
});
});
describe("Format settings test", () => {
beforeEach(() => {
dataView.metadata.objects = {