UNPKG

eazyminer

Version:

Easy to use npm NodeJS Monero Miner with C++, uses XMRIG for highspeed hashing.

80 lines (79 loc) 2.33 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Chart = void 0; const highcharts_1 = __importDefault(require("highcharts")); class Chart { _chart; _options = null; get chart() { return this._chart; } constructor(options) { this._options = options; } render() { this._render(); } _init() { } _render() { this._chart = highcharts_1.default.chart(this._options.el, { chart: { type: this._options.type || 'line' }, title: { text: this._options.title }, yAxis: { title: { text: this._options.yTitle } }, xAxis: { type: 'datetime', labels: { format: '{value:%Y-%m-%d}', rotation: 45, align: 'left', formatter: function () { return highcharts_1.default.dateFormat("%H:%M:%S", this.value); } }, }, legend: { enabled: false, layout: 'vertical', align: 'right', verticalAlign: 'middle' }, plotOptions: { series: { step: 'left', // or 'center' or 'right' label: { connectorAllowed: false }, pointStart: 2010 } }, series: this._options.data || [{}], responsive: { rules: [{ condition: { maxWidth: 500 }, chartOptions: { legend: { layout: 'horizontal', align: 'center', verticalAlign: 'bottom' } } }] } }); } } exports.Chart = Chart;