Comments (2)
If using bundler (like webpack, rollup, etc.), for example:
npm install echarts-stat
npm install echarts
import * as echarts from 'echarts';
import {transform} from 'echarts-stat';
echarts.registerTransform(transform.histogram);
var myChart = echarts.init(document.getElementById('main0'));
var option = {
dataset: [{
source: [
[8.3, 143], [8.6, 214], [8.8, 251], [10.5, 26], [10.7, 86], [10.8, 93], [11.0, 176], [11.0, 39], [11.1, 221], [11.2, 188], [11.3, 57], [11.4, 91], [11.4, 191], [11.7, 8], [12.0, 196], [12.9, 177], [12.9, 153], [13.3, 201], [13.7, 199], [13.8, 47], [14.0, 81], [14.2, 98], [14.5, 121], [16.0, 37], [16.3, 12], [17.3, 105], [17.5, 168], [17.9, 84], [18.0, 197], [18.0, 155], [20.6, 125]
]
}, {
transform: {
type: 'ecStat:histogram'
}
}],
tooltip: {
},
xAxis: {
type: 'category',
scale: true
},
yAxis: {},
series: {
name: 'histogram',
type: 'bar',
barWidth: '99.3%',
label: {
show: true,
position: 'top'
},
datasetIndex: 1
}
};
myChart.setOption(option);
from echarts-stat.
Thanks @100pah,
As far as I can see the first import is the full library of echarts, using the bundlers I would tend to use partial modules and import them via import { use } from 'echarts/core'
So I believe along with the import {transform} from 'echarts-stat';
I should also import the method: registerTransform
.
I saw you created a new issue on the main echarts library so perhaps it's something we need to wait and expect from the next release of echarts, am I correct?
Thanks again for your support
from echarts-stat.
Related Issues (20)
- ecstat 使用 histogram时,计算分组起始值时 存在0.1+0.2 != 0.3的
- Missing type for transform regression. HOT 24
- Tooltip integration on regression lines HOT 1
- Error handler throwing message with typo
- Linear regression fails on Date format HOT 5
- polynomial expression precision
- Datasets with one value break freedmanDiaconis and scott methods HOT 1
- Expose options for bin width and bin count in histogram function
- Linear , Polynomial series plotting
- echarts-stat with ReactJS ? HOT 2
- 关于直方图间隔个数 HOT 1
- 能否支持局部加权回归 算法
- 请问有什么办法能取得回归曲线的表达式吗? HOT 4
- 聚类图和回归图什么情况下不显示点?
- opt.dimensions not working
- 如何完整显示回归拟合的公式 HOT 1
- Scatter 旁邊的cluster 字體大小 HOT 1
- 直方图很不错,可否支持stack属性,来实现堆叠直方图的效果呢? HOT 2
- 多项式回归算得的公式好像不对
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from echarts-stat.