Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
y: empty(80),
style: {
line: 'green'
}
}
if (argv.help || !argv._[0]) {
console.log('Usage: climem FILE')
console.log(' climem PORT HOST')
console.log('to enable in any node process, use node -r climem')
process.exit(1)
}
if (!argv.data) {
screen = blessed.screen()
line = contrib.line({
width: 80,
height: 30,
xLabelPadding: 3,
xPadding: 5,
label: 'Memory (MB)',
showLegend: true,
legend: { width: 12 }
})
screen.append(line)
screen.key(['escape', 'q', 'C-c'], () => {
return process.exit(0)
})
}
pump(net.connect(argv._[0], argv._[1]),
const draw_chart = (data) => {
let min = _.min( _.map(data, (d) => _.min(d.y)) )
line = contrib.line({
minY: min,
xLabelPadding: 3,
xPadding: 5,
wholeNumbersOnly: false,
label: 'Sell vs Buy'
})
screen.append(line)
screen.key(['escape', 'q', 'C-c'], function(ch, key) {
return process.exit(0);
})
line.setData(data)
screen.render()
}
function Test() {
var screen = blessed.screen({});
//create layout and widgets
var grid = new contrib.grid({ rows: 12, cols: 12, screen: screen });
var line = contrib.line({ style: { line: "yellow",
text: "green",
baseline: "black" },
xLabelPadding: 3,
xPadding: 5,
label: 'Title' }), data = {
x: ['t1', 't2', 't3', 't4'],
y: [5, 1, 7, 5]
};
screen.append(line); //must append before setting data
line.setData([data]);
screen.key(['escape', 'q', 'C-c'], function (ch, key) {
return process.exit(0);
});
screen.render();
}
return Test;
getReport().then(data => {
const line = contrib.line({
style: {
line: 'yellow',
text: 'green',
baseline: 'black'
},
xLabelPadding: 3,
xPadding: 5,
showLegend: true,
wholeNumbersOnly: false //true=do not show fraction in y axis
});
const commits = {
title: '',
x: Object.keys(data),
y: Object.values(data)
};
console.log(getCalendar(data));
initPnl(){
const t = this;
this.pnl = contrib.line({
style:{
line: "yellow",
text: "white",
baseline: "white",
},
xPadding: 5,
border: {
type: 'line',
},
padding: DEFAULT_PADDING,
showLegend: false,
wholeNumbersOnly: false, //true=do not show fraction in y axis
label: 'Pnl',
top: '33.33%',
left: WIDTH_LEFT_PANEL / 2 + '%',
width: WIDTH_LEFT_PANEL / 2 + '%',
initPnl(){
const t = this;
this.pnl = line({
style:{
line: "yellow",
text: "white",
baseline: "white",
},
xPadding: 5,
border: {
type: 'line',
},
padding: DEFAULT_PADDING,
showLegend: false,
wholeNumbersOnly: false, //true=do not show fraction in y axis
label: 'Pnl',
top: '33.33%',
left: WIDTH_LEFT_PANEL / 2 + '%',
width: WIDTH_LEFT_PANEL / 2 + '%',
BaseLineGraph.prototype._createGraph = function (options) {
this.node = contrib.line({
label: this.label,
border: "line",
numYLabels: 4,
maxY: options.maxY,
showLegend: false,
wholeNumbersOnly: true,
style: {
border: {
fg: this.layoutConfig.borderColor
}
}
});
this.recalculatePosition();
this.parent.append(this.node);
padding: 1
});
const roll = grid.set(7, 6, 5, 6, blessed.log, {
label: "Analyzing variations",
content: "Waiting...",
padding: 1
});
const genesis = grid.set(8, 0, 4, 6, blessed.box, {
label: "Genetics info",
content: "Loading...",
padding: 1
});
const chart = contrib.line({
height: 12,
top: 1,
xPadding: 1,
xLabelPadding: 1,
wholeNumbersOnly: true,
showLegend: false
});
genesis.append(chart);
const breaks_bar = contrib.gauge({
showLabel: false,
height: 3,
top: 5,
left: 20,
width: 30
});