richie
9 years ago
20 changed files with 858 additions and 531 deletions
@ -0,0 +1,60 @@
|
||||
package com.fr.solution.plugin.chart.echarts.common.theme; |
||||
|
||||
import com.fr.general.ComparatorUtils; |
||||
import com.fr.stable.xml.XMLPrintWriter; |
||||
import com.fr.stable.xml.XMLable; |
||||
import com.fr.stable.xml.XMLableReader; |
||||
|
||||
/** |
||||
* Created by richie on 16/2/22. |
||||
*/ |
||||
public class EChartsTheme implements XMLable { |
||||
|
||||
public static final String XML_TAG = "Theme"; |
||||
|
||||
private String name; |
||||
|
||||
public EChartsTheme() { |
||||
this("default"); |
||||
} |
||||
|
||||
public EChartsTheme(String name) { |
||||
this.name = name; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object obj) { |
||||
return obj instanceof EChartsTheme |
||||
&& ComparatorUtils.equals(name, ((EChartsTheme) obj).name); |
||||
} |
||||
|
||||
@Override |
||||
public void readXML(XMLableReader reader) { |
||||
if (reader.isChildNode()) { |
||||
String tagName = reader.getTagName(); |
||||
if (tagName.equals("ThemeAttr")) { |
||||
name = reader.getAttrAsString("name", "default"); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public void writeXML(XMLPrintWriter writer) { |
||||
writer.startTAG("ThemeAttr"); |
||||
writer.attr("name", name); |
||||
writer.end(); |
||||
} |
||||
|
||||
@Override |
||||
public Object clone() throws CloneNotSupportedException { |
||||
return super.clone(); |
||||
} |
||||
} |
@ -0,0 +1,83 @@
|
||||
package com.fr.solution.plugin.chart.echarts.common.tooltip; |
||||
|
||||
import com.fr.general.ComparatorUtils; |
||||
import com.fr.json.JSONException; |
||||
import com.fr.json.JSONObject; |
||||
import com.fr.stable.StringUtils; |
||||
import com.fr.stable.web.Repository; |
||||
import com.fr.stable.xml.XMLPrintWriter; |
||||
import com.fr.stable.xml.XMLable; |
||||
import com.fr.stable.xml.XMLableReader; |
||||
|
||||
/** |
||||
* Created by richie on 16/2/22. |
||||
*/ |
||||
public class EChartsTooltip implements XMLable { |
||||
|
||||
public static final String XML_TAG = "Tooltip"; |
||||
|
||||
private TriggerType triggerType; |
||||
private String format; |
||||
|
||||
public EChartsTooltip() { |
||||
|
||||
} |
||||
|
||||
public TriggerType getTriggerType() { |
||||
return triggerType; |
||||
} |
||||
|
||||
public void setTriggerType(TriggerType triggerType) { |
||||
this.triggerType = triggerType; |
||||
} |
||||
|
||||
public String getFormat() { |
||||
return format; |
||||
} |
||||
|
||||
public void setFormat(String format) { |
||||
this.format = format; |
||||
} |
||||
|
||||
public JSONObject toJSONObject(Repository repo) throws JSONException { |
||||
JSONObject jo = JSONObject.create(); |
||||
jo.put("trigger", triggerType.getType()); |
||||
jo.put("formatter", format); |
||||
return jo; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object obj) { |
||||
return obj instanceof EChartsTooltip |
||||
&& ComparatorUtils.equals(triggerType, ((EChartsTooltip) obj).triggerType) |
||||
&& ComparatorUtils.equals(format, ((EChartsTooltip) obj).format); |
||||
} |
||||
|
||||
@Override |
||||
public void readXML(XMLableReader reader) { |
||||
if (reader.isChildNode()) { |
||||
String tagName = reader.getTagName(); |
||||
if (tagName.equals("Attr")) { |
||||
triggerType = TriggerType.parse(reader.getAttrAsString("trigger", "")); |
||||
format = reader.getAttrAsString("format", ""); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public void writeXML(XMLPrintWriter writer) { |
||||
writer.startTAG("Attr"); |
||||
if (triggerType != null) { |
||||
writer.attr("trigger", triggerType.getType()); |
||||
} |
||||
if (StringUtils.isNotEmpty(format)) { |
||||
writer.attr("format", format); |
||||
} |
||||
writer.end(); |
||||
} |
||||
|
||||
@Override |
||||
public Object clone() throws CloneNotSupportedException { |
||||
return super.clone(); |
||||
} |
||||
} |
@ -0,0 +1,30 @@
|
||||
package com.fr.solution.plugin.chart.echarts.common.tooltip; |
||||
|
||||
import com.fr.general.ComparatorUtils; |
||||
|
||||
/** |
||||
* Created by richie on 16/2/22. |
||||
*/ |
||||
public enum TriggerType { |
||||
|
||||
ITEM("item"), AXIS("axis"); |
||||
|
||||
private String type; |
||||
|
||||
TriggerType(String type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public String getType() { |
||||
return type; |
||||
} |
||||
|
||||
public static TriggerType parse(String type) { |
||||
for (TriggerType tt : values()) { |
||||
if (ComparatorUtils.equals(type, tt.type)) { |
||||
return tt; |
||||
} |
||||
} |
||||
return ITEM; |
||||
} |
||||
} |
@ -0,0 +1,35 @@
|
||||
package com.fr.solution.plugin.chart.echarts.common.ui; |
||||
|
||||
import com.fr.design.dialog.BasicScrollPane; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.general.Inter; |
||||
import com.fr.solution.plugin.chart.echarts.common.base.ECharts; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by richie on 16/2/22. |
||||
*/ |
||||
public class EChartsLegendPane extends BasicScrollPane<ECharts> { |
||||
|
||||
public EChartsLegendPane(EChartsStylePane parent) { |
||||
|
||||
} |
||||
@Override |
||||
protected JPanel createContentPane() { |
||||
JPanel panel = new JPanel(new BorderLayout()); |
||||
panel.add(new UILabel("待开发", SwingConstants.CENTER), BorderLayout.CENTER); |
||||
return panel; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(ECharts ob) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return Inter.getLocText("Plugin-ECharts_Legend"); |
||||
} |
||||
} |
@ -0,0 +1,75 @@
|
||||
package com.fr.solution.plugin.chart.echarts.common.ui; |
||||
|
||||
import com.fr.design.dialog.BasicScrollPane; |
||||
import com.fr.design.gui.icombobox.UIDictionaryComboBox; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.general.Inter; |
||||
import com.fr.solution.plugin.chart.echarts.common.base.ECharts; |
||||
import com.fr.solution.plugin.chart.echarts.common.theme.EChartsTheme; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by richie on 16/2/22. |
||||
*/ |
||||
public class EChartsThemePane extends BasicScrollPane<ECharts> { |
||||
|
||||
private static final String[] themes = new String[]{"default", "dark"}; |
||||
|
||||
private UIDictionaryComboBox<String> themeComboBox; |
||||
|
||||
|
||||
public EChartsThemePane(EChartsStylePane stylePane) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
protected JPanel createContentPane() { |
||||
JPanel panel = new JPanel(new BorderLayout()); |
||||
double p = TableLayout.PREFERRED; |
||||
double f = TableLayout.FILL; |
||||
double[] rowSize = {p}; |
||||
double[] columnSize = {p, f}; |
||||
|
||||
UILabel titleLabel = new UILabel(Inter.getLocText("Plugin-ECharts_Theme_Select")); |
||||
|
||||
themeComboBox = new UIDictionaryComboBox<String>( |
||||
new String[]{"default", "dark"}, |
||||
new String[]{"默认", "暗黑"}); |
||||
|
||||
JPanel cen = TableLayoutHelper.createTableLayoutPane(new Component[][] { |
||||
{titleLabel, themeComboBox} |
||||
},rowSize, columnSize); |
||||
panel.add(cen, BorderLayout.CENTER); |
||||
return panel; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(ECharts ob) { |
||||
if (ob == null) { |
||||
return; |
||||
} |
||||
EChartsTheme theme = ob.getTheme(); |
||||
if (theme != null) { |
||||
themeComboBox.setSelectedItem(theme.getName()); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public void updateBean(ECharts ob) { |
||||
if (ob == null) { |
||||
ob = new ECharts(); |
||||
} |
||||
EChartsTheme theme = new EChartsTheme(); |
||||
theme.setName(themeComboBox.getSelectedItem()); |
||||
ob.setTheme(theme); |
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return Inter.getLocText("Plugin-ECharts_Theme"); |
||||
} |
||||
} |
@ -1,31 +1,84 @@
|
||||
package com.fr.solution.plugin.chart.echarts.common.ui; |
||||
|
||||
import com.fr.design.dialog.BasicScrollPane; |
||||
import com.fr.design.gui.icombobox.UIDictionaryComboBox; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.itextfield.UITextField; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.general.Inter; |
||||
import com.fr.solution.plugin.chart.echarts.common.base.ECharts; |
||||
import com.fr.solution.plugin.chart.echarts.common.tooltip.EChartsTooltip; |
||||
import com.fr.solution.plugin.chart.echarts.common.tooltip.TriggerType; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by richie on 16/2/19. |
||||
*/ |
||||
public class EChartsTooltipPane extends BasicScrollPane<ECharts> { |
||||
|
||||
private UIDictionaryComboBox<TriggerType> triggerComboBox; |
||||
private UITextField formatterTextField; |
||||
|
||||
public EChartsTooltipPane(EChartsStylePane parent) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
protected JPanel createContentPane() { |
||||
return new JPanel(); |
||||
JPanel panel = new JPanel(); |
||||
double p = TableLayout.PREFERRED; |
||||
double f = TableLayout.FILL; |
||||
double[] rowSize = {p, p}; |
||||
double[] columnSize = {p, f}; |
||||
|
||||
UILabel titleLabel = new UILabel("触发点"); |
||||
|
||||
triggerComboBox = new UIDictionaryComboBox<TriggerType>( |
||||
new TriggerType[]{TriggerType.ITEM, TriggerType.AXIS}, |
||||
new String[]{"图例", "坐标轴"}); |
||||
|
||||
UILabel formatterLabel = new UILabel("显示格式"); |
||||
|
||||
formatterTextField = new UITextField(12); |
||||
|
||||
JPanel cen = TableLayoutHelper.createTableLayoutPane(new Component[][] { |
||||
{titleLabel, triggerComboBox}, |
||||
{formatterLabel, formatterTextField} |
||||
},rowSize, columnSize); |
||||
panel.add(cen, BorderLayout.CENTER); |
||||
|
||||
return panel; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(ECharts ob) { |
||||
if (ob == null) { |
||||
return; |
||||
} |
||||
EChartsTooltip tooltip = ob.getTooltip(); |
||||
if (tooltip == null) { |
||||
return; |
||||
} |
||||
triggerComboBox.setSelectedItem(tooltip.getTriggerType()); |
||||
formatterTextField.setText(tooltip.getFormat()); |
||||
} |
||||
|
||||
@Override |
||||
public void updateBean(ECharts ob) { |
||||
if (ob == null) { |
||||
ob = new ECharts(); |
||||
} |
||||
EChartsTooltip tooltip = new EChartsTooltip(); |
||||
tooltip.setTriggerType(triggerComboBox.getSelectedItem()); |
||||
tooltip.setFormat(formatterTextField.getText()); |
||||
ob.setTooltip(tooltip); |
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return "Tooltip"; |
||||
return Inter.getLocText("Plugin-ECharts_Tooltip"); |
||||
} |
||||
} |
||||
|
@ -1,164 +1,14 @@
|
||||
package com.fr.solution.plugin.chart.echarts.common.ui.data; |
||||
|
||||
import com.fr.chart.base.ChartConstants; |
||||
import com.fr.chart.chartattr.Bar2DPlot; |
||||
import com.fr.chart.chartattr.ChartCollection; |
||||
import com.fr.chart.chartdata.NormalTableDataDefinition; |
||||
import com.fr.chart.chartdata.TopDefinition; |
||||
import com.fr.design.gui.icombobox.UIComboBox; |
||||
import com.fr.design.gui.ilable.BoldFontTextLabel; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.mainframe.chart.gui.ChartDataPane; |
||||
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; |
||||
import com.fr.design.utils.gui.GUICoreUtils; |
||||
import com.fr.general.ComparatorUtils; |
||||
import com.fr.general.Inter; |
||||
import com.fr.solution.plugin.chart.echarts.common.ui.series.NewSeriesTypeUsePane; |
||||
import com.fr.stable.ArrayUtils; |
||||
import com.fr.stable.StringUtils; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
import java.awt.event.ItemEvent; |
||||
import java.awt.event.ItemListener; |
||||
import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContentPane; |
||||
|
||||
/** |
||||
* Created by richie on 16/1/29. |
||||
*/ |
||||
public class AbstractEChartsTableDataContentPane extends AbstractTableDataContentPane { |
||||
|
||||
protected UIComboBox categoryComboBox; |
||||
protected NewSeriesTypeUsePane seriesTypeUsePane; |
||||
|
||||
public class AbstractEChartsTableDataContentPane extends CategoryPlotTableDataContentPane { |
||||
|
||||
public AbstractEChartsTableDataContentPane(ChartDataPane parent) { |
||||
|
||||
categoryComboBox = new UIComboBox(); |
||||
JPanel categoryPane = new JPanel(new BorderLayout(4, 0)); |
||||
categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground())); |
||||
UILabel label1 = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name") + ":", SwingConstants.RIGHT); |
||||
label1.setPreferredSize(new Dimension(75, 20)); |
||||
categoryComboBox.setPreferredSize(new Dimension(100, 20)); |
||||
|
||||
categoryComboBox.addItem(Inter.getLocText("Chart-Use_None")); |
||||
categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryComboBox, null, null, label1, null})); |
||||
|
||||
this.setLayout(new BorderLayout()); |
||||
|
||||
this.add(categoryPane, BorderLayout.NORTH); |
||||
|
||||
seriesTypeUsePane = new NewSeriesTypeUsePane(parent, new Bar2DPlot()); |
||||
this.add(seriesTypeUsePane, BorderLayout.SOUTH); |
||||
|
||||
categoryComboBox.addItemListener(new ItemListener() { |
||||
public void itemStateChanged(ItemEvent e) { |
||||
checkSeriseUse(categoryComboBox.getSelectedItem() != null); |
||||
makeToolTipUse(categoryComboBox); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
protected void makeToolTipUse(UIComboBox comBox) { |
||||
if (comBox.getSelectedItem() != null) { |
||||
comBox.setToolTipText(comBox.getSelectedItem().toString()); |
||||
} else { |
||||
comBox.setToolTipText(null); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 检查 某些Box是否可用 |
||||
* |
||||
* @param hasUse 是否使用. |
||||
*/ |
||||
public void checkBoxUse(boolean hasUse) { |
||||
categoryComboBox.setEnabled(hasUse); |
||||
checkSeriseUse(hasUse); |
||||
} |
||||
|
||||
protected void checkSeriseUse(boolean hasUse) { |
||||
if (seriesTypeUsePane != null) { |
||||
seriesTypeUsePane.checkUseBox(hasUse && categoryComboBox.getSelectedItem() != null); |
||||
} |
||||
} |
||||
|
||||
protected void refreshBoxListWithSelectTableData(java.util.List list) { |
||||
refreshBoxItems(categoryComboBox, list); |
||||
categoryComboBox.addItem(Inter.getLocText("Chart-Use_None")); |
||||
|
||||
seriesTypeUsePane.refreshBoxListWithSelectTableData(list); |
||||
super(parent); |
||||
} |
||||
|
||||
/** |
||||
* 清空所有的box设置 |
||||
*/ |
||||
public void clearAllBoxList() { |
||||
clearBoxItems(categoryComboBox); |
||||
categoryComboBox.addItem(Inter.getLocText("Chart-Use_None")); |
||||
seriesTypeUsePane.clearAllBoxList(); |
||||
} |
||||
|
||||
/** |
||||
* 保存界面内容到ChartCollection |
||||
*/ |
||||
public void updateBean(ChartCollection collection) { |
||||
seriesTypeUsePane.updateBean(collection); |
||||
NormalTableDataDefinition dataDefinition = (NormalTableDataDefinition) collection.getSelectedChart().getFilterDefinition(); |
||||
if (dataDefinition == null) { |
||||
return; |
||||
} |
||||
Object categoryName = categoryComboBox.getSelectedItem(); |
||||
|
||||
if (ArrayUtils.contains(ChartConstants.NONE_KEYS, categoryName)) { |
||||
dataDefinition.setCategoryName(StringUtils.EMPTY); |
||||
} else { |
||||
dataDefinition.setCategoryName(categoryName == null ? null : categoryName.toString()); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* 根据ChartCollection 更新界面 |
||||
*/ |
||||
public void populateBean(ChartCollection collection) { |
||||
super.populateBean(collection); |
||||
TopDefinition top = (TopDefinition) collection.getSelectedChart().getFilterDefinition(); |
||||
|
||||
if (!(top instanceof NormalTableDataDefinition)) { |
||||
return; |
||||
} |
||||
NormalTableDataDefinition data = (NormalTableDataDefinition) top; |
||||
|
||||
if (data == null || ComparatorUtils.equals(data.getCategoryName(), StringUtils.EMPTY)) { |
||||
categoryComboBox.setSelectedItem(Inter.getLocText("Chart-Use_None")); |
||||
} else if (data != null && !this.boxItemsContainsObject(categoryComboBox, data.getCategoryName())) { |
||||
categoryComboBox.setSelectedItem(null); |
||||
} else { |
||||
combineCustomEditValue(categoryComboBox, data == null ? null : data.getCategoryName()); |
||||
} |
||||
|
||||
seriesTypeUsePane.populateBean(collection, this.isNeedSummaryCaculateMethod()); |
||||
} |
||||
|
||||
private boolean boxItemsContainsObject(UIComboBox box, Object item) { |
||||
if (box == null) { |
||||
return false; |
||||
} |
||||
|
||||
ComboBoxModel dataModel = box.getModel(); |
||||
for (int i = 0; i < dataModel.getSize(); i++) { |
||||
if (ComparatorUtils.equals(dataModel.getElementAt(i), item)) { |
||||
return true; |
||||
} |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
/** |
||||
* 重新布局整个面板 |
||||
*/ |
||||
public void redoLayoutPane() { |
||||
seriesTypeUsePane.relayoutPane(this.isNeedSummaryCaculateMethod()); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,5 @@
|
||||
(function(){ |
||||
if (!window.EChartsTheme) { |
||||
window.EChartsTheme = {}; |
||||
} |
||||
})(); |
@ -0,0 +1,337 @@
|
||||
(function(){ |
||||
$.extend(window.EChartsTheme, { |
||||
|
||||
dark : { |
||||
// 全图默认背景
|
||||
backgroundColor: '#1b1b1b', |
||||
|
||||
// 默认色板
|
||||
color: [ |
||||
'#FE8463', '#9BCA63', '#FAD860', '#60C0DD', '#0084C6', |
||||
'#D7504B', '#C6E579', '#26C0C0', '#F0805A', '#F4E001', |
||||
'#B5C334' |
||||
], |
||||
|
||||
// 图表标题
|
||||
title: { |
||||
textStyle: { |
||||
fontWeight: 'normal', |
||||
color: '#fff' // 主标题文字颜色
|
||||
} |
||||
}, |
||||
|
||||
// 图例
|
||||
legend: { |
||||
textStyle: { |
||||
color: '#ccc' // 图例文字颜色
|
||||
} |
||||
}, |
||||
|
||||
// 值域
|
||||
dataRange: { |
||||
itemWidth: 15, |
||||
color: ['#FFF808', '#21BCF9'], |
||||
textStyle: { |
||||
color: '#ccc' // 值域文字颜色
|
||||
} |
||||
}, |
||||
|
||||
toolbox: { |
||||
color: ['#fff', '#fff', '#fff', '#fff'], |
||||
effectiveColor: '#FE8463', |
||||
disableColor: '#666' |
||||
}, |
||||
|
||||
// 提示框
|
||||
tooltip: { |
||||
backgroundColor: 'rgba(250,250,250,0.8)', // 提示背景颜色,默认为透明度为0.7的黑色
|
||||
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
||||
type: 'line', // 默认为直线,可选为:'line' | 'shadow'
|
||||
lineStyle: { // 直线指示器样式设置
|
||||
color: '#aaa' |
||||
}, |
||||
crossStyle: { |
||||
color: '#aaa' |
||||
}, |
||||
shadowStyle: { // 阴影指示器样式设置
|
||||
color: 'rgba(200,200,200,0.2)' |
||||
} |
||||
}, |
||||
textStyle: { |
||||
color: '#333' |
||||
} |
||||
}, |
||||
|
||||
// 区域缩放控制器
|
||||
dataZoom: { |
||||
dataBackgroundColor: '#555', // 数据背景颜色
|
||||
fillerColor: 'rgba(200,200,200,0.2)', // 填充颜色
|
||||
handleColor: '#eee' // 手柄颜色
|
||||
}, |
||||
|
||||
// 网格
|
||||
grid: { |
||||
borderWidth: 0 |
||||
}, |
||||
|
||||
// 类目轴
|
||||
categoryAxis: { |
||||
axisLine: { // 坐标轴线
|
||||
show: false |
||||
}, |
||||
axisTick: { // 坐标轴小标记
|
||||
show: false |
||||
}, |
||||
axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
|
||||
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
|
||||
color: '#ccc' |
||||
} |
||||
}, |
||||
splitLine: { // 分隔线
|
||||
show: false |
||||
} |
||||
}, |
||||
|
||||
// 数值型坐标轴默认参数
|
||||
valueAxis: { |
||||
axisLine: { // 坐标轴线
|
||||
show: false |
||||
}, |
||||
axisTick: { // 坐标轴小标记
|
||||
show: false |
||||
}, |
||||
axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
|
||||
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
|
||||
color: '#ccc' |
||||
} |
||||
}, |
||||
splitLine: { // 分隔线
|
||||
lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
|
||||
color: ['#aaa'], |
||||
type: 'dashed' |
||||
} |
||||
}, |
||||
splitArea: { // 分隔区域
|
||||
show: false |
||||
} |
||||
}, |
||||
|
||||
polar: { |
||||
name: { |
||||
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
|
||||
color: '#ccc' |
||||
} |
||||
}, |
||||
axisLine: { // 坐标轴线
|
||||
lineStyle: { // 属性lineStyle控制线条样式
|
||||
color: '#ddd' |
||||
} |
||||
}, |
||||
splitArea: { |
||||
show: true, |
||||
areaStyle: { |
||||
color: ['rgba(250,250,250,0.2)', 'rgba(200,200,200,0.2)'] |
||||
} |
||||
}, |
||||
splitLine: { |
||||
lineStyle: { |
||||
color: '#ddd' |
||||
} |
||||
} |
||||
}, |
||||
|
||||
timeline: { |
||||
label: { |
||||
textStyle: { |
||||
color: '#ccc' |
||||
} |
||||
}, |
||||
lineStyle: { |
||||
color: '#aaa' |
||||
}, |
||||
controlStyle: { |
||||
normal: {color: '#fff'}, |
||||
emphasis: {color: '#FE8463'} |
||||
}, |
||||
symbolSize: 3 |
||||
}, |
||||
|
||||
// 折线图默认参数
|
||||
line: { |
||||
smooth: true |
||||
}, |
||||
|
||||
// K线图默认参数
|
||||
k: { |
||||
itemStyle: { |
||||
normal: { |
||||
color: '#FE8463', // 阳线填充颜色
|
||||
color0: '#9BCA63', // 阴线填充颜色
|
||||
lineStyle: { |
||||
width: 1, |
||||
color: '#FE8463', // 阳线边框颜色
|
||||
color0: '#9BCA63' // 阴线边框颜色
|
||||
} |
||||
} |
||||
} |
||||
}, |
||||
|
||||
// 雷达图默认参数
|
||||
radar: { |
||||
symbol: 'emptyCircle', // 图形类型
|
||||
symbolSize: 3 |
||||
//symbol: null, // 拐点图形类型
|
||||
//symbolRotate : null, // 图形旋转控制
|
||||
}, |
||||
|
||||
pie: { |
||||
itemStyle: { |
||||
normal: { |
||||
borderWidth: 1, |
||||
borderColor: 'rgba(255, 255, 255, 0.5)' |
||||
}, |
||||
emphasis: { |
||||
borderWidth: 1, |
||||
borderColor: 'rgba(255, 255, 255, 1)' |
||||
} |
||||
} |
||||
}, |
||||
|
||||
map: { |
||||
itemStyle: { |
||||
normal: { |
||||
borderColor: 'rgba(255, 255, 255, 0.5)', |
||||
areaStyle: { |
||||
color: '#ddd' |
||||
}, |
||||
label: { |
||||
textStyle: { |
||||
// color: '#ccc'
|
||||
} |
||||
} |
||||
}, |
||||
emphasis: { // 也是选中样式
|
||||
areaStyle: { |
||||
color: '#FE8463' |
||||
}, |
||||
label: { |
||||
textStyle: { |
||||
// color: 'ccc'
|
||||
} |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
|
||||
force: { |
||||
itemStyle: { |
||||
normal: { |
||||
linkStyle: { |
||||
color: '#fff' |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
|
||||
chord: { |
||||
itemStyle: { |
||||
normal: { |
||||
borderWidth: 1, |
||||
borderColor: 'rgba(228, 228, 228, 0.2)', |
||||
chordStyle: { |
||||
lineStyle: { |
||||
color: 'rgba(228, 228, 228, 0.2)' |
||||
} |
||||
} |
||||
}, |
||||
emphasis: { |
||||
borderWidth: 1, |
||||
borderColor: 'rgba(228, 228, 228, 0.9)', |
||||
chordStyle: { |
||||
lineStyle: { |
||||
color: 'rgba(228, 228, 228, 0.9)' |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
|
||||
gauge: { |
||||
axisLine: { // 坐标轴线
|
||||
show: true, // 默认显示,属性show控制显示与否
|
||||
lineStyle: { // 属性lineStyle控制线条样式
|
||||
color: [[0.2, '#9BCA63'], [0.8, '#60C0DD'], [1, '#D7504B']], |
||||
width: 3, |
||||
shadowColor: '#fff', //默认透明
|
||||
shadowBlur: 10 |
||||
} |
||||
}, |
||||
axisTick: { // 坐标轴小标记
|
||||
length: 15, // 属性length控制线长
|
||||
lineStyle: { // 属性lineStyle控制线条样式
|
||||
color: 'auto', |
||||
shadowColor: '#fff', //默认透明
|
||||
shadowBlur: 10 |
||||
} |
||||
}, |
||||
axisLabel: { // 坐标轴小标记
|
||||
textStyle: { // 属性lineStyle控制线条样式
|
||||
fontWeight: 'bolder', |
||||
color: '#fff', |
||||
shadowColor: '#fff', //默认透明
|
||||
shadowBlur: 10 |
||||
} |
||||
}, |
||||
splitLine: { // 分隔线
|
||||
length: 25, // 属性length控制线长
|
||||
lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
|
||||
width: 3, |
||||
color: '#fff', |
||||
shadowColor: '#fff', //默认透明
|
||||
shadowBlur: 10 |
||||
} |
||||
}, |
||||
pointer: { // 分隔线
|
||||
shadowColor: '#fff', //默认透明
|
||||
shadowBlur: 5 |
||||
}, |
||||
title: { |
||||
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
|
||||
fontWeight: 'bolder', |
||||
fontSize: 20, |
||||
fontStyle: 'italic', |
||||
color: '#fff', |
||||
shadowColor: '#fff', //默认透明
|
||||
shadowBlur: 10 |
||||
} |
||||
}, |
||||
detail: { |
||||
shadowColor: '#fff', //默认透明
|
||||
shadowBlur: 5, |
||||
offsetCenter: [0, '50%'], // x, y,单位px
|
||||
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
|
||||
fontWeight: 'bolder', |
||||
color: '#fff' |
||||
} |
||||
} |
||||
}, |
||||
|
||||
funnel: { |
||||
itemStyle: { |
||||
normal: { |
||||
borderColor: 'rgba(255, 255, 255, 0.5)', |
||||
borderWidth: 1 |
||||
}, |
||||
emphasis: { |
||||
borderColor: 'rgba(255, 255, 255, 1)', |
||||
borderWidth: 1 |
||||
} |
||||
} |
||||
}, |
||||
|
||||
textStyle: { |
||||
fontFamily: '微软雅黑, Arial, Verdana, sans-serif' |
||||
} |
||||
} |
||||
}); |
||||
})(); |
@ -1,2 +1,11 @@
|
||||
Plugin-ECharts_Chinese_Map=Chinese Map |
||||
Plugin-ECharts_Pie=Pie(ECharts) |
||||
Plugin-ECharts_Pie=Pie(ECharts) |
||||
Plugin-ECharts_Title=Title |
||||
Plugin-ECharts_Title_Show=Show Title |
||||
Plugin-ECharts_Title_Not_Show=Hide Title |
||||
Plugin-ECharts_Title_Show_Label=Show Title |
||||
Plugin-ECharts_Title_Content=Content |
||||
Plugin-ECharts_Tooltip=Theme |
||||
Plugin-ECharts_Theme=Theme |
||||
Plugin-ECharts_Theme_Select=Select Theme |
||||
Plugin-ECharts_Legend=Legend |
||||
|
@ -1,2 +1,11 @@
|
||||
Plugin-ECharts_Chinese_Map=\u4E2D\u56FD\u5730\u56FE |
||||
Plugin-ECharts_Pie=\u997C\u56FE(ECharts) |
||||
Plugin-ECharts_Pie=\u997C\u56FE(ECharts) |
||||
Plugin-ECharts_Title=\u6807\u9898 |
||||
Plugin-ECharts_Title_Show=\u663E\u793A |
||||
Plugin-ECharts_Title_Not_Show=\u4E0D\u663E\u793A |
||||
Plugin-ECharts_Title_Show_Label=\u663E\u793A\u6807\u9898 |
||||
Plugin-ECharts_Title_Content=\u6807\u9898\u5185\u5BB9 |
||||
Plugin-ECharts_Tooltip=\u6807\u7B7E |
||||
Plugin-ECharts_Theme=\u4E3B\u9898 |
||||
Plugin-ECharts_Theme_Select=\u4E3B\u9898\u9009\u62E9 |
||||
Plugin-ECharts_Legend=\u56FE\u4F8B |
Loading…
Reference in new issue