Clarifying changing chart type option (#10563)

Backports PR #10463

**Commit 1:**
fixing #10427

* Original sha: 4e03d2032d
* Authored by ppisljar <peter.pisljar@gmail.com> on 2017-02-20T11:09:22Z

**Commit 2:**
fixing test

* Original sha: 82705d019c
* Authored by ppisljar <peter.pisljar@gmail.com> on 2017-02-22T10:13:36Z
This commit is contained in:
jasper 2017-02-24 05:04:14 -05:00 committed by Peter Pisljar
parent 191a70f28d
commit b2370cc6e6
6 changed files with 44 additions and 7 deletions

View file

@ -88,7 +88,16 @@ export default function PointSeriesVisType(Private) {
setYExtents: false
},
positions: ['top', 'left', 'right', 'bottom'],
chartTypes: ['line', 'area', 'histogram'],
chartTypes: [{
value: 'line',
text: 'line'
}, {
value: 'area',
text: 'area'
}, {
value: 'histogram',
text: 'bar'
}],
axisModes: ['normal', 'percentage', 'wiggle', 'silhouette'],
scaleTypes: ['linear', 'log', 'square root'],
chartModes: ['normal', 'stacked'],

View file

@ -11,6 +11,7 @@
>
<div class="kuiSideBarCollapsibleTitle">
<div
ng-init="isSeriesOpen = ($index === 0)"
class="kuiSideBarCollapsibleTitle__label"
ng-click="isSeriesOpen = !isSeriesOpen"
>
@ -31,14 +32,14 @@
<div class="kuiSideBarFormRow">
<label class="kuiSideBarFormRow__label" for="{{ 'seriesType' + $index }}">
Type
Chart Type
</label>
<div class="kuiSideBarFormRow__control">
<select
id="{{ 'seriesType' + $index }}"
class="kuiSelect kuiSideBarSelect"
ng-model="chart.type"
ng-options="mode for mode in vis.type.params.chartTypes"
ng-options="mode.value as mode.text for mode in vis.type.params.chartTypes"
></select>
</div>
</div>

View file

@ -86,7 +86,16 @@ export default function PointSeriesVisType(Private) {
setYExtents: false
},
positions: ['top', 'left', 'right', 'bottom'],
chartTypes: ['line', 'area', 'histogram'],
chartTypes: [{
value: 'line',
text: 'line'
}, {
value: 'area',
text: 'area'
}, {
value: 'histogram',
text: 'bar'
}],
axisModes: ['normal', 'percentage', 'wiggle', 'silhouette'],
scaleTypes: ['linear', 'log', 'square root'],
chartModes: ['normal', 'stacked'],

View file

@ -85,7 +85,16 @@ export default function PointSeriesVisType(Private) {
setYExtents: false
},
positions: ['top', 'left', 'right', 'bottom'],
chartTypes: ['line', 'area', 'histogram'],
chartTypes: [{
value: 'line',
text: 'line'
}, {
value: 'area',
text: 'area'
}, {
value: 'histogram',
text: 'bar'
}],
axisModes: ['normal', 'percentage', 'wiggle', 'silhouette'],
scaleTypes: ['linear', 'log', 'square root'],
chartModes: ['normal', 'stacked'],

View file

@ -75,7 +75,16 @@ export default function PointSeriesVisType(Private) {
setYExtents: false
},
positions: ['top', 'left', 'right', 'bottom'],
chartTypes: ['line', 'area', 'histogram'],
chartTypes: [{
value: 'line',
text: 'line'
}, {
value: 'area',
text: 'area'
}, {
value: 'histogram',
text: 'bar'
}],
axisModes: ['normal', 'percentage', 'wiggle', 'silhouette'],
scaleTypes: ['linear', 'log', 'square root'],
chartModes: ['normal', 'stacked'],

View file

@ -125,7 +125,7 @@ bdd.describe('visualize app', function describeIndexTests() {
bdd.it('should change average series type to histogram', function () {
return PageObjects.visualizeOptions.toggleCollapsibleTitle('RightAxis-1')
.then(function () {
return PageObjects.visualizeOptions.setSeriesType(1, 'histogram');
return PageObjects.visualizeOptions.setSeriesType(1, 'bar');
})
.then(function () {
return PageObjects.visualize.clickGo();