Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vislib Point Series updates #9044

Merged
merged 17 commits into from
Dec 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/core_plugins/kbn_vislib_vis_types/public/area.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export default function HistogramVisType(Private) {
'effect on the series above it.',
params: {
defaults: {
shareYAxis: true,
addTooltip: true,
addLegend: true,
legendPosition: 'right',
Expand All @@ -27,8 +26,7 @@ export default function HistogramVisType(Private) {
times: [],
addTimeMarker: false,
defaultYExtents: false,
setYExtents: false,
yAxis: {}
setYExtents: false
},
legendPositions: [{
value: 'left',
Expand Down
4 changes: 1 addition & 3 deletions src/core_plugins/kbn_vislib_vis_types/public/histogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default function HistogramVisType(Private) {
'exact numbers or percentages. If you are not sure which chart you need, you could do worse than to start here.',
params: {
defaults: {
shareYAxis: true,
addTooltip: true,
addLegend: true,
legendPosition: 'right',
Expand All @@ -23,8 +22,7 @@ export default function HistogramVisType(Private) {
times: [],
addTimeMarker: false,
defaultYExtents: false,
setYExtents: false,
yAxis: {}
setYExtents: false
},
legendPositions: [{
value: 'left',
Expand Down
4 changes: 1 addition & 3 deletions src/core_plugins/kbn_vislib_vis_types/public/line.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default function HistogramVisType(Private) {
'Be careful with sparse sets as the connection between points can be misleading.',
params: {
defaults: {
shareYAxis: true,
addTooltip: true,
addLegend: true,
legendPosition: 'right',
Expand All @@ -27,8 +26,7 @@ export default function HistogramVisType(Private) {
times: [],
addTimeMarker: false,
defaultYExtents: false,
setYExtents: false,
yAxis: {}
setYExtents: false
},
legendPositions: [{
value: 'left',
Expand Down
1 change: 0 additions & 1 deletion src/core_plugins/kbn_vislib_vis_types/public/pie.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default function HistogramVisType(Private) {
'Pro Tip: Pie charts are best used sparingly, and with no more than 7 slices per pie.',
params: {
defaults: {
shareYAxis: true,
addTooltip: true,
addLegend: true,
legendPosition: 'right',
Expand Down
1 change: 0 additions & 1 deletion src/fixtures/vislib/_vis_fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ module.exports = function VislibFixtures(Private) {
return function (visLibParams) {
let Vis = Private(VislibVisProvider);
return new Vis($visCanvas.new(), _.defaults({}, visLibParams || {}, {
shareYAxis: true,
addTooltip: true,
addLegend: true,
defaultYExtents: false,
Expand Down
1 change: 0 additions & 1 deletion src/ui/public/vis/__tests__/_vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ describe('Vis Class', function () {
expect(vis.params).to.have.property('addLegend', true);
expect(vis.params).to.have.property('addTooltip', true);
expect(vis.params).to.have.property('mode', 'stacked');
expect(vis.params).to.have.property('shareYAxis', true);
});
});

Expand Down
24 changes: 24 additions & 0 deletions src/ui/public/vislib/VISLIB.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Vislib general overview
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love this!


`vis.js` constructor accepts vis parameters and render method accepts data. it exposes event emitter interface so we can listen to certain events like 'renderComplete'.

`vis.render` will create 'lib/vis_config' to handle configuration (applying defaults etc) and then create 'lib/handler' which will take the work over.

`vis/handler` will init all parts of the chart (based on visualization type) and call render method on each of the building blocks.

## Visualizations

Each base vis type (`lib/types`) can have a different layout defined (`lib/layout`) and different building blocks (pie charts dont have axes for example)

All base visualizations extend from `visualizations/_chart`

### Pie chart

### Map

### Point series chart

`visualizations/point_series` takes care of drawing the point series chart (no axes or titles, just the chart itself). It creates all the series defined and calls render method on them.

currently there are 3 series types available (line, area, bars), they all extend from `vislualizations/point_series/_point_series`.

Loading