realchart 1.1.12 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gauge.d.ts +490 -0
- package/gauge.js +7 -0
- package/gauge.mjs +7 -0
- package/heatmap.d.ts +27 -0
- package/heatmap.js +7 -0
- package/heatmap.mjs +7 -0
- package/{dist/index.d.ts → index.d.ts} +2155 -1660
- package/index.js +7 -0
- package/index.mjs +7 -0
- package/package.json +38 -6
- package/{dist/realchart-style.css → realchart-style.css} +1 -0
- package/split.d.ts +114 -0
- package/split.js +7 -0
- package/split.mjs +7 -0
- package/treemap.d.ts +82 -0
- package/treemap.js +7 -0
- package/treemap.mjs +7 -0
- package/vector.d.ts +21 -0
- package/vector.js +7 -0
- package/vector.mjs +7 -0
- package/dist/index.esm.js +0 -7
- package/dist/index.ie.js +0 -7
- package/dist/index.js +0 -7
- package/dist/realchart-style.ie.css +0 -948
package/heatmap.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as RealChart from 'realchart';
|
|
2
|
+
import { ConnectableSeries, HeatmapSeriesOptions, IPlottingItem, DataPoint } from 'realchart';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Heatmap 시리즈 모델.<br/>
|
|
6
|
+
* {@page op.SeriesOptions#type}은 {@page config.series.heatmap 'heatmap'}이고,
|
|
7
|
+
* {@page options 설정} 모델은 {@page op.HeatmapSeriesOptions}이다.
|
|
8
|
+
*
|
|
9
|
+
* @modules heatmap
|
|
10
|
+
*/
|
|
11
|
+
declare class HeatmapSeries extends ConnectableSeries<HeatmapSeriesOptions> {
|
|
12
|
+
static readonly type = "heatmap";
|
|
13
|
+
static defaults: HeatmapSeriesOptions;
|
|
14
|
+
_heatMin: number;
|
|
15
|
+
_heatMax: number;
|
|
16
|
+
getColor(value: number): string;
|
|
17
|
+
canMixWith(other: IPlottingItem): boolean;
|
|
18
|
+
canCategorized(): boolean;
|
|
19
|
+
hasZ(): boolean;
|
|
20
|
+
defYAxisType(): string;
|
|
21
|
+
protected _createPoint(source: any): DataPoint;
|
|
22
|
+
protected _doPrepareRender(): void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare function registerSeries(chart: typeof RealChart): void;
|
|
26
|
+
|
|
27
|
+
export { HeatmapSeries, registerSeries as default };
|
package/heatmap.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* RealChart Heatmap v1.2.3
|
|
4
|
+
* Copyright (C) 2023-2024 WooriTech Inc.
|
|
5
|
+
* All Rights Reserved.
|
|
6
|
+
*/
|
|
7
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("realchart")):"function"==typeof define&&define.amd?define(["exports","realchart"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).RealChartheatmap={},e.RealChart)}(this,(function(e,t){"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(i){if("default"!==i){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return e[i]}})}})),t.default=e,Object.freeze(t)}var r=i(t);class s extends t.ZValuePoint{}class n extends t.ConnectableSeries{getColor(e){}canMixWith(e){return!1}canCategorized(){return!0}hasZ(){return!0}defYAxisType(){return"category"}_createPoint(e){return new s(e)}_doPrepareRender(){super._doPrepareRender();let e=Number.MAX_VALUE,i=Number.MIN_VALUE;this._runPoints.forEach((r=>{isNaN(r.zValue)||(e=t.minv(e,r.zValue),i=t.maxv(i,r.zValue))})),this._heatMin=e,this._heatMax=i}}n.type=t.HeatmapSeriesType,n.defaults=t.extend(t.Series.defaults,{tooltipText:"x: <b>${x}</b><br>y: <b>${y}</b><br>heat: <b>${z}</b>"});class o extends t.RectElement{constructor(e){super(e,t.SeriesView.POINT_CLASS)}}class a extends t.SeriesView{constructor(e){super(e,"rct-heatmap-series"),this._cells=new t.ElementPool(this._pointContainer,o)}_getPointPool(){return this._cells}_prepareSeries(e,t){this.$_parepareCells(t,this._visPoints)}_renderSeries(e,t){this._pointContainer.invert(this._inverted,t),this.$_layoutCells(e,t)}_runShowEffect(e){e&&t.SeriesAnimation.grow(this)}_doViewRateChanged(e){this.$_layoutCells(this.width,this.height)}$_parepareCells(e,i){const r=new t.Color(e._calcedColor),s=[{fill:void 0}],n=e._heatMin,o=e._heatMax-n;this._cells.prepare(i.length,((t,a)=>{const l=t.point=i[a];s[0].fill=r.brighten(1-(l.zValue-n)/o).toString(),this._setPointStyle(t,e,l,s)}))}$_layoutCells(e,t){const i=this.model,r=this._inverted,s=this._getGrowRate();i.pointLabel;const n=this._labelViews(),o=this._labelContainer._textAlign,a=i._xAxisObj,l=i._yAxisObj,u=r?e:t,h=r?t:e,c=r?0:t;this._cells.forEach((e=>{const t=e.point;if(e.setVis(!t.isNull)){const i=a.getUnitLen(h,t.xValue)*s,_=l.getUnitLen(u,t.yValue)*s;let d,f=a.getPos(h,t.xValue)-i/2,p=c-l.getPos(u,t.yValue)-_/2;if(t.xPos=r?c+l.getPos(u,t.yValue):f+i/2,t.yPos=r?h-a.getPos(h,t.xValue)+i/2:p+_/2,e.setBounds(f,p,i,_),n&&(d=n.get(t,0))){d.layout(o);const e=d.getBBox();r?(p=h-a.getPos(h,t.xValue)-e.height/2,f=c+l.getPos(u,t.yValue)):(f+=i/2,p+=(_-e.height)/2),f-=e.width/2,d.trans(f,p)}}}))}}function l(e){(function(e){return e.Series&&e.SeriesView})(e)&&(e.Series.register(n),e.SeriesView.register([n,a]))}l(r),e.HeatmapSeries=n,e.default=l,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/heatmap.mjs
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* RealChart Heatmap v1.2.3
|
|
4
|
+
* Copyright (C) 2023-2024 WooriTech Inc.
|
|
5
|
+
* All Rights Reserved.
|
|
6
|
+
*/
|
|
7
|
+
import{HeatmapSeriesType as e,extend as t,Series as s,ConnectableSeries as i,minv as r,maxv as n,ZValuePoint as o,SeriesView as l,ElementPool as a,SeriesAnimation as h,Color as u,RectElement as _}from"./index.mjs";class c extends o{}class g extends i{getColor(e){}canMixWith(e){return!1}canCategorized(){return!0}hasZ(){return!0}defYAxisType(){return"category"}_createPoint(e){return new c(e)}_doPrepareRender(){super._doPrepareRender();let e=Number.MAX_VALUE,t=Number.MIN_VALUE;this._runPoints.forEach((s=>{isNaN(s.zValue)||(e=r(e,s.zValue),t=n(t,s.zValue))})),this._heatMin=e,this._heatMax=t}}g.type=e,g.defaults=t(s.defaults,{tooltipText:"x: <b>${x}</b><br>y: <b>${y}</b><br>heat: <b>${z}</b>"});class d extends _{constructor(e){super(e,l.POINT_CLASS)}}class p extends l{constructor(e){super(e,"rct-heatmap-series"),this._cells=new a(this._pointContainer,d)}_getPointPool(){return this._cells}_prepareSeries(e,t){this.$_parepareCells(t,this._visPoints)}_renderSeries(e,t){this._pointContainer.invert(this._inverted,t),this.$_layoutCells(e,t)}_runShowEffect(e){e&&h.grow(this)}_doViewRateChanged(e){this.$_layoutCells(this.width,this.height)}$_parepareCells(e,t){const s=new u(e._calcedColor),i=[{fill:void 0}],r=e._heatMin,n=e._heatMax-r;this._cells.prepare(t.length,((o,l)=>{const a=o.point=t[l];i[0].fill=s.brighten(1-(a.zValue-r)/n).toString(),this._setPointStyle(o,e,a,i)}))}$_layoutCells(e,t){const s=this.model,i=this._inverted,r=this._getGrowRate();s.pointLabel;const n=this._labelViews(),o=this._labelContainer._textAlign,l=s._xAxisObj,a=s._yAxisObj,h=i?e:t,u=i?t:e,_=i?0:t;this._cells.forEach((e=>{const t=e.point;if(e.setVis(!t.isNull)){const s=l.getUnitLen(u,t.xValue)*r,c=a.getUnitLen(h,t.yValue)*r;let g,d=l.getPos(u,t.xValue)-s/2,p=_-a.getPos(h,t.yValue)-c/2;if(t.xPos=i?_+a.getPos(h,t.yValue):d+s/2,t.yPos=i?u-l.getPos(u,t.xValue)+s/2:p+c/2,e.setBounds(d,p,s,c),n&&(g=n.get(t,0))){g.layout(o);const e=g.getBBox();i?(p=u-l.getPos(u,t.xValue)-e.height/2,d=_+a.getPos(h,t.yValue)):(d+=s/2,p+=(c-e.height)/2),d-=e.width/2,g.trans(d,p)}}}))}}function x(e){(function(e){return e.Series&&e.SeriesView})(e)&&(e.Series.register(g),e.SeriesView.register([g,p]))}export{g as HeatmapSeries,x as default};
|