From 3d104fabfb6f1b21662591b1cd352b258cb4b94f Mon Sep 17 00:00:00 2001 From: datagear Date: Sun, 9 Feb 2020 20:04:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=86=85=E7=BD=AE=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E6=8F=92=E4=BB=B6=EF=BC=8C=E6=B7=BB=E5=8A=A0=E6=95=A3?= =?UTF-8?q?=E7=82=B9=E5=9B=BE=E3=80=81=E9=9B=B7=E8=BE=BE=E5=9B=BE=E3=80=81?= =?UTF-8?q?=E6=BC=8F=E6=96=97=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/datagear/analysis/DataSet.java | 7 + .../analysis/support/AbstractDataSet.java | 20 +- .../support/SimpleDashboardThemeSource.java | 2 +- .../datagear/analysis/support/SqlDataSet.java | 8 +- .../html/DirectoryHtmlChartPluginManager.java | 2 +- .../html/HtmlChartScriptObjectWriter.java | 2 +- .../analysis/support/SqlDataSetTest.java | 4 +- .../management/domain/SqlDataSetEntity.java | 21 +- .../org.datagear.chart.bar.zip | Bin 3489 -> 3720 bytes .../org.datagear.chart.funnel.zip | Bin 0 -> 3821 bytes .../org.datagear.chart.gauge.zip | Bin 3538 -> 3565 bytes .../org.datagear.chart.line.zip | Bin 3490 -> 3693 bytes .../org.datagear.chart.pie.zip | Bin 3657 -> 3782 bytes .../org.datagear.chart.radar.zip | Bin 0 -> 3915 bytes .../org.datagear.chart.scatter.zip | Bin 0 -> 3651 bytes .../static/script/datagear-chart-util.js | 217 +++++++++++++----- test/sql/test-sql-script-mysql.sql | 14 ++ 17 files changed, 213 insertions(+), 84 deletions(-) create mode 100644 datagear-web/src/main/resources/org/datagear/web/builtInHtmlChartPlugins/org.datagear.chart.funnel.zip create mode 100644 datagear-web/src/main/resources/org/datagear/web/builtInHtmlChartPlugins/org.datagear.chart.radar.zip create mode 100644 datagear-web/src/main/resources/org/datagear/web/builtInHtmlChartPlugins/org.datagear.chart.scatter.zip diff --git a/datagear-analysis/src/main/java/org/datagear/analysis/DataSet.java b/datagear-analysis/src/main/java/org/datagear/analysis/DataSet.java index 2c9180b9..01b29278 100644 --- a/datagear-analysis/src/main/java/org/datagear/analysis/DataSet.java +++ b/datagear-analysis/src/main/java/org/datagear/analysis/DataSet.java @@ -15,6 +15,13 @@ import java.util.Map; */ public interface DataSet extends Identifiable { + /** + * 获取名称。 + * + * @return + */ + String getName(); + /** * 获取属性列表。 *

diff --git a/datagear-analysis/src/main/java/org/datagear/analysis/support/AbstractDataSet.java b/datagear-analysis/src/main/java/org/datagear/analysis/support/AbstractDataSet.java index 91371aad..be25d651 100644 --- a/datagear-analysis/src/main/java/org/datagear/analysis/support/AbstractDataSet.java +++ b/datagear-analysis/src/main/java/org/datagear/analysis/support/AbstractDataSet.java @@ -14,12 +14,12 @@ import java.util.Map; import org.datagear.analysis.AbstractIdentifiable; import org.datagear.analysis.DataNameAndType; -import org.datagear.analysis.DataSetResult; +import org.datagear.analysis.DataSet; import org.datagear.analysis.DataSetException; import org.datagear.analysis.DataSetExport; -import org.datagear.analysis.DataSet; import org.datagear.analysis.DataSetParam; import org.datagear.analysis.DataSetProperty; +import org.datagear.analysis.DataSetResult; /** * 抽象{@linkplain DataSet}。 @@ -29,6 +29,8 @@ import org.datagear.analysis.DataSetProperty; */ public abstract class AbstractDataSet extends AbstractIdentifiable implements DataSet { + private String name; + private List properties; private List params; @@ -40,12 +42,24 @@ public abstract class AbstractDataSet extends AbstractIdentifiable implements Da super(); } - public AbstractDataSet(String id, List properties) + public AbstractDataSet(String id, String name, List properties) { super(id); + this.name = name; this.properties = properties; } + @Override + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + @Override public List getProperties() { diff --git a/datagear-analysis/src/main/java/org/datagear/analysis/support/SimpleDashboardThemeSource.java b/datagear-analysis/src/main/java/org/datagear/analysis/support/SimpleDashboardThemeSource.java index 4d2c8823..539eeabe 100644 --- a/datagear-analysis/src/main/java/org/datagear/analysis/support/SimpleDashboardThemeSource.java +++ b/datagear-analysis/src/main/java/org/datagear/analysis/support/SimpleDashboardThemeSource.java @@ -31,7 +31,7 @@ public class SimpleDashboardThemeSource implements DashboardThemeSource public static final DashboardTheme THEME_DARK = new DashboardTheme("#000", "#EEE", "#333", new ChartTheme("#101010", "#EEE", "#202020", "#AAA", "#888", "#444", "#F58400", new String[] { "#5EF6FE", - "#12CDD2", "#019DA2", "#24666C", "#73A373", "#EA7E53", "#EEDD78", "#73B9BC", "#7289AB", "#91CA8C" }, + "#91CA8C", "#EA7E53", "#24666C", "#73A373", "#019DA2", "#EEDD78", "#73B9BC", "#7289AB", "#12CDD2" }, new Theme("#000", "#EEE", "#333"))); private Map dashboardThemes; diff --git a/datagear-analysis/src/main/java/org/datagear/analysis/support/SqlDataSet.java b/datagear-analysis/src/main/java/org/datagear/analysis/support/SqlDataSet.java index feb2f47f..efeb5f81 100644 --- a/datagear-analysis/src/main/java/org/datagear/analysis/support/SqlDataSet.java +++ b/datagear-analysis/src/main/java/org/datagear/analysis/support/SqlDataSet.java @@ -13,11 +13,11 @@ import java.sql.SQLException; import java.util.List; import java.util.Map; -import org.datagear.analysis.DataSetResult; -import org.datagear.analysis.DataSetException; import org.datagear.analysis.DataSet; +import org.datagear.analysis.DataSetException; import org.datagear.analysis.DataSetParam; import org.datagear.analysis.DataSetProperty; +import org.datagear.analysis.DataSetResult; import org.datagear.analysis.support.ParameterSqlResolver.ParameterSql; import org.datagear.util.JdbcUtil; import org.datagear.util.JdbcUtil.QueryResultSet; @@ -46,10 +46,10 @@ public class SqlDataSet extends AbstractDataSet super(); } - public SqlDataSet(String id, List properties, ConnectionFactory connectionFactory, + public SqlDataSet(String id, String name, List properties, ConnectionFactory connectionFactory, String sql) { - super(id, properties); + super(id, name, properties); this.connectionFactory = connectionFactory; this.sql = sql; } diff --git a/datagear-analysis/src/main/java/org/datagear/analysis/support/html/DirectoryHtmlChartPluginManager.java b/datagear-analysis/src/main/java/org/datagear/analysis/support/html/DirectoryHtmlChartPluginManager.java index eb19acbc..c5d5487f 100644 --- a/datagear-analysis/src/main/java/org/datagear/analysis/support/html/DirectoryHtmlChartPluginManager.java +++ b/datagear-analysis/src/main/java/org/datagear/analysis/support/html/DirectoryHtmlChartPluginManager.java @@ -42,7 +42,7 @@ public class DirectoryHtmlChartPluginManager extends ConcurrentChartPluginManage private HtmlChartPluginLoader htmlChartPluginLoader = new HtmlChartPluginLoader(); - private long readCheckForReloadTimeThreashold = 5 * 60 * 1000; + private long readCheckForReloadTimeThreashold = (LOGGER.isDebugEnabled() ? 0 : 5 * 60 * 1000); private Map pluginIdFileNameMap = new HashMap(); diff --git a/datagear-analysis/src/main/java/org/datagear/analysis/support/html/HtmlChartScriptObjectWriter.java b/datagear-analysis/src/main/java/org/datagear/analysis/support/html/HtmlChartScriptObjectWriter.java index 15e6d26b..6498ede4 100644 --- a/datagear-analysis/src/main/java/org/datagear/analysis/support/html/HtmlChartScriptObjectWriter.java +++ b/datagear-analysis/src/main/java/org/datagear/analysis/support/html/HtmlChartScriptObjectWriter.java @@ -107,7 +107,7 @@ public class HtmlChartScriptObjectWriter extends AbstractHtmlScriptObjectWriter { public JsonDataSet(DataSet dataSet) { - super(dataSet.getId(), dataSet.getProperties()); + super(dataSet.getId(), dataSet.getName(), dataSet.getProperties()); setParams(dataSet.getParams()); setExports(dataSet.getExports()); } diff --git a/datagear-analysis/src/test/java/org/datagear/analysis/support/SqlDataSetTest.java b/datagear-analysis/src/test/java/org/datagear/analysis/support/SqlDataSetTest.java index 8e78f14b..9be80e85 100644 --- a/datagear-analysis/src/test/java/org/datagear/analysis/support/SqlDataSetTest.java +++ b/datagear-analysis/src/test/java/org/datagear/analysis/support/SqlDataSetTest.java @@ -14,9 +14,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.datagear.analysis.DataSetResult; import org.datagear.analysis.DataSetParam; import org.datagear.analysis.DataSetProperty; +import org.datagear.analysis.DataSetResult; import org.datagear.analysis.DataType; import org.datagear.util.JdbcUtil; import org.datagear.util.resource.SimpleConnectionFactory; @@ -66,7 +66,7 @@ public class SqlDataSetTest extends DBTestSupport List dataSetParams = Arrays.asList(new DataSetParam("id", DataType.INTEGER, true), new DataSetParam("name", DataType.STRING, true)); - SqlDataSet sqlDataSet = new SqlDataSet("1", dataSetProperties, connectionFactory, sql); + SqlDataSet sqlDataSet = new SqlDataSet("1", "1", dataSetProperties, connectionFactory, sql); sqlDataSet.setParams(dataSetParams); Map dataSetParamValues = new HashMap(); diff --git a/datagear-management/src/main/java/org/datagear/management/domain/SqlDataSetEntity.java b/datagear-management/src/main/java/org/datagear/management/domain/SqlDataSetEntity.java index a1ec14f7..02474bbe 100644 --- a/datagear-management/src/main/java/org/datagear/management/domain/SqlDataSetEntity.java +++ b/datagear-management/src/main/java/org/datagear/management/domain/SqlDataSetEntity.java @@ -27,9 +27,6 @@ public class SqlDataSetEntity extends SqlDataSet implements CreateUserEntity properties, SchemaConnectionFactory connectionFactory, - String sql, String name, User createUser) + public SqlDataSetEntity(String id, String name, List properties, + SchemaConnectionFactory connectionFactory, + String sql, User createUser) { - super(id, properties, connectionFactory, sql); - this.name = name; + super(id, name, properties, connectionFactory, sql); this.createTime = new Date(); } @@ -78,16 +75,6 @@ public class SqlDataSetEntity extends SqlDataSet implements CreateUserEntityiX1ia%$vL^}P2`6s zC!2%5Xxy{8((F;+o4fa?c+Kc6;!YZlYf zi*F_r3CafCUtx0H^ZNPwV)y*5`}Q$prqGJC@RC88R1=7cIOq`m*%WHnx39r z&+Wg-wQjE5f4j>6&!4mFYF!s^N{wPs4fnb+QMN#~^~~!UHG{VfmOP=wpDyfFYE~A$ zRF=Fn{J7xLB^s)HzFvzRZ4b7*@$o)V!=mH5XO)IlWgwIIS#Qf-$1Th!+k6R-JR>N2 zMnU{Qv-jkE3}-?_iuyKA^Z7OJfsSu#JfrZ23-v4JwWdr+x}M$9WPGNf!THbET_;%2 zHeGPjJ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Md>EDliuNda+I$^r6_tzy;p99$${WVU#&yHMsvAxxaz4mK< zfHynGEVGlXVoVGSf~*V-0p5&EqRfcoHTfT}rV=cDAxi?2SpY)gWKTXtIarDd@MdLW P00Jf;Yyr~jydWL`2pTg8 diff --git a/datagear-web/src/main/resources/org/datagear/web/builtInHtmlChartPlugins/org.datagear.chart.funnel.zip b/datagear-web/src/main/resources/org/datagear/web/builtInHtmlChartPlugins/org.datagear.chart.funnel.zip new file mode 100644 index 0000000000000000000000000000000000000000..6f1d03867cea33766947c4bc7f751225f0c5f1c2 GIT binary patch literal 3821 zcmY+HX*d+_8i&Vj>_oO?EK?a1jlv*eFtRo?c0z*~`@SzRwh@uYl6_yIWZz5K8N&!= zm-Walio~hwT<3o}@AKh(-!H#!_jBDplr|MLCxHI! z$IV&YsLclC@kv&Nu=!@{@}aN_6Li8Rsk^?wq=qMB=<;G@vIZ|8(WC>#%1wz zB49S@qIYS;cKG4-`{rgf@=x1DPh2E|p*~7+*4&V9(=IN3064aOjj@H(15RRL2!A-~ z&L|*NZ7%Pwws{7 z8C=X**f6K~nVfQ98gE;N^z>?c(|zS3_+?8iTMe00Xg%E`OoBtlwg#C{`PhtZSOOmL zNWef)QH`t};SKSq_9za&2Pqry)N_z;&JE6!Kz49kB`~_zZZbBT?h0|RoKH0Tg6s_0 zH-GhOn2w*zGUbhkFeyeK#{Bd@ zb$g{DkI}5VXLqL?TBi=sXJe<3>Ra$rm5igm!n>1qH1Kpl+_BWae(|_*9*U(<)J_Za zEUwxVnkwfCuKbweU6iPP$9vkN+hYzDwqBH0IGRb3E9BxM1RLmV-k27~Le-PcTBOLI zDi^wV;>$xQkra7Z>W)tXGnQoYCCI@ojw*un)~j$% zI{nP`oMULgFzc7g#jmYXkcumSl*(Gd*<)J`e$PH#UABjiWgK0rDcknp0s`~Sh+*V* z5_@uvfxJk2m_Fmmz6SDLw4B@=<*8_S;%fHrW?#Ss7K+@{A-%V+v#n-=5IWPHfoQG(pD zZ}}ON9)VL$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v*Hh-LLJj zQY-)W3%~#Va9^x!7xxWGq3H{@=x~Rqf7I~HarBzn=yXq`vO{~-2ThSJ;v3kS1MYU6 zuYZ-46(DJyU1<^TSt6B}% zM2=nSm}Wm~1-t(&&+fX}nbr%OLxhi+XmH+IdED==;|gT~gN|KWE!V%Px@-95#JtYlqvmp>rM%W|D7T)yEXlthqr!IeNND~RS%`avYp;vcYBuIt+S-C zwI@tfDvIOhdhIWKdnetlzE-iZDz-X0!N_)VF7Lk8Ged6K+}%_rUcM*DDk{F%>-WP` zGt1}RxIT6H37OwZwX_4C{Ygn%u6>73tLXBEkKJc$crn&44hpf#DB7%Nz z&U)4RIqUXEZj&6jW<+{S;g0*B%EiDiIh$8e5tcBK6#>&{0NjAdYk8IA XU@0}gn-ypv0|OHfwg71hUJwreK=nwL diff --git a/datagear-web/src/main/resources/org/datagear/web/builtInHtmlChartPlugins/org.datagear.chart.line.zip b/datagear-web/src/main/resources/org/datagear/web/builtInHtmlChartPlugins/org.datagear.chart.line.zip index 27971d2d71aa434495ba4af2bcd6b00a6a3ac1d6..57865fcef4564271322056b25027617563987392 100644 GIT binary patch delta 906 zcmZ1^{Z@uAz?+#xgnMZ`{7~-uE9*p7Eu{XAx(pNn(iG zW67ynUX{nH7QRm{ITv>!d79JBvp4IP-#$J6di**A!^ERItQlR}ZBBOG`0lpvxh`js z!_`ME%Ty;!5_`V={q^VadHeRY??}n_){~s$adJ{?O5C!p=b8!2O>`w9TlHeEx|Ua0 zev~iSp{9M`n(2_R8n>R&0lr0VGa6($EEA2?ZZ|XPe6iq*Xj8l&{p;SfV{Pvz@_u^# zs{YUSqsQ&-?OspSt6p2ND%?k(`_Eq1^l5B<%Tmq4HbllRXMV#bx7jttFlD+%xI9?Xb4)bnQDLT;~{A`W{EPm4_6 zYqgl2cQ;3)aQD|kId3#iPG+foS$OoB)We&frl?-1PhTD7!FMLWra6AOQn1O})@dG3 z3@bMzhilB5(bE^R&*hWZ>^2*z9j4uTS@qv2ELd9H-Q;Jrd?B}bh4n4KlJK6fla)zoKmMnkQ z2ReDH99yC=^;v!Cb;)^!srO1EwACGi?z+xAEca%ez(p^_IVN z=l}Q+`3vDq}Ul40=yZSM41tpWwHdXrV=c-AWH%>O#n=%6#L|4 ZUPU=r{t57AWn%yWCLnA9(wBKbJOH(iljr~d delta 701 zcmaDWvq+jRz?+#xgn_)?8F6OK_kICD)oJ^Ki>16`0M2zQ>&OY4gB;J4E^?G!NYyDf zx)&GshgJD@fbjh(p3_%sITPg6f4I5ePI~;Zq!5=11G&wa;w4R*mX$lY_Wixs;U{tM zYyH)q=ezm$@2f9b=3ASY^2le)wr$7k{1?b@pXn}1Tk+TgzF@yhx2 z_TxbsCyI^*o~V*pvAt@`BrB%;uRb#`&uN}%u;WBXrhZ5L^2mwDoTmD_z7xOg^5d7% z44=7?)#W=UUt72DVNQ^#R_7G!mD?nm^=_Ox;~cy7TYbaamvap=*=H}!Q!<)*Y^`2~ z*rxQ%7;9I*tA*94*Kqo3U07TC*)8`2=WFrZSDyuCe%>Mab$jWKMyo@=7YM(WH~YG6 zUBT3HfsM-b>o&xw`?>+^`h~KeI8A3IM*N6`e)mObiSntPBhR-i%D5%!u?g`7y7i5-fosO9Inb07BzrJw8P_Sdt6y SW@Tdl0wy4A0n!}2ARYiMp*gGo diff --git a/datagear-web/src/main/resources/org/datagear/web/builtInHtmlChartPlugins/org.datagear.chart.pie.zip b/datagear-web/src/main/resources/org/datagear/web/builtInHtmlChartPlugins/org.datagear.chart.pie.zip index 33f19a2dc5b0bd2a3a7fa45197d7d5bffc855dc6..a0729ff5886078ddae983a5844ca6782adf40aed 100644 GIT binary patch delta 995 zcmX>pb4->mz?+#xgnldboAZow#@T`(fh!fV;i7)0O5@}2&xze<^MAFz z<6<@&-8tyegFKEfrU;TzlUrb(?84nYT*H?>ulS4+>!kgnbNe4I4AzR#V5OPm*s?-pDPTU zBlX@ms92sl@o-A_5s}s}M^9?$08y#PF7%S5r#g;j!oS>@zQR`Dd2bUbw2w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KS99C{m{!ji;LXnQ`5Vip6^}HY+ E06-Xxx&QzG diff --git a/datagear-web/src/main/resources/org/datagear/web/builtInHtmlChartPlugins/org.datagear.chart.radar.zip b/datagear-web/src/main/resources/org/datagear/web/builtInHtmlChartPlugins/org.datagear.chart.radar.zip new file mode 100644 index 0000000000000000000000000000000000000000..268cb1d53c3e45070add52674eb5f5f8cb4a4dd2 GIT binary patch literal 3915 zcmY+HWmpqz|At4W5|X0yP(nHeIFK4KVsr^ej_!^DBQ{_n2olmAg3=upBP0YRBu2v? zB&8AIugCv*pV#;PeYk)3m+Ss^9_Iyv5)m^1$bS!yohA(M*C7MY0<<+%)N~EijLoP4 zvp*EA-=P$(PY4(Q-R5(iJneK5%!QGhmkrW|&JQ!)QzHDj@&}1=31T=+TH=txj&Jl5 z3p#PzEs*nz+-h#i?Toc!ZY64=Df`sEj(j;|gDw2#hYFFctKEZx-Np;=(|>jkN4i7L zexQCnYo)wihzRY<8A}#97_-69Of_%qD0iQCUl=alKHj*v2s&i-obTAd%^jB;X11DM z!jExmCG1v{J54fM-QVX7g4%jv9CLP6S3Uo9?9jZiHZHP|>qQ*XXtalkBlb9_Nt>m5 z>aE~fld{H-x+XlTwAkdlOe5e7qpvyZifC#n+I9sdJ-nM+;#^|%%LFg5O$*A)NCD{% ztGU2hcl95Z)BIM`p70@H_9Lfj?bd?gY@rc!uQoaM6-~L6_4HPe%`!y*M?t;E^5s;> zLMoGgMa*vW@q@>f77cPKUAz|_!r?*z3Q2a%0!MQm9s>Z7ZSy8o2ZIl2>?UQjGP5pfkE3_nYgAc?#>V;m(scJt{dZdu1BUH5Wp|{$!go- zWmF|CIPkZL^h0xuLleZ;ueH99&k^{lqmi~@f`JR4Wfdh%ukFwPNv=t>AR841#YEmU z;sC2oKx6y`eCmA4qV)tShkSKilbDr)6ypZ;-hU zK==KLo`^re)`z6KP$_3biR$lK#)`Db6$^f5(#(MCZunMdk2a(muO-Lsv`b)5)@(cD zihJ=lTQ4g3<)jmF;c;K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RbC`x{OmV9Un|GWJ!yOV@iH`E6_j} zMo;};f>JViO72$SeCq*!h0we+;*PL3hbDb>3)NDt*Wp<&SwtkiCba>(xGh%yYT`*q z%5~>%qoEGykfBa8T68B@EYTeA>R=XecvfA-Ulm0bQ7jh2{*6PfNp$V9O-9loUt_## zQ|j}M#u1SfCdh~b>HSmT`XK9;5EJm=(Kx`|mGwqgdd@6q(R5^%dJOnqn zIrQK?2dUerj_!GGr`lwSGNl=W$_VBx%@hzHw_TI`IsZE)ttTzG06-SupYzATy^Ht% zQSEOuhybMj4Q{eUp?}(cgB$U`!R>E>KLq_P4*Va1^54Y$#nXQz{_q4>CHTDw0D$|u MB7Xm6WPhgr1EVmq(EtDd literal 0 HcmV?d00001 diff --git a/datagear-web/src/main/resources/org/datagear/web/webapp/staticResource/static/script/datagear-chart-util.js b/datagear-web/src/main/resources/org/datagear/web/webapp/staticResource/static/script/datagear-chart-util.js index 51dcba86..c9cde9cb 100644 --- a/datagear-web/src/main/resources/org/datagear/web/webapp/staticResource/static/script/datagear-chart-util.js +++ b/datagear-web/src/main/resources/org/datagear/web/webapp/staticResource/static/script/datagear-chart-util.js @@ -15,6 +15,9 @@ /** * 获取图表主题。 + * + * @param chart + * @return {...} */ util.chartTheme = function(chart) { @@ -22,7 +25,10 @@ }; /** - * 获取渲染样式。 + * 获取渲染风格。 + * + * @param chart + * @return "..." */ util.chartRenderStyle = function(chart) { @@ -87,9 +93,10 @@ }; /** - * 获取第一个图标数据集对象。 + * 获取第一个图表数据集对象。 * * @param chart + * @return {dataSet: [], propertySigns: {...}} */ util.firstChartDataSet = function(chart) { @@ -99,6 +106,30 @@ return chart.chartDataSets[0]; }; + /** + * 获取图表数据集对象数组。 + */ + util.chartDataSets = function(chart) + { + if(!chart || !chart.chartDataSets || chart.chartDataSets.length < 1) + return []; + + return chart.chartDataSets; + }; + + /** + * 获取图表名称。 + * + * @param chartDataSet 图表数据集对象 + */ + util.dataSetName = function(chartDataSet) + { + var dataSet = (chartDataSet.dataSet || chartDataSet); + var name = (dataSet ? dataSet.name : ""); + + return (name ? name : ""); + }; + /** * 获取指定标记的第一个数据集属性,没有则返回null。 * @@ -145,12 +176,12 @@ } } - for(var i=0; i 0) - { - for(var i=0; i< property.length; i++) - re[i] = (re[i].length > 0 ? re[i][0] : null); + if(!dataSetResults || !dataSetResults.length || dataSetResults.length < index) + return {}; - return re; - } - else - return (re.length > 0 ? re[0] : null); + return dataSetResults[index]; }; /** - * 获取结果数据属性值数组。 + * 获取数据集结果指定属性、指定行的单元格值。 * * @param result 数据集结果对象、对象数组 - * @param property 属性对象、属性名、属性对象数组、属性名数组 - * @param count 获取结果数据的最多行数,可选,默认为全部 + * @param property 数据集属性对象、属性名 + * @param row 行索引,以0开始,默认为0 */ - util.dataPropertyValues = function(result, property, count) + util.resultCell = function(result, property, row) + { + if(row == null) + row = 0; + + var re = this.resultRowArrays(result, property, row+1); + + return (re.length > row ? re[row] : undefined); + }; + + /** + * 将数据集结果的行对象按照指定properties顺序转换为行值数组。 + * + * @param result 数据集结果对象、对象数组 + * @param properties 数据集属性对象数组、属性名数组、属性对象、属性名 + * @param count 获取的最多行数,可选,默认为全部 + * @return properties为数组时:[[..., ...], ...];properties非数组时:[..., ...] + */ + util.resultRowArrays = function(result, properties, count) { var re = []; - if(property == null) + if(properties == null) return re; var datas = (result.length != null ? result : (result.datas || [])); + var getCount = datas.length; if(count != null && count < getCount) getCount = count; - if(property.length > 0) + if(properties.length > 0) { - for(var i=0; i 0) + { + for(var i=0; i