Permalink
Browse files

add theme river entry and treak

  • Loading branch information...
1 parent d9514b6 commit 194c08e871c9d00bfd031533d4ef4529f8eac15b @100pah 100pah committed Jan 9, 2017
Showing with 46 additions and 3 deletions.
  1. +1 −0 index.js
  2. +2 −0 src/echarts.js
  3. +5 −3 src/visual/dataColor.js
  4. +38 −0 test/visualMap-layout.html
View
@@ -23,6 +23,7 @@ require('./lib/chart/effectScatter');
require('./lib/chart/lines');
require('./lib/chart/heatmap');
require('./lib/chart/pictorialBar');
+require('./lib/chart/themeRiver');
require('./lib/component/graphic');
require('./lib/component/grid');
View
@@ -60,6 +60,8 @@ define(function (require) {
var PRIORITY_VISUAL_GLOBAL = 2000;
var PRIORITY_VISUAL_CHART = 3000;
var PRIORITY_VISUAL_COMPONENT = 4000;
+ // FIXME
+ // necessary?
var PRIORITY_VISUAL_BRUSH = 5000;
// Main process have three entries: `setOption`, `dispatchAction` and `resize`,
@@ -1,4 +1,6 @@
-// Pick color from palette for each data item
+// Pick color from palette for each data item.
+// Applicable for charts that require applying color palette
+// in data level (like pie, funnel, chord).
define(function (require) {
return function (seriesType, ecModel) {
@@ -14,15 +16,15 @@ define(function (require) {
idxMap[rawIdx] = idx;
});
dataAll.each(function (rawIdx) {
- // FIXME Performance
- var itemModel = dataAll.getItemModel(rawIdx);
var filteredIdx = idxMap[rawIdx];
// If series.itemStyle.normal.color is a function. itemVisual may be encoded
var singleDataColor = filteredIdx != null
&& data.getItemVisual(filteredIdx, 'color', true);
if (!singleDataColor) {
+ // FIXME Performance
+ var itemModel = dataAll.getItemModel(rawIdx);
var color = itemModel.get('itemStyle.normal.color')
|| seriesModel.getColorFromPalette(dataAll.getName(rawIdx), paletteScope);
// Legend may use the visual info in data before processed
@@ -65,6 +65,19 @@
});
makeChart({
show: true,
+ splitNumber: 7,
+ minOpen: true,
+ maxOpen: true,
+ showLabel: true,
+ text: ['Number Result'],
+ backgroundColor: '#eee',
+ padding: [10, 30, 5, 40],
+ visualSelected: {
+ data: ['red', 'pink']
+ }
+ });
+ makeChart({
+ show: true,
pieces: [
{min: 10, max: 15, color: 'green'},
{min: 15, max: 25, visualValue: 'blue'},
@@ -89,6 +102,18 @@
}
});
makeChart({
+ splitNumber: 5,
+ right: 0,
+ dimension: 3,
+ text: ['Number Result'],
+ showLabel: true,
+ backgroundColor: '#eee',
+ visualSelected: {
+ type: 'symbol',
+ data: ['roundRect', 'rect', 'diamond', 'line', 'circle']
+ }
+ });
+ makeChart({
splitNumber: 6,
top: 0,
left: 0,
@@ -111,6 +136,19 @@
}
});
makeChart({
+ splitNumber: 5,
+ top: 20,
+ right: 0,
+ text: ['Number \nRe', 'Number \nRe2'],
+ showLabel: true,
+ orient: 'horizontal',
+ dimension: 3,
+ backgroundColor: '#eee',
+ visualSelected: {
+ type: 'colorLightness'
+ }
+ });
+ makeChart({
splitNumber: 6,
top: 40,
orient: 'horizontal',

0 comments on commit 194c08e

Please sign in to comment.