diff --git a/examples/01-basic.html b/examples/01-basic.html new file mode 100644 index 0000000..b37b10a --- /dev/null +++ b/examples/01-basic.html @@ -0,0 +1,23 @@ + + + + + + + + + + + hello +
+ + + + diff --git a/src/index.ts b/src/index.ts index 491c318..021d390 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,32 +1,42 @@ import { ChartwerkBase, VueChartwerkBaseMixin, TickOrientation, TimeFormat, AxisFormat } from '@chartwerk/base'; import * as d3 from 'd3'; -import * as _ from 'lodash'; + + export class ChartwerkGaugePod extends ChartwerkBase { - _metricsContainer: any; + + // TODO: define the type better + private _dValue: d3.Selection; constructor(el: HTMLElement, _series: any[] = [], _options: any = {}) { super(d3, el, _series, _options); + this._init(); } - _renderMetrics(): void { - } - - onMouseOver(): void { - // TODO: add + private _init() { + this._initValueText(); } - onMouseMove(): void { - // TODO: add + private _initValueText(): void { + this._dValue = this._chartContainer + .append('text') + .text('hey you') + .attr('fill', 'black'); } - onMouseOut(): void { - // TODO: add + + _renderMetrics(): void { + } + + /* handlers and overloads */ + onMouseOver(): void {} + onMouseMove(): void {} + onMouseOut(): void { } renderSharedCrosshair(): void {} hideSharedCrosshair(): void {} } diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..e69de29