Skip to content
This repository has been archived by the owner on Nov 22, 2017. It is now read-only.

Commit

Permalink
Switch back to DOM rendered chart labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashid Khan committed Jul 21, 2016
1 parent 9095c44 commit a2bac2e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
6 changes: 3 additions & 3 deletions index.js
Expand Up @@ -32,7 +32,7 @@ module.exports = function (kibana) {
},
hacks: [
'plugins/timelion/lib/panel_registry',
'plugins/timelion/panels/timechart'
'plugins/timelion/panels/timechart/timechart'
],
visTypes: [
'plugins/timelion/vis'
Expand All @@ -46,10 +46,10 @@ module.exports = function (kibana) {
path: path.resolve(__dirname, 'bower_components/flot/jquery.flot.time'),
imports: 'flot'
},
flotCanvas$: {
/*flotCanvas$: {
path: path.resolve(__dirname, 'bower_components/flot/jquery.flot.canvas'),
imports: 'flot'
},
},*/
flotSymbol$: {
path: path.resolve(__dirname, 'bower_components/flot/jquery.flot.symbol'),
imports: 'flot'
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "timelion",
"version": "0.1.379",
"version": "0.1.380",
"kibanas": [
"5.0.0-alpha2",
"5.0.0-alpha3",
Expand Down
2 changes: 1 addition & 1 deletion public/panels/timechart/flot.js
@@ -1,7 +1,7 @@
require('flot');
require('flotTime');
require('flotCrosshair');
require('flotCanvas');
//require('flotCanvas');
require('flotSelection');
require('flotSymbol');
require('flotStack');
Expand Down
@@ -1,4 +1,5 @@
require('./flot');
require('plugins/timelion/panels/timechart/timechart.less');
var _ = require('lodash');
var $ = require('jquery');
var moment = require('moment-timezone');
Expand All @@ -21,18 +22,20 @@ panelRegistry.register(function timeChartProvider($compile, $rootScope, timefilt
// could just use angular's injection to provide a moment service?
moment.tz.setDefault(config.get('dateFormat:tz'));

var render = $scope.seriesList.render || {};

$scope.chart = $scope.seriesList.list;
$scope.interval = $scope.interval;
$scope.search = $scope.search || _.noop;

var legendValueNumbers;
var debouncedSetLegendNumbers;
var defaultOptions = {
canvas: true,
//canvas: false,
xaxis: {
mode: 'time',
tickLength: 5,
timezone: 'browser'
timezone: 'browser',
},
selection: {
mode: 'x',
Expand All @@ -44,6 +47,7 @@ panelRegistry.register(function timeChartProvider($compile, $rootScope, timefilt
lineWidth: 2
},
grid: {
color: render.grid === false ? 'transparent' : (render.grid || '#000'),
borderWidth: 0,
borderColor: null,
margin: 10,
Expand Down
3 changes: 3 additions & 0 deletions public/panels/timechart/timechart.less
@@ -0,0 +1,3 @@
.ngLegendValue {
color: #000;
}

0 comments on commit a2bac2e

Please sign in to comment.