rroonga 5.1.1-x86-mingw32 → 6.0.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -1
- data/bin/grndump +9 -0
- data/doc/text/cross-compile.md +72 -0
- data/doc/text/install.md +121 -0
- data/doc/text/news.md +1451 -0
- data/doc/text/release.md +135 -0
- data/doc/text/tutorial.md +402 -0
- data/ext/groonga/rb-grn-column.c +54 -24
- data/ext/groonga/rb-grn-config.c +131 -10
- data/ext/groonga/rb-grn-context.c +0 -10
- data/ext/groonga/rb-grn-encoding.c +0 -2
- data/ext/groonga/rb-grn-expression.c +63 -3
- data/ext/groonga/rb-grn-index.c +34 -0
- data/ext/groonga/rb-grn-object.c +10 -10
- data/ext/groonga/rb-grn-operator.c +7 -0
- data/ext/groonga/rb-grn-plugin.c +39 -0
- data/ext/groonga/rb-grn-utils.c +5 -65
- data/ext/groonga/rb-grn.h +9 -9
- data/ext/groonga/rb-groonga.c +31 -1
- data/lib/2.1/groonga.so +0 -0
- data/lib/2.2/groonga.so +0 -0
- data/lib/2.3/groonga.so +0 -0
- data/lib/groonga.rb +1 -0
- data/lib/groonga/column.rb +13 -0
- data/lib/groonga/dumper.rb +3 -1
- data/lib/groonga/expression-builder.rb +66 -18
- data/lib/groonga/{expression-builder-19.rb → index.rb} +11 -19
- data/lib/groonga/record.rb +1 -1
- data/lib/rroonga.rb +16 -0
- data/rroonga-build.rb +6 -6
- data/rroonga.gemspec +1 -1
- data/test/groonga-test-utils.rb +0 -8
- data/test/test-column.rb +107 -1
- data/test/test-config.rb +18 -0
- data/test/test-database.rb +0 -2
- data/test/test-error-message.rb +20 -0
- data/test/test-expression-builder.rb +172 -29
- data/test/test-plugin.rb +25 -1
- data/test/test-table-dumper.rb +35 -6
- data/test/test-table-select.rb +0 -1
- data/vendor/local/bin/grndb.exe +0 -0
- data/vendor/local/bin/groonga-benchmark.exe +0 -0
- data/vendor/local/bin/groonga.exe +0 -0
- data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
- data/vendor/local/bin/libgroonga-0.dll +0 -0
- data/vendor/local/bin/libmecab-2.dll +0 -0
- data/vendor/local/bin/libmsgpack-4.dll +0 -0
- data/vendor/local/bin/libmsgpackc-2.dll +0 -0
- data/vendor/local/bin/libonig-5.dll +0 -0
- data/vendor/local/bin/libstdc++-6.dll +0 -0
- data/vendor/local/bin/lz4.exe +0 -0
- data/vendor/local/bin/lz4c.exe +0 -0
- data/vendor/local/bin/lz4cat +0 -0
- data/vendor/local/bin/mecab-config +5 -5
- data/vendor/local/bin/mecab.exe +0 -0
- data/vendor/local/bin/onig-config +1 -1
- data/vendor/local/bin/zlib1.dll +0 -0
- data/vendor/local/etc/groonga/httpd/groonga-httpd.conf +2 -2
- data/vendor/local/include/groonga/groonga.h +16 -11
- data/vendor/local/include/groonga/groonga/array.h +76 -0
- data/vendor/local/include/groonga/groonga/command.h +3 -5
- data/vendor/local/include/groonga/groonga/config.h +65 -0
- data/vendor/local/include/groonga/groonga/dat.h +100 -0
- data/vendor/local/include/groonga/groonga/dump.h +34 -0
- data/vendor/local/include/groonga/groonga/expr.h +21 -16
- data/vendor/local/include/groonga/groonga/file_reader.h +2 -5
- data/vendor/local/include/groonga/groonga/geo.h +2 -5
- data/vendor/local/include/groonga/groonga/groonga.h +28 -270
- data/vendor/local/include/groonga/groonga/hash.h +89 -0
- data/vendor/local/include/groonga/groonga/ii.h +3 -5
- data/vendor/local/include/groonga/groonga/nfkc.h +4 -5
- data/vendor/local/include/groonga/groonga/normalizer.h +3 -5
- data/vendor/local/include/groonga/groonga/obj.h +7 -5
- data/vendor/local/include/groonga/groonga/output.h +3 -5
- data/vendor/local/include/groonga/groonga/pat.h +102 -0
- data/vendor/local/include/groonga/groonga/plugin.h +29 -12
- data/vendor/local/include/groonga/groonga/portability.h +3 -5
- data/vendor/local/include/groonga/groonga/request_canceler.h +2 -5
- data/vendor/local/include/groonga/groonga/scorer.h +3 -5
- data/vendor/local/include/groonga/groonga/thread.h +2 -5
- data/vendor/local/include/groonga/groonga/token.h +5 -6
- data/vendor/local/include/groonga/groonga/token_filter.h +3 -5
- data/vendor/local/include/groonga/groonga/tokenizer.h +3 -5
- data/vendor/local/include/groonga/groonga/type.h +31 -0
- data/vendor/local/include/groonga/groonga/util.h +3 -5
- data/vendor/local/include/groonga/groonga/windows.h +2 -5
- data/vendor/local/include/groonga/groonga/windows_event_logger.h +2 -5
- data/vendor/local/include/mecab.h +1336 -96
- data/vendor/local/include/msgpack.h +3 -11
- data/vendor/local/include/msgpack.hpp +4 -11
- data/vendor/local/include/msgpack/adaptor/adaptor_base.hpp +84 -0
- data/vendor/local/include/msgpack/adaptor/array_ref.hpp +174 -0
- data/vendor/local/include/msgpack/adaptor/bool.hpp +41 -33
- data/vendor/local/include/msgpack/adaptor/boost/fusion.hpp +160 -0
- data/vendor/local/include/msgpack/adaptor/boost/msgpack_variant.hpp +430 -0
- data/vendor/local/include/msgpack/adaptor/boost/optional.hpp +96 -0
- data/vendor/local/include/msgpack/adaptor/boost/string_ref.hpp +87 -0
- data/vendor/local/include/msgpack/adaptor/char_ptr.hpp +132 -53
- data/vendor/local/include/msgpack/adaptor/check_container_size.hpp +18 -12
- data/vendor/local/include/msgpack/adaptor/cpp11/array.hpp +106 -44
- data/vendor/local/include/msgpack/adaptor/cpp11/array_char.hpp +59 -54
- data/vendor/local/include/msgpack/adaptor/cpp11/array_unsigned_char.hpp +89 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/forward_list.hpp +65 -46
- data/vendor/local/include/msgpack/adaptor/cpp11/reference_wrapper.hpp +68 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/shared_ptr.hpp +82 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/tuple.hpp +88 -64
- data/vendor/local/include/msgpack/adaptor/cpp11/unique_ptr.hpp +82 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/unordered_map.hpp +151 -111
- data/vendor/local/include/msgpack/adaptor/cpp11/unordered_set.hpp +142 -104
- data/vendor/local/include/msgpack/adaptor/define.hpp +15 -13
- data/vendor/local/include/msgpack/adaptor/deque.hpp +78 -53
- data/vendor/local/include/msgpack/adaptor/detail/{cpp03_define.hpp → cpp03_define_array.hpp} +225 -210
- data/vendor/local/include/msgpack/adaptor/detail/cpp03_define_map.hpp +2791 -0
- data/vendor/local/include/msgpack/adaptor/detail/cpp03_msgpack_tuple.hpp +3070 -3079
- data/vendor/local/include/msgpack/adaptor/detail/{cpp11_define.hpp → cpp11_define_array.hpp} +71 -62
- data/vendor/local/include/msgpack/adaptor/detail/cpp11_define_map.hpp +163 -0
- data/vendor/local/include/msgpack/adaptor/detail/cpp11_msgpack_tuple.hpp +105 -42
- data/vendor/local/include/msgpack/adaptor/ext.hpp +237 -0
- data/vendor/local/include/msgpack/adaptor/fixint.hpp +178 -92
- data/vendor/local/include/msgpack/adaptor/float.hpp +87 -69
- data/vendor/local/include/msgpack/adaptor/int.hpp +243 -123
- data/vendor/local/include/msgpack/adaptor/list.hpp +76 -53
- data/vendor/local/include/msgpack/adaptor/map.hpp +244 -157
- data/vendor/local/include/msgpack/adaptor/msgpack_tuple.hpp +3 -11
- data/vendor/local/include/msgpack/adaptor/nil.hpp +45 -29
- data/vendor/local/include/msgpack/adaptor/pair.hpp +58 -38
- data/vendor/local/include/msgpack/adaptor/raw.hpp +47 -39
- data/vendor/local/include/msgpack/adaptor/set.hpp +156 -102
- data/vendor/local/include/msgpack/adaptor/string.hpp +58 -50
- data/vendor/local/include/msgpack/adaptor/tr1/unordered_map.hpp +120 -113
- data/vendor/local/include/msgpack/adaptor/tr1/unordered_set.hpp +114 -106
- data/vendor/local/include/msgpack/adaptor/v4raw.hpp +106 -0
- data/vendor/local/include/msgpack/adaptor/vector.hpp +94 -60
- data/vendor/local/include/msgpack/adaptor/vector_bool.hpp +59 -51
- data/vendor/local/include/msgpack/adaptor/vector_char.hpp +62 -54
- data/vendor/local/include/msgpack/adaptor/vector_unsigned_char.hpp +89 -0
- data/vendor/local/include/msgpack/cpp_config.hpp +37 -22
- data/vendor/local/include/msgpack/detail/cpp03_zone.hpp +17 -11
- data/vendor/local/include/msgpack/detail/cpp11_zone.hpp +19 -19
- data/vendor/local/include/msgpack/fbuffer.h +3 -11
- data/vendor/local/include/msgpack/fbuffer.hpp +7 -11
- data/vendor/local/include/msgpack/gcc_atomic.h +3 -11
- data/vendor/local/include/msgpack/iterator.hpp +9 -13
- data/vendor/local/include/msgpack/meta.hpp +51 -0
- data/vendor/local/include/msgpack/object.h +3 -11
- data/vendor/local/include/msgpack/object.hpp +390 -290
- data/vendor/local/include/msgpack/object_fwd.hpp +57 -44
- data/vendor/local/include/msgpack/pack.h +6 -12
- data/vendor/local/include/msgpack/pack.hpp +58 -30
- data/vendor/local/include/msgpack/pack_define.h +3 -11
- data/vendor/local/include/msgpack/pack_template.h +35 -15
- data/vendor/local/include/msgpack/predef.h +19 -0
- data/vendor/local/include/msgpack/predef/architecture.h +30 -0
- data/vendor/local/include/msgpack/predef/architecture/alpha.h +60 -0
- data/vendor/local/include/msgpack/predef/architecture/arm.h +71 -0
- data/vendor/local/include/msgpack/predef/architecture/blackfin.h +47 -0
- data/vendor/local/include/msgpack/predef/architecture/convex.h +67 -0
- data/vendor/local/include/msgpack/predef/architecture/ia64.h +49 -0
- data/vendor/local/include/msgpack/predef/architecture/m68k.h +83 -0
- data/vendor/local/include/msgpack/predef/architecture/mips.h +74 -0
- data/vendor/local/include/msgpack/predef/architecture/parisc.h +65 -0
- data/vendor/local/include/msgpack/predef/architecture/ppc.h +73 -0
- data/vendor/local/include/msgpack/predef/architecture/pyramid.h +43 -0
- data/vendor/local/include/msgpack/predef/architecture/rs6k.h +56 -0
- data/vendor/local/include/msgpack/predef/architecture/sparc.h +55 -0
- data/vendor/local/include/msgpack/predef/architecture/superh.h +68 -0
- data/vendor/local/include/msgpack/predef/architecture/sys370.h +44 -0
- data/vendor/local/include/msgpack/predef/architecture/sys390.h +44 -0
- data/vendor/local/include/msgpack/predef/architecture/x86.h +38 -0
- data/vendor/local/include/msgpack/predef/architecture/x86/32.h +87 -0
- data/vendor/local/include/msgpack/predef/architecture/x86/64.h +50 -0
- data/vendor/local/include/msgpack/predef/architecture/z.h +43 -0
- data/vendor/local/include/msgpack/predef/compiler.h +41 -0
- data/vendor/local/include/msgpack/predef/compiler/borland.h +64 -0
- data/vendor/local/include/msgpack/predef/compiler/clang.h +57 -0
- data/vendor/local/include/msgpack/predef/compiler/comeau.h +62 -0
- data/vendor/local/include/msgpack/predef/compiler/compaq.h +67 -0
- data/vendor/local/include/msgpack/predef/compiler/diab.h +57 -0
- data/vendor/local/include/msgpack/predef/compiler/digitalmars.h +57 -0
- data/vendor/local/include/msgpack/predef/compiler/dignus.h +57 -0
- data/vendor/local/include/msgpack/predef/compiler/edg.h +57 -0
- data/vendor/local/include/msgpack/predef/compiler/ekopath.h +58 -0
- data/vendor/local/include/msgpack/predef/compiler/gcc.h +69 -0
- data/vendor/local/include/msgpack/predef/compiler/gcc_xml.h +53 -0
- data/vendor/local/include/msgpack/predef/compiler/greenhills.h +67 -0
- data/vendor/local/include/msgpack/predef/compiler/hp_acc.h +62 -0
- data/vendor/local/include/msgpack/predef/compiler/iar.h +57 -0
- data/vendor/local/include/msgpack/predef/compiler/ibm.h +73 -0
- data/vendor/local/include/msgpack/predef/compiler/intel.h +66 -0
- data/vendor/local/include/msgpack/predef/compiler/kai.h +57 -0
- data/vendor/local/include/msgpack/predef/compiler/llvm.h +58 -0
- data/vendor/local/include/msgpack/predef/compiler/metaware.h +54 -0
- data/vendor/local/include/msgpack/predef/compiler/metrowerks.h +78 -0
- data/vendor/local/include/msgpack/predef/compiler/microtec.h +54 -0
- data/vendor/local/include/msgpack/predef/compiler/mpw.h +64 -0
- data/vendor/local/include/msgpack/predef/compiler/palm.h +57 -0
- data/vendor/local/include/msgpack/predef/compiler/pgi.h +61 -0
- data/vendor/local/include/msgpack/predef/compiler/sgi_mipspro.h +67 -0
- data/vendor/local/include/msgpack/predef/compiler/sunpro.h +67 -0
- data/vendor/local/include/msgpack/predef/compiler/tendra.h +54 -0
- data/vendor/local/include/msgpack/predef/compiler/visualc.h +92 -0
- data/vendor/local/include/msgpack/predef/compiler/watcom.h +57 -0
- data/vendor/local/include/msgpack/predef/detail/_cassert.h +17 -0
- data/vendor/local/include/msgpack/predef/detail/_exception.h +15 -0
- data/vendor/local/include/msgpack/predef/detail/comp_detected.h +10 -0
- data/vendor/local/include/msgpack/predef/detail/endian_compat.h +26 -0
- data/vendor/local/include/msgpack/predef/detail/os_detected.h +10 -0
- data/vendor/local/include/msgpack/predef/detail/platform_detected.h +10 -0
- data/vendor/local/include/msgpack/predef/detail/test.h +17 -0
- data/vendor/local/include/msgpack/predef/language.h +15 -0
- data/vendor/local/include/msgpack/predef/language/objc.h +43 -0
- data/vendor/local/include/msgpack/predef/language/stdc.h +54 -0
- data/vendor/local/include/msgpack/predef/language/stdcpp.h +124 -0
- data/vendor/local/include/msgpack/predef/library.h +14 -0
- data/vendor/local/include/msgpack/predef/library/c.h +18 -0
- data/vendor/local/include/msgpack/predef/library/c/_prefix.h +13 -0
- data/vendor/local/include/msgpack/predef/library/c/gnu.h +62 -0
- data/vendor/local/include/msgpack/predef/library/c/uc.h +48 -0
- data/vendor/local/include/msgpack/predef/library/c/vms.h +48 -0
- data/vendor/local/include/msgpack/predef/library/c/zos.h +57 -0
- data/vendor/local/include/msgpack/predef/library/std.h +23 -0
- data/vendor/local/include/msgpack/predef/library/std/_prefix.h +23 -0
- data/vendor/local/include/msgpack/predef/library/std/cxx.h +47 -0
- data/vendor/local/include/msgpack/predef/library/std/dinkumware.h +53 -0
- data/vendor/local/include/msgpack/predef/library/std/libcomo.h +48 -0
- data/vendor/local/include/msgpack/predef/library/std/modena.h +46 -0
- data/vendor/local/include/msgpack/predef/library/std/msl.h +54 -0
- data/vendor/local/include/msgpack/predef/library/std/roguewave.h +57 -0
- data/vendor/local/include/msgpack/predef/library/std/sgi.h +52 -0
- data/vendor/local/include/msgpack/predef/library/std/stdcpp3.h +54 -0
- data/vendor/local/include/msgpack/predef/library/std/stlport.h +60 -0
- data/vendor/local/include/msgpack/predef/library/std/vacpp.h +45 -0
- data/vendor/local/include/msgpack/predef/make.h +89 -0
- data/vendor/local/include/msgpack/predef/os.h +31 -0
- data/vendor/local/include/msgpack/predef/os/aix.h +67 -0
- data/vendor/local/include/msgpack/predef/os/amigaos.h +47 -0
- data/vendor/local/include/msgpack/predef/os/android.h +46 -0
- data/vendor/local/include/msgpack/predef/os/beos.h +46 -0
- data/vendor/local/include/msgpack/predef/os/bsd.h +95 -0
- data/vendor/local/include/msgpack/predef/os/bsd/bsdi.h +48 -0
- data/vendor/local/include/msgpack/predef/os/bsd/dragonfly.h +50 -0
- data/vendor/local/include/msgpack/predef/os/bsd/free.h +60 -0
- data/vendor/local/include/msgpack/predef/os/bsd/net.h +84 -0
- data/vendor/local/include/msgpack/predef/os/bsd/open.h +171 -0
- data/vendor/local/include/msgpack/predef/os/cygwin.h +46 -0
- data/vendor/local/include/msgpack/predef/os/haiku.h +47 -0
- data/vendor/local/include/msgpack/predef/os/hpux.h +48 -0
- data/vendor/local/include/msgpack/predef/os/ios.h +51 -0
- data/vendor/local/include/msgpack/predef/os/irix.h +47 -0
- data/vendor/local/include/msgpack/predef/os/linux.h +47 -0
- data/vendor/local/include/msgpack/predef/os/macos.h +66 -0
- data/vendor/local/include/msgpack/predef/os/os400.h +46 -0
- data/vendor/local/include/msgpack/predef/os/qnxnto.h +60 -0
- data/vendor/local/include/msgpack/predef/os/solaris.h +47 -0
- data/vendor/local/include/msgpack/predef/os/unix.h +76 -0
- data/vendor/local/include/msgpack/predef/os/vms.h +53 -0
- data/vendor/local/include/msgpack/predef/os/windows.h +51 -0
- data/vendor/local/include/msgpack/predef/other.h +14 -0
- data/vendor/local/include/msgpack/predef/other/endian.h +205 -0
- data/vendor/local/include/msgpack/predef/platform.h +19 -0
- data/vendor/local/include/msgpack/predef/platform/mingw.h +70 -0
- data/vendor/local/include/msgpack/predef/platform/windows_desktop.h +44 -0
- data/vendor/local/include/msgpack/predef/platform/windows_phone.h +42 -0
- data/vendor/local/include/msgpack/predef/platform/windows_runtime.h +44 -0
- data/vendor/local/include/msgpack/predef/platform/windows_store.h +42 -0
- data/vendor/local/include/msgpack/predef/version.h +15 -0
- data/vendor/local/include/msgpack/predef/version_number.h +54 -0
- data/vendor/local/include/msgpack/preprocessor.hpp +19 -0
- data/vendor/local/include/msgpack/preprocessor/arithmetic.hpp +25 -0
- data/vendor/local/include/msgpack/preprocessor/arithmetic/add.hpp +51 -0
- data/vendor/local/include/msgpack/preprocessor/arithmetic/dec.hpp +288 -0
- data/vendor/local/include/msgpack/preprocessor/arithmetic/detail/div_base.hpp +61 -0
- data/vendor/local/include/msgpack/preprocessor/arithmetic/div.hpp +39 -0
- data/vendor/local/include/msgpack/preprocessor/arithmetic/inc.hpp +288 -0
- data/vendor/local/include/msgpack/preprocessor/arithmetic/mod.hpp +39 -0
- data/vendor/local/include/msgpack/preprocessor/arithmetic/mul.hpp +53 -0
- data/vendor/local/include/msgpack/preprocessor/arithmetic/sub.hpp +50 -0
- data/vendor/local/include/msgpack/preprocessor/array.hpp +32 -0
- data/vendor/local/include/msgpack/preprocessor/array/data.hpp +28 -0
- data/vendor/local/include/msgpack/preprocessor/array/detail/get_data.hpp +55 -0
- data/vendor/local/include/msgpack/preprocessor/array/elem.hpp +29 -0
- data/vendor/local/include/msgpack/preprocessor/array/enum.hpp +33 -0
- data/vendor/local/include/msgpack/preprocessor/array/insert.hpp +55 -0
- data/vendor/local/include/msgpack/preprocessor/array/pop_back.hpp +37 -0
- data/vendor/local/include/msgpack/preprocessor/array/pop_front.hpp +38 -0
- data/vendor/local/include/msgpack/preprocessor/array/push_back.hpp +35 -0
- data/vendor/local/include/msgpack/preprocessor/array/push_front.hpp +35 -0
- data/vendor/local/include/msgpack/preprocessor/array/remove.hpp +54 -0
- data/vendor/local/include/msgpack/preprocessor/array/replace.hpp +49 -0
- data/vendor/local/include/msgpack/preprocessor/array/reverse.hpp +29 -0
- data/vendor/local/include/msgpack/preprocessor/array/size.hpp +28 -0
- data/vendor/local/include/msgpack/preprocessor/array/to_list.hpp +47 -0
- data/vendor/local/include/msgpack/preprocessor/array/to_seq.hpp +46 -0
- data/vendor/local/include/msgpack/preprocessor/array/to_tuple.hpp +33 -0
- data/vendor/local/include/msgpack/preprocessor/assert_msg.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/cat.hpp +35 -0
- data/vendor/local/include/msgpack/preprocessor/comma.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/comma_if.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/comparison.hpp +24 -0
- data/vendor/local/include/msgpack/preprocessor/comparison/equal.hpp +34 -0
- data/vendor/local/include/msgpack/preprocessor/comparison/greater.hpp +38 -0
- data/vendor/local/include/msgpack/preprocessor/comparison/greater_equal.hpp +38 -0
- data/vendor/local/include/msgpack/preprocessor/comparison/less.hpp +46 -0
- data/vendor/local/include/msgpack/preprocessor/comparison/less_equal.hpp +39 -0
- data/vendor/local/include/msgpack/preprocessor/comparison/not_equal.hpp +814 -0
- data/vendor/local/include/msgpack/preprocessor/config/config.hpp +101 -0
- data/vendor/local/include/msgpack/preprocessor/config/limits.hpp +30 -0
- data/vendor/local/include/msgpack/preprocessor/control.hpp +22 -0
- data/vendor/local/include/msgpack/preprocessor/control/deduce_d.hpp +22 -0
- data/vendor/local/include/msgpack/preprocessor/control/detail/dmc/while.hpp +536 -0
- data/vendor/local/include/msgpack/preprocessor/control/detail/edg/while.hpp +534 -0
- data/vendor/local/include/msgpack/preprocessor/control/detail/msvc/while.hpp +277 -0
- data/vendor/local/include/msgpack/preprocessor/control/detail/while.hpp +536 -0
- data/vendor/local/include/msgpack/preprocessor/control/expr_if.hpp +30 -0
- data/vendor/local/include/msgpack/preprocessor/control/expr_iif.hpp +31 -0
- data/vendor/local/include/msgpack/preprocessor/control/if.hpp +30 -0
- data/vendor/local/include/msgpack/preprocessor/control/iif.hpp +34 -0
- data/vendor/local/include/msgpack/preprocessor/control/while.hpp +312 -0
- data/vendor/local/include/msgpack/preprocessor/debug.hpp +18 -0
- data/vendor/local/include/msgpack/preprocessor/debug/assert.hpp +44 -0
- data/vendor/local/include/msgpack/preprocessor/debug/error.hpp +33 -0
- data/vendor/local/include/msgpack/preprocessor/debug/line.hpp +35 -0
- data/vendor/local/include/msgpack/preprocessor/dec.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/detail/auto_rec.hpp +293 -0
- data/vendor/local/include/msgpack/preprocessor/detail/check.hpp +48 -0
- data/vendor/local/include/msgpack/preprocessor/detail/dmc/auto_rec.hpp +286 -0
- data/vendor/local/include/msgpack/preprocessor/detail/is_binary.hpp +30 -0
- data/vendor/local/include/msgpack/preprocessor/detail/is_nullary.hpp +30 -0
- data/vendor/local/include/msgpack/preprocessor/detail/is_unary.hpp +30 -0
- data/vendor/local/include/msgpack/preprocessor/detail/null.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/detail/split.hpp +35 -0
- data/vendor/local/include/msgpack/preprocessor/empty.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/enum.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/enum_params.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/enum_params_with_a_default.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/enum_params_with_defaults.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/enum_shifted.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/enum_shifted_params.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/expand.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/expr_if.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/facilities.hpp +23 -0
- data/vendor/local/include/msgpack/preprocessor/facilities/apply.hpp +34 -0
- data/vendor/local/include/msgpack/preprocessor/facilities/detail/is_empty.hpp +55 -0
- data/vendor/local/include/msgpack/preprocessor/facilities/empty.hpp +23 -0
- data/vendor/local/include/msgpack/preprocessor/facilities/expand.hpp +28 -0
- data/vendor/local/include/msgpack/preprocessor/facilities/identity.hpp +23 -0
- data/vendor/local/include/msgpack/preprocessor/facilities/intercept.hpp +277 -0
- data/vendor/local/include/msgpack/preprocessor/facilities/is_1.hpp +23 -0
- data/vendor/local/include/msgpack/preprocessor/facilities/is_empty.hpp +56 -0
- data/vendor/local/include/msgpack/preprocessor/facilities/is_empty_or_1.hpp +31 -0
- data/vendor/local/include/msgpack/preprocessor/facilities/is_empty_variadic.hpp +57 -0
- data/vendor/local/include/msgpack/preprocessor/facilities/overload.hpp +25 -0
- data/vendor/local/include/msgpack/preprocessor/for.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/identity.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/if.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/inc.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/iterate.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/iteration.hpp +19 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/bounds/lower1.hpp +99 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/bounds/lower2.hpp +99 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/bounds/lower3.hpp +99 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/bounds/lower4.hpp +99 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/bounds/lower5.hpp +99 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/bounds/upper1.hpp +99 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/bounds/upper2.hpp +99 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/bounds/upper3.hpp +99 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/bounds/upper4.hpp +99 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/bounds/upper5.hpp +99 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/finish.hpp +99 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/iter/forward1.hpp +1342 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/iter/forward2.hpp +1338 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/iter/forward3.hpp +1338 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/iter/forward4.hpp +1338 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/iter/forward5.hpp +1338 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/iter/reverse1.hpp +1296 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/iter/reverse2.hpp +1296 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/iter/reverse3.hpp +1296 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/iter/reverse4.hpp +1296 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/iter/reverse5.hpp +1296 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/local.hpp +812 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/rlocal.hpp +782 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/self.hpp +21 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/detail/start.hpp +99 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/iterate.hpp +82 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/local.hpp +26 -0
- data/vendor/local/include/msgpack/preprocessor/iteration/self.hpp +19 -0
- data/vendor/local/include/msgpack/preprocessor/library.hpp +36 -0
- data/vendor/local/include/msgpack/preprocessor/limits.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/list.hpp +37 -0
- data/vendor/local/include/msgpack/preprocessor/list/adt.hpp +73 -0
- data/vendor/local/include/msgpack/preprocessor/list/append.hpp +40 -0
- data/vendor/local/include/msgpack/preprocessor/list/at.hpp +39 -0
- data/vendor/local/include/msgpack/preprocessor/list/cat.hpp +42 -0
- data/vendor/local/include/msgpack/preprocessor/list/detail/dmc/fold_left.hpp +279 -0
- data/vendor/local/include/msgpack/preprocessor/list/detail/edg/fold_left.hpp +536 -0
- data/vendor/local/include/msgpack/preprocessor/list/detail/edg/fold_right.hpp +794 -0
- data/vendor/local/include/msgpack/preprocessor/list/detail/fold_left.hpp +279 -0
- data/vendor/local/include/msgpack/preprocessor/list/detail/fold_right.hpp +277 -0
- data/vendor/local/include/msgpack/preprocessor/list/enum.hpp +41 -0
- data/vendor/local/include/msgpack/preprocessor/list/filter.hpp +54 -0
- data/vendor/local/include/msgpack/preprocessor/list/first_n.hpp +58 -0
- data/vendor/local/include/msgpack/preprocessor/list/fold_left.hpp +303 -0
- data/vendor/local/include/msgpack/preprocessor/list/fold_right.hpp +40 -0
- data/vendor/local/include/msgpack/preprocessor/list/for_each.hpp +49 -0
- data/vendor/local/include/msgpack/preprocessor/list/for_each_i.hpp +65 -0
- data/vendor/local/include/msgpack/preprocessor/list/for_each_product.hpp +141 -0
- data/vendor/local/include/msgpack/preprocessor/list/rest_n.hpp +55 -0
- data/vendor/local/include/msgpack/preprocessor/list/reverse.hpp +40 -0
- data/vendor/local/include/msgpack/preprocessor/list/size.hpp +58 -0
- data/vendor/local/include/msgpack/preprocessor/list/to_array.hpp +155 -0
- data/vendor/local/include/msgpack/preprocessor/list/to_seq.hpp +32 -0
- data/vendor/local/include/msgpack/preprocessor/list/to_tuple.hpp +61 -0
- data/vendor/local/include/msgpack/preprocessor/list/transform.hpp +49 -0
- data/vendor/local/include/msgpack/preprocessor/logical.hpp +29 -0
- data/vendor/local/include/msgpack/preprocessor/logical/and.hpp +30 -0
- data/vendor/local/include/msgpack/preprocessor/logical/bitand.hpp +38 -0
- data/vendor/local/include/msgpack/preprocessor/logical/bitnor.hpp +38 -0
- data/vendor/local/include/msgpack/preprocessor/logical/bitor.hpp +38 -0
- data/vendor/local/include/msgpack/preprocessor/logical/bitxor.hpp +38 -0
- data/vendor/local/include/msgpack/preprocessor/logical/bool.hpp +288 -0
- data/vendor/local/include/msgpack/preprocessor/logical/compl.hpp +36 -0
- data/vendor/local/include/msgpack/preprocessor/logical/nor.hpp +30 -0
- data/vendor/local/include/msgpack/preprocessor/logical/not.hpp +30 -0
- data/vendor/local/include/msgpack/preprocessor/logical/or.hpp +30 -0
- data/vendor/local/include/msgpack/preprocessor/logical/xor.hpp +30 -0
- data/vendor/local/include/msgpack/preprocessor/max.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/min.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/punctuation.hpp +22 -0
- data/vendor/local/include/msgpack/preprocessor/punctuation/comma.hpp +21 -0
- data/vendor/local/include/msgpack/preprocessor/punctuation/comma_if.hpp +31 -0
- data/vendor/local/include/msgpack/preprocessor/punctuation/detail/is_begin_parens.hpp +48 -0
- data/vendor/local/include/msgpack/preprocessor/punctuation/is_begin_parens.hpp +51 -0
- data/vendor/local/include/msgpack/preprocessor/punctuation/paren.hpp +23 -0
- data/vendor/local/include/msgpack/preprocessor/punctuation/paren_if.hpp +38 -0
- data/vendor/local/include/msgpack/preprocessor/punctuation/remove_parens.hpp +39 -0
- data/vendor/local/include/msgpack/preprocessor/repeat.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/repeat_2nd.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/repeat_3rd.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/repeat_from_to.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/repeat_from_to_2nd.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/repeat_from_to_3rd.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/repetition.hpp +32 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/deduce_r.hpp +22 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/deduce_z.hpp +22 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/detail/dmc/for.hpp +536 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/detail/edg/for.hpp +534 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/detail/for.hpp +536 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/detail/msvc/for.hpp +277 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/enum.hpp +66 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/enum_binary_params.hpp +54 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/enum_params.hpp +41 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/enum_params_with_a_default.hpp +25 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/enum_params_with_defaults.hpp +24 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/enum_shifted.hpp +68 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/enum_shifted_binary_params.hpp +51 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/enum_shifted_params.hpp +44 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/enum_trailing.hpp +63 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/enum_trailing_binary_params.hpp +53 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/enum_trailing_params.hpp +38 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/for.hpp +306 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/repeat.hpp +825 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/repeat_from_to.hpp +87 -0
- data/vendor/local/include/msgpack/preprocessor/selection.hpp +18 -0
- data/vendor/local/include/msgpack/preprocessor/selection/max.hpp +39 -0
- data/vendor/local/include/msgpack/preprocessor/selection/min.hpp +39 -0
- data/vendor/local/include/msgpack/preprocessor/seq.hpp +44 -0
- data/vendor/local/include/msgpack/preprocessor/seq/cat.hpp +49 -0
- data/vendor/local/include/msgpack/preprocessor/seq/detail/binary_transform.hpp +48 -0
- data/vendor/local/include/msgpack/preprocessor/seq/detail/split.hpp +284 -0
- data/vendor/local/include/msgpack/preprocessor/seq/elem.hpp +304 -0
- data/vendor/local/include/msgpack/preprocessor/seq/enum.hpp +288 -0
- data/vendor/local/include/msgpack/preprocessor/seq/filter.hpp +54 -0
- data/vendor/local/include/msgpack/preprocessor/seq/first_n.hpp +30 -0
- data/vendor/local/include/msgpack/preprocessor/seq/fold_left.hpp +1070 -0
- data/vendor/local/include/msgpack/preprocessor/seq/fold_right.hpp +288 -0
- data/vendor/local/include/msgpack/preprocessor/seq/for_each.hpp +60 -0
- data/vendor/local/include/msgpack/preprocessor/seq/for_each_i.hpp +61 -0
- data/vendor/local/include/msgpack/preprocessor/seq/for_each_product.hpp +126 -0
- data/vendor/local/include/msgpack/preprocessor/seq/insert.hpp +28 -0
- data/vendor/local/include/msgpack/preprocessor/seq/pop_back.hpp +29 -0
- data/vendor/local/include/msgpack/preprocessor/seq/pop_front.hpp +27 -0
- data/vendor/local/include/msgpack/preprocessor/seq/push_back.hpp +19 -0
- data/vendor/local/include/msgpack/preprocessor/seq/push_front.hpp +19 -0
- data/vendor/local/include/msgpack/preprocessor/seq/remove.hpp +29 -0
- data/vendor/local/include/msgpack/preprocessor/seq/replace.hpp +29 -0
- data/vendor/local/include/msgpack/preprocessor/seq/rest_n.hpp +30 -0
- data/vendor/local/include/msgpack/preprocessor/seq/reverse.hpp +39 -0
- data/vendor/local/include/msgpack/preprocessor/seq/seq.hpp +44 -0
- data/vendor/local/include/msgpack/preprocessor/seq/size.hpp +547 -0
- data/vendor/local/include/msgpack/preprocessor/seq/subseq.hpp +28 -0
- data/vendor/local/include/msgpack/preprocessor/seq/to_array.hpp +28 -0
- data/vendor/local/include/msgpack/preprocessor/seq/to_list.hpp +29 -0
- data/vendor/local/include/msgpack/preprocessor/seq/to_tuple.hpp +27 -0
- data/vendor/local/include/msgpack/preprocessor/seq/transform.hpp +48 -0
- data/vendor/local/include/msgpack/preprocessor/seq/variadic_seq_to_seq.hpp +28 -0
- data/vendor/local/include/msgpack/preprocessor/slot.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/slot/counter.hpp +25 -0
- data/vendor/local/include/msgpack/preprocessor/slot/detail/counter.hpp +269 -0
- data/vendor/local/include/msgpack/preprocessor/slot/detail/def.hpp +49 -0
- data/vendor/local/include/msgpack/preprocessor/slot/detail/shared.hpp +247 -0
- data/vendor/local/include/msgpack/preprocessor/slot/detail/slot1.hpp +267 -0
- data/vendor/local/include/msgpack/preprocessor/slot/detail/slot2.hpp +267 -0
- data/vendor/local/include/msgpack/preprocessor/slot/detail/slot3.hpp +267 -0
- data/vendor/local/include/msgpack/preprocessor/slot/detail/slot4.hpp +267 -0
- data/vendor/local/include/msgpack/preprocessor/slot/detail/slot5.hpp +267 -0
- data/vendor/local/include/msgpack/preprocessor/slot/slot.hpp +32 -0
- data/vendor/local/include/msgpack/preprocessor/stringize.hpp +33 -0
- data/vendor/local/include/msgpack/preprocessor/tuple.hpp +35 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/detail/is_single_return.hpp +28 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/eat.hpp +106 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/elem.hpp +201 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/enum.hpp +22 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/insert.hpp +37 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/pop_back.hpp +64 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/pop_front.hpp +65 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/push_back.hpp +31 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/push_front.hpp +32 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/rem.hpp +149 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/remove.hpp +64 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/replace.hpp +37 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/reverse.hpp +117 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/size.hpp +28 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/to_array.hpp +39 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/to_list.hpp +118 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/to_seq.hpp +119 -0
- data/vendor/local/include/msgpack/preprocessor/variadic.hpp +23 -0
- data/vendor/local/include/msgpack/preprocessor/variadic/detail/is_single_return.hpp +28 -0
- data/vendor/local/include/msgpack/preprocessor/variadic/elem.hpp +94 -0
- data/vendor/local/include/msgpack/preprocessor/variadic/size.hpp +30 -0
- data/vendor/local/include/msgpack/preprocessor/variadic/to_array.hpp +32 -0
- data/vendor/local/include/msgpack/preprocessor/variadic/to_list.hpp +25 -0
- data/vendor/local/include/msgpack/preprocessor/variadic/to_seq.hpp +25 -0
- data/vendor/local/include/msgpack/preprocessor/variadic/to_tuple.hpp +24 -0
- data/vendor/local/include/msgpack/preprocessor/while.hpp +17 -0
- data/vendor/local/include/msgpack/preprocessor/wstringize.hpp +29 -0
- data/vendor/local/include/msgpack/sbuffer.h +3 -11
- data/vendor/local/include/msgpack/sbuffer.hpp +34 -16
- data/vendor/local/include/msgpack/sysdep.h +102 -116
- data/vendor/local/include/msgpack/type.hpp +17 -0
- data/vendor/local/include/msgpack/unpack.h +3 -11
- data/vendor/local/include/msgpack/unpack.hpp +23 -47
- data/vendor/local/include/msgpack/unpack_define.h +3 -11
- data/vendor/local/include/msgpack/unpack_template.h +322 -328
- data/vendor/local/include/msgpack/util.h +3 -11
- data/vendor/local/include/msgpack/version.h +3 -11
- data/vendor/local/include/msgpack/version.hpp +3 -11
- data/vendor/local/include/msgpack/version_master.h +2 -2
- data/vendor/local/include/msgpack/versioning.hpp +27 -35
- data/vendor/local/include/msgpack/vrefbuffer.h +3 -11
- data/vendor/local/include/msgpack/vrefbuffer.hpp +7 -11
- data/vendor/local/include/msgpack/zbuffer.h +17 -25
- data/vendor/local/include/msgpack/zbuffer.hpp +9 -13
- data/vendor/local/include/msgpack/zone.h +3 -11
- data/vendor/local/include/msgpack/zone.hpp +3 -11
- data/vendor/local/lib/groonga/plugins/functions/string.a +0 -0
- data/vendor/local/lib/groonga/plugins/functions/string.dll +0 -0
- data/vendor/local/lib/groonga/plugins/functions/string.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/functions/string.la +41 -0
- data/vendor/local/lib/groonga/plugins/functions/vector.a +0 -0
- data/vendor/local/lib/groonga/plugins/functions/vector.dll +0 -0
- data/vendor/local/lib/groonga/plugins/functions/vector.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/functions/vector.la +4 -4
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.a +0 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll +0 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.la +4 -4
- data/vendor/local/lib/groonga/plugins/ruby/eval.a +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/eval.dll +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/eval.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/eval.la +4 -4
- data/vendor/local/lib/groonga/plugins/ruby/load.a +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/load.dll +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/load.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/load.la +4 -4
- data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.la +4 -4
- data/vendor/local/lib/groonga/plugins/table/table.a +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.dll +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.la +4 -4
- data/vendor/local/lib/groonga/plugins/token_filters/stop_word.a +0 -0
- data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll +0 -0
- data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/token_filters/stop_word.la +4 -4
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.la +4 -4
- data/vendor/local/lib/groonga/scripts/ruby/accessor.rb +5 -0
- data/vendor/local/lib/groonga/scripts/ruby/command_line/grndb.rb +202 -90
- data/vendor/local/lib/groonga/scripts/ruby/command_line_parser.rb +156 -0
- data/vendor/local/lib/groonga/scripts/ruby/context.rb +2 -4
- data/vendor/local/lib/groonga/scripts/ruby/expression_rewriters.rb +5 -5
- data/vendor/local/lib/groonga/scripts/ruby/expression_size_estimator.rb +2 -1
- data/vendor/local/lib/groonga/scripts/ruby/fixed_size_column.rb +5 -0
- data/vendor/local/lib/groonga/scripts/ruby/initialize/post.rb +5 -0
- data/vendor/local/lib/groonga/scripts/ruby/logger.rb +1 -3
- data/vendor/local/lib/groonga/scripts/ruby/require.rb +4 -1
- data/vendor/local/lib/groonga/scripts/ruby/scan_info.rb +3 -0
- data/vendor/local/lib/groonga/scripts/ruby/scan_info_builder.rb +29 -1
- data/vendor/local/lib/groonga/scripts/ruby/scan_info_data.rb +18 -14
- data/vendor/local/lib/groonga/scripts/ruby/table.rb +8 -0
- data/vendor/local/lib/groonga/scripts/ruby/table_cursor.rb +2 -0
- data/vendor/local/lib/groonga/scripts/ruby/variable_size_column.rb +5 -0
- data/vendor/local/lib/libgroonga.a +0 -0
- data/vendor/local/lib/libgroonga.dll.a +0 -0
- data/vendor/local/lib/libgroonga.la +4 -4
- data/vendor/local/lib/liblz4.a +0 -0
- data/vendor/local/lib/liblz4.dll +0 -0
- data/vendor/local/lib/liblz4.dll.1 +0 -0
- data/vendor/local/lib/liblz4.dll.1.5.0 +0 -0
- data/vendor/local/lib/libmecab.a +0 -0
- data/vendor/local/lib/libmecab.dll.a +0 -0
- data/vendor/local/lib/libmecab.la +4 -4
- data/vendor/local/lib/libmsgpack.a +0 -0
- data/vendor/local/lib/libmsgpack.dll.a +0 -0
- data/vendor/local/lib/libmsgpack.la +2 -2
- data/vendor/local/lib/libmsgpackc.a +0 -0
- data/vendor/local/lib/libmsgpackc.dll.a +0 -0
- data/vendor/local/lib/libmsgpackc.la +2 -2
- data/vendor/local/lib/libonig.a +0 -0
- data/vendor/local/lib/libonig.dll.a +0 -0
- data/vendor/local/lib/libonig.la +4 -4
- data/vendor/local/lib/libz.a +0 -0
- data/vendor/local/lib/libz.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/groonga.pc +3 -3
- data/vendor/local/lib/pkgconfig/liblz4.pc +5 -5
- data/vendor/local/lib/pkgconfig/msgpack.pc +2 -2
- data/vendor/local/lib/pkgconfig/oniguruma.pc +6 -6
- data/vendor/local/lib/pkgconfig/zlib.pc +3 -3
- data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
- data/vendor/local/sbin/groonga-httpd-restart +1 -1
- data/vendor/local/sbin/groonga-httpd.exe +0 -0
- data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/release.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/install/centos.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/debian.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/fedora.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/mac_os_x.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/others.txt +5 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/solaris.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/ubuntu.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/windows.txt +9 -9
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +288 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/reference.txt +2 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/alias.txt +164 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_ctx.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_geo.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/command/command_version.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_copy.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/config_delete.txt +95 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/config_get.txt +96 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/config_set.txt +96 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/lock_acquire.txt +102 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/lock_clear.txt +10 -9
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/lock_release.txt +98 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/object_exist.txt +7 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/object_inspect.txt +385 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/object_remove.txt +140 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/reindex.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/schema.txt +627 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/table_list.txt +3 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/configuration.txt +50 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/grndb.txt +41 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/grn_expr.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/operations/geolocation_search.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/regular_expression.txt +4 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/tokenizers.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/types.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/server/memcached.txt +1 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/server/package.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_static/basic.css +1 -1
- data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/_static/pygments.css +2 -0
- data/vendor/local/share/doc/groonga/en/html/_static/searchtools.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/_static/websupport.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/client.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/community.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/development.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/development/build.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_autotools.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_cmake.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/contribution/development/build/windows_cmake.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +14 -14
- data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +57 -57
- data/vendor/local/share/doc/groonga/en/html/contribution/development/repository.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +16 -16
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +16 -16
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/introduction.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/contribution/report.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/development.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/genindex.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/index.html +117 -97
- data/vendor/local/share/doc/groonga/en/html/install.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/install/centos.html +30 -30
- data/vendor/local/share/doc/groonga/en/html/install/debian.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/install/fedora.html +20 -20
- data/vendor/local/share/doc/groonga/en/html/install/mac_os_x.html +15 -15
- data/vendor/local/share/doc/groonga/en/html/install/others.html +24 -24
- data/vendor/local/share/doc/groonga/en/html/install/solaris.html +13 -13
- data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +20 -20
- data/vendor/local/share/doc/groonga/en/html/install/windows.html +15 -15
- data/vendor/local/share/doc/groonga/en/html/limitations.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/news.html +350 -102
- data/vendor/local/share/doc/groonga/en/html/news/0.x.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/news/1.3.x.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/news/2.x.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/news/3.x.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/news/4.x.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/news/senna.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/en/html/reference.html +117 -97
- data/vendor/local/share/doc/groonga/en/html/reference/alias.html +447 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api.html +40 -40
- data/vendor/local/share/doc/groonga/en/html/reference/api/global_configurations.html +23 -23
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +30 -30
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_content_type.html +23 -23
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +28 -28
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +24 -24
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_thread.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +21 -21
- data/vendor/local/share/doc/groonga/en/html/reference/api/overview.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/plugin.html +23 -23
- data/vendor/local/share/doc/groonga/en/html/reference/cast.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/column.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/columns/index.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/columns/pseudo.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/columns/scalar.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/columns/vector.html +23 -23
- data/vendor/local/share/doc/groonga/en/html/reference/command.html +61 -53
- data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +24 -24
- data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +19 -19
- data/vendor/local/share/doc/groonga/en/html/reference/command/pretty_print.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference/command/request_id.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_copy.html +22 -22
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_rename.html +14 -14
- data/vendor/local/share/doc/groonga/en/html/reference/commands/config_delete.html +255 -0
- data/vendor/local/share/doc/groonga/en/html/reference/commands/config_get.html +239 -0
- data/vendor/local/share/doc/groonga/en/html/reference/commands/config_set.html +237 -0
- data/vendor/local/share/doc/groonga/en/html/reference/commands/database_unmap.html +35 -35
- data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +31 -31
- data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +30 -30
- data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +46 -46
- data/vendor/local/share/doc/groonga/en/html/reference/commands/io_flush.html +60 -60
- data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +35 -35
- data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_acquire.html +247 -0
- data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_clear.html +43 -42
- data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_release.html +246 -0
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +31 -31
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +33 -33
- data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_count.html +53 -53
- data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_parameters.html +43 -43
- data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_range_filter.html +63 -63
- data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_select.html +135 -135
- data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_shard_list.html +43 -43
- data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_table_remove.html +48 -48
- data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +41 -41
- data/vendor/local/share/doc/groonga/en/html/reference/commands/normalizer_list.html +29 -29
- data/vendor/local/share/doc/groonga/en/html/reference/commands/object_exist.html +43 -38
- data/vendor/local/share/doc/groonga/en/html/reference/commands/object_inspect.html +592 -0
- data/vendor/local/share/doc/groonga/en/html/reference/commands/object_remove.html +324 -0
- data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_register.html +30 -30
- data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_unregister.html +29 -29
- data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +28 -28
- data/vendor/local/share/doc/groonga/en/html/reference/commands/range_filter.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +29 -29
- data/vendor/local/share/doc/groonga/en/html/reference/commands/reindex.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/reference/commands/request_cancel.html +37 -37
- data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +33 -33
- data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_load.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/reference/commands/schema.html +1188 -0
- data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +187 -187
- data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +28 -28
- data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +41 -41
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +56 -56
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +29 -29
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +52 -52
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_rename.html +35 -35
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_tokenize.html +42 -42
- data/vendor/local/share/doc/groonga/en/html/reference/commands/thread_limit.html +37 -37
- data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +55 -55
- data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenizer_list.html +29 -29
- data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +30 -30
- data/vendor/local/share/doc/groonga/en/html/reference/configuration.html +178 -0
- data/vendor/local/share/doc/groonga/en/html/reference/executables.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grndb.html +43 -10
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-benchmark.html +14 -14
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-httpd.html +13 -13
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-learner.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +30 -30
- data/vendor/local/share/doc/groonga/en/html/reference/function.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/between.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +20 -20
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_full.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_html.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/reference/functions/html_untag.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/reference/functions/in_values.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference/functions/prefix_rk_search.html +15 -15
- data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_size.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +24 -24
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +47 -47
- data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +29 -29
- data/vendor/local/share/doc/groonga/en/html/reference/log.html +41 -41
- data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/operations.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/operations/geolocation_search.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/operations/prefix_rk_search.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/reference/output.html +16 -16
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +17 -17
- data/vendor/local/share/doc/groonga/en/html/reference/regular_expression.html +23 -23
- data/vendor/local/share/doc/groonga/en/html/reference/scorer.html +18 -18
- data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_at_most.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_idf.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/sharding.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/reference/suggest.html +35 -35
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/completion.html +40 -40
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/correction.html +31 -31
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/introduction.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/suggestion.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/reference/tables.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/token_filters.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +29 -29
- data/vendor/local/share/doc/groonga/en/html/reference/tuning.html +46 -46
- data/vendor/local/share/doc/groonga/en/html/reference/types.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/search.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/server.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/server/http.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +17 -17
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/server/memcached.html +8 -7
- data/vendor/local/share/doc/groonga/en/html/server/package.html +29 -29
- data/vendor/local/share/doc/groonga/en/html/spec.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +13 -13
- data/vendor/local/share/doc/groonga/en/html/spec/search.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +16 -16
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/mmap_cannot_allocate_memory.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +14 -14
- data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +13 -13
- data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +13 -13
- data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +18 -18
- data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +18 -18
- data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +16 -16
- data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/release.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/centos.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/debian.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/fedora.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/mac_os_x.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/others.txt +5 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/solaris.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/ubuntu.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/windows.txt +9 -9
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +288 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference.txt +2 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/alias.txt +164 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_ctx.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_geo.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/command/command_version.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_copy.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/config_delete.txt +95 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/config_get.txt +96 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/config_set.txt +96 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/lock_acquire.txt +102 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/lock_clear.txt +10 -9
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/lock_release.txt +98 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/object_exist.txt +7 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/object_inspect.txt +385 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/object_remove.txt +140 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/reindex.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/schema.txt +627 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/table_list.txt +3 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/configuration.txt +50 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/grndb.txt +41 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/grn_expr.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/operations/geolocation_search.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/regular_expression.txt +4 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/tokenizers.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/types.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/server/memcached.txt +1 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/server/package.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_static/basic.css +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_static/pygments.css +2 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_static/websupport.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/client.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/community.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/build.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_autotools.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_cmake.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/windows_cmake.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +14 -14
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +57 -57
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +16 -16
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +16 -16
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/introduction.html +12 -12
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/development.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/index.html +116 -96
- data/vendor/local/share/doc/groonga/ja/html/install.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/install/centos.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/install/debian.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +20 -20
- data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +15 -15
- data/vendor/local/share/doc/groonga/ja/html/install/others.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +13 -13
- data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +20 -20
- data/vendor/local/share/doc/groonga/ja/html/install/windows.html +15 -15
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news.html +329 -100
- data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news/1.3.x.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news/2.x.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/news/3.x.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news/4.x.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news/senna.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/reference.html +116 -96
- data/vendor/local/share/doc/groonga/ja/html/reference/alias.html +419 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api.html +40 -40
- data/vendor/local/share/doc/groonga/ja/html/reference/api/global_configurations.html +23 -23
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +26 -26
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_content_type.html +23 -23
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +26 -26
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +26 -26
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_thread.html +26 -26
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +21 -21
- data/vendor/local/share/doc/groonga/ja/html/reference/api/overview.html +26 -26
- data/vendor/local/share/doc/groonga/ja/html/reference/api/plugin.html +23 -23
- data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/column.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/index.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/pseudo.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/scalar.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/vector.html +23 -23
- data/vendor/local/share/doc/groonga/ja/html/reference/command.html +56 -48
- data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +23 -23
- data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +15 -15
- data/vendor/local/share/doc/groonga/ja/html/reference/command/pretty_print.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/reference/command/request_id.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_copy.html +22 -22
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_rename.html +14 -14
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_delete.html +254 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_get.html +235 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_set.html +234 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/database_unmap.html +35 -35
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +31 -31
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +46 -46
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/io_flush.html +60 -60
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +37 -37
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_acquire.html +242 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_clear.html +43 -43
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_release.html +242 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +31 -31
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +33 -33
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_count.html +53 -53
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_parameters.html +43 -43
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_range_filter.html +63 -63
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_select.html +135 -135
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_shard_list.html +43 -43
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_table_remove.html +48 -48
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +41 -41
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalizer_list.html +29 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_exist.html +41 -36
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_inspect.html +595 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_remove.html +306 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_register.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_unregister.html +29 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +28 -28
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/range_filter.html +26 -26
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +29 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/reindex.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/request_cancel.html +37 -37
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_eval.html +33 -33
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_load.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/schema.html +1196 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +187 -187
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +28 -28
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +33 -33
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +45 -45
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +56 -56
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +29 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +52 -52
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_rename.html +35 -35
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_tokenize.html +42 -42
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/thread_limit.html +37 -37
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenize.html +55 -55
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenizer_list.html +29 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +31 -31
- data/vendor/local/share/doc/groonga/ja/html/reference/configuration.html +167 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grndb.html +35 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-benchmark.html +14 -14
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +35 -35
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-httpd.html +13 -13
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-learner.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/function.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/between.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +20 -20
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_full.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_html.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/in_values.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/prefix_rk_search.html +15 -15
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +12 -12
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_size.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +48 -48
- data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +29 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/log.html +41 -41
- data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/operations.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/operations/geolocation_search.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/operations/prefix_rk_search.html +12 -12
- data/vendor/local/share/doc/groonga/ja/html/reference/output.html +16 -16
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +17 -17
- data/vendor/local/share/doc/groonga/ja/html/reference/regular_expression.html +23 -23
- data/vendor/local/share/doc/groonga/ja/html/reference/scorer.html +18 -18
- data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_at_most.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_idf.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/sharding.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest.html +35 -35
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/completion.html +40 -40
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/correction.html +31 -31
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/introduction.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/suggestion.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/token_filters.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +28 -28
- data/vendor/local/share/doc/groonga/ja/html/reference/tuning.html +46 -46
- data/vendor/local/share/doc/groonga/ja/html/reference/types.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/search.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/server.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/server/http.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +16 -16
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/memcached.html +8 -7
- data/vendor/local/share/doc/groonga/ja/html/server/package.html +28 -28
- data/vendor/local/share/doc/groonga/ja/html/spec.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +13 -13
- data/vendor/local/share/doc/groonga/ja/html/spec/search.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +16 -16
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/mmap_cannot_allocate_memory.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +14 -14
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +13 -13
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +13 -13
- data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +18 -18
- data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +18 -18
- data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +16 -16
- data/vendor/local/share/groonga/html/admin.old/index.html +1 -1
- data/vendor/local/share/groonga/html/admin.old/index.ja.html +1 -1
- data/vendor/local/share/groonga/html/admin.old/js/{jquery.flot-0.7.js → jquery.flot-0.8.3.js} +1540 -817
- data/vendor/local/share/groonga/html/admin.old/js/jquery.flot.license.txt +1 -1
- data/vendor/local/share/groonga/mruby/LEGAL +29 -29
- data/vendor/local/share/license/mruby/AUTHORS +3 -1
- data/vendor/local/share/license/mruby/MITL +1 -1
- data/vendor/local/share/license/mruby/README.md +13 -45
- data/vendor/local/share/license/msgpack/COPYING +4 -13
- data/vendor/local/share/license/msgpack/LICENSE_1_0.txt +23 -0
- data/vendor/local/share/license/msgpack/NOTICE +14 -0
- data/vendor/local/share/license/msgpack/{README → README.md} +4 -4
- data/vendor/local/share/man/ja/man1/groonga.1 +3429 -398
- data/vendor/local/share/man/man1/groonga.1 +3670 -500
- metadata +523 -89
- data/lib/2.0/groonga.so +0 -0
- data/vendor/local/bin/libmecab-1.dll +0 -0
- data/vendor/local/bin/libwinpthread-1.dll +0 -0
- data/vendor/local/include/groonga/groonga/conf.h +0 -42
- data/vendor/local/include/msgpack/adaptor/bool_fwd.hpp +0 -39
- data/vendor/local/include/msgpack/adaptor/char_ptr_fwd.hpp +0 -43
- data/vendor/local/include/msgpack/adaptor/cpp11/array_char_fwd.hpp +0 -45
- data/vendor/local/include/msgpack/adaptor/cpp11/array_fwd.hpp +0 -44
- data/vendor/local/include/msgpack/adaptor/cpp11/forward_list_fwd.hpp +0 -44
- data/vendor/local/include/msgpack/adaptor/cpp11/tuple_fwd.hpp +0 -62
- data/vendor/local/include/msgpack/adaptor/cpp11/unordered_map_fwd.hpp +0 -53
- data/vendor/local/include/msgpack/adaptor/cpp11/unordered_set_fwd.hpp +0 -52
- data/vendor/local/include/msgpack/adaptor/deque_fwd.hpp +0 -40
- data/vendor/local/include/msgpack/adaptor/detail/cpp03_msgpack_tuple_fwd.hpp +0 -4341
- data/vendor/local/include/msgpack/adaptor/detail/cpp11_msgpack_tuple_fwd.hpp +0 -84
- data/vendor/local/include/msgpack/adaptor/fixint_fwd.hpp +0 -100
- data/vendor/local/include/msgpack/adaptor/float_fwd.hpp +0 -44
- data/vendor/local/include/msgpack/adaptor/int_fwd.hpp +0 -100
- data/vendor/local/include/msgpack/adaptor/list_fwd.hpp +0 -40
- data/vendor/local/include/msgpack/adaptor/map_fwd.hpp +0 -69
- data/vendor/local/include/msgpack/adaptor/msgpack_tuple_fwd.hpp +0 -29
- data/vendor/local/include/msgpack/adaptor/nil_fwd.hpp +0 -51
- data/vendor/local/include/msgpack/adaptor/pair_fwd.hpp +0 -42
- data/vendor/local/include/msgpack/adaptor/raw_fwd.hpp +0 -50
- data/vendor/local/include/msgpack/adaptor/set_fwd.hpp +0 -52
- data/vendor/local/include/msgpack/adaptor/string_fwd.hpp +0 -42
- data/vendor/local/include/msgpack/adaptor/tr1/unordered_map_fwd.hpp +0 -75
- data/vendor/local/include/msgpack/adaptor/tr1/unordered_set_fwd.hpp +0 -75
- data/vendor/local/include/msgpack/adaptor/vector_bool_fwd.hpp +0 -40
- data/vendor/local/include/msgpack/adaptor/vector_char_fwd.hpp +0 -42
- data/vendor/local/include/msgpack/adaptor/vector_fwd.hpp +0 -42
- data/vendor/local/include/msgpack_fwd.hpp +0 -28
- data/vendor/local/share/license/msgpack/LICENSE +0 -202
@@ -7,7 +7,7 @@
|
|
7
7
|
<head>
|
8
8
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
9
9
|
|
10
|
-
<title>4.11. クエリ拡張 — Groonga v5.1.
|
10
|
+
<title>4.11. クエリ拡張 — Groonga v5.1.2-250-gb1f40beドキュメント</title>
|
11
11
|
|
12
12
|
<link rel="stylesheet" href="../_static/groonga.css" type="text/css" />
|
13
13
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<script type="text/javascript">
|
16
16
|
var DOCUMENTATION_OPTIONS = {
|
17
17
|
URL_ROOT: '../',
|
18
|
-
VERSION: '5.1.
|
18
|
+
VERSION: '5.1.2-250-gb1f40be',
|
19
19
|
COLLAPSE_INDEX: false,
|
20
20
|
FILE_SUFFIX: '.html',
|
21
21
|
HAS_SOURCE: true
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<script type="text/javascript" src="../_static/doctools.js"></script>
|
27
27
|
<script type="text/javascript" src="../_static/translations.js"></script>
|
28
28
|
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
29
|
-
<link rel="top" title="Groonga v5.1.
|
29
|
+
<link rel="top" title="Groonga v5.1.2-250-gb1f40beドキュメント" href="../index.html" />
|
30
30
|
<link rel="up" title="4. チュートリアル" href="../tutorial.html" />
|
31
31
|
<link rel="next" title="5. サーバー" href="../server.html" />
|
32
32
|
<link rel="prev" title="4.10. マイクロブログ検索システムの作成" href="micro_blog.html" />
|
@@ -61,7 +61,7 @@
|
|
61
61
|
<li class="right" >
|
62
62
|
<a href="micro_blog.html" title="4.10. マイクロブログ検索システムの作成"
|
63
63
|
accesskey="P">前へ</a> |</li>
|
64
|
-
<li class="nav-item nav-item-0"><a href="../index.html">Groonga v5.1.
|
64
|
+
<li class="nav-item nav-item-0"><a href="../index.html">Groonga v5.1.2-250-gb1f40beドキュメント</a> »</li>
|
65
65
|
<li class="nav-item nav-item-1"><a href="../tutorial.html" accesskey="U">4. チュートリアル</a> »</li>
|
66
66
|
</ul>
|
67
67
|
</div>
|
@@ -80,7 +80,7 @@
|
|
80
80
|
<p>クエリ拡張を使うには、文書を格納するテーブルと検索文字列と置換文字列のペアを格納する置換テーブルを作る必要があります。置換テーブルでは主キーが元の文字列、ShortText型のカラムが置換後の文字列をあらわします。</p>
|
81
81
|
<p>それでは文書テーブルと置換テーブルを作成しましょう。</p>
|
82
82
|
<p>実行例:</p>
|
83
|
-
<div class="highlight-none"><div class="highlight"><pre>table_create Doc TABLE_PAT_KEY ShortText
|
83
|
+
<div class="highlight-none"><div class="highlight"><pre><span></span>table_create Doc TABLE_PAT_KEY ShortText
|
84
84
|
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
85
85
|
column_create Doc body COLUMN_SCALAR ShortText
|
86
86
|
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
@@ -112,7 +112,7 @@ load --table Synonym
|
|
112
112
|
<h2>4.11.2. 検索<a class="headerlink" href="#search" title="このヘッドラインへのパーマリンク">¶</a></h2>
|
113
113
|
<p>では、準備した置換テーブルを使ってみます。まずは <code class="docutils literal"><span class="pre">query_expander</span></code> を使わずに <code class="docutils literal"><span class="pre">select</span></code> コマンドを実行してみましょう。</p>
|
114
114
|
<p>実行例:</p>
|
115
|
-
<div class="highlight-none"><div class="highlight"><pre>select Doc --match_columns body --query "theater"
|
115
|
+
<div class="highlight-none"><div class="highlight"><pre><span></span>select Doc --match_columns body --query "theater"
|
116
116
|
# [
|
117
117
|
# [
|
118
118
|
# 0,
|
@@ -185,7 +185,7 @@ select Doc --match_columns body --query "theatre"
|
|
185
185
|
<p>このクエリではクエリ文字列に完全に一致するレコードを返します。</p>
|
186
186
|
<p>では、 <code class="docutils literal"><span class="pre">query_expander</span></code> を <code class="docutils literal"><span class="pre">Synonym</span></code> テーブルの <code class="docutils literal"><span class="pre">body</span></code> カラムに対して使ってみましょう。</p>
|
187
187
|
<p>実行例:</p>
|
188
|
-
<div class="highlight-none"><div class="highlight"><pre>select Doc --match_columns body --query "theater" --query_expander Synonym.body
|
188
|
+
<div class="highlight-none"><div class="highlight"><pre><span></span>select Doc --match_columns body --query "theater" --query_expander Synonym.body
|
189
189
|
# [
|
190
190
|
# [
|
191
191
|
# 0,
|
@@ -326,12 +326,12 @@ select Doc --match_columns body --query "theatre" --query_expander Syn
|
|
326
326
|
<li class="right" >
|
327
327
|
<a href="micro_blog.html" title="4.10. マイクロブログ検索システムの作成"
|
328
328
|
>前へ</a> |</li>
|
329
|
-
<li class="nav-item nav-item-0"><a href="../index.html">Groonga v5.1.
|
329
|
+
<li class="nav-item nav-item-0"><a href="../index.html">Groonga v5.1.2-250-gb1f40beドキュメント</a> »</li>
|
330
330
|
<li class="nav-item nav-item-1"><a href="../tutorial.html" >4. チュートリアル</a> »</li>
|
331
331
|
</ul>
|
332
332
|
</div>
|
333
333
|
<div class="footer" role="contentinfo">
|
334
|
-
© Copyright 2009-
|
334
|
+
© Copyright 2009-2016, Brazil, Inc.
|
335
335
|
</div>
|
336
336
|
</body>
|
337
337
|
</html>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<head>
|
8
8
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
9
9
|
|
10
|
-
<title>4.4. さまざまな検索条件 — Groonga v5.1.
|
10
|
+
<title>4.4. さまざまな検索条件 — Groonga v5.1.2-250-gb1f40beドキュメント</title>
|
11
11
|
|
12
12
|
<link rel="stylesheet" href="../_static/groonga.css" type="text/css" />
|
13
13
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<script type="text/javascript">
|
16
16
|
var DOCUMENTATION_OPTIONS = {
|
17
17
|
URL_ROOT: '../',
|
18
|
-
VERSION: '5.1.
|
18
|
+
VERSION: '5.1.2-250-gb1f40be',
|
19
19
|
COLLAPSE_INDEX: false,
|
20
20
|
FILE_SUFFIX: '.html',
|
21
21
|
HAS_SOURCE: true
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<script type="text/javascript" src="../_static/doctools.js"></script>
|
27
27
|
<script type="text/javascript" src="../_static/translations.js"></script>
|
28
28
|
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
29
|
-
<link rel="top" title="Groonga v5.1.
|
29
|
+
<link rel="top" title="Groonga v5.1.2-250-gb1f40beドキュメント" href="../index.html" />
|
30
30
|
<link rel="up" title="4. チュートリアル" href="../tutorial.html" />
|
31
31
|
<link rel="next" title="4.5. ドリルダウン" href="drilldown.html" />
|
32
32
|
<link rel="prev" title="4.3. いろいろなデータの保存" href="data.html" />
|
@@ -61,7 +61,7 @@
|
|
61
61
|
<li class="right" >
|
62
62
|
<a href="data.html" title="4.3. いろいろなデータの保存"
|
63
63
|
accesskey="P">前へ</a> |</li>
|
64
|
-
<li class="nav-item nav-item-0"><a href="../index.html">Groonga v5.1.
|
64
|
+
<li class="nav-item nav-item-0"><a href="../index.html">Groonga v5.1.2-250-gb1f40beドキュメント</a> »</li>
|
65
65
|
<li class="nav-item nav-item-1"><a href="../tutorial.html" accesskey="U">4. チュートリアル</a> »</li>
|
66
66
|
</ul>
|
67
67
|
</div>
|
@@ -78,7 +78,7 @@
|
|
78
78
|
<h2>4.4.1. JavaScriptに似た文法での絞込・全文検索<a class="headerlink" href="#narrow-down-full-text-search-by-using-syntax-like-javascript" title="このヘッドラインへのパーマリンク">¶</a></h2>
|
79
79
|
<p><code class="docutils literal"><span class="pre">select</span></code> コマンドの <code class="docutils literal"><span class="pre">filter</span></code> パラメータは、レコードの検索条件を指定します。 <code class="docutils literal"><span class="pre">filter</span></code> パラメータと <code class="docutils literal"><span class="pre">query</span></code> パラメータでは、 <code class="docutils literal"><span class="pre">filter</span></code> パラメータにはJavaScriptの式に似た文法で条件を指定する点が違います。</p>
|
80
80
|
<p>実行例:</p>
|
81
|
-
<div class="highlight-none"><div class="highlight"><pre>select --table Site --filter "_id <= 1" --output_columns _id,_key
|
81
|
+
<div class="highlight-none"><div class="highlight"><pre><span></span>select --table Site --filter "_id <= 1" --output_columns _id,_key
|
82
82
|
# [
|
83
83
|
# [
|
84
84
|
# 0,
|
@@ -110,13 +110,13 @@
|
|
110
110
|
</pre></div>
|
111
111
|
</div>
|
112
112
|
<p>上記クエリの詳細をみてみましょう。 <code class="docutils literal"><span class="pre">filter</span></code> パラメータではこのように条件が指定されています:</p>
|
113
|
-
<div class="highlight-none"><div class="highlight"><pre>_id <= 1
|
113
|
+
<div class="highlight-none"><div class="highlight"><pre><span></span>_id <= 1
|
114
114
|
</pre></div>
|
115
115
|
</div>
|
116
116
|
<p>このケースでは、 <code class="docutils literal"><span class="pre">_id</span></code> の値が1以下であるという条件に合致するレコードを返します。</p>
|
117
117
|
<p>また、 <code class="docutils literal"><span class="pre">&&</span></code> や <code class="docutils literal"><span class="pre">||</span></code> を使って、条件のAND・OR指定をすることもできます。</p>
|
118
118
|
<p>実行例:</p>
|
119
|
-
<div class="highlight-none"><div class="highlight"><pre>select --table Site --filter "_id >= 4 && _id <= 6" --output_columns _id,_key
|
119
|
+
<div class="highlight-none"><div class="highlight"><pre><span></span>select --table Site --filter "_id >= 4 && _id <= 6" --output_columns _id,_key
|
120
120
|
# [
|
121
121
|
# [
|
122
122
|
# 0,
|
@@ -207,7 +207,7 @@ select --table Site --filter "_id <= 2 || _id >= 7" --output_col
|
|
207
207
|
<p><code class="docutils literal"><span class="pre">select</span></code> コマンドの <code class="docutils literal"><span class="pre">scorer</span></code> パラメータは、 全文検索を行った結果の各レコードに対して処理を行うためのパラメータです。</p>
|
208
208
|
<p><code class="docutils literal"><span class="pre">filter</span></code> パラメータと同様に、 JavaScriptの式に似た文法で様々な条件を指定することができます。</p>
|
209
209
|
<p>実行例:</p>
|
210
|
-
<div class="highlight-none"><div class="highlight"><pre>select --table Site --filter "true" --scorer "_score = rand()" --output_columns _id,_key,_score --sortby _score
|
210
|
+
<div class="highlight-none"><div class="highlight"><pre><span></span>select --table Site --filter "true" --scorer "_score = rand()" --output_columns _id,_key,_score --sortby _score
|
211
211
|
# [
|
212
212
|
# [
|
213
213
|
# 0,
|
@@ -359,12 +359,12 @@ select --table Site --filter "true" --scorer "_score = rand()&quo
|
|
359
359
|
</div>
|
360
360
|
<p>'_score'は仮想的なカラムです。全文検索のスコアが代入されています。仮想的なカラムの詳細については、 <a class="reference internal" href="../reference/columns/pseudo.html"><em>擬似カラム</em></a> を参照してください。</p>
|
361
361
|
<p>上記のクエリでは <code class="docutils literal"><span class="pre">scorer</span></code> パラメータの条件はこのとおりです:</p>
|
362
|
-
<div class="highlight-none"><div class="highlight"><pre>_score = rand()
|
362
|
+
<div class="highlight-none"><div class="highlight"><pre><span></span>_score = rand()
|
363
363
|
</pre></div>
|
364
364
|
</div>
|
365
365
|
<p>このケースでは、rand()という乱数を返す関数を用いて、全文検索のスコアを乱数で上書きしています。</p>
|
366
366
|
<p><code class="docutils literal"><span class="pre">sortby</span></code> パラメータの条件は次のとおりです:</p>
|
367
|
-
<div class="highlight-none"><div class="highlight"><pre>_score
|
367
|
+
<div class="highlight-none"><div class="highlight"><pre><span></span>_score
|
368
368
|
</pre></div>
|
369
369
|
</div>
|
370
370
|
<p>これは、スコア順に検索結果を昇順にソートすることを意味しています。</p>
|
@@ -388,7 +388,7 @@ select --table Site --filter "true" --scorer "_score = rand()&quo
|
|
388
388
|
<p>ここでは、ためしに東京駅と新宿駅とついて、世界測地系での位置情報を保存してみましょう。東京駅は緯度が35度40分52.975秒、経度が139度45分57.902秒です。新宿駅は緯度が35度41分27.316秒、経度が139度42分0.929秒です。よって、ミリ秒表記の場合はそれぞれ"128452975x503157902"/"128487316x502920929"となります。度数表記の場合はそれぞれ"35.6813819x139.7660839"/"35.6909211x139.7002581"となります。</p>
|
389
389
|
<p>ミリ秒表記で位置情報を登録してみましょう。</p>
|
390
390
|
<p>実行例:</p>
|
391
|
-
<div class="highlight-none"><div class="highlight"><pre>column_create --table Site --name location --type WGS84GeoPoint
|
391
|
+
<div class="highlight-none"><div class="highlight"><pre><span></span>column_create --table Site --name location --type WGS84GeoPoint
|
392
392
|
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
393
393
|
load --table Site
|
394
394
|
[
|
@@ -434,7 +434,7 @@ select --table Site --query "_id:1 OR _id:2" --output_columns _key,loc
|
|
434
434
|
<p><code class="docutils literal"><span class="pre">scorer</span></code> パラメータに <a class="reference internal" href="../reference/functions/geo_distance.html"><em>geo_distance</em></a> を使って計算した距離を設定します。</p>
|
435
435
|
<p>ここでは、秋葉原駅からの距離を表示させてみましょう。世界測地系では、秋葉原駅の位置は緯度が35度41分55.259秒、経度が139度46分27.188秒です。よって、geo_distance関数に与える文字列は"128515259x503187188"となります。</p>
|
436
436
|
<p>実行例:</p>
|
437
|
-
<div class="highlight-none"><div class="highlight"><pre>select --table Site --query "_id:1 OR _id:2" --output_columns _key,location,_score --scorer '_score = geo_distance(location, "128515259x503187188")'
|
437
|
+
<div class="highlight-none"><div class="highlight"><pre><span></span>select --table Site --query "_id:1 OR _id:2" --output_columns _key,location,_score --scorer '_score = geo_distance(location, "128515259x503187188")'
|
438
438
|
# [
|
439
439
|
# [
|
440
440
|
# 0,
|
@@ -478,7 +478,7 @@ select --table Site --query "_id:1 OR _id:2" --output_columns _key,loc
|
|
478
478
|
<p>結果から、東京駅と秋葉原駅は2054m、秋葉原駅と新宿駅は6720m離れているようです。</p>
|
479
479
|
<p><code class="docutils literal"><span class="pre">geo_distance</span></code> 関数は、<code class="docutils literal"><span class="pre">_score</span></code> に値を設定することで、<code class="docutils literal"><span class="pre">sortby</span></code> パラメータによるソートでも用いることができます。</p>
|
480
480
|
<p>実行例:</p>
|
481
|
-
<div class="highlight-none"><div class="highlight"><pre>select --table Site --query "_id:1 OR _id:2" --output_columns _key,location,_score --scorer '_score = geo_distance(location, "128515259x503187188")' --sortby -_score
|
481
|
+
<div class="highlight-none"><div class="highlight"><pre><span></span>select --table Site --query "_id:1 OR _id:2" --output_columns _key,location,_score --scorer '_score = geo_distance(location, "128515259x503187188")' --sortby -_score
|
482
482
|
# [
|
483
483
|
# [
|
484
484
|
# 0,
|
@@ -523,7 +523,7 @@ select --table Site --query "_id:1 OR _id:2" --output_columns _key,loc
|
|
523
523
|
<p>その場合には、 <code class="docutils literal"><span class="pre">filter</span></code> パラメータで <a class="reference internal" href="../reference/functions/geo_in_circle.html"><em>geo_in_circle</em></a> を指定します。</p>
|
524
524
|
<p>たとえば、秋葉原駅から5000m以内にあるレコードを検索してみましょう。</p>
|
525
525
|
<p>実行例:</p>
|
526
|
-
<div class="highlight-none"><div class="highlight"><pre>select --table Site --output_columns _key,location --filter 'geo_in_circle(location, "128515259x503187188", 5000)'
|
526
|
+
<div class="highlight-none"><div class="highlight"><pre><span></span>select --table Site --output_columns _key,location --filter 'geo_in_circle(location, "128515259x503187188", 5000)'
|
527
527
|
# [
|
528
528
|
# [
|
529
529
|
# 0,
|
@@ -616,12 +616,12 @@ select --table Site --query "_id:1 OR _id:2" --output_columns _key,loc
|
|
616
616
|
<li class="right" >
|
617
617
|
<a href="data.html" title="4.3. いろいろなデータの保存"
|
618
618
|
>前へ</a> |</li>
|
619
|
-
<li class="nav-item nav-item-0"><a href="../index.html">Groonga v5.1.
|
619
|
+
<li class="nav-item nav-item-0"><a href="../index.html">Groonga v5.1.2-250-gb1f40beドキュメント</a> »</li>
|
620
620
|
<li class="nav-item nav-item-1"><a href="../tutorial.html" >4. チュートリアル</a> »</li>
|
621
621
|
</ul>
|
622
622
|
</div>
|
623
623
|
<div class="footer" role="contentinfo">
|
624
|
-
© Copyright 2009-
|
624
|
+
© Copyright 2009-2016, Brazil, Inc.
|
625
625
|
</div>
|
626
626
|
</body>
|
627
627
|
</html>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<link rel="stylesheet" type="text/css" href="css/redmond/jquery-ui-1.8.18.custom.css">
|
14
14
|
<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
|
15
15
|
<script type="text/javascript" src="js/jquery-ui-1.8.18.custom.js"></script>
|
16
|
-
<script type="text/javascript" src="js/jquery.flot-0.
|
16
|
+
<script type="text/javascript" src="js/jquery.flot-0.8.3.js"></script>
|
17
17
|
<script type="text/javascript" src="js/groonga-admin.js"></script>
|
18
18
|
</head>
|
19
19
|
<body>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<link rel="stylesheet" type="text/css" href="css/redmond/jquery-ui-1.8.18.custom.css">
|
14
14
|
<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
|
15
15
|
<script type="text/javascript" src="js/jquery-ui-1.8.18.custom.js"></script>
|
16
|
-
<script type="text/javascript" src="js/jquery.flot-0.
|
16
|
+
<script type="text/javascript" src="js/jquery.flot-0.8.3.js"></script>
|
17
17
|
<script type="text/javascript" src="js/groonga-admin.js"></script>
|
18
18
|
</head>
|
19
19
|
<body>
|
data/vendor/local/share/groonga/html/admin.old/js/{jquery.flot-0.7.js → jquery.flot-0.8.3.js}
RENAMED
@@ -1,12 +1,3 @@
|
|
1
|
-
/*! Javascript plotting library for jQuery, v. 0.7.
|
2
|
-
*
|
3
|
-
* Released under the MIT license by IOLA, December 2007.
|
4
|
-
*
|
5
|
-
*/
|
6
|
-
|
7
|
-
// first an inline dependency, jquery.colorhelpers.js, we inline it here
|
8
|
-
// for convenience
|
9
|
-
|
10
1
|
/* Plugin for jQuery for working with colors.
|
11
2
|
*
|
12
3
|
* Version 1.1.
|
@@ -28,16 +19,652 @@
|
|
28
19
|
* V. 1.1: Fix error handling so e.g. parsing an empty string does
|
29
20
|
* produce a color rather than just crashing.
|
30
21
|
*/
|
31
|
-
|
22
|
+
|
23
|
+
(function($) {
|
24
|
+
$.color = {};
|
25
|
+
|
26
|
+
// construct color object with some convenient chainable helpers
|
27
|
+
$.color.make = function (r, g, b, a) {
|
28
|
+
var o = {};
|
29
|
+
o.r = r || 0;
|
30
|
+
o.g = g || 0;
|
31
|
+
o.b = b || 0;
|
32
|
+
o.a = a != null ? a : 1;
|
33
|
+
|
34
|
+
o.add = function (c, d) {
|
35
|
+
for (var i = 0; i < c.length; ++i)
|
36
|
+
o[c.charAt(i)] += d;
|
37
|
+
return o.normalize();
|
38
|
+
};
|
39
|
+
|
40
|
+
o.scale = function (c, f) {
|
41
|
+
for (var i = 0; i < c.length; ++i)
|
42
|
+
o[c.charAt(i)] *= f;
|
43
|
+
return o.normalize();
|
44
|
+
};
|
45
|
+
|
46
|
+
o.toString = function () {
|
47
|
+
if (o.a >= 1.0) {
|
48
|
+
return "rgb("+[o.r, o.g, o.b].join(",")+")";
|
49
|
+
} else {
|
50
|
+
return "rgba("+[o.r, o.g, o.b, o.a].join(",")+")";
|
51
|
+
}
|
52
|
+
};
|
53
|
+
|
54
|
+
o.normalize = function () {
|
55
|
+
function clamp(min, value, max) {
|
56
|
+
return value < min ? min: (value > max ? max: value);
|
57
|
+
}
|
58
|
+
|
59
|
+
o.r = clamp(0, parseInt(o.r), 255);
|
60
|
+
o.g = clamp(0, parseInt(o.g), 255);
|
61
|
+
o.b = clamp(0, parseInt(o.b), 255);
|
62
|
+
o.a = clamp(0, o.a, 1);
|
63
|
+
return o;
|
64
|
+
};
|
65
|
+
|
66
|
+
o.clone = function () {
|
67
|
+
return $.color.make(o.r, o.b, o.g, o.a);
|
68
|
+
};
|
69
|
+
|
70
|
+
return o.normalize();
|
71
|
+
}
|
72
|
+
|
73
|
+
// extract CSS color property from element, going up in the DOM
|
74
|
+
// if it's "transparent"
|
75
|
+
$.color.extract = function (elem, css) {
|
76
|
+
var c;
|
77
|
+
|
78
|
+
do {
|
79
|
+
c = elem.css(css).toLowerCase();
|
80
|
+
// keep going until we find an element that has color, or
|
81
|
+
// we hit the body or root (have no parent)
|
82
|
+
if (c != '' && c != 'transparent')
|
83
|
+
break;
|
84
|
+
elem = elem.parent();
|
85
|
+
} while (elem.length && !$.nodeName(elem.get(0), "body"));
|
86
|
+
|
87
|
+
// catch Safari's way of signalling transparent
|
88
|
+
if (c == "rgba(0, 0, 0, 0)")
|
89
|
+
c = "transparent";
|
90
|
+
|
91
|
+
return $.color.parse(c);
|
92
|
+
}
|
93
|
+
|
94
|
+
// parse CSS color string (like "rgb(10, 32, 43)" or "#fff"),
|
95
|
+
// returns color object, if parsing failed, you get black (0, 0,
|
96
|
+
// 0) out
|
97
|
+
$.color.parse = function (str) {
|
98
|
+
var res, m = $.color.make;
|
99
|
+
|
100
|
+
// Look for rgb(num,num,num)
|
101
|
+
if (res = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))
|
102
|
+
return m(parseInt(res[1], 10), parseInt(res[2], 10), parseInt(res[3], 10));
|
103
|
+
|
104
|
+
// Look for rgba(num,num,num,num)
|
105
|
+
if (res = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))
|
106
|
+
return m(parseInt(res[1], 10), parseInt(res[2], 10), parseInt(res[3], 10), parseFloat(res[4]));
|
107
|
+
|
108
|
+
// Look for rgb(num%,num%,num%)
|
109
|
+
if (res = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))
|
110
|
+
return m(parseFloat(res[1])*2.55, parseFloat(res[2])*2.55, parseFloat(res[3])*2.55);
|
111
|
+
|
112
|
+
// Look for rgba(num%,num%,num%,num)
|
113
|
+
if (res = /rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))
|
114
|
+
return m(parseFloat(res[1])*2.55, parseFloat(res[2])*2.55, parseFloat(res[3])*2.55, parseFloat(res[4]));
|
115
|
+
|
116
|
+
// Look for #a0b1c2
|
117
|
+
if (res = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))
|
118
|
+
return m(parseInt(res[1], 16), parseInt(res[2], 16), parseInt(res[3], 16));
|
119
|
+
|
120
|
+
// Look for #fff
|
121
|
+
if (res = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))
|
122
|
+
return m(parseInt(res[1]+res[1], 16), parseInt(res[2]+res[2], 16), parseInt(res[3]+res[3], 16));
|
123
|
+
|
124
|
+
// Otherwise, we're most likely dealing with a named color
|
125
|
+
var name = $.trim(str).toLowerCase();
|
126
|
+
if (name == "transparent")
|
127
|
+
return m(255, 255, 255, 0);
|
128
|
+
else {
|
129
|
+
// default to black
|
130
|
+
res = lookupColors[name] || [0, 0, 0];
|
131
|
+
return m(res[0], res[1], res[2]);
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
var lookupColors = {
|
136
|
+
aqua:[0,255,255],
|
137
|
+
azure:[240,255,255],
|
138
|
+
beige:[245,245,220],
|
139
|
+
black:[0,0,0],
|
140
|
+
blue:[0,0,255],
|
141
|
+
brown:[165,42,42],
|
142
|
+
cyan:[0,255,255],
|
143
|
+
darkblue:[0,0,139],
|
144
|
+
darkcyan:[0,139,139],
|
145
|
+
darkgrey:[169,169,169],
|
146
|
+
darkgreen:[0,100,0],
|
147
|
+
darkkhaki:[189,183,107],
|
148
|
+
darkmagenta:[139,0,139],
|
149
|
+
darkolivegreen:[85,107,47],
|
150
|
+
darkorange:[255,140,0],
|
151
|
+
darkorchid:[153,50,204],
|
152
|
+
darkred:[139,0,0],
|
153
|
+
darksalmon:[233,150,122],
|
154
|
+
darkviolet:[148,0,211],
|
155
|
+
fuchsia:[255,0,255],
|
156
|
+
gold:[255,215,0],
|
157
|
+
green:[0,128,0],
|
158
|
+
indigo:[75,0,130],
|
159
|
+
khaki:[240,230,140],
|
160
|
+
lightblue:[173,216,230],
|
161
|
+
lightcyan:[224,255,255],
|
162
|
+
lightgreen:[144,238,144],
|
163
|
+
lightgrey:[211,211,211],
|
164
|
+
lightpink:[255,182,193],
|
165
|
+
lightyellow:[255,255,224],
|
166
|
+
lime:[0,255,0],
|
167
|
+
magenta:[255,0,255],
|
168
|
+
maroon:[128,0,0],
|
169
|
+
navy:[0,0,128],
|
170
|
+
olive:[128,128,0],
|
171
|
+
orange:[255,165,0],
|
172
|
+
pink:[255,192,203],
|
173
|
+
purple:[128,0,128],
|
174
|
+
violet:[128,0,128],
|
175
|
+
red:[255,0,0],
|
176
|
+
silver:[192,192,192],
|
177
|
+
white:[255,255,255],
|
178
|
+
yellow:[255,255,0]
|
179
|
+
};
|
180
|
+
})(jQuery);
|
181
|
+
/* Javascript plotting library for jQuery, version 0.8.3.
|
182
|
+
|
183
|
+
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
184
|
+
Licensed under the MIT license.
|
185
|
+
|
186
|
+
*/
|
32
187
|
|
33
188
|
// the actual Flot code
|
34
189
|
(function($) {
|
190
|
+
|
191
|
+
// Cache the prototype hasOwnProperty for faster access
|
192
|
+
|
193
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
194
|
+
|
195
|
+
// A shim to provide 'detach' to jQuery versions prior to 1.4. Using a DOM
|
196
|
+
// operation produces the same effect as detach, i.e. removing the element
|
197
|
+
// without touching its jQuery data.
|
198
|
+
|
199
|
+
// Do not merge this into Flot 0.9, since it requires jQuery 1.4.4+.
|
200
|
+
|
201
|
+
if (!$.fn.detach) {
|
202
|
+
$.fn.detach = function() {
|
203
|
+
return this.each(function() {
|
204
|
+
if (this.parentNode) {
|
205
|
+
this.parentNode.removeChild( this );
|
206
|
+
}
|
207
|
+
});
|
208
|
+
};
|
209
|
+
}
|
210
|
+
|
211
|
+
///////////////////////////////////////////////////////////////////////////
|
212
|
+
// The Canvas object is a wrapper around an HTML5 <canvas> tag.
|
213
|
+
//
|
214
|
+
// @constructor
|
215
|
+
// @param {string} cls List of classes to apply to the canvas.
|
216
|
+
// @param {element} container Element onto which to append the canvas.
|
217
|
+
//
|
218
|
+
// Requiring a container is a little iffy, but unfortunately canvas
|
219
|
+
// operations don't work unless the canvas is attached to the DOM.
|
220
|
+
|
221
|
+
function Canvas(cls, container) {
|
222
|
+
|
223
|
+
var element = container.children("." + cls)[0];
|
224
|
+
|
225
|
+
if (element == null) {
|
226
|
+
|
227
|
+
element = document.createElement("canvas");
|
228
|
+
element.className = cls;
|
229
|
+
|
230
|
+
$(element).css({ direction: "ltr", position: "absolute", left: 0, top: 0 })
|
231
|
+
.appendTo(container);
|
232
|
+
|
233
|
+
// If HTML5 Canvas isn't available, fall back to [Ex|Flash]canvas
|
234
|
+
|
235
|
+
if (!element.getContext) {
|
236
|
+
if (window.G_vmlCanvasManager) {
|
237
|
+
element = window.G_vmlCanvasManager.initElement(element);
|
238
|
+
} else {
|
239
|
+
throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");
|
240
|
+
}
|
241
|
+
}
|
242
|
+
}
|
243
|
+
|
244
|
+
this.element = element;
|
245
|
+
|
246
|
+
var context = this.context = element.getContext("2d");
|
247
|
+
|
248
|
+
// Determine the screen's ratio of physical to device-independent
|
249
|
+
// pixels. This is the ratio between the canvas width that the browser
|
250
|
+
// advertises and the number of pixels actually present in that space.
|
251
|
+
|
252
|
+
// The iPhone 4, for example, has a device-independent width of 320px,
|
253
|
+
// but its screen is actually 640px wide. It therefore has a pixel
|
254
|
+
// ratio of 2, while most normal devices have a ratio of 1.
|
255
|
+
|
256
|
+
var devicePixelRatio = window.devicePixelRatio || 1,
|
257
|
+
backingStoreRatio =
|
258
|
+
context.webkitBackingStorePixelRatio ||
|
259
|
+
context.mozBackingStorePixelRatio ||
|
260
|
+
context.msBackingStorePixelRatio ||
|
261
|
+
context.oBackingStorePixelRatio ||
|
262
|
+
context.backingStorePixelRatio || 1;
|
263
|
+
|
264
|
+
this.pixelRatio = devicePixelRatio / backingStoreRatio;
|
265
|
+
|
266
|
+
// Size the canvas to match the internal dimensions of its container
|
267
|
+
|
268
|
+
this.resize(container.width(), container.height());
|
269
|
+
|
270
|
+
// Collection of HTML div layers for text overlaid onto the canvas
|
271
|
+
|
272
|
+
this.textContainer = null;
|
273
|
+
this.text = {};
|
274
|
+
|
275
|
+
// Cache of text fragments and metrics, so we can avoid expensively
|
276
|
+
// re-calculating them when the plot is re-rendered in a loop.
|
277
|
+
|
278
|
+
this._textCache = {};
|
279
|
+
}
|
280
|
+
|
281
|
+
// Resizes the canvas to the given dimensions.
|
282
|
+
//
|
283
|
+
// @param {number} width New width of the canvas, in pixels.
|
284
|
+
// @param {number} width New height of the canvas, in pixels.
|
285
|
+
|
286
|
+
Canvas.prototype.resize = function(width, height) {
|
287
|
+
|
288
|
+
if (width <= 0 || height <= 0) {
|
289
|
+
throw new Error("Invalid dimensions for plot, width = " + width + ", height = " + height);
|
290
|
+
}
|
291
|
+
|
292
|
+
var element = this.element,
|
293
|
+
context = this.context,
|
294
|
+
pixelRatio = this.pixelRatio;
|
295
|
+
|
296
|
+
// Resize the canvas, increasing its density based on the display's
|
297
|
+
// pixel ratio; basically giving it more pixels without increasing the
|
298
|
+
// size of its element, to take advantage of the fact that retina
|
299
|
+
// displays have that many more pixels in the same advertised space.
|
300
|
+
|
301
|
+
// Resizing should reset the state (excanvas seems to be buggy though)
|
302
|
+
|
303
|
+
if (this.width != width) {
|
304
|
+
element.width = width * pixelRatio;
|
305
|
+
element.style.width = width + "px";
|
306
|
+
this.width = width;
|
307
|
+
}
|
308
|
+
|
309
|
+
if (this.height != height) {
|
310
|
+
element.height = height * pixelRatio;
|
311
|
+
element.style.height = height + "px";
|
312
|
+
this.height = height;
|
313
|
+
}
|
314
|
+
|
315
|
+
// Save the context, so we can reset in case we get replotted. The
|
316
|
+
// restore ensure that we're really back at the initial state, and
|
317
|
+
// should be safe even if we haven't saved the initial state yet.
|
318
|
+
|
319
|
+
context.restore();
|
320
|
+
context.save();
|
321
|
+
|
322
|
+
// Scale the coordinate space to match the display density; so even though we
|
323
|
+
// may have twice as many pixels, we still want lines and other drawing to
|
324
|
+
// appear at the same size; the extra pixels will just make them crisper.
|
325
|
+
|
326
|
+
context.scale(pixelRatio, pixelRatio);
|
327
|
+
};
|
328
|
+
|
329
|
+
// Clears the entire canvas area, not including any overlaid HTML text
|
330
|
+
|
331
|
+
Canvas.prototype.clear = function() {
|
332
|
+
this.context.clearRect(0, 0, this.width, this.height);
|
333
|
+
};
|
334
|
+
|
335
|
+
// Finishes rendering the canvas, including managing the text overlay.
|
336
|
+
|
337
|
+
Canvas.prototype.render = function() {
|
338
|
+
|
339
|
+
var cache = this._textCache;
|
340
|
+
|
341
|
+
// For each text layer, add elements marked as active that haven't
|
342
|
+
// already been rendered, and remove those that are no longer active.
|
343
|
+
|
344
|
+
for (var layerKey in cache) {
|
345
|
+
if (hasOwnProperty.call(cache, layerKey)) {
|
346
|
+
|
347
|
+
var layer = this.getTextLayer(layerKey),
|
348
|
+
layerCache = cache[layerKey];
|
349
|
+
|
350
|
+
layer.hide();
|
351
|
+
|
352
|
+
for (var styleKey in layerCache) {
|
353
|
+
if (hasOwnProperty.call(layerCache, styleKey)) {
|
354
|
+
var styleCache = layerCache[styleKey];
|
355
|
+
for (var key in styleCache) {
|
356
|
+
if (hasOwnProperty.call(styleCache, key)) {
|
357
|
+
|
358
|
+
var positions = styleCache[key].positions;
|
359
|
+
|
360
|
+
for (var i = 0, position; position = positions[i]; i++) {
|
361
|
+
if (position.active) {
|
362
|
+
if (!position.rendered) {
|
363
|
+
layer.append(position.element);
|
364
|
+
position.rendered = true;
|
365
|
+
}
|
366
|
+
} else {
|
367
|
+
positions.splice(i--, 1);
|
368
|
+
if (position.rendered) {
|
369
|
+
position.element.detach();
|
370
|
+
}
|
371
|
+
}
|
372
|
+
}
|
373
|
+
|
374
|
+
if (positions.length == 0) {
|
375
|
+
delete styleCache[key];
|
376
|
+
}
|
377
|
+
}
|
378
|
+
}
|
379
|
+
}
|
380
|
+
}
|
381
|
+
|
382
|
+
layer.show();
|
383
|
+
}
|
384
|
+
}
|
385
|
+
};
|
386
|
+
|
387
|
+
// Creates (if necessary) and returns the text overlay container.
|
388
|
+
//
|
389
|
+
// @param {string} classes String of space-separated CSS classes used to
|
390
|
+
// uniquely identify the text layer.
|
391
|
+
// @return {object} The jQuery-wrapped text-layer div.
|
392
|
+
|
393
|
+
Canvas.prototype.getTextLayer = function(classes) {
|
394
|
+
|
395
|
+
var layer = this.text[classes];
|
396
|
+
|
397
|
+
// Create the text layer if it doesn't exist
|
398
|
+
|
399
|
+
if (layer == null) {
|
400
|
+
|
401
|
+
// Create the text layer container, if it doesn't exist
|
402
|
+
|
403
|
+
if (this.textContainer == null) {
|
404
|
+
this.textContainer = $("<div class='flot-text'></div>")
|
405
|
+
.css({
|
406
|
+
position: "absolute",
|
407
|
+
top: 0,
|
408
|
+
left: 0,
|
409
|
+
bottom: 0,
|
410
|
+
right: 0,
|
411
|
+
'font-size': "smaller",
|
412
|
+
color: "#545454"
|
413
|
+
})
|
414
|
+
.insertAfter(this.element);
|
415
|
+
}
|
416
|
+
|
417
|
+
layer = this.text[classes] = $("<div></div>")
|
418
|
+
.addClass(classes)
|
419
|
+
.css({
|
420
|
+
position: "absolute",
|
421
|
+
top: 0,
|
422
|
+
left: 0,
|
423
|
+
bottom: 0,
|
424
|
+
right: 0
|
425
|
+
})
|
426
|
+
.appendTo(this.textContainer);
|
427
|
+
}
|
428
|
+
|
429
|
+
return layer;
|
430
|
+
};
|
431
|
+
|
432
|
+
// Creates (if necessary) and returns a text info object.
|
433
|
+
//
|
434
|
+
// The object looks like this:
|
435
|
+
//
|
436
|
+
// {
|
437
|
+
// width: Width of the text's wrapper div.
|
438
|
+
// height: Height of the text's wrapper div.
|
439
|
+
// element: The jQuery-wrapped HTML div containing the text.
|
440
|
+
// positions: Array of positions at which this text is drawn.
|
441
|
+
// }
|
442
|
+
//
|
443
|
+
// The positions array contains objects that look like this:
|
444
|
+
//
|
445
|
+
// {
|
446
|
+
// active: Flag indicating whether the text should be visible.
|
447
|
+
// rendered: Flag indicating whether the text is currently visible.
|
448
|
+
// element: The jQuery-wrapped HTML div containing the text.
|
449
|
+
// x: X coordinate at which to draw the text.
|
450
|
+
// y: Y coordinate at which to draw the text.
|
451
|
+
// }
|
452
|
+
//
|
453
|
+
// Each position after the first receives a clone of the original element.
|
454
|
+
//
|
455
|
+
// The idea is that that the width, height, and general 'identity' of the
|
456
|
+
// text is constant no matter where it is placed; the placements are a
|
457
|
+
// secondary property.
|
458
|
+
//
|
459
|
+
// Canvas maintains a cache of recently-used text info objects; getTextInfo
|
460
|
+
// either returns the cached element or creates a new entry.
|
461
|
+
//
|
462
|
+
// @param {string} layer A string of space-separated CSS classes uniquely
|
463
|
+
// identifying the layer containing this text.
|
464
|
+
// @param {string} text Text string to retrieve info for.
|
465
|
+
// @param {(string|object)=} font Either a string of space-separated CSS
|
466
|
+
// classes or a font-spec object, defining the text's font and style.
|
467
|
+
// @param {number=} angle Angle at which to rotate the text, in degrees.
|
468
|
+
// Angle is currently unused, it will be implemented in the future.
|
469
|
+
// @param {number=} width Maximum width of the text before it wraps.
|
470
|
+
// @return {object} a text info object.
|
471
|
+
|
472
|
+
Canvas.prototype.getTextInfo = function(layer, text, font, angle, width) {
|
473
|
+
|
474
|
+
var textStyle, layerCache, styleCache, info;
|
475
|
+
|
476
|
+
// Cast the value to a string, in case we were given a number or such
|
477
|
+
|
478
|
+
text = "" + text;
|
479
|
+
|
480
|
+
// If the font is a font-spec object, generate a CSS font definition
|
481
|
+
|
482
|
+
if (typeof font === "object") {
|
483
|
+
textStyle = font.style + " " + font.variant + " " + font.weight + " " + font.size + "px/" + font.lineHeight + "px " + font.family;
|
484
|
+
} else {
|
485
|
+
textStyle = font;
|
486
|
+
}
|
487
|
+
|
488
|
+
// Retrieve (or create) the cache for the text's layer and styles
|
489
|
+
|
490
|
+
layerCache = this._textCache[layer];
|
491
|
+
|
492
|
+
if (layerCache == null) {
|
493
|
+
layerCache = this._textCache[layer] = {};
|
494
|
+
}
|
495
|
+
|
496
|
+
styleCache = layerCache[textStyle];
|
497
|
+
|
498
|
+
if (styleCache == null) {
|
499
|
+
styleCache = layerCache[textStyle] = {};
|
500
|
+
}
|
501
|
+
|
502
|
+
info = styleCache[text];
|
503
|
+
|
504
|
+
// If we can't find a matching element in our cache, create a new one
|
505
|
+
|
506
|
+
if (info == null) {
|
507
|
+
|
508
|
+
var element = $("<div></div>").html(text)
|
509
|
+
.css({
|
510
|
+
position: "absolute",
|
511
|
+
'max-width': width,
|
512
|
+
top: -9999
|
513
|
+
})
|
514
|
+
.appendTo(this.getTextLayer(layer));
|
515
|
+
|
516
|
+
if (typeof font === "object") {
|
517
|
+
element.css({
|
518
|
+
font: textStyle,
|
519
|
+
color: font.color
|
520
|
+
});
|
521
|
+
} else if (typeof font === "string") {
|
522
|
+
element.addClass(font);
|
523
|
+
}
|
524
|
+
|
525
|
+
info = styleCache[text] = {
|
526
|
+
width: element.outerWidth(true),
|
527
|
+
height: element.outerHeight(true),
|
528
|
+
element: element,
|
529
|
+
positions: []
|
530
|
+
};
|
531
|
+
|
532
|
+
element.detach();
|
533
|
+
}
|
534
|
+
|
535
|
+
return info;
|
536
|
+
};
|
537
|
+
|
538
|
+
// Adds a text string to the canvas text overlay.
|
539
|
+
//
|
540
|
+
// The text isn't drawn immediately; it is marked as rendering, which will
|
541
|
+
// result in its addition to the canvas on the next render pass.
|
542
|
+
//
|
543
|
+
// @param {string} layer A string of space-separated CSS classes uniquely
|
544
|
+
// identifying the layer containing this text.
|
545
|
+
// @param {number} x X coordinate at which to draw the text.
|
546
|
+
// @param {number} y Y coordinate at which to draw the text.
|
547
|
+
// @param {string} text Text string to draw.
|
548
|
+
// @param {(string|object)=} font Either a string of space-separated CSS
|
549
|
+
// classes or a font-spec object, defining the text's font and style.
|
550
|
+
// @param {number=} angle Angle at which to rotate the text, in degrees.
|
551
|
+
// Angle is currently unused, it will be implemented in the future.
|
552
|
+
// @param {number=} width Maximum width of the text before it wraps.
|
553
|
+
// @param {string=} halign Horizontal alignment of the text; either "left",
|
554
|
+
// "center" or "right".
|
555
|
+
// @param {string=} valign Vertical alignment of the text; either "top",
|
556
|
+
// "middle" or "bottom".
|
557
|
+
|
558
|
+
Canvas.prototype.addText = function(layer, x, y, text, font, angle, width, halign, valign) {
|
559
|
+
|
560
|
+
var info = this.getTextInfo(layer, text, font, angle, width),
|
561
|
+
positions = info.positions;
|
562
|
+
|
563
|
+
// Tweak the div's position to match the text's alignment
|
564
|
+
|
565
|
+
if (halign == "center") {
|
566
|
+
x -= info.width / 2;
|
567
|
+
} else if (halign == "right") {
|
568
|
+
x -= info.width;
|
569
|
+
}
|
570
|
+
|
571
|
+
if (valign == "middle") {
|
572
|
+
y -= info.height / 2;
|
573
|
+
} else if (valign == "bottom") {
|
574
|
+
y -= info.height;
|
575
|
+
}
|
576
|
+
|
577
|
+
// Determine whether this text already exists at this position.
|
578
|
+
// If so, mark it for inclusion in the next render pass.
|
579
|
+
|
580
|
+
for (var i = 0, position; position = positions[i]; i++) {
|
581
|
+
if (position.x == x && position.y == y) {
|
582
|
+
position.active = true;
|
583
|
+
return;
|
584
|
+
}
|
585
|
+
}
|
586
|
+
|
587
|
+
// If the text doesn't exist at this position, create a new entry
|
588
|
+
|
589
|
+
// For the very first position we'll re-use the original element,
|
590
|
+
// while for subsequent ones we'll clone it.
|
591
|
+
|
592
|
+
position = {
|
593
|
+
active: true,
|
594
|
+
rendered: false,
|
595
|
+
element: positions.length ? info.element.clone() : info.element,
|
596
|
+
x: x,
|
597
|
+
y: y
|
598
|
+
};
|
599
|
+
|
600
|
+
positions.push(position);
|
601
|
+
|
602
|
+
// Move the element to its final position within the container
|
603
|
+
|
604
|
+
position.element.css({
|
605
|
+
top: Math.round(y),
|
606
|
+
left: Math.round(x),
|
607
|
+
'text-align': halign // In case the text wraps
|
608
|
+
});
|
609
|
+
};
|
610
|
+
|
611
|
+
// Removes one or more text strings from the canvas text overlay.
|
612
|
+
//
|
613
|
+
// If no parameters are given, all text within the layer is removed.
|
614
|
+
//
|
615
|
+
// Note that the text is not immediately removed; it is simply marked as
|
616
|
+
// inactive, which will result in its removal on the next render pass.
|
617
|
+
// This avoids the performance penalty for 'clear and redraw' behavior,
|
618
|
+
// where we potentially get rid of all text on a layer, but will likely
|
619
|
+
// add back most or all of it later, as when redrawing axes, for example.
|
620
|
+
//
|
621
|
+
// @param {string} layer A string of space-separated CSS classes uniquely
|
622
|
+
// identifying the layer containing this text.
|
623
|
+
// @param {number=} x X coordinate of the text.
|
624
|
+
// @param {number=} y Y coordinate of the text.
|
625
|
+
// @param {string=} text Text string to remove.
|
626
|
+
// @param {(string|object)=} font Either a string of space-separated CSS
|
627
|
+
// classes or a font-spec object, defining the text's font and style.
|
628
|
+
// @param {number=} angle Angle at which the text is rotated, in degrees.
|
629
|
+
// Angle is currently unused, it will be implemented in the future.
|
630
|
+
|
631
|
+
Canvas.prototype.removeText = function(layer, x, y, text, font, angle) {
|
632
|
+
if (text == null) {
|
633
|
+
var layerCache = this._textCache[layer];
|
634
|
+
if (layerCache != null) {
|
635
|
+
for (var styleKey in layerCache) {
|
636
|
+
if (hasOwnProperty.call(layerCache, styleKey)) {
|
637
|
+
var styleCache = layerCache[styleKey];
|
638
|
+
for (var key in styleCache) {
|
639
|
+
if (hasOwnProperty.call(styleCache, key)) {
|
640
|
+
var positions = styleCache[key].positions;
|
641
|
+
for (var i = 0, position; position = positions[i]; i++) {
|
642
|
+
position.active = false;
|
643
|
+
}
|
644
|
+
}
|
645
|
+
}
|
646
|
+
}
|
647
|
+
}
|
648
|
+
}
|
649
|
+
} else {
|
650
|
+
var positions = this.getTextInfo(layer, text, font, angle).positions;
|
651
|
+
for (var i = 0, position; position = positions[i]; i++) {
|
652
|
+
if (position.x == x && position.y == y) {
|
653
|
+
position.active = false;
|
654
|
+
}
|
655
|
+
}
|
656
|
+
}
|
657
|
+
};
|
658
|
+
|
659
|
+
///////////////////////////////////////////////////////////////////////////
|
660
|
+
// The top-level container for the entire plot.
|
661
|
+
|
35
662
|
function Plot(placeholder, data_, options_, plugins) {
|
36
663
|
// data is on the form:
|
37
664
|
// [ series1, series2 ... ]
|
38
665
|
// where series is either just the data as [ [x1, y1], [x2, y2], ... ]
|
39
666
|
// or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
|
40
|
-
|
667
|
+
|
41
668
|
var series = [],
|
42
669
|
options = {
|
43
670
|
// the color theme used for graphs
|
@@ -51,12 +678,14 @@
|
|
51
678
|
position: "ne", // position of default legend container within plot
|
52
679
|
margin: 5, // distance from grid edge to default legend container within plot
|
53
680
|
backgroundColor: null, // null means auto-detect
|
54
|
-
backgroundOpacity: 0.85 // set to 0 to avoid background
|
681
|
+
backgroundOpacity: 0.85, // set to 0 to avoid background
|
682
|
+
sorted: null // default to no legend sorting
|
55
683
|
},
|
56
684
|
xaxis: {
|
57
685
|
show: null, // null = auto-detect, true = always, false = never
|
58
686
|
position: "bottom", // or "top"
|
59
687
|
mode: null, // null or "time"
|
688
|
+
font: null, // null (derived from CSS in placeholder) or object like { size: 11, lineHeight: 13, style: "italic", weight: "bold", family: "sans-serif", variant: "small-caps" }
|
60
689
|
color: null, // base color, labels, ticks
|
61
690
|
tickColor: null, // possibly different color of ticks, e.g. "rgba(0,0,0,0.15)"
|
62
691
|
transform: null, // null or f: number -> number to transform axis
|
@@ -71,14 +700,9 @@
|
|
71
700
|
reserveSpace: null, // whether to reserve space even if axis isn't shown
|
72
701
|
tickLength: null, // size in pixels of ticks, or "full" for whole line
|
73
702
|
alignTicksWithAxis: null, // axis number or null for no sync
|
74
|
-
|
75
|
-
// mode specific options
|
76
703
|
tickDecimals: null, // no. of decimals, null means auto
|
77
704
|
tickSize: null, // number or [number, "unit"]
|
78
|
-
minTickSize: null
|
79
|
-
monthNames: null, // list of names of months
|
80
|
-
timeformat: null, // format string to use
|
81
|
-
twelveHourClock: false // 12 or 24 time in time mode
|
705
|
+
minTickSize: null // number or [number, "unit"]
|
82
706
|
},
|
83
707
|
yaxis: {
|
84
708
|
autoscaleMargin: 0.02,
|
@@ -97,11 +721,13 @@
|
|
97
721
|
},
|
98
722
|
lines: {
|
99
723
|
// we don't put in show: false so we can see
|
100
|
-
// whether lines were actively disabled
|
724
|
+
// whether lines were actively disabled
|
101
725
|
lineWidth: 2, // in pixels
|
102
726
|
fill: false,
|
103
727
|
fillColor: null,
|
104
728
|
steps: false
|
729
|
+
// Omit 'zero', so we can later default its value to
|
730
|
+
// match that of the 'fill' option.
|
105
731
|
},
|
106
732
|
bars: {
|
107
733
|
show: false,
|
@@ -109,10 +735,12 @@
|
|
109
735
|
barWidth: 1, // in units of the x axis
|
110
736
|
fill: true,
|
111
737
|
fillColor: null,
|
112
|
-
align: "left", // or "center"
|
113
|
-
horizontal: false
|
738
|
+
align: "left", // "left", "right", or "center"
|
739
|
+
horizontal: false,
|
740
|
+
zero: true
|
114
741
|
},
|
115
|
-
shadowSize: 3
|
742
|
+
shadowSize: 3,
|
743
|
+
highlightColor: null
|
116
744
|
},
|
117
745
|
grid: {
|
118
746
|
show: true,
|
@@ -121,6 +749,7 @@
|
|
121
749
|
backgroundColor: null, // null for transparent, else color
|
122
750
|
borderColor: null, // set if different from the grid color
|
123
751
|
tickColor: null, // color for the ticks, e.g. "rgba(0,0,0,0.15)"
|
752
|
+
margin: 0, // distance from the canvas edge to the grid
|
124
753
|
labelMargin: 5, // in pixels
|
125
754
|
axisMargin: 8, // in pixels
|
126
755
|
borderWidth: 2, // in pixels
|
@@ -134,20 +763,24 @@
|
|
134
763
|
autoHighlight: true, // highlight in case mouse is near
|
135
764
|
mouseActiveRadius: 10 // how far the mouse can be away to activate an item
|
136
765
|
},
|
766
|
+
interaction: {
|
767
|
+
redrawOverlayInterval: 1000/60 // time between updates, -1 means in same flow
|
768
|
+
},
|
137
769
|
hooks: {}
|
138
770
|
},
|
139
|
-
|
771
|
+
surface = null, // the canvas for the plot itself
|
140
772
|
overlay = null, // canvas for interactive stuff on top of plot
|
141
773
|
eventHolder = null, // jQuery object that events should be bound to
|
142
774
|
ctx = null, octx = null,
|
143
775
|
xaxes = [], yaxes = [],
|
144
776
|
plotOffset = { left: 0, right: 0, top: 0, bottom: 0},
|
145
|
-
canvasWidth = 0, canvasHeight = 0,
|
146
777
|
plotWidth = 0, plotHeight = 0,
|
147
778
|
hooks = {
|
148
779
|
processOptions: [],
|
149
780
|
processRawData: [],
|
150
781
|
processDatapoints: [],
|
782
|
+
processOffset: [],
|
783
|
+
drawBackground: [],
|
151
784
|
drawSeries: [],
|
152
785
|
draw: [],
|
153
786
|
bindEvents: [],
|
@@ -161,7 +794,7 @@
|
|
161
794
|
plot.setupGrid = setupGrid;
|
162
795
|
plot.draw = draw;
|
163
796
|
plot.getPlaceholder = function() { return placeholder; };
|
164
|
-
plot.getCanvas = function() { return
|
797
|
+
plot.getCanvas = function() { return surface.element; };
|
165
798
|
plot.getPlotOffset = function() { return plotOffset; };
|
166
799
|
plot.width = function () { return plotWidth; };
|
167
800
|
plot.height = function () { return plotHeight; };
|
@@ -190,20 +823,38 @@
|
|
190
823
|
plot.triggerRedrawOverlay = triggerRedrawOverlay;
|
191
824
|
plot.pointOffset = function(point) {
|
192
825
|
return {
|
193
|
-
left: parseInt(xaxes[axisNumber(point, "x") - 1].p2c(+point.x) + plotOffset.left),
|
194
|
-
top: parseInt(yaxes[axisNumber(point, "y") - 1].p2c(+point.y) + plotOffset.top)
|
826
|
+
left: parseInt(xaxes[axisNumber(point, "x") - 1].p2c(+point.x) + plotOffset.left, 10),
|
827
|
+
top: parseInt(yaxes[axisNumber(point, "y") - 1].p2c(+point.y) + plotOffset.top, 10)
|
195
828
|
};
|
196
829
|
};
|
197
830
|
plot.shutdown = shutdown;
|
831
|
+
plot.destroy = function () {
|
832
|
+
shutdown();
|
833
|
+
placeholder.removeData("plot").empty();
|
834
|
+
|
835
|
+
series = [];
|
836
|
+
options = null;
|
837
|
+
surface = null;
|
838
|
+
overlay = null;
|
839
|
+
eventHolder = null;
|
840
|
+
ctx = null;
|
841
|
+
octx = null;
|
842
|
+
xaxes = [];
|
843
|
+
yaxes = [];
|
844
|
+
hooks = null;
|
845
|
+
highlights = [];
|
846
|
+
plot = null;
|
847
|
+
};
|
198
848
|
plot.resize = function () {
|
199
|
-
|
200
|
-
|
201
|
-
|
849
|
+
var width = placeholder.width(),
|
850
|
+
height = placeholder.height();
|
851
|
+
surface.resize(width, height);
|
852
|
+
overlay.resize(width, height);
|
202
853
|
};
|
203
854
|
|
204
855
|
// public attributes
|
205
856
|
plot.hooks = hooks;
|
206
|
-
|
857
|
+
|
207
858
|
// initialize
|
208
859
|
initPlugins(plot);
|
209
860
|
parseOptions(options_);
|
@@ -221,40 +872,109 @@
|
|
221
872
|
}
|
222
873
|
|
223
874
|
function initPlugins() {
|
875
|
+
|
876
|
+
// References to key classes, allowing plugins to modify them
|
877
|
+
|
878
|
+
var classes = {
|
879
|
+
Canvas: Canvas
|
880
|
+
};
|
881
|
+
|
224
882
|
for (var i = 0; i < plugins.length; ++i) {
|
225
883
|
var p = plugins[i];
|
226
|
-
p.init(plot);
|
884
|
+
p.init(plot, classes);
|
227
885
|
if (p.options)
|
228
886
|
$.extend(true, options, p.options);
|
229
887
|
}
|
230
888
|
}
|
231
|
-
|
889
|
+
|
232
890
|
function parseOptions(opts) {
|
233
|
-
|
234
|
-
|
891
|
+
|
235
892
|
$.extend(true, options, opts);
|
236
|
-
|
893
|
+
|
894
|
+
// $.extend merges arrays, rather than replacing them. When less
|
895
|
+
// colors are provided than the size of the default palette, we
|
896
|
+
// end up with those colors plus the remaining defaults, which is
|
897
|
+
// not expected behavior; avoid it by replacing them here.
|
898
|
+
|
899
|
+
if (opts && opts.colors) {
|
900
|
+
options.colors = opts.colors;
|
901
|
+
}
|
902
|
+
|
237
903
|
if (options.xaxis.color == null)
|
238
|
-
options.xaxis.color = options.grid.color;
|
904
|
+
options.xaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();
|
239
905
|
if (options.yaxis.color == null)
|
240
|
-
options.yaxis.color = options.grid.color;
|
241
|
-
|
242
|
-
if (options.xaxis.tickColor == null) //
|
243
|
-
options.xaxis.tickColor = options.grid.tickColor;
|
244
|
-
if (options.yaxis.tickColor == null) //
|
245
|
-
options.yaxis.tickColor = options.grid.tickColor;
|
906
|
+
options.yaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();
|
907
|
+
|
908
|
+
if (options.xaxis.tickColor == null) // grid.tickColor for back-compatibility
|
909
|
+
options.xaxis.tickColor = options.grid.tickColor || options.xaxis.color;
|
910
|
+
if (options.yaxis.tickColor == null) // grid.tickColor for back-compatibility
|
911
|
+
options.yaxis.tickColor = options.grid.tickColor || options.yaxis.color;
|
246
912
|
|
247
913
|
if (options.grid.borderColor == null)
|
248
914
|
options.grid.borderColor = options.grid.color;
|
249
915
|
if (options.grid.tickColor == null)
|
250
916
|
options.grid.tickColor = $.color.parse(options.grid.color).scale('a', 0.22).toString();
|
251
|
-
|
252
|
-
//
|
253
|
-
//
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
917
|
+
|
918
|
+
// Fill in defaults for axis options, including any unspecified
|
919
|
+
// font-spec fields, if a font-spec was provided.
|
920
|
+
|
921
|
+
// If no x/y axis options were provided, create one of each anyway,
|
922
|
+
// since the rest of the code assumes that they exist.
|
923
|
+
|
924
|
+
var i, axisOptions, axisCount,
|
925
|
+
fontSize = placeholder.css("font-size"),
|
926
|
+
fontSizeDefault = fontSize ? +fontSize.replace("px", "") : 13,
|
927
|
+
fontDefaults = {
|
928
|
+
style: placeholder.css("font-style"),
|
929
|
+
size: Math.round(0.8 * fontSizeDefault),
|
930
|
+
variant: placeholder.css("font-variant"),
|
931
|
+
weight: placeholder.css("font-weight"),
|
932
|
+
family: placeholder.css("font-family")
|
933
|
+
};
|
934
|
+
|
935
|
+
axisCount = options.xaxes.length || 1;
|
936
|
+
for (i = 0; i < axisCount; ++i) {
|
937
|
+
|
938
|
+
axisOptions = options.xaxes[i];
|
939
|
+
if (axisOptions && !axisOptions.tickColor) {
|
940
|
+
axisOptions.tickColor = axisOptions.color;
|
941
|
+
}
|
942
|
+
|
943
|
+
axisOptions = $.extend(true, {}, options.xaxis, axisOptions);
|
944
|
+
options.xaxes[i] = axisOptions;
|
945
|
+
|
946
|
+
if (axisOptions.font) {
|
947
|
+
axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);
|
948
|
+
if (!axisOptions.font.color) {
|
949
|
+
axisOptions.font.color = axisOptions.color;
|
950
|
+
}
|
951
|
+
if (!axisOptions.font.lineHeight) {
|
952
|
+
axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15);
|
953
|
+
}
|
954
|
+
}
|
955
|
+
}
|
956
|
+
|
957
|
+
axisCount = options.yaxes.length || 1;
|
958
|
+
for (i = 0; i < axisCount; ++i) {
|
959
|
+
|
960
|
+
axisOptions = options.yaxes[i];
|
961
|
+
if (axisOptions && !axisOptions.tickColor) {
|
962
|
+
axisOptions.tickColor = axisOptions.color;
|
963
|
+
}
|
964
|
+
|
965
|
+
axisOptions = $.extend(true, {}, options.yaxis, axisOptions);
|
966
|
+
options.yaxes[i] = axisOptions;
|
967
|
+
|
968
|
+
if (axisOptions.font) {
|
969
|
+
axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);
|
970
|
+
if (!axisOptions.font.color) {
|
971
|
+
axisOptions.font.color = axisOptions.color;
|
972
|
+
}
|
973
|
+
if (!axisOptions.font.lineHeight) {
|
974
|
+
axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15);
|
975
|
+
}
|
976
|
+
}
|
977
|
+
}
|
258
978
|
|
259
979
|
// backwards compatibility, to be removed in future
|
260
980
|
if (options.xaxis.noTicks && options.xaxis.ticks == null)
|
@@ -264,10 +984,24 @@
|
|
264
984
|
if (options.x2axis) {
|
265
985
|
options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis);
|
266
986
|
options.xaxes[1].position = "top";
|
987
|
+
// Override the inherit to allow the axis to auto-scale
|
988
|
+
if (options.x2axis.min == null) {
|
989
|
+
options.xaxes[1].min = null;
|
990
|
+
}
|
991
|
+
if (options.x2axis.max == null) {
|
992
|
+
options.xaxes[1].max = null;
|
993
|
+
}
|
267
994
|
}
|
268
995
|
if (options.y2axis) {
|
269
996
|
options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis);
|
270
997
|
options.yaxes[1].position = "right";
|
998
|
+
// Override the inherit to allow the axis to auto-scale
|
999
|
+
if (options.y2axis.min == null) {
|
1000
|
+
options.yaxes[1].min = null;
|
1001
|
+
}
|
1002
|
+
if (options.y2axis.max == null) {
|
1003
|
+
options.yaxes[1].max = null;
|
1004
|
+
}
|
271
1005
|
}
|
272
1006
|
if (options.grid.coloredAreas)
|
273
1007
|
options.grid.markings = options.grid.coloredAreas;
|
@@ -281,6 +1015,8 @@
|
|
281
1015
|
$.extend(true, options.series.bars, options.bars);
|
282
1016
|
if (options.shadowSize != null)
|
283
1017
|
options.series.shadowSize = options.shadowSize;
|
1018
|
+
if (options.highlightColor != null)
|
1019
|
+
options.series.highlightColor = options.highlightColor;
|
284
1020
|
|
285
1021
|
// save options on axes for future reference
|
286
1022
|
for (i = 0; i < options.xaxes.length; ++i)
|
@@ -301,7 +1037,7 @@
|
|
301
1037
|
fillInSeriesOptions();
|
302
1038
|
processData();
|
303
1039
|
}
|
304
|
-
|
1040
|
+
|
305
1041
|
function parseData(d) {
|
306
1042
|
var res = [];
|
307
1043
|
for (var i = 0; i < d.length; ++i) {
|
@@ -322,7 +1058,7 @@
|
|
322
1058
|
|
323
1059
|
return res;
|
324
1060
|
}
|
325
|
-
|
1061
|
+
|
326
1062
|
function axisNumber(obj, coord) {
|
327
1063
|
var a = obj[coord + "axis"];
|
328
1064
|
if (typeof a == "object") // if we got a real axis, extract number
|
@@ -336,9 +1072,9 @@
|
|
336
1072
|
// return flat array without annoying null entries
|
337
1073
|
return $.grep(xaxes.concat(yaxes), function (a) { return a; });
|
338
1074
|
}
|
339
|
-
|
1075
|
+
|
340
1076
|
function canvasToAxisCoords(pos) {
|
341
|
-
// return an object with x/y corresponding to all used axes
|
1077
|
+
// return an object with x/y corresponding to all used axes
|
342
1078
|
var res = {}, i, axis;
|
343
1079
|
for (i = 0; i < xaxes.length; ++i) {
|
344
1080
|
axis = xaxes[i];
|
@@ -351,7 +1087,7 @@
|
|
351
1087
|
if (axis && axis.used)
|
352
1088
|
res["y" + axis.n] = axis.c2p(pos.top);
|
353
1089
|
}
|
354
|
-
|
1090
|
+
|
355
1091
|
if (res.x1 !== undefined)
|
356
1092
|
res.x = res.x1;
|
357
1093
|
if (res.y1 !== undefined)
|
@@ -359,7 +1095,7 @@
|
|
359
1095
|
|
360
1096
|
return res;
|
361
1097
|
}
|
362
|
-
|
1098
|
+
|
363
1099
|
function axisToCanvasCoords(pos) {
|
364
1100
|
// get canvas coords from the first pair of x/y found in pos
|
365
1101
|
var res = {}, i, axis, key;
|
@@ -377,7 +1113,7 @@
|
|
377
1113
|
}
|
378
1114
|
}
|
379
1115
|
}
|
380
|
-
|
1116
|
+
|
381
1117
|
for (i = 0; i < yaxes.length; ++i) {
|
382
1118
|
axis = yaxes[i];
|
383
1119
|
if (axis && axis.used) {
|
@@ -391,10 +1127,10 @@
|
|
391
1127
|
}
|
392
1128
|
}
|
393
1129
|
}
|
394
|
-
|
1130
|
+
|
395
1131
|
return res;
|
396
1132
|
}
|
397
|
-
|
1133
|
+
|
398
1134
|
function getOrCreateAxis(axes, number) {
|
399
1135
|
if (!axes[number - 1])
|
400
1136
|
axes[number - 1] = {
|
@@ -402,64 +1138,69 @@
|
|
402
1138
|
direction: axes == xaxes ? "x" : "y",
|
403
1139
|
options: $.extend(true, {}, axes == xaxes ? options.xaxis : options.yaxis)
|
404
1140
|
};
|
405
|
-
|
1141
|
+
|
406
1142
|
return axes[number - 1];
|
407
1143
|
}
|
408
1144
|
|
409
1145
|
function fillInSeriesOptions() {
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
1146
|
+
|
1147
|
+
var neededColors = series.length, maxIndex = -1, i;
|
1148
|
+
|
1149
|
+
// Subtract the number of series that already have fixed colors or
|
1150
|
+
// color indexes from the number that we still need to generate.
|
1151
|
+
|
416
1152
|
for (i = 0; i < series.length; ++i) {
|
417
1153
|
var sc = series[i].color;
|
418
1154
|
if (sc != null) {
|
419
|
-
|
420
|
-
if (typeof sc == "number")
|
421
|
-
|
422
|
-
|
423
|
-
usedColors.push($.color.parse(series[i].color));
|
1155
|
+
neededColors--;
|
1156
|
+
if (typeof sc == "number" && sc > maxIndex) {
|
1157
|
+
maxIndex = sc;
|
1158
|
+
}
|
424
1159
|
}
|
425
1160
|
}
|
426
|
-
|
427
|
-
//
|
428
|
-
//
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
//
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
if (i
|
453
|
-
|
454
|
-
|
1161
|
+
|
1162
|
+
// If any of the series have fixed color indexes, then we need to
|
1163
|
+
// generate at least as many colors as the highest index.
|
1164
|
+
|
1165
|
+
if (neededColors <= maxIndex) {
|
1166
|
+
neededColors = maxIndex + 1;
|
1167
|
+
}
|
1168
|
+
|
1169
|
+
// Generate all the colors, using first the option colors and then
|
1170
|
+
// variations on those colors once they're exhausted.
|
1171
|
+
|
1172
|
+
var c, colors = [], colorPool = options.colors,
|
1173
|
+
colorPoolSize = colorPool.length, variation = 0;
|
1174
|
+
|
1175
|
+
for (i = 0; i < neededColors; i++) {
|
1176
|
+
|
1177
|
+
c = $.color.parse(colorPool[i % colorPoolSize] || "#666");
|
1178
|
+
|
1179
|
+
// Each time we exhaust the colors in the pool we adjust
|
1180
|
+
// a scaling factor used to produce more variations on
|
1181
|
+
// those colors. The factor alternates negative/positive
|
1182
|
+
// to produce lighter/darker colors.
|
1183
|
+
|
1184
|
+
// Reset the variation after every few cycles, or else
|
1185
|
+
// it will end up producing only white or black colors.
|
1186
|
+
|
1187
|
+
if (i % colorPoolSize == 0 && i) {
|
1188
|
+
if (variation >= 0) {
|
1189
|
+
if (variation < 0.5) {
|
1190
|
+
variation = -variation - 0.2;
|
1191
|
+
} else variation = 0;
|
1192
|
+
} else variation = -variation;
|
455
1193
|
}
|
1194
|
+
|
1195
|
+
colors[i] = c.scale('rgb', 1 + variation);
|
456
1196
|
}
|
457
1197
|
|
458
|
-
//
|
1198
|
+
// Finalize the series options, filling in their colors
|
1199
|
+
|
459
1200
|
var colori = 0, s;
|
460
1201
|
for (i = 0; i < series.length; ++i) {
|
461
1202
|
s = series[i];
|
462
|
-
|
1203
|
+
|
463
1204
|
// assign colors
|
464
1205
|
if (s.color == null) {
|
465
1206
|
s.color = colors[colori].toString();
|
@@ -480,18 +1221,26 @@
|
|
480
1221
|
s.lines.show = true;
|
481
1222
|
}
|
482
1223
|
|
1224
|
+
// If nothing was provided for lines.zero, default it to match
|
1225
|
+
// lines.fill, since areas by default should extend to zero.
|
1226
|
+
|
1227
|
+
if (s.lines.zero == null) {
|
1228
|
+
s.lines.zero = !!s.lines.fill;
|
1229
|
+
}
|
1230
|
+
|
483
1231
|
// setup axes
|
484
1232
|
s.xaxis = getOrCreateAxis(xaxes, axisNumber(s, "x"));
|
485
1233
|
s.yaxis = getOrCreateAxis(yaxes, axisNumber(s, "y"));
|
486
1234
|
}
|
487
1235
|
}
|
488
|
-
|
1236
|
+
|
489
1237
|
function processData() {
|
490
1238
|
var topSentry = Number.POSITIVE_INFINITY,
|
491
1239
|
bottomSentry = Number.NEGATIVE_INFINITY,
|
492
1240
|
fakeInfinity = Number.MAX_VALUE,
|
493
1241
|
i, j, k, m, length,
|
494
|
-
s, points, ps, x, y, axis, val, f, p
|
1242
|
+
s, points, ps, x, y, axis, val, f, p,
|
1243
|
+
data, format;
|
495
1244
|
|
496
1245
|
function updateAxis(axis, min, max) {
|
497
1246
|
if (min < axis.datamin && min != -fakeInfinity)
|
@@ -506,19 +1255,20 @@
|
|
506
1255
|
axis.datamax = bottomSentry;
|
507
1256
|
axis.used = false;
|
508
1257
|
});
|
509
|
-
|
1258
|
+
|
510
1259
|
for (i = 0; i < series.length; ++i) {
|
511
1260
|
s = series[i];
|
512
1261
|
s.datapoints = { points: [] };
|
513
|
-
|
1262
|
+
|
514
1263
|
executeHooks(hooks.processRawData, [ s, s.data, s.datapoints ]);
|
515
1264
|
}
|
516
|
-
|
1265
|
+
|
517
1266
|
// first pass: clean and copy data
|
518
1267
|
for (i = 0; i < series.length; ++i) {
|
519
1268
|
s = series[i];
|
520
1269
|
|
521
|
-
|
1270
|
+
data = s.data;
|
1271
|
+
format = s.datapoints.format;
|
522
1272
|
|
523
1273
|
if (!format) {
|
524
1274
|
format = [];
|
@@ -527,13 +1277,14 @@
|
|
527
1277
|
format.push({ y: true, number: true, required: true });
|
528
1278
|
|
529
1279
|
if (s.bars.show || (s.lines.show && s.lines.fill)) {
|
530
|
-
|
1280
|
+
var autoscale = !!((s.bars.show && s.bars.zero) || (s.lines.show && s.lines.zero));
|
1281
|
+
format.push({ y: true, number: true, required: false, defaultValue: 0, autoscale: autoscale });
|
531
1282
|
if (s.bars.horizontal) {
|
532
1283
|
delete format[format.length - 1].y;
|
533
1284
|
format[format.length - 1].x = true;
|
534
1285
|
}
|
535
1286
|
}
|
536
|
-
|
1287
|
+
|
537
1288
|
s.datapoints.format = format;
|
538
1289
|
}
|
539
1290
|
|
@@ -541,13 +1292,13 @@
|
|
541
1292
|
continue; // already filled in
|
542
1293
|
|
543
1294
|
s.datapoints.pointsize = format.length;
|
544
|
-
|
1295
|
+
|
545
1296
|
ps = s.datapoints.pointsize;
|
546
1297
|
points = s.datapoints.points;
|
547
1298
|
|
548
|
-
insertSteps = s.lines.show && s.lines.steps;
|
1299
|
+
var insertSteps = s.lines.show && s.lines.steps;
|
549
1300
|
s.xaxis.used = s.yaxis.used = true;
|
550
|
-
|
1301
|
+
|
551
1302
|
for (j = k = 0; j < data.length; ++j, k += ps) {
|
552
1303
|
p = data[j];
|
553
1304
|
|
@@ -571,26 +1322,30 @@
|
|
571
1322
|
if (val == null) {
|
572
1323
|
if (f.required)
|
573
1324
|
nullify = true;
|
574
|
-
|
1325
|
+
|
575
1326
|
if (f.defaultValue != null)
|
576
1327
|
val = f.defaultValue;
|
577
1328
|
}
|
578
1329
|
}
|
579
|
-
|
1330
|
+
|
580
1331
|
points[k + m] = val;
|
581
1332
|
}
|
582
1333
|
}
|
583
|
-
|
1334
|
+
|
584
1335
|
if (nullify) {
|
585
1336
|
for (m = 0; m < ps; ++m) {
|
586
1337
|
val = points[k + m];
|
587
1338
|
if (val != null) {
|
588
1339
|
f = format[m];
|
589
1340
|
// extract min/max info
|
590
|
-
if (f.
|
591
|
-
|
592
|
-
|
593
|
-
|
1341
|
+
if (f.autoscale !== false) {
|
1342
|
+
if (f.x) {
|
1343
|
+
updateAxis(s.xaxis, val, val);
|
1344
|
+
}
|
1345
|
+
if (f.y) {
|
1346
|
+
updateAxis(s.yaxis, val, val);
|
1347
|
+
}
|
1348
|
+
}
|
594
1349
|
}
|
595
1350
|
points[k + m] = null;
|
596
1351
|
}
|
@@ -620,19 +1375,20 @@
|
|
620
1375
|
// give the hooks a chance to run
|
621
1376
|
for (i = 0; i < series.length; ++i) {
|
622
1377
|
s = series[i];
|
623
|
-
|
1378
|
+
|
624
1379
|
executeHooks(hooks.processDatapoints, [ s, s.datapoints]);
|
625
1380
|
}
|
626
1381
|
|
627
1382
|
// second pass: find datamax/datamin for auto-scaling
|
628
1383
|
for (i = 0; i < series.length; ++i) {
|
629
1384
|
s = series[i];
|
630
|
-
points = s.datapoints.points
|
1385
|
+
points = s.datapoints.points;
|
631
1386
|
ps = s.datapoints.pointsize;
|
1387
|
+
format = s.datapoints.format;
|
632
1388
|
|
633
1389
|
var xmin = topSentry, ymin = topSentry,
|
634
1390
|
xmax = bottomSentry, ymax = bottomSentry;
|
635
|
-
|
1391
|
+
|
636
1392
|
for (j = 0; j < points.length; j += ps) {
|
637
1393
|
if (points[j] == null)
|
638
1394
|
continue;
|
@@ -640,9 +1396,9 @@
|
|
640
1396
|
for (m = 0; m < ps; ++m) {
|
641
1397
|
val = points[j + m];
|
642
1398
|
f = format[m];
|
643
|
-
if (!f || val == fakeInfinity || val == -fakeInfinity)
|
1399
|
+
if (!f || f.autoscale === false || val == fakeInfinity || val == -fakeInfinity)
|
644
1400
|
continue;
|
645
|
-
|
1401
|
+
|
646
1402
|
if (f.x) {
|
647
1403
|
if (val < xmin)
|
648
1404
|
xmin = val;
|
@@ -657,10 +1413,22 @@
|
|
657
1413
|
}
|
658
1414
|
}
|
659
1415
|
}
|
660
|
-
|
1416
|
+
|
661
1417
|
if (s.bars.show) {
|
662
1418
|
// make sure we got room for the bar on the dancing floor
|
663
|
-
var delta
|
1419
|
+
var delta;
|
1420
|
+
|
1421
|
+
switch (s.bars.align) {
|
1422
|
+
case "left":
|
1423
|
+
delta = 0;
|
1424
|
+
break;
|
1425
|
+
case "right":
|
1426
|
+
delta = -s.bars.barWidth;
|
1427
|
+
break;
|
1428
|
+
default:
|
1429
|
+
delta = -s.bars.barWidth / 2;
|
1430
|
+
}
|
1431
|
+
|
664
1432
|
if (s.bars.horizontal) {
|
665
1433
|
ymin += delta;
|
666
1434
|
ymax += delta + s.bars.barWidth;
|
@@ -670,7 +1438,7 @@
|
|
670
1438
|
xmax += delta + s.bars.barWidth;
|
671
1439
|
}
|
672
1440
|
}
|
673
|
-
|
1441
|
+
|
674
1442
|
updateAxis(s.xaxis, xmin, xmax);
|
675
1443
|
updateAxis(s.yaxis, ymin, ymax);
|
676
1444
|
}
|
@@ -683,103 +1451,35 @@
|
|
683
1451
|
});
|
684
1452
|
}
|
685
1453
|
|
686
|
-
function makeCanvas(skipPositioning, cls) {
|
687
|
-
var c = document.createElement('canvas');
|
688
|
-
c.className = cls;
|
689
|
-
c.width = canvasWidth;
|
690
|
-
c.height = canvasHeight;
|
691
|
-
|
692
|
-
if (!skipPositioning)
|
693
|
-
$(c).css({ position: 'absolute', left: 0, top: 0 });
|
694
|
-
|
695
|
-
$(c).appendTo(placeholder);
|
696
|
-
|
697
|
-
if (!c.getContext) // excanvas hack
|
698
|
-
c = window.G_vmlCanvasManager.initElement(c);
|
699
|
-
|
700
|
-
// used for resetting in case we get replotted
|
701
|
-
c.getContext("2d").save();
|
702
|
-
|
703
|
-
return c;
|
704
|
-
}
|
705
|
-
|
706
|
-
function getCanvasDimensions() {
|
707
|
-
canvasWidth = placeholder.width();
|
708
|
-
canvasHeight = placeholder.height();
|
709
|
-
|
710
|
-
if (canvasWidth <= 0 || canvasHeight <= 0)
|
711
|
-
throw "Invalid dimensions for plot, width = " + canvasWidth + ", height = " + canvasHeight;
|
712
|
-
}
|
713
|
-
|
714
|
-
function resizeCanvas(c) {
|
715
|
-
// resizing should reset the state (excanvas seems to be
|
716
|
-
// buggy though)
|
717
|
-
if (c.width != canvasWidth)
|
718
|
-
c.width = canvasWidth;
|
719
|
-
|
720
|
-
if (c.height != canvasHeight)
|
721
|
-
c.height = canvasHeight;
|
722
|
-
|
723
|
-
// so try to get back to the initial state (even if it's
|
724
|
-
// gone now, this should be safe according to the spec)
|
725
|
-
var cctx = c.getContext("2d");
|
726
|
-
cctx.restore();
|
727
|
-
|
728
|
-
// and save again
|
729
|
-
cctx.save();
|
730
|
-
}
|
731
|
-
|
732
1454
|
function setupCanvases() {
|
733
|
-
var reused,
|
734
|
-
existingCanvas = placeholder.children("canvas.base"),
|
735
|
-
existingOverlay = placeholder.children("canvas.overlay");
|
736
|
-
|
737
|
-
if (existingCanvas.length == 0 || existingOverlay == 0) {
|
738
|
-
// init everything
|
739
|
-
|
740
|
-
placeholder.html(""); // make sure placeholder is clear
|
741
|
-
|
742
|
-
placeholder.css({ padding: 0 }); // padding messes up the positioning
|
743
|
-
|
744
|
-
if (placeholder.css("position") == 'static')
|
745
|
-
placeholder.css("position", "relative"); // for positioning labels and overlay
|
746
1455
|
|
747
|
-
|
748
|
-
|
749
|
-
canvas = makeCanvas(true, "base");
|
750
|
-
overlay = makeCanvas(false, "overlay"); // overlay canvas for interactive features
|
1456
|
+
// Make sure the placeholder is clear of everything except canvases
|
1457
|
+
// from a previous plot in this container that we'll try to re-use.
|
751
1458
|
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
1459
|
+
placeholder.css("padding", 0) // padding messes up the positioning
|
1460
|
+
.children().filter(function(){
|
1461
|
+
return !$(this).hasClass("flot-overlay") && !$(this).hasClass('flot-base');
|
1462
|
+
}).remove();
|
756
1463
|
|
757
|
-
|
758
|
-
|
1464
|
+
if (placeholder.css("position") == 'static')
|
1465
|
+
placeholder.css("position", "relative"); // for positioning labels and overlay
|
759
1466
|
|
760
|
-
|
761
|
-
|
1467
|
+
surface = new Canvas("flot-base", placeholder);
|
1468
|
+
overlay = new Canvas("flot-overlay", placeholder); // overlay canvas for interactive features
|
1469
|
+
|
1470
|
+
ctx = surface.context;
|
1471
|
+
octx = overlay.context;
|
762
1472
|
|
763
|
-
|
764
|
-
|
1473
|
+
// define which element we're listening for events on
|
1474
|
+
eventHolder = $(overlay.element).unbind();
|
765
1475
|
|
766
|
-
// we
|
767
|
-
// sometimes has trouble with the stacking order
|
768
|
-
eventHolder = $([overlay, canvas]);
|
1476
|
+
// If we're re-using a plot object, shut down the old one
|
769
1477
|
|
770
|
-
|
771
|
-
// run shutdown in the old plot object
|
772
|
-
placeholder.data("plot").shutdown();
|
1478
|
+
var existing = placeholder.data("plot");
|
773
1479
|
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
// make sure overlay pixels are cleared (canvas is cleared when we redraw)
|
778
|
-
octx.clearRect(0, 0, canvasWidth, canvasHeight);
|
779
|
-
|
780
|
-
// then whack any remaining obvious garbage left
|
781
|
-
eventHolder.unbind();
|
782
|
-
placeholder.children().not([canvas, overlay]).remove();
|
1480
|
+
if (existing) {
|
1481
|
+
existing.shutdown();
|
1482
|
+
overlay.clear();
|
783
1483
|
}
|
784
1484
|
|
785
1485
|
// save in case we get replotted
|
@@ -790,7 +1490,14 @@
|
|
790
1490
|
// bind events
|
791
1491
|
if (options.grid.hoverable) {
|
792
1492
|
eventHolder.mousemove(onMouseMove);
|
793
|
-
|
1493
|
+
|
1494
|
+
// Use bind, rather than .mouseleave, because we officially
|
1495
|
+
// still support jQuery 1.2.6, which doesn't define a shortcut
|
1496
|
+
// for mouseenter or mouseleave. This was a bug/oversight that
|
1497
|
+
// was fixed somewhere around 1.3.x. We can return to using
|
1498
|
+
// .mouseleave when we drop support for 1.2.6.
|
1499
|
+
|
1500
|
+
eventHolder.bind("mouseleave", onMouseLeave);
|
794
1501
|
}
|
795
1502
|
|
796
1503
|
if (options.grid.clickable)
|
@@ -802,23 +1509,23 @@
|
|
802
1509
|
function shutdown() {
|
803
1510
|
if (redrawTimeout)
|
804
1511
|
clearTimeout(redrawTimeout);
|
805
|
-
|
1512
|
+
|
806
1513
|
eventHolder.unbind("mousemove", onMouseMove);
|
807
1514
|
eventHolder.unbind("mouseleave", onMouseLeave);
|
808
1515
|
eventHolder.unbind("click", onClick);
|
809
|
-
|
1516
|
+
|
810
1517
|
executeHooks(hooks.shutdown, [eventHolder]);
|
811
1518
|
}
|
812
1519
|
|
813
1520
|
function setTransformationHelpers(axis) {
|
814
1521
|
// set helper functions on the axis, assumes plot area
|
815
1522
|
// has been computed already
|
816
|
-
|
1523
|
+
|
817
1524
|
function identity(x) { return x; }
|
818
|
-
|
1525
|
+
|
819
1526
|
var s, m, t = axis.options.transform || identity,
|
820
1527
|
it = axis.options.inverseTransform;
|
821
|
-
|
1528
|
+
|
822
1529
|
// precompute how much the axis is scaling a point
|
823
1530
|
// in canvas space
|
824
1531
|
if (axis.direction == "x") {
|
@@ -844,129 +1551,108 @@
|
|
844
1551
|
}
|
845
1552
|
|
846
1553
|
function measureTickLabels(axis) {
|
847
|
-
var opts = axis.options, i, ticks = axis.ticks || [], labels = [],
|
848
|
-
l, w = opts.labelWidth, h = opts.labelHeight, dummyDiv;
|
849
1554
|
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
// to avoid measuring the widths of the labels (it's slow), we
|
859
|
-
// construct fixed-size boxes and put the labels inside
|
860
|
-
// them, we don't need the exact figures and the
|
861
|
-
// fixed-size box content is easy to center
|
862
|
-
if (w == null)
|
863
|
-
w = Math.floor(canvasWidth / (ticks.length > 0 ? ticks.length : 1));
|
864
|
-
|
865
|
-
// measure x label heights
|
866
|
-
if (h == null) {
|
867
|
-
labels = [];
|
868
|
-
for (i = 0; i < ticks.length; ++i) {
|
869
|
-
l = ticks[i].label;
|
870
|
-
if (l)
|
871
|
-
labels.push('<div class="tickLabel" style="float:left;width:' + w + 'px">' + l + '</div>');
|
872
|
-
}
|
873
|
-
|
874
|
-
if (labels.length > 0) {
|
875
|
-
// stick them all in the same div and measure
|
876
|
-
// collective height
|
877
|
-
labels.push('<div style="clear:left"></div>');
|
878
|
-
dummyDiv = makeDummyDiv(labels, "width:10000px;");
|
879
|
-
h = dummyDiv.height();
|
880
|
-
dummyDiv.remove();
|
881
|
-
}
|
882
|
-
}
|
883
|
-
}
|
884
|
-
else if (w == null || h == null) {
|
885
|
-
// calculate y label dimensions
|
886
|
-
for (i = 0; i < ticks.length; ++i) {
|
887
|
-
l = ticks[i].label;
|
888
|
-
if (l)
|
889
|
-
labels.push('<div class="tickLabel">' + l + '</div>');
|
890
|
-
}
|
891
|
-
|
892
|
-
if (labels.length > 0) {
|
893
|
-
dummyDiv = makeDummyDiv(labels, "");
|
894
|
-
if (w == null)
|
895
|
-
w = dummyDiv.children().width();
|
896
|
-
if (h == null)
|
897
|
-
h = dummyDiv.find("div.tickLabel").height();
|
898
|
-
dummyDiv.remove();
|
899
|
-
}
|
900
|
-
}
|
1555
|
+
var opts = axis.options,
|
1556
|
+
ticks = axis.ticks || [],
|
1557
|
+
labelWidth = opts.labelWidth || 0,
|
1558
|
+
labelHeight = opts.labelHeight || 0,
|
1559
|
+
maxWidth = labelWidth || (axis.direction == "x" ? Math.floor(surface.width / (ticks.length || 1)) : null),
|
1560
|
+
legacyStyles = axis.direction + "Axis " + axis.direction + axis.n + "Axis",
|
1561
|
+
layer = "flot-" + axis.direction + "-axis flot-" + axis.direction + axis.n + "-axis " + legacyStyles,
|
1562
|
+
font = opts.font || "flot-tick-label tickLabel";
|
901
1563
|
|
902
|
-
|
903
|
-
w = 0;
|
904
|
-
if (h == null)
|
905
|
-
h = 0;
|
1564
|
+
for (var i = 0; i < ticks.length; ++i) {
|
906
1565
|
|
907
|
-
|
908
|
-
|
1566
|
+
var t = ticks[i];
|
1567
|
+
|
1568
|
+
if (!t.label)
|
1569
|
+
continue;
|
1570
|
+
|
1571
|
+
var info = surface.getTextInfo(layer, t.label, font, null, maxWidth);
|
1572
|
+
|
1573
|
+
labelWidth = Math.max(labelWidth, info.width);
|
1574
|
+
labelHeight = Math.max(labelHeight, info.height);
|
1575
|
+
}
|
1576
|
+
|
1577
|
+
axis.labelWidth = opts.labelWidth || labelWidth;
|
1578
|
+
axis.labelHeight = opts.labelHeight || labelHeight;
|
909
1579
|
}
|
910
1580
|
|
911
1581
|
function allocateAxisBoxFirstPhase(axis) {
|
912
1582
|
// find the bounding box of the axis by looking at label
|
913
1583
|
// widths/heights and ticks, make room by diminishing the
|
914
|
-
// plotOffset
|
1584
|
+
// plotOffset; this first phase only looks at one
|
1585
|
+
// dimension per axis, the other dimension depends on the
|
1586
|
+
// other axes so will have to wait
|
915
1587
|
|
916
1588
|
var lw = axis.labelWidth,
|
917
1589
|
lh = axis.labelHeight,
|
918
1590
|
pos = axis.options.position,
|
1591
|
+
isXAxis = axis.direction === "x",
|
919
1592
|
tickLength = axis.options.tickLength,
|
920
|
-
|
1593
|
+
axisMargin = options.grid.axisMargin,
|
921
1594
|
padding = options.grid.labelMargin,
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
1595
|
+
innermost = true,
|
1596
|
+
outermost = true,
|
1597
|
+
first = true,
|
1598
|
+
found = false;
|
1599
|
+
|
1600
|
+
// Determine the axis's position in its direction and on its side
|
1601
|
+
|
1602
|
+
$.each(isXAxis ? xaxes : yaxes, function(i, a) {
|
1603
|
+
if (a && (a.show || a.reserveSpace)) {
|
1604
|
+
if (a === axis) {
|
1605
|
+
found = true;
|
1606
|
+
} else if (a.options.position === pos) {
|
1607
|
+
if (found) {
|
1608
|
+
outermost = false;
|
1609
|
+
} else {
|
1610
|
+
innermost = false;
|
1611
|
+
}
|
1612
|
+
}
|
1613
|
+
if (!found) {
|
1614
|
+
first = false;
|
1615
|
+
}
|
1616
|
+
}
|
928
1617
|
});
|
929
|
-
if ($.inArray(axis, samePosition) == samePosition.length - 1)
|
930
|
-
axismargin = 0; // outermost
|
931
1618
|
|
932
|
-
//
|
933
|
-
if (tickLength == null)
|
934
|
-
tickLength = "full";
|
1619
|
+
// The outermost axis on each side has no margin
|
935
1620
|
|
936
|
-
|
937
|
-
|
938
|
-
}
|
1621
|
+
if (outermost) {
|
1622
|
+
axisMargin = 0;
|
1623
|
+
}
|
1624
|
+
|
1625
|
+
// The ticks for the first axis in each direction stretch across
|
1626
|
+
|
1627
|
+
if (tickLength == null) {
|
1628
|
+
tickLength = first ? "full" : 5;
|
1629
|
+
}
|
939
1630
|
|
940
|
-
var innermost = $.inArray(axis, sameDirection) == 0;
|
941
|
-
if (!innermost && tickLength == "full")
|
942
|
-
tickLength = 5;
|
943
|
-
|
944
1631
|
if (!isNaN(+tickLength))
|
945
1632
|
padding += +tickLength;
|
946
1633
|
|
947
|
-
|
948
|
-
if (axis.direction == "x") {
|
1634
|
+
if (isXAxis) {
|
949
1635
|
lh += padding;
|
950
|
-
|
1636
|
+
|
951
1637
|
if (pos == "bottom") {
|
952
|
-
plotOffset.bottom += lh +
|
953
|
-
axis.box = { top:
|
1638
|
+
plotOffset.bottom += lh + axisMargin;
|
1639
|
+
axis.box = { top: surface.height - plotOffset.bottom, height: lh };
|
954
1640
|
}
|
955
1641
|
else {
|
956
|
-
axis.box = { top: plotOffset.top +
|
957
|
-
plotOffset.top += lh +
|
1642
|
+
axis.box = { top: plotOffset.top + axisMargin, height: lh };
|
1643
|
+
plotOffset.top += lh + axisMargin;
|
958
1644
|
}
|
959
1645
|
}
|
960
1646
|
else {
|
961
1647
|
lw += padding;
|
962
|
-
|
1648
|
+
|
963
1649
|
if (pos == "left") {
|
964
|
-
axis.box = { left: plotOffset.left +
|
965
|
-
plotOffset.left += lw +
|
1650
|
+
axis.box = { left: plotOffset.left + axisMargin, width: lw };
|
1651
|
+
plotOffset.left += lw + axisMargin;
|
966
1652
|
}
|
967
1653
|
else {
|
968
|
-
plotOffset.right += lw +
|
969
|
-
axis.box = { left:
|
1654
|
+
plotOffset.right += lw + axisMargin;
|
1655
|
+
axis.box = { left: surface.width - plotOffset.right, width: lw };
|
970
1656
|
}
|
971
1657
|
}
|
972
1658
|
|
@@ -978,85 +1664,137 @@
|
|
978
1664
|
}
|
979
1665
|
|
980
1666
|
function allocateAxisBoxSecondPhase(axis) {
|
981
|
-
//
|
1667
|
+
// now that all axis boxes have been placed in one
|
1668
|
+
// dimension, we can set the remaining dimension coordinates
|
982
1669
|
if (axis.direction == "x") {
|
983
|
-
axis.box.left = plotOffset.left;
|
984
|
-
axis.box.width =
|
1670
|
+
axis.box.left = plotOffset.left - axis.labelWidth / 2;
|
1671
|
+
axis.box.width = surface.width - plotOffset.left - plotOffset.right + axis.labelWidth;
|
985
1672
|
}
|
986
1673
|
else {
|
987
|
-
axis.box.top = plotOffset.top;
|
988
|
-
axis.box.height =
|
1674
|
+
axis.box.top = plotOffset.top - axis.labelHeight / 2;
|
1675
|
+
axis.box.height = surface.height - plotOffset.bottom - plotOffset.top + axis.labelHeight;
|
989
1676
|
}
|
990
1677
|
}
|
991
|
-
|
1678
|
+
|
1679
|
+
function adjustLayoutForThingsStickingOut() {
|
1680
|
+
// possibly adjust plot offset to ensure everything stays
|
1681
|
+
// inside the canvas and isn't clipped off
|
1682
|
+
|
1683
|
+
var minMargin = options.grid.minBorderMargin,
|
1684
|
+
axis, i;
|
1685
|
+
|
1686
|
+
// check stuff from the plot (FIXME: this should just read
|
1687
|
+
// a value from the series, otherwise it's impossible to
|
1688
|
+
// customize)
|
1689
|
+
if (minMargin == null) {
|
1690
|
+
minMargin = 0;
|
1691
|
+
for (i = 0; i < series.length; ++i)
|
1692
|
+
minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth/2));
|
1693
|
+
}
|
1694
|
+
|
1695
|
+
var margins = {
|
1696
|
+
left: minMargin,
|
1697
|
+
right: minMargin,
|
1698
|
+
top: minMargin,
|
1699
|
+
bottom: minMargin
|
1700
|
+
};
|
1701
|
+
|
1702
|
+
// check axis labels, note we don't check the actual
|
1703
|
+
// labels but instead use the overall width/height to not
|
1704
|
+
// jump as much around with replots
|
1705
|
+
$.each(allAxes(), function (_, axis) {
|
1706
|
+
if (axis.reserveSpace && axis.ticks && axis.ticks.length) {
|
1707
|
+
if (axis.direction === "x") {
|
1708
|
+
margins.left = Math.max(margins.left, axis.labelWidth / 2);
|
1709
|
+
margins.right = Math.max(margins.right, axis.labelWidth / 2);
|
1710
|
+
} else {
|
1711
|
+
margins.bottom = Math.max(margins.bottom, axis.labelHeight / 2);
|
1712
|
+
margins.top = Math.max(margins.top, axis.labelHeight / 2);
|
1713
|
+
}
|
1714
|
+
}
|
1715
|
+
});
|
1716
|
+
|
1717
|
+
plotOffset.left = Math.ceil(Math.max(margins.left, plotOffset.left));
|
1718
|
+
plotOffset.right = Math.ceil(Math.max(margins.right, plotOffset.right));
|
1719
|
+
plotOffset.top = Math.ceil(Math.max(margins.top, plotOffset.top));
|
1720
|
+
plotOffset.bottom = Math.ceil(Math.max(margins.bottom, plotOffset.bottom));
|
1721
|
+
}
|
1722
|
+
|
992
1723
|
function setupGrid() {
|
993
|
-
var i, axes = allAxes();
|
1724
|
+
var i, axes = allAxes(), showGrid = options.grid.show;
|
994
1725
|
|
995
|
-
//
|
1726
|
+
// Initialize the plot's offset from the edge of the canvas
|
996
1727
|
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1728
|
+
for (var a in plotOffset) {
|
1729
|
+
var margin = options.grid.margin || 0;
|
1730
|
+
plotOffset[a] = typeof margin == "number" ? margin : margin[a] || 0;
|
1731
|
+
}
|
1732
|
+
|
1733
|
+
executeHooks(hooks.processOffset, [plotOffset]);
|
1734
|
+
|
1735
|
+
// If the grid is visible, add its border width to the offset
|
1003
1736
|
|
1737
|
+
for (var a in plotOffset) {
|
1738
|
+
if(typeof(options.grid.borderWidth) == "object") {
|
1739
|
+
plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0;
|
1740
|
+
}
|
1741
|
+
else {
|
1742
|
+
plotOffset[a] += showGrid ? options.grid.borderWidth : 0;
|
1743
|
+
}
|
1744
|
+
}
|
1745
|
+
|
1746
|
+
$.each(axes, function (_, axis) {
|
1747
|
+
var axisOpts = axis.options;
|
1748
|
+
axis.show = axisOpts.show == null ? axis.used : axisOpts.show;
|
1749
|
+
axis.reserveSpace = axisOpts.reserveSpace == null ? axis.show : axisOpts.reserveSpace;
|
1004
1750
|
setRange(axis);
|
1005
1751
|
});
|
1006
1752
|
|
1007
|
-
|
1753
|
+
if (showGrid) {
|
1754
|
+
|
1755
|
+
var allocatedAxes = $.grep(axes, function (axis) {
|
1756
|
+
return axis.show || axis.reserveSpace;
|
1757
|
+
});
|
1008
1758
|
|
1009
|
-
plotOffset.left = plotOffset.right = plotOffset.top = plotOffset.bottom = 0;
|
1010
|
-
if (options.grid.show) {
|
1011
1759
|
$.each(allocatedAxes, function (_, axis) {
|
1012
1760
|
// make the ticks
|
1013
1761
|
setupTickGeneration(axis);
|
1014
1762
|
setTicks(axis);
|
1015
1763
|
snapRangeToTicks(axis, axis.ticks);
|
1016
|
-
|
1017
1764
|
// find labelWidth/Height for axis
|
1018
1765
|
measureTickLabels(axis);
|
1019
1766
|
});
|
1020
1767
|
|
1021
|
-
// with all dimensions
|
1022
|
-
// axis boxes, start from the outside
|
1768
|
+
// with all dimensions calculated, we can compute the
|
1769
|
+
// axis bounding boxes, start from the outside
|
1770
|
+
// (reverse order)
|
1023
1771
|
for (i = allocatedAxes.length - 1; i >= 0; --i)
|
1024
1772
|
allocateAxisBoxFirstPhase(allocatedAxes[i]);
|
1025
1773
|
|
1026
1774
|
// make sure we've got enough space for things that
|
1027
1775
|
// might stick out
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
}
|
1034
|
-
|
1035
|
-
for (var a in plotOffset) {
|
1036
|
-
plotOffset[a] += options.grid.borderWidth;
|
1037
|
-
plotOffset[a] = Math.max(minMargin, plotOffset[a]);
|
1038
|
-
}
|
1776
|
+
adjustLayoutForThingsStickingOut();
|
1777
|
+
|
1778
|
+
$.each(allocatedAxes, function (_, axis) {
|
1779
|
+
allocateAxisBoxSecondPhase(axis);
|
1780
|
+
});
|
1039
1781
|
}
|
1040
|
-
|
1041
|
-
plotWidth = canvasWidth - plotOffset.left - plotOffset.right;
|
1042
|
-
plotHeight = canvasHeight - plotOffset.bottom - plotOffset.top;
|
1043
1782
|
|
1044
|
-
|
1783
|
+
plotWidth = surface.width - plotOffset.left - plotOffset.right;
|
1784
|
+
plotHeight = surface.height - plotOffset.bottom - plotOffset.top;
|
1785
|
+
|
1786
|
+
// now we got the proper plot dimensions, we can compute the scaling
|
1045
1787
|
$.each(axes, function (_, axis) {
|
1046
1788
|
setTransformationHelpers(axis);
|
1047
1789
|
});
|
1048
1790
|
|
1049
|
-
if (
|
1050
|
-
|
1051
|
-
allocateAxisBoxSecondPhase(axis);
|
1052
|
-
});
|
1053
|
-
|
1054
|
-
insertAxisLabels();
|
1791
|
+
if (showGrid) {
|
1792
|
+
drawAxisLabels();
|
1055
1793
|
}
|
1056
|
-
|
1794
|
+
|
1057
1795
|
insertLegend();
|
1058
1796
|
}
|
1059
|
-
|
1797
|
+
|
1060
1798
|
function setRange(axis) {
|
1061
1799
|
var opts = axis.options,
|
1062
1800
|
min = +(opts.min != null ? opts.min : axis.datamin),
|
@@ -1098,7 +1836,7 @@
|
|
1098
1836
|
|
1099
1837
|
function setupTickGeneration(axis) {
|
1100
1838
|
var opts = axis.options;
|
1101
|
-
|
1839
|
+
|
1102
1840
|
// estimate number of ticks
|
1103
1841
|
var noTicks;
|
1104
1842
|
if (typeof opts.ticks == "number" && opts.ticks > 0)
|
@@ -1106,209 +1844,65 @@
|
|
1106
1844
|
else
|
1107
1845
|
// heuristic based on the model a*sqrt(x) fitted to
|
1108
1846
|
// some data points that seemed reasonable
|
1109
|
-
noTicks = 0.3 * Math.sqrt(axis.direction == "x" ?
|
1847
|
+
noTicks = 0.3 * Math.sqrt(axis.direction == "x" ? surface.width : surface.height);
|
1110
1848
|
|
1111
1849
|
var delta = (axis.max - axis.min) / noTicks,
|
1112
|
-
|
1113
|
-
|
1114
|
-
if (opts.mode == "time") {
|
1115
|
-
// pretty handling of time
|
1116
|
-
|
1117
|
-
// map of app. size of time units in milliseconds
|
1118
|
-
var timeUnitSize = {
|
1119
|
-
"second": 1000,
|
1120
|
-
"minute": 60 * 1000,
|
1121
|
-
"hour": 60 * 60 * 1000,
|
1122
|
-
"day": 24 * 60 * 60 * 1000,
|
1123
|
-
"month": 30 * 24 * 60 * 60 * 1000,
|
1124
|
-
"year": 365.2425 * 24 * 60 * 60 * 1000
|
1125
|
-
};
|
1126
|
-
|
1127
|
-
|
1128
|
-
// the allowed tick sizes, after 1 year we use
|
1129
|
-
// an integer algorithm
|
1130
|
-
var spec = [
|
1131
|
-
[1, "second"], [2, "second"], [5, "second"], [10, "second"],
|
1132
|
-
[30, "second"],
|
1133
|
-
[1, "minute"], [2, "minute"], [5, "minute"], [10, "minute"],
|
1134
|
-
[30, "minute"],
|
1135
|
-
[1, "hour"], [2, "hour"], [4, "hour"],
|
1136
|
-
[8, "hour"], [12, "hour"],
|
1137
|
-
[1, "day"], [2, "day"], [3, "day"],
|
1138
|
-
[0.25, "month"], [0.5, "month"], [1, "month"],
|
1139
|
-
[2, "month"], [3, "month"], [6, "month"],
|
1140
|
-
[1, "year"]
|
1141
|
-
];
|
1142
|
-
|
1143
|
-
var minSize = 0;
|
1144
|
-
if (opts.minTickSize != null) {
|
1145
|
-
if (typeof opts.tickSize == "number")
|
1146
|
-
minSize = opts.tickSize;
|
1147
|
-
else
|
1148
|
-
minSize = opts.minTickSize[0] * timeUnitSize[opts.minTickSize[1]];
|
1149
|
-
}
|
1150
|
-
|
1151
|
-
for (var i = 0; i < spec.length - 1; ++i)
|
1152
|
-
if (delta < (spec[i][0] * timeUnitSize[spec[i][1]]
|
1153
|
-
+ spec[i + 1][0] * timeUnitSize[spec[i + 1][1]]) / 2
|
1154
|
-
&& spec[i][0] * timeUnitSize[spec[i][1]] >= minSize)
|
1155
|
-
break;
|
1156
|
-
size = spec[i][0];
|
1157
|
-
unit = spec[i][1];
|
1158
|
-
|
1159
|
-
// special-case the possibility of several years
|
1160
|
-
if (unit == "year") {
|
1161
|
-
magn = Math.pow(10, Math.floor(Math.log(delta / timeUnitSize.year) / Math.LN10));
|
1162
|
-
norm = (delta / timeUnitSize.year) / magn;
|
1163
|
-
if (norm < 1.5)
|
1164
|
-
size = 1;
|
1165
|
-
else if (norm < 3)
|
1166
|
-
size = 2;
|
1167
|
-
else if (norm < 7.5)
|
1168
|
-
size = 5;
|
1169
|
-
else
|
1170
|
-
size = 10;
|
1171
|
-
|
1172
|
-
size *= magn;
|
1173
|
-
}
|
1174
|
-
|
1175
|
-
axis.tickSize = opts.tickSize || [size, unit];
|
1176
|
-
|
1177
|
-
generator = function(axis) {
|
1178
|
-
var ticks = [],
|
1179
|
-
tickSize = axis.tickSize[0], unit = axis.tickSize[1],
|
1180
|
-
d = new Date(axis.min);
|
1181
|
-
|
1182
|
-
var step = tickSize * timeUnitSize[unit];
|
1183
|
-
|
1184
|
-
if (unit == "second")
|
1185
|
-
d.setUTCSeconds(floorInBase(d.getUTCSeconds(), tickSize));
|
1186
|
-
if (unit == "minute")
|
1187
|
-
d.setUTCMinutes(floorInBase(d.getUTCMinutes(), tickSize));
|
1188
|
-
if (unit == "hour")
|
1189
|
-
d.setUTCHours(floorInBase(d.getUTCHours(), tickSize));
|
1190
|
-
if (unit == "month")
|
1191
|
-
d.setUTCMonth(floorInBase(d.getUTCMonth(), tickSize));
|
1192
|
-
if (unit == "year")
|
1193
|
-
d.setUTCFullYear(floorInBase(d.getUTCFullYear(), tickSize));
|
1194
|
-
|
1195
|
-
// reset smaller components
|
1196
|
-
d.setUTCMilliseconds(0);
|
1197
|
-
if (step >= timeUnitSize.minute)
|
1198
|
-
d.setUTCSeconds(0);
|
1199
|
-
if (step >= timeUnitSize.hour)
|
1200
|
-
d.setUTCMinutes(0);
|
1201
|
-
if (step >= timeUnitSize.day)
|
1202
|
-
d.setUTCHours(0);
|
1203
|
-
if (step >= timeUnitSize.day * 4)
|
1204
|
-
d.setUTCDate(1);
|
1205
|
-
if (step >= timeUnitSize.year)
|
1206
|
-
d.setUTCMonth(0);
|
1207
|
-
|
1208
|
-
|
1209
|
-
var carry = 0, v = Number.NaN, prev;
|
1210
|
-
do {
|
1211
|
-
prev = v;
|
1212
|
-
v = d.getTime();
|
1213
|
-
ticks.push(v);
|
1214
|
-
if (unit == "month") {
|
1215
|
-
if (tickSize < 1) {
|
1216
|
-
// a bit complicated - we'll divide the month
|
1217
|
-
// up but we need to take care of fractions
|
1218
|
-
// so we don't end up in the middle of a day
|
1219
|
-
d.setUTCDate(1);
|
1220
|
-
var start = d.getTime();
|
1221
|
-
d.setUTCMonth(d.getUTCMonth() + 1);
|
1222
|
-
var end = d.getTime();
|
1223
|
-
d.setTime(v + carry * timeUnitSize.hour + (end - start) * tickSize);
|
1224
|
-
carry = d.getUTCHours();
|
1225
|
-
d.setUTCHours(0);
|
1226
|
-
}
|
1227
|
-
else
|
1228
|
-
d.setUTCMonth(d.getUTCMonth() + tickSize);
|
1229
|
-
}
|
1230
|
-
else if (unit == "year") {
|
1231
|
-
d.setUTCFullYear(d.getUTCFullYear() + tickSize);
|
1232
|
-
}
|
1233
|
-
else
|
1234
|
-
d.setTime(v + step);
|
1235
|
-
} while (v < axis.max && v != prev);
|
1236
|
-
|
1237
|
-
return ticks;
|
1238
|
-
};
|
1850
|
+
dec = -Math.floor(Math.log(delta) / Math.LN10),
|
1851
|
+
maxDec = opts.tickDecimals;
|
1239
1852
|
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
// first check global format
|
1244
|
-
if (opts.timeformat != null)
|
1245
|
-
return $.plot.formatDate(d, opts.timeformat, opts.monthNames);
|
1246
|
-
|
1247
|
-
var t = axis.tickSize[0] * timeUnitSize[axis.tickSize[1]];
|
1248
|
-
var span = axis.max - axis.min;
|
1249
|
-
var suffix = (opts.twelveHourClock) ? " %p" : "";
|
1250
|
-
|
1251
|
-
if (t < timeUnitSize.minute)
|
1252
|
-
fmt = "%h:%M:%S" + suffix;
|
1253
|
-
else if (t < timeUnitSize.day) {
|
1254
|
-
if (span < 2 * timeUnitSize.day)
|
1255
|
-
fmt = "%h:%M" + suffix;
|
1256
|
-
else
|
1257
|
-
fmt = "%b %d %h:%M" + suffix;
|
1258
|
-
}
|
1259
|
-
else if (t < timeUnitSize.month)
|
1260
|
-
fmt = "%b %d";
|
1261
|
-
else if (t < timeUnitSize.year) {
|
1262
|
-
if (span < timeUnitSize.year)
|
1263
|
-
fmt = "%b";
|
1264
|
-
else
|
1265
|
-
fmt = "%b %y";
|
1266
|
-
}
|
1267
|
-
else
|
1268
|
-
fmt = "%y";
|
1269
|
-
|
1270
|
-
return $.plot.formatDate(d, fmt, opts.monthNames);
|
1271
|
-
};
|
1853
|
+
if (maxDec != null && dec > maxDec) {
|
1854
|
+
dec = maxDec;
|
1272
1855
|
}
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
if (norm
|
1284
|
-
size =
|
1285
|
-
|
1286
|
-
size = 2;
|
1287
|
-
// special case for 2.5, requires an extra decimal
|
1288
|
-
if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) {
|
1289
|
-
size = 2.5;
|
1290
|
-
++dec;
|
1291
|
-
}
|
1856
|
+
|
1857
|
+
var magn = Math.pow(10, -dec),
|
1858
|
+
norm = delta / magn, // norm is between 1.0 and 10.0
|
1859
|
+
size;
|
1860
|
+
|
1861
|
+
if (norm < 1.5) {
|
1862
|
+
size = 1;
|
1863
|
+
} else if (norm < 3) {
|
1864
|
+
size = 2;
|
1865
|
+
// special case for 2.5, requires an extra decimal
|
1866
|
+
if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) {
|
1867
|
+
size = 2.5;
|
1868
|
+
++dec;
|
1292
1869
|
}
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1870
|
+
} else if (norm < 7.5) {
|
1871
|
+
size = 5;
|
1872
|
+
} else {
|
1873
|
+
size = 10;
|
1874
|
+
}
|
1875
|
+
|
1876
|
+
size *= magn;
|
1877
|
+
|
1878
|
+
if (opts.minTickSize != null && size < opts.minTickSize) {
|
1879
|
+
size = opts.minTickSize;
|
1880
|
+
}
|
1881
|
+
|
1882
|
+
axis.delta = delta;
|
1883
|
+
axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec);
|
1884
|
+
axis.tickSize = opts.tickSize || size;
|
1297
1885
|
|
1298
|
-
|
1299
|
-
|
1300
|
-
if (opts.minTickSize != null && size < opts.minTickSize)
|
1301
|
-
size = opts.minTickSize;
|
1886
|
+
// Time mode was moved to a plug-in in 0.8, and since so many people use it
|
1887
|
+
// we'll add an especially friendly reminder to make sure they included it.
|
1302
1888
|
|
1303
|
-
|
1304
|
-
|
1889
|
+
if (opts.mode == "time" && !axis.tickGenerator) {
|
1890
|
+
throw new Error("Time mode requires the flot.time plugin.");
|
1891
|
+
}
|
1892
|
+
|
1893
|
+
// Flot supports base-10 axes; any other mode else is handled by a plug-in,
|
1894
|
+
// like flot.time.js.
|
1895
|
+
|
1896
|
+
if (!axis.tickGenerator) {
|
1897
|
+
|
1898
|
+
axis.tickGenerator = function (axis) {
|
1305
1899
|
|
1306
|
-
|
1307
|
-
|
1900
|
+
var ticks = [],
|
1901
|
+
start = floorInBase(axis.min, axis.tickSize),
|
1902
|
+
i = 0,
|
1903
|
+
v = Number.NaN,
|
1904
|
+
prev;
|
1308
1905
|
|
1309
|
-
// spew out all possible ticks
|
1310
|
-
var start = floorInBase(axis.min, axis.tickSize),
|
1311
|
-
i = 0, v = Number.NaN, prev;
|
1312
1906
|
do {
|
1313
1907
|
prev = v;
|
1314
1908
|
v = start + i * axis.tickSize;
|
@@ -1318,24 +1912,42 @@
|
|
1318
1912
|
return ticks;
|
1319
1913
|
};
|
1320
1914
|
|
1321
|
-
|
1322
|
-
|
1915
|
+
axis.tickFormatter = function (value, axis) {
|
1916
|
+
|
1917
|
+
var factor = axis.tickDecimals ? Math.pow(10, axis.tickDecimals) : 1;
|
1918
|
+
var formatted = "" + Math.round(value * factor) / factor;
|
1919
|
+
|
1920
|
+
// If tickDecimals was specified, ensure that we have exactly that
|
1921
|
+
// much precision; otherwise default to the value's own precision.
|
1922
|
+
|
1923
|
+
if (axis.tickDecimals != null) {
|
1924
|
+
var decimal = formatted.indexOf(".");
|
1925
|
+
var precision = decimal == -1 ? 0 : formatted.length - decimal - 1;
|
1926
|
+
if (precision < axis.tickDecimals) {
|
1927
|
+
return (precision ? formatted : formatted + ".") + ("" + factor).substr(1, axis.tickDecimals - precision);
|
1928
|
+
}
|
1929
|
+
}
|
1930
|
+
|
1931
|
+
return formatted;
|
1323
1932
|
};
|
1324
1933
|
}
|
1325
1934
|
|
1935
|
+
if ($.isFunction(opts.tickFormatter))
|
1936
|
+
axis.tickFormatter = function (v, axis) { return "" + opts.tickFormatter(v, axis); };
|
1937
|
+
|
1326
1938
|
if (opts.alignTicksWithAxis != null) {
|
1327
1939
|
var otherAxis = (axis.direction == "x" ? xaxes : yaxes)[opts.alignTicksWithAxis - 1];
|
1328
1940
|
if (otherAxis && otherAxis.used && otherAxis != axis) {
|
1329
1941
|
// consider snapping min/max to outermost nice ticks
|
1330
|
-
var niceTicks =
|
1942
|
+
var niceTicks = axis.tickGenerator(axis);
|
1331
1943
|
if (niceTicks.length > 0) {
|
1332
1944
|
if (opts.min == null)
|
1333
1945
|
axis.min = Math.min(axis.min, niceTicks[0]);
|
1334
1946
|
if (opts.max == null && niceTicks.length > 1)
|
1335
1947
|
axis.max = Math.max(axis.max, niceTicks[niceTicks.length - 1]);
|
1336
1948
|
}
|
1337
|
-
|
1338
|
-
|
1949
|
+
|
1950
|
+
axis.tickGenerator = function (axis) {
|
1339
1951
|
// copy ticks, scaled to this axis
|
1340
1952
|
var ticks = [], v, i;
|
1341
1953
|
for (i = 0; i < otherAxis.ticks.length; ++i) {
|
@@ -1345,12 +1957,12 @@
|
|
1345
1957
|
}
|
1346
1958
|
return ticks;
|
1347
1959
|
};
|
1348
|
-
|
1960
|
+
|
1349
1961
|
// we might need an extra decimal since forced
|
1350
1962
|
// ticks don't necessarily fit naturally
|
1351
|
-
if (axis.mode
|
1352
|
-
var extraDec = Math.max(0, -Math.floor(Math.log(delta) / Math.LN10) + 1),
|
1353
|
-
ts =
|
1963
|
+
if (!axis.mode && opts.tickDecimals == null) {
|
1964
|
+
var extraDec = Math.max(0, -Math.floor(Math.log(axis.delta) / Math.LN10) + 1),
|
1965
|
+
ts = axis.tickGenerator(axis);
|
1354
1966
|
|
1355
1967
|
// only proceed if the tick interval rounded
|
1356
1968
|
// with an extra decimal doesn't give us a
|
@@ -1360,14 +1972,8 @@
|
|
1360
1972
|
}
|
1361
1973
|
}
|
1362
1974
|
}
|
1363
|
-
|
1364
|
-
axis.tickGenerator = generator;
|
1365
|
-
if ($.isFunction(opts.tickFormatter))
|
1366
|
-
axis.tickFormatter = function (v, axis) { return "" + opts.tickFormatter(v, axis); };
|
1367
|
-
else
|
1368
|
-
axis.tickFormatter = formatter;
|
1369
1975
|
}
|
1370
|
-
|
1976
|
+
|
1371
1977
|
function setTicks(axis) {
|
1372
1978
|
var oticks = axis.options.ticks, ticks = [];
|
1373
1979
|
if (oticks == null || (typeof oticks == "number" && oticks > 0))
|
@@ -1375,7 +1981,7 @@
|
|
1375
1981
|
else if (oticks) {
|
1376
1982
|
if ($.isFunction(oticks))
|
1377
1983
|
// generate the ticks
|
1378
|
-
ticks = oticks(
|
1984
|
+
ticks = oticks(axis);
|
1379
1985
|
else
|
1380
1986
|
ticks = oticks;
|
1381
1987
|
}
|
@@ -1409,18 +2015,22 @@
|
|
1409
2015
|
axis.max = Math.max(axis.max, ticks[ticks.length - 1].v);
|
1410
2016
|
}
|
1411
2017
|
}
|
1412
|
-
|
2018
|
+
|
1413
2019
|
function draw() {
|
1414
|
-
|
2020
|
+
|
2021
|
+
surface.clear();
|
2022
|
+
|
2023
|
+
executeHooks(hooks.drawBackground, [ctx]);
|
1415
2024
|
|
1416
2025
|
var grid = options.grid;
|
1417
2026
|
|
1418
2027
|
// draw background, if any
|
1419
2028
|
if (grid.show && grid.backgroundColor)
|
1420
2029
|
drawBackground();
|
1421
|
-
|
1422
|
-
if (grid.show && !grid.aboveData)
|
2030
|
+
|
2031
|
+
if (grid.show && !grid.aboveData) {
|
1423
2032
|
drawGrid();
|
2033
|
+
}
|
1424
2034
|
|
1425
2035
|
for (var i = 0; i < series.length; ++i) {
|
1426
2036
|
executeHooks(hooks.drawSeries, [ctx, series[i]]);
|
@@ -1428,15 +2038,23 @@
|
|
1428
2038
|
}
|
1429
2039
|
|
1430
2040
|
executeHooks(hooks.draw, [ctx]);
|
1431
|
-
|
1432
|
-
if (grid.show && grid.aboveData)
|
2041
|
+
|
2042
|
+
if (grid.show && grid.aboveData) {
|
1433
2043
|
drawGrid();
|
2044
|
+
}
|
2045
|
+
|
2046
|
+
surface.render();
|
2047
|
+
|
2048
|
+
// A draw implies that either the axes or data have changed, so we
|
2049
|
+
// should probably update the overlay highlights as well.
|
2050
|
+
|
2051
|
+
triggerRedrawOverlay();
|
1434
2052
|
}
|
1435
2053
|
|
1436
2054
|
function extractRange(ranges, coord) {
|
1437
2055
|
var axis, from, to, key, axes = allAxes();
|
1438
2056
|
|
1439
|
-
for (i = 0; i < axes.length; ++i) {
|
2057
|
+
for (var i = 0; i < axes.length; ++i) {
|
1440
2058
|
axis = axes[i];
|
1441
2059
|
if (axis.direction == coord) {
|
1442
2060
|
key = coord + axis.n + "axis";
|
@@ -1463,10 +2081,10 @@
|
|
1463
2081
|
from = to;
|
1464
2082
|
to = tmp;
|
1465
2083
|
}
|
1466
|
-
|
2084
|
+
|
1467
2085
|
return { from: from, to: to, axis: axis };
|
1468
2086
|
}
|
1469
|
-
|
2087
|
+
|
1470
2088
|
function drawBackground() {
|
1471
2089
|
ctx.save();
|
1472
2090
|
ctx.translate(plotOffset.left, plotOffset.top);
|
@@ -1477,8 +2095,8 @@
|
|
1477
2095
|
}
|
1478
2096
|
|
1479
2097
|
function drawGrid() {
|
1480
|
-
var i;
|
1481
|
-
|
2098
|
+
var i, axes, bw, bc;
|
2099
|
+
|
1482
2100
|
ctx.save();
|
1483
2101
|
ctx.translate(plotOffset.left, plotOffset.top);
|
1484
2102
|
|
@@ -1486,14 +2104,14 @@
|
|
1486
2104
|
var markings = options.grid.markings;
|
1487
2105
|
if (markings) {
|
1488
2106
|
if ($.isFunction(markings)) {
|
1489
|
-
|
2107
|
+
axes = plot.getAxes();
|
1490
2108
|
// xmin etc. is backwards compatibility, to be
|
1491
2109
|
// removed in the future
|
1492
2110
|
axes.xmin = axes.xaxis.min;
|
1493
2111
|
axes.xmax = axes.xaxis.max;
|
1494
2112
|
axes.ymin = axes.yaxis.min;
|
1495
2113
|
axes.ymax = axes.yaxis.max;
|
1496
|
-
|
2114
|
+
|
1497
2115
|
markings = markings(axes);
|
1498
2116
|
}
|
1499
2117
|
|
@@ -1522,26 +2140,34 @@
|
|
1522
2140
|
yrange.from = Math.max(yrange.from, yrange.axis.min);
|
1523
2141
|
yrange.to = Math.min(yrange.to, yrange.axis.max);
|
1524
2142
|
|
1525
|
-
|
2143
|
+
var xequal = xrange.from === xrange.to,
|
2144
|
+
yequal = yrange.from === yrange.to;
|
2145
|
+
|
2146
|
+
if (xequal && yequal) {
|
1526
2147
|
continue;
|
2148
|
+
}
|
1527
2149
|
|
1528
2150
|
// then draw
|
1529
|
-
xrange.from = xrange.axis.p2c(xrange.from);
|
1530
|
-
xrange.to = xrange.axis.p2c(xrange.to);
|
1531
|
-
yrange.from = yrange.axis.p2c(yrange.from);
|
1532
|
-
yrange.to = yrange.axis.p2c(yrange.to);
|
1533
|
-
|
1534
|
-
if (
|
1535
|
-
|
2151
|
+
xrange.from = Math.floor(xrange.axis.p2c(xrange.from));
|
2152
|
+
xrange.to = Math.floor(xrange.axis.p2c(xrange.to));
|
2153
|
+
yrange.from = Math.floor(yrange.axis.p2c(yrange.from));
|
2154
|
+
yrange.to = Math.floor(yrange.axis.p2c(yrange.to));
|
2155
|
+
|
2156
|
+
if (xequal || yequal) {
|
2157
|
+
var lineWidth = m.lineWidth || options.grid.markingsLineWidth,
|
2158
|
+
subPixel = lineWidth % 2 ? 0.5 : 0;
|
1536
2159
|
ctx.beginPath();
|
1537
2160
|
ctx.strokeStyle = m.color || options.grid.markingsColor;
|
1538
|
-
ctx.lineWidth =
|
1539
|
-
|
1540
|
-
|
2161
|
+
ctx.lineWidth = lineWidth;
|
2162
|
+
if (xequal) {
|
2163
|
+
ctx.moveTo(xrange.to + subPixel, yrange.from);
|
2164
|
+
ctx.lineTo(xrange.to + subPixel, yrange.to);
|
2165
|
+
} else {
|
2166
|
+
ctx.moveTo(xrange.from, yrange.to + subPixel);
|
2167
|
+
ctx.lineTo(xrange.to, yrange.to + subPixel);
|
2168
|
+
}
|
1541
2169
|
ctx.stroke();
|
1542
|
-
}
|
1543
|
-
else {
|
1544
|
-
// fill area
|
2170
|
+
} else {
|
1545
2171
|
ctx.fillStyle = m.color || options.grid.markingsColor;
|
1546
2172
|
ctx.fillRect(xrange.from, yrange.to,
|
1547
2173
|
xrange.to - xrange.from,
|
@@ -1549,17 +2175,17 @@
|
|
1549
2175
|
}
|
1550
2176
|
}
|
1551
2177
|
}
|
1552
|
-
|
2178
|
+
|
1553
2179
|
// draw the ticks
|
1554
|
-
|
2180
|
+
axes = allAxes();
|
2181
|
+
bw = options.grid.borderWidth;
|
1555
2182
|
|
1556
2183
|
for (var j = 0; j < axes.length; ++j) {
|
1557
2184
|
var axis = axes[j], box = axis.box,
|
1558
2185
|
t = axis.tickLength, x, y, xoff, yoff;
|
1559
2186
|
if (!axis.show || axis.ticks.length == 0)
|
1560
|
-
continue
|
1561
|
-
|
1562
|
-
ctx.strokeStyle = axis.options.tickColor || $.color.parse(axis.options.color).scale('a', 0.22).toString();
|
2187
|
+
continue;
|
2188
|
+
|
1563
2189
|
ctx.lineWidth = 1;
|
1564
2190
|
|
1565
2191
|
// find the edges
|
@@ -1577,19 +2203,23 @@
|
|
1577
2203
|
else
|
1578
2204
|
x = box.left - plotOffset.left + (axis.position == "left" ? box.width : 0);
|
1579
2205
|
}
|
1580
|
-
|
2206
|
+
|
1581
2207
|
// draw tick bar
|
1582
2208
|
if (!axis.innermost) {
|
2209
|
+
ctx.strokeStyle = axis.options.color;
|
1583
2210
|
ctx.beginPath();
|
1584
2211
|
xoff = yoff = 0;
|
1585
2212
|
if (axis.direction == "x")
|
1586
|
-
xoff = plotWidth;
|
2213
|
+
xoff = plotWidth + 1;
|
1587
2214
|
else
|
1588
|
-
yoff = plotHeight;
|
1589
|
-
|
2215
|
+
yoff = plotHeight + 1;
|
2216
|
+
|
1590
2217
|
if (ctx.lineWidth == 1) {
|
1591
|
-
|
1592
|
-
|
2218
|
+
if (axis.direction == "x") {
|
2219
|
+
y = Math.floor(y) + 0.5;
|
2220
|
+
} else {
|
2221
|
+
x = Math.floor(x) + 0.5;
|
2222
|
+
}
|
1593
2223
|
}
|
1594
2224
|
|
1595
2225
|
ctx.moveTo(x, y);
|
@@ -1598,29 +2228,33 @@
|
|
1598
2228
|
}
|
1599
2229
|
|
1600
2230
|
// draw ticks
|
2231
|
+
|
2232
|
+
ctx.strokeStyle = axis.options.tickColor;
|
2233
|
+
|
1601
2234
|
ctx.beginPath();
|
1602
2235
|
for (i = 0; i < axis.ticks.length; ++i) {
|
1603
2236
|
var v = axis.ticks[i].v;
|
1604
|
-
|
2237
|
+
|
1605
2238
|
xoff = yoff = 0;
|
1606
2239
|
|
1607
|
-
if (v < axis.min || v > axis.max
|
2240
|
+
if (isNaN(v) || v < axis.min || v > axis.max
|
1608
2241
|
// skip those lying on the axes if we got a border
|
1609
|
-
|| (t == "full"
|
2242
|
+
|| (t == "full"
|
2243
|
+
&& ((typeof bw == "object" && bw[axis.position] > 0) || bw > 0)
|
1610
2244
|
&& (v == axis.min || v == axis.max)))
|
1611
2245
|
continue;
|
1612
2246
|
|
1613
2247
|
if (axis.direction == "x") {
|
1614
2248
|
x = axis.p2c(v);
|
1615
2249
|
yoff = t == "full" ? -plotHeight : t;
|
1616
|
-
|
2250
|
+
|
1617
2251
|
if (axis.position == "top")
|
1618
2252
|
yoff = -yoff;
|
1619
2253
|
}
|
1620
2254
|
else {
|
1621
2255
|
y = axis.p2c(v);
|
1622
2256
|
xoff = t == "full" ? -plotWidth : t;
|
1623
|
-
|
2257
|
+
|
1624
2258
|
if (axis.position == "left")
|
1625
2259
|
xoff = -xoff;
|
1626
2260
|
}
|
@@ -1635,74 +2269,117 @@
|
|
1635
2269
|
ctx.moveTo(x, y);
|
1636
2270
|
ctx.lineTo(x + xoff, y + yoff);
|
1637
2271
|
}
|
1638
|
-
|
2272
|
+
|
1639
2273
|
ctx.stroke();
|
1640
2274
|
}
|
1641
|
-
|
1642
|
-
|
2275
|
+
|
2276
|
+
|
1643
2277
|
// draw border
|
1644
2278
|
if (bw) {
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
2279
|
+
// If either borderWidth or borderColor is an object, then draw the border
|
2280
|
+
// line by line instead of as one rectangle
|
2281
|
+
bc = options.grid.borderColor;
|
2282
|
+
if(typeof bw == "object" || typeof bc == "object") {
|
2283
|
+
if (typeof bw !== "object") {
|
2284
|
+
bw = {top: bw, right: bw, bottom: bw, left: bw};
|
2285
|
+
}
|
2286
|
+
if (typeof bc !== "object") {
|
2287
|
+
bc = {top: bc, right: bc, bottom: bc, left: bc};
|
2288
|
+
}
|
2289
|
+
|
2290
|
+
if (bw.top > 0) {
|
2291
|
+
ctx.strokeStyle = bc.top;
|
2292
|
+
ctx.lineWidth = bw.top;
|
2293
|
+
ctx.beginPath();
|
2294
|
+
ctx.moveTo(0 - bw.left, 0 - bw.top/2);
|
2295
|
+
ctx.lineTo(plotWidth, 0 - bw.top/2);
|
2296
|
+
ctx.stroke();
|
2297
|
+
}
|
2298
|
+
|
2299
|
+
if (bw.right > 0) {
|
2300
|
+
ctx.strokeStyle = bc.right;
|
2301
|
+
ctx.lineWidth = bw.right;
|
2302
|
+
ctx.beginPath();
|
2303
|
+
ctx.moveTo(plotWidth + bw.right / 2, 0 - bw.top);
|
2304
|
+
ctx.lineTo(plotWidth + bw.right / 2, plotHeight);
|
2305
|
+
ctx.stroke();
|
2306
|
+
}
|
2307
|
+
|
2308
|
+
if (bw.bottom > 0) {
|
2309
|
+
ctx.strokeStyle = bc.bottom;
|
2310
|
+
ctx.lineWidth = bw.bottom;
|
2311
|
+
ctx.beginPath();
|
2312
|
+
ctx.moveTo(plotWidth + bw.right, plotHeight + bw.bottom / 2);
|
2313
|
+
ctx.lineTo(0, plotHeight + bw.bottom / 2);
|
2314
|
+
ctx.stroke();
|
2315
|
+
}
|
2316
|
+
|
2317
|
+
if (bw.left > 0) {
|
2318
|
+
ctx.strokeStyle = bc.left;
|
2319
|
+
ctx.lineWidth = bw.left;
|
2320
|
+
ctx.beginPath();
|
2321
|
+
ctx.moveTo(0 - bw.left/2, plotHeight + bw.bottom);
|
2322
|
+
ctx.lineTo(0- bw.left/2, 0);
|
2323
|
+
ctx.stroke();
|
2324
|
+
}
|
2325
|
+
}
|
2326
|
+
else {
|
2327
|
+
ctx.lineWidth = bw;
|
2328
|
+
ctx.strokeStyle = options.grid.borderColor;
|
2329
|
+
ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw);
|
2330
|
+
}
|
1648
2331
|
}
|
1649
2332
|
|
1650
2333
|
ctx.restore();
|
1651
2334
|
}
|
1652
2335
|
|
1653
|
-
function
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
2336
|
+
function drawAxisLabels() {
|
2337
|
+
|
2338
|
+
$.each(allAxes(), function (_, axis) {
|
2339
|
+
var box = axis.box,
|
2340
|
+
legacyStyles = axis.direction + "Axis " + axis.direction + axis.n + "Axis",
|
2341
|
+
layer = "flot-" + axis.direction + "-axis flot-" + axis.direction + axis.n + "-axis " + legacyStyles,
|
2342
|
+
font = axis.options.font || "flot-tick-label tickLabel",
|
2343
|
+
tick, x, y, halign, valign;
|
2344
|
+
|
2345
|
+
// Remove text before checking for axis.show and ticks.length;
|
2346
|
+
// otherwise plugins, like flot-tickrotor, that draw their own
|
2347
|
+
// tick labels will end up with both theirs and the defaults.
|
2348
|
+
|
2349
|
+
surface.removeText(layer);
|
2350
|
+
|
2351
|
+
if (!axis.show || axis.ticks.length == 0)
|
2352
|
+
return;
|
1657
2353
|
|
1658
|
-
var axes = allAxes();
|
1659
|
-
for (var j = 0; j < axes.length; ++j) {
|
1660
|
-
var axis = axes[j], box = axis.box;
|
1661
|
-
if (!axis.show)
|
1662
|
-
continue;
|
1663
|
-
//debug: html.push('<div style="position:absolute;opacity:0.10;background-color:red;left:' + box.left + 'px;top:' + box.top + 'px;width:' + box.width + 'px;height:' + box.height + 'px"></div>')
|
1664
|
-
html.push('<div class="' + axis.direction + 'Axis ' + axis.direction + axis.n + 'Axis" style="color:' + axis.options.color + '">');
|
1665
2354
|
for (var i = 0; i < axis.ticks.length; ++i) {
|
1666
|
-
|
2355
|
+
|
2356
|
+
tick = axis.ticks[i];
|
1667
2357
|
if (!tick.label || tick.v < axis.min || tick.v > axis.max)
|
1668
2358
|
continue;
|
1669
2359
|
|
1670
|
-
var pos = {}, align;
|
1671
|
-
|
1672
2360
|
if (axis.direction == "x") {
|
1673
|
-
|
1674
|
-
|
1675
|
-
if (axis.position == "bottom")
|
1676
|
-
|
1677
|
-
else
|
1678
|
-
|
1679
|
-
|
1680
|
-
else {
|
1681
|
-
pos.top = Math.round(plotOffset.top + axis.p2c(tick.v) - axis.labelHeight/2);
|
1682
|
-
if (axis.position == "left") {
|
1683
|
-
pos.right = canvasWidth - (box.left + box.width - box.padding)
|
1684
|
-
align = "right";
|
2361
|
+
halign = "center";
|
2362
|
+
x = plotOffset.left + axis.p2c(tick.v);
|
2363
|
+
if (axis.position == "bottom") {
|
2364
|
+
y = box.top + box.padding;
|
2365
|
+
} else {
|
2366
|
+
y = box.top + box.height - box.padding;
|
2367
|
+
valign = "bottom";
|
1685
2368
|
}
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
2369
|
+
} else {
|
2370
|
+
valign = "middle";
|
2371
|
+
y = plotOffset.top + axis.p2c(tick.v);
|
2372
|
+
if (axis.position == "left") {
|
2373
|
+
x = box.left + box.width - box.padding;
|
2374
|
+
halign = "right";
|
2375
|
+
} else {
|
2376
|
+
x = box.left + box.padding;
|
1689
2377
|
}
|
1690
2378
|
}
|
1691
2379
|
|
1692
|
-
|
1693
|
-
|
1694
|
-
var style = ["position:absolute", "text-align:" + align ];
|
1695
|
-
for (var a in pos)
|
1696
|
-
style.push(a + ":" + pos[a] + "px")
|
1697
|
-
|
1698
|
-
html.push('<div class="tickLabel" style="' + style.join(';') + '">' + tick.label + '</div>');
|
2380
|
+
surface.addText(layer, x, y, tick.label, font, null, null, halign, valign);
|
1699
2381
|
}
|
1700
|
-
|
1701
|
-
}
|
1702
|
-
|
1703
|
-
html.push('</div>');
|
1704
|
-
|
1705
|
-
placeholder.append(html.join(""));
|
2382
|
+
});
|
1706
2383
|
}
|
1707
2384
|
|
1708
2385
|
function drawSeries(series) {
|
@@ -1713,18 +2390,18 @@
|
|
1713
2390
|
if (series.points.show)
|
1714
2391
|
drawSeriesPoints(series);
|
1715
2392
|
}
|
1716
|
-
|
2393
|
+
|
1717
2394
|
function drawSeriesLines(series) {
|
1718
2395
|
function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {
|
1719
2396
|
var points = datapoints.points,
|
1720
2397
|
ps = datapoints.pointsize,
|
1721
2398
|
prevx = null, prevy = null;
|
1722
|
-
|
2399
|
+
|
1723
2400
|
ctx.beginPath();
|
1724
2401
|
for (var i = ps; i < points.length; i += ps) {
|
1725
2402
|
var x1 = points[i - ps], y1 = points[i - ps + 1],
|
1726
2403
|
x2 = points[i], y2 = points[i + 1];
|
1727
|
-
|
2404
|
+
|
1728
2405
|
if (x1 == null || x2 == null)
|
1729
2406
|
continue;
|
1730
2407
|
|
@@ -1787,7 +2464,7 @@
|
|
1787
2464
|
|
1788
2465
|
if (x1 != prevx || y1 != prevy)
|
1789
2466
|
ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset);
|
1790
|
-
|
2467
|
+
|
1791
2468
|
prevx = x2;
|
1792
2469
|
prevy = y2;
|
1793
2470
|
ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset);
|
@@ -1839,7 +2516,7 @@
|
|
1839
2516
|
continue;
|
1840
2517
|
|
1841
2518
|
// clip x values
|
1842
|
-
|
2519
|
+
|
1843
2520
|
// clip with xmin
|
1844
2521
|
if (x1 <= x2 && x1 < axisx.min) {
|
1845
2522
|
if (x2 < axisx.min)
|
@@ -1874,7 +2551,7 @@
|
|
1874
2551
|
ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom));
|
1875
2552
|
areaOpen = true;
|
1876
2553
|
}
|
1877
|
-
|
2554
|
+
|
1878
2555
|
// now first check the case where both is outside
|
1879
2556
|
if (y1 >= axisy.max && y2 >= axisy.max) {
|
1880
2557
|
ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max));
|
@@ -1886,7 +2563,7 @@
|
|
1886
2563
|
ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min));
|
1887
2564
|
continue;
|
1888
2565
|
}
|
1889
|
-
|
2566
|
+
|
1890
2567
|
// else it's a bit more complicated, there might
|
1891
2568
|
// be a flat maxed out rectangle first, then a
|
1892
2569
|
// triangular cutout or reverse; to find these
|
@@ -1895,7 +2572,7 @@
|
|
1895
2572
|
|
1896
2573
|
// clip the y values, without shortcutting, we
|
1897
2574
|
// go through all cases in turn
|
1898
|
-
|
2575
|
+
|
1899
2576
|
// clip with ymin
|
1900
2577
|
if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) {
|
1901
2578
|
x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
|
@@ -1922,7 +2599,7 @@
|
|
1922
2599
|
ctx.lineTo(axisx.p2c(x1old), axisy.p2c(y1));
|
1923
2600
|
// it goes to (x1, y1), but we fill that below
|
1924
2601
|
}
|
1925
|
-
|
2602
|
+
|
1926
2603
|
// fill triangular section, this sometimes result
|
1927
2604
|
// in redundant points if (x1, y1) hasn't changed
|
1928
2605
|
// from previous line to, but we just ignore that
|
@@ -1976,7 +2653,7 @@
|
|
1976
2653
|
var x = points[i], y = points[i + 1];
|
1977
2654
|
if (x == null || x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)
|
1978
2655
|
continue;
|
1979
|
-
|
2656
|
+
|
1980
2657
|
ctx.beginPath();
|
1981
2658
|
x = axisx.p2c(x);
|
1982
2659
|
y = axisy.p2c(y) + offset;
|
@@ -1985,7 +2662,7 @@
|
|
1985
2662
|
else
|
1986
2663
|
symbol(ctx, x, y, radius, shadow);
|
1987
2664
|
ctx.closePath();
|
1988
|
-
|
2665
|
+
|
1989
2666
|
if (fillStyle) {
|
1990
2667
|
ctx.fillStyle = fillStyle;
|
1991
2668
|
ctx.fill();
|
@@ -1993,7 +2670,7 @@
|
|
1993
2670
|
ctx.stroke();
|
1994
2671
|
}
|
1995
2672
|
}
|
1996
|
-
|
2673
|
+
|
1997
2674
|
ctx.save();
|
1998
2675
|
ctx.translate(plotOffset.left, plotOffset.top);
|
1999
2676
|
|
@@ -2001,6 +2678,15 @@
|
|
2001
2678
|
sw = series.shadowSize,
|
2002
2679
|
radius = series.points.radius,
|
2003
2680
|
symbol = series.points.symbol;
|
2681
|
+
|
2682
|
+
// If the user sets the line width to 0, we change it to a very
|
2683
|
+
// small value. A line width of 0 seems to force the default of 1.
|
2684
|
+
// Doing the conditional here allows the shadow setting to still be
|
2685
|
+
// optional even with a lineWidth of 0.
|
2686
|
+
|
2687
|
+
if( lw == 0 )
|
2688
|
+
lw = 0.0001;
|
2689
|
+
|
2004
2690
|
if (lw > 0 && sw > 0) {
|
2005
2691
|
// draw shadow in two steps
|
2006
2692
|
var w = sw / 2;
|
@@ -2022,7 +2708,7 @@
|
|
2022
2708
|
ctx.restore();
|
2023
2709
|
}
|
2024
2710
|
|
2025
|
-
function drawBar(x, y, b, barLeft, barRight,
|
2711
|
+
function drawBar(x, y, b, barLeft, barRight, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) {
|
2026
2712
|
var left, right, bottom, top,
|
2027
2713
|
drawLeft, drawRight, drawTop, drawBottom,
|
2028
2714
|
tmp;
|
@@ -2064,12 +2750,12 @@
|
|
2064
2750
|
drawTop = false;
|
2065
2751
|
}
|
2066
2752
|
}
|
2067
|
-
|
2753
|
+
|
2068
2754
|
// clip
|
2069
2755
|
if (right < axisx.min || left > axisx.max ||
|
2070
2756
|
top < axisy.min || bottom > axisy.max)
|
2071
2757
|
return;
|
2072
|
-
|
2758
|
+
|
2073
2759
|
if (left < axisx.min) {
|
2074
2760
|
left = axisx.min;
|
2075
2761
|
drawLeft = false;
|
@@ -2084,7 +2770,7 @@
|
|
2084
2770
|
bottom = axisy.min;
|
2085
2771
|
drawBottom = false;
|
2086
2772
|
}
|
2087
|
-
|
2773
|
+
|
2088
2774
|
if (top > axisy.max) {
|
2089
2775
|
top = axisy.max;
|
2090
2776
|
drawTop = false;
|
@@ -2094,16 +2780,11 @@
|
|
2094
2780
|
bottom = axisy.p2c(bottom);
|
2095
2781
|
right = axisx.p2c(right);
|
2096
2782
|
top = axisy.p2c(top);
|
2097
|
-
|
2783
|
+
|
2098
2784
|
// fill the bar
|
2099
2785
|
if (fillStyleCallback) {
|
2100
|
-
c.beginPath();
|
2101
|
-
c.moveTo(left, bottom);
|
2102
|
-
c.lineTo(left, top);
|
2103
|
-
c.lineTo(right, top);
|
2104
|
-
c.lineTo(right, bottom);
|
2105
2786
|
c.fillStyle = fillStyleCallback(bottom, top);
|
2106
|
-
c.
|
2787
|
+
c.fillRect(left, top, right - left, bottom - top)
|
2107
2788
|
}
|
2108
2789
|
|
2109
2790
|
// draw outline
|
@@ -2111,35 +2792,35 @@
|
|
2111
2792
|
c.beginPath();
|
2112
2793
|
|
2113
2794
|
// FIXME: inline moveTo is buggy with excanvas
|
2114
|
-
c.moveTo(left, bottom
|
2795
|
+
c.moveTo(left, bottom);
|
2115
2796
|
if (drawLeft)
|
2116
|
-
c.lineTo(left, top
|
2797
|
+
c.lineTo(left, top);
|
2117
2798
|
else
|
2118
|
-
c.moveTo(left, top
|
2799
|
+
c.moveTo(left, top);
|
2119
2800
|
if (drawTop)
|
2120
|
-
c.lineTo(right, top
|
2801
|
+
c.lineTo(right, top);
|
2121
2802
|
else
|
2122
|
-
c.moveTo(right, top
|
2803
|
+
c.moveTo(right, top);
|
2123
2804
|
if (drawRight)
|
2124
|
-
c.lineTo(right, bottom
|
2805
|
+
c.lineTo(right, bottom);
|
2125
2806
|
else
|
2126
|
-
c.moveTo(right, bottom
|
2807
|
+
c.moveTo(right, bottom);
|
2127
2808
|
if (drawBottom)
|
2128
|
-
c.lineTo(left, bottom
|
2809
|
+
c.lineTo(left, bottom);
|
2129
2810
|
else
|
2130
|
-
c.moveTo(left, bottom
|
2811
|
+
c.moveTo(left, bottom);
|
2131
2812
|
c.stroke();
|
2132
2813
|
}
|
2133
2814
|
}
|
2134
|
-
|
2815
|
+
|
2135
2816
|
function drawSeriesBars(series) {
|
2136
|
-
function plotBars(datapoints, barLeft, barRight,
|
2817
|
+
function plotBars(datapoints, barLeft, barRight, fillStyleCallback, axisx, axisy) {
|
2137
2818
|
var points = datapoints.points, ps = datapoints.pointsize;
|
2138
|
-
|
2819
|
+
|
2139
2820
|
for (var i = 0; i < points.length; i += ps) {
|
2140
2821
|
if (points[i] == null)
|
2141
2822
|
continue;
|
2142
|
-
drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight,
|
2823
|
+
drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth);
|
2143
2824
|
}
|
2144
2825
|
}
|
2145
2826
|
|
@@ -2149,9 +2830,22 @@
|
|
2149
2830
|
// FIXME: figure out a way to add shadows (for instance along the right edge)
|
2150
2831
|
ctx.lineWidth = series.bars.lineWidth;
|
2151
2832
|
ctx.strokeStyle = series.color;
|
2152
|
-
|
2833
|
+
|
2834
|
+
var barLeft;
|
2835
|
+
|
2836
|
+
switch (series.bars.align) {
|
2837
|
+
case "left":
|
2838
|
+
barLeft = 0;
|
2839
|
+
break;
|
2840
|
+
case "right":
|
2841
|
+
barLeft = -series.bars.barWidth;
|
2842
|
+
break;
|
2843
|
+
default:
|
2844
|
+
barLeft = -series.bars.barWidth / 2;
|
2845
|
+
}
|
2846
|
+
|
2153
2847
|
var fillStyleCallback = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null;
|
2154
|
-
plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth,
|
2848
|
+
plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth, fillStyleCallback, series.xaxis, series.yaxis);
|
2155
2849
|
ctx.restore();
|
2156
2850
|
}
|
2157
2851
|
|
@@ -2162,27 +2856,66 @@
|
|
2162
2856
|
|
2163
2857
|
if (filloptions.fillColor)
|
2164
2858
|
return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor);
|
2165
|
-
|
2859
|
+
|
2166
2860
|
var c = $.color.parse(seriesColor);
|
2167
2861
|
c.a = typeof fill == "number" ? fill : 0.4;
|
2168
2862
|
c.normalize();
|
2169
2863
|
return c.toString();
|
2170
2864
|
}
|
2171
|
-
|
2865
|
+
|
2172
2866
|
function insertLegend() {
|
2173
|
-
placeholder.find(".legend").remove();
|
2174
2867
|
|
2175
|
-
if (
|
2868
|
+
if (options.legend.container != null) {
|
2869
|
+
$(options.legend.container).html("");
|
2870
|
+
} else {
|
2871
|
+
placeholder.find(".legend").remove();
|
2872
|
+
}
|
2873
|
+
|
2874
|
+
if (!options.legend.show) {
|
2176
2875
|
return;
|
2177
|
-
|
2178
|
-
|
2876
|
+
}
|
2877
|
+
|
2878
|
+
var fragments = [], entries = [], rowStarted = false,
|
2179
2879
|
lf = options.legend.labelFormatter, s, label;
|
2880
|
+
|
2881
|
+
// Build a list of legend entries, with each having a label and a color
|
2882
|
+
|
2180
2883
|
for (var i = 0; i < series.length; ++i) {
|
2181
2884
|
s = series[i];
|
2182
|
-
|
2183
|
-
|
2184
|
-
|
2185
|
-
|
2885
|
+
if (s.label) {
|
2886
|
+
label = lf ? lf(s.label, s) : s.label;
|
2887
|
+
if (label) {
|
2888
|
+
entries.push({
|
2889
|
+
label: label,
|
2890
|
+
color: s.color
|
2891
|
+
});
|
2892
|
+
}
|
2893
|
+
}
|
2894
|
+
}
|
2895
|
+
|
2896
|
+
// Sort the legend using either the default or a custom comparator
|
2897
|
+
|
2898
|
+
if (options.legend.sorted) {
|
2899
|
+
if ($.isFunction(options.legend.sorted)) {
|
2900
|
+
entries.sort(options.legend.sorted);
|
2901
|
+
} else if (options.legend.sorted == "reverse") {
|
2902
|
+
entries.reverse();
|
2903
|
+
} else {
|
2904
|
+
var ascending = options.legend.sorted != "descending";
|
2905
|
+
entries.sort(function(a, b) {
|
2906
|
+
return a.label == b.label ? 0 : (
|
2907
|
+
(a.label < b.label) != ascending ? 1 : -1 // Logical XOR
|
2908
|
+
);
|
2909
|
+
});
|
2910
|
+
}
|
2911
|
+
}
|
2912
|
+
|
2913
|
+
// Generate markup for the list of entries, in their final order
|
2914
|
+
|
2915
|
+
for (var i = 0; i < entries.length; ++i) {
|
2916
|
+
|
2917
|
+
var entry = entries[i];
|
2918
|
+
|
2186
2919
|
if (i % options.legend.noColumns == 0) {
|
2187
2920
|
if (rowStarted)
|
2188
2921
|
fragments.push('</tr>');
|
@@ -2190,16 +2923,15 @@
|
|
2190
2923
|
rowStarted = true;
|
2191
2924
|
}
|
2192
2925
|
|
2193
|
-
if (lf)
|
2194
|
-
label = lf(label, s);
|
2195
|
-
|
2196
2926
|
fragments.push(
|
2197
|
-
'<td class="legendColorBox"><div style="border:1px solid ' + options.legend.labelBoxBorderColor + ';padding:1px"><div style="width:4px;height:0;border:5px solid ' +
|
2198
|
-
'<td class="legendLabel">' + label + '</td>'
|
2927
|
+
'<td class="legendColorBox"><div style="border:1px solid ' + options.legend.labelBoxBorderColor + ';padding:1px"><div style="width:4px;height:0;border:5px solid ' + entry.color + ';overflow:hidden"></div></div></td>' +
|
2928
|
+
'<td class="legendLabel">' + entry.label + '</td>'
|
2929
|
+
);
|
2199
2930
|
}
|
2931
|
+
|
2200
2932
|
if (rowStarted)
|
2201
2933
|
fragments.push('</tr>');
|
2202
|
-
|
2934
|
+
|
2203
2935
|
if (fragments.length == 0)
|
2204
2936
|
return;
|
2205
2937
|
|
@@ -2243,43 +2975,43 @@
|
|
2243
2975
|
|
2244
2976
|
|
2245
2977
|
// interactive features
|
2246
|
-
|
2978
|
+
|
2247
2979
|
var highlights = [],
|
2248
2980
|
redrawTimeout = null;
|
2249
|
-
|
2981
|
+
|
2250
2982
|
// returns the data item the mouse is over, or null if none is found
|
2251
2983
|
function findNearbyItem(mouseX, mouseY, seriesFilter) {
|
2252
2984
|
var maxDistance = options.grid.mouseActiveRadius,
|
2253
2985
|
smallestDistance = maxDistance * maxDistance + 1,
|
2254
|
-
item = null, foundPoint = false, i, j;
|
2986
|
+
item = null, foundPoint = false, i, j, ps;
|
2255
2987
|
|
2256
2988
|
for (i = series.length - 1; i >= 0; --i) {
|
2257
2989
|
if (!seriesFilter(series[i]))
|
2258
2990
|
continue;
|
2259
|
-
|
2991
|
+
|
2260
2992
|
var s = series[i],
|
2261
2993
|
axisx = s.xaxis,
|
2262
2994
|
axisy = s.yaxis,
|
2263
2995
|
points = s.datapoints.points,
|
2264
|
-
ps = s.datapoints.pointsize,
|
2265
2996
|
mx = axisx.c2p(mouseX), // precompute some stuff to make the loop faster
|
2266
2997
|
my = axisy.c2p(mouseY),
|
2267
2998
|
maxx = maxDistance / axisx.scale,
|
2268
2999
|
maxy = maxDistance / axisy.scale;
|
2269
3000
|
|
3001
|
+
ps = s.datapoints.pointsize;
|
2270
3002
|
// with inverse transforms, we can't use the maxx/maxy
|
2271
3003
|
// optimization, sadly
|
2272
3004
|
if (axisx.options.inverseTransform)
|
2273
3005
|
maxx = Number.MAX_VALUE;
|
2274
3006
|
if (axisy.options.inverseTransform)
|
2275
3007
|
maxy = Number.MAX_VALUE;
|
2276
|
-
|
3008
|
+
|
2277
3009
|
if (s.lines.show || s.points.show) {
|
2278
3010
|
for (j = 0; j < points.length; j += ps) {
|
2279
3011
|
var x = points[j], y = points[j + 1];
|
2280
3012
|
if (x == null)
|
2281
3013
|
continue;
|
2282
|
-
|
3014
|
+
|
2283
3015
|
// For points and lines, the cursor must be within a
|
2284
3016
|
// certain distance to the data point
|
2285
3017
|
if (x - mx > maxx || x - mx < -maxx ||
|
@@ -2300,19 +3032,32 @@
|
|
2300
3032
|
}
|
2301
3033
|
}
|
2302
3034
|
}
|
2303
|
-
|
3035
|
+
|
2304
3036
|
if (s.bars.show && !item) { // no other point can be nearby
|
2305
|
-
|
2306
|
-
|
2307
|
-
|
3037
|
+
|
3038
|
+
var barLeft, barRight;
|
3039
|
+
|
3040
|
+
switch (s.bars.align) {
|
3041
|
+
case "left":
|
3042
|
+
barLeft = 0;
|
3043
|
+
break;
|
3044
|
+
case "right":
|
3045
|
+
barLeft = -s.bars.barWidth;
|
3046
|
+
break;
|
3047
|
+
default:
|
3048
|
+
barLeft = -s.bars.barWidth / 2;
|
3049
|
+
}
|
3050
|
+
|
3051
|
+
barRight = barLeft + s.bars.barWidth;
|
3052
|
+
|
2308
3053
|
for (j = 0; j < points.length; j += ps) {
|
2309
3054
|
var x = points[j], y = points[j + 1], b = points[j + 2];
|
2310
3055
|
if (x == null)
|
2311
3056
|
continue;
|
2312
|
-
|
3057
|
+
|
2313
3058
|
// for a bar graph, the cursor must be inside the bar
|
2314
|
-
if (series[i].bars.horizontal ?
|
2315
|
-
(mx <= Math.max(b, x) && mx >= Math.min(b, x) &&
|
3059
|
+
if (series[i].bars.horizontal ?
|
3060
|
+
(mx <= Math.max(b, x) && mx >= Math.min(b, x) &&
|
2316
3061
|
my >= y + barLeft && my <= y + barRight) :
|
2317
3062
|
(mx >= x + barLeft && mx <= x + barRight &&
|
2318
3063
|
my >= Math.min(b, y) && my <= Math.max(b, y)))
|
@@ -2325,13 +3070,13 @@
|
|
2325
3070
|
i = item[0];
|
2326
3071
|
j = item[1];
|
2327
3072
|
ps = series[i].datapoints.pointsize;
|
2328
|
-
|
3073
|
+
|
2329
3074
|
return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),
|
2330
3075
|
dataIndex: j,
|
2331
3076
|
series: series[i],
|
2332
3077
|
seriesIndex: i };
|
2333
3078
|
}
|
2334
|
-
|
3079
|
+
|
2335
3080
|
return null;
|
2336
3081
|
}
|
2337
3082
|
|
@@ -2367,8 +3112,8 @@
|
|
2367
3112
|
|
2368
3113
|
if (item) {
|
2369
3114
|
// fill in mouse pos for any listeners out there
|
2370
|
-
item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left);
|
2371
|
-
item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top);
|
3115
|
+
item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);
|
3116
|
+
item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);
|
2372
3117
|
}
|
2373
3118
|
|
2374
3119
|
if (options.grid.autoHighlight) {
|
@@ -2381,17 +3126,23 @@
|
|
2381
3126
|
h.point[1] == item.datapoint[1]))
|
2382
3127
|
unhighlight(h.series, h.point);
|
2383
3128
|
}
|
2384
|
-
|
3129
|
+
|
2385
3130
|
if (item)
|
2386
3131
|
highlight(item.series, item.datapoint, eventname);
|
2387
3132
|
}
|
2388
|
-
|
3133
|
+
|
2389
3134
|
placeholder.trigger(eventname, [ pos, item ]);
|
2390
3135
|
}
|
2391
3136
|
|
2392
3137
|
function triggerRedrawOverlay() {
|
3138
|
+
var t = options.interaction.redrawOverlayInterval;
|
3139
|
+
if (t == -1) { // skip event queue
|
3140
|
+
drawOverlay();
|
3141
|
+
return;
|
3142
|
+
}
|
3143
|
+
|
2393
3144
|
if (!redrawTimeout)
|
2394
|
-
redrawTimeout = setTimeout(drawOverlay,
|
3145
|
+
redrawTimeout = setTimeout(drawOverlay, t);
|
2395
3146
|
}
|
2396
3147
|
|
2397
3148
|
function drawOverlay() {
|
@@ -2399,9 +3150,9 @@
|
|
2399
3150
|
|
2400
3151
|
// draw highlights
|
2401
3152
|
octx.save();
|
2402
|
-
|
3153
|
+
overlay.clear();
|
2403
3154
|
octx.translate(plotOffset.left, plotOffset.top);
|
2404
|
-
|
3155
|
+
|
2405
3156
|
var i, hi;
|
2406
3157
|
for (i = 0; i < highlights.length; ++i) {
|
2407
3158
|
hi = highlights[i];
|
@@ -2412,10 +3163,10 @@
|
|
2412
3163
|
drawPointHighlight(hi.series, hi.point);
|
2413
3164
|
}
|
2414
3165
|
octx.restore();
|
2415
|
-
|
3166
|
+
|
2416
3167
|
executeHooks(hooks.drawOverlay, [octx]);
|
2417
3168
|
}
|
2418
|
-
|
3169
|
+
|
2419
3170
|
function highlight(s, point, auto) {
|
2420
3171
|
if (typeof s == "number")
|
2421
3172
|
s = series[s];
|
@@ -2434,18 +3185,21 @@
|
|
2434
3185
|
else if (!auto)
|
2435
3186
|
highlights[i].auto = false;
|
2436
3187
|
}
|
2437
|
-
|
3188
|
+
|
2438
3189
|
function unhighlight(s, point) {
|
2439
3190
|
if (s == null && point == null) {
|
2440
3191
|
highlights = [];
|
2441
3192
|
triggerRedrawOverlay();
|
3193
|
+
return;
|
2442
3194
|
}
|
2443
|
-
|
3195
|
+
|
2444
3196
|
if (typeof s == "number")
|
2445
3197
|
s = series[s];
|
2446
3198
|
|
2447
|
-
if (typeof point == "number")
|
2448
|
-
|
3199
|
+
if (typeof point == "number") {
|
3200
|
+
var ps = s.datapoints.pointsize;
|
3201
|
+
point = s.datapoints.points.slice(ps * point, ps * (point + 1));
|
3202
|
+
}
|
2449
3203
|
|
2450
3204
|
var i = indexOfHighlight(s, point);
|
2451
3205
|
if (i != -1) {
|
@@ -2454,7 +3208,7 @@
|
|
2454
3208
|
triggerRedrawOverlay();
|
2455
3209
|
}
|
2456
3210
|
}
|
2457
|
-
|
3211
|
+
|
2458
3212
|
function indexOfHighlight(s, p) {
|
2459
3213
|
for (var i = 0; i < highlights.length; ++i) {
|
2460
3214
|
var h = highlights[i];
|
@@ -2464,21 +3218,22 @@
|
|
2464
3218
|
}
|
2465
3219
|
return -1;
|
2466
3220
|
}
|
2467
|
-
|
3221
|
+
|
2468
3222
|
function drawPointHighlight(series, point) {
|
2469
3223
|
var x = point[0], y = point[1],
|
2470
|
-
axisx = series.xaxis, axisy = series.yaxis
|
2471
|
-
|
3224
|
+
axisx = series.xaxis, axisy = series.yaxis,
|
3225
|
+
highlightColor = (typeof series.highlightColor === "string") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString();
|
3226
|
+
|
2472
3227
|
if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)
|
2473
3228
|
return;
|
2474
|
-
|
3229
|
+
|
2475
3230
|
var pointRadius = series.points.radius + series.points.lineWidth / 2;
|
2476
3231
|
octx.lineWidth = pointRadius;
|
2477
|
-
octx.strokeStyle =
|
2478
|
-
var radius = 1.5 * pointRadius
|
2479
|
-
|
2480
|
-
|
2481
|
-
|
3232
|
+
octx.strokeStyle = highlightColor;
|
3233
|
+
var radius = 1.5 * pointRadius;
|
3234
|
+
x = axisx.p2c(x);
|
3235
|
+
y = axisy.p2c(y);
|
3236
|
+
|
2482
3237
|
octx.beginPath();
|
2483
3238
|
if (series.points.symbol == "circle")
|
2484
3239
|
octx.arc(x, y, radius, 0, 2 * Math.PI, false);
|
@@ -2489,12 +3244,26 @@
|
|
2489
3244
|
}
|
2490
3245
|
|
2491
3246
|
function drawBarHighlight(series, point) {
|
3247
|
+
var highlightColor = (typeof series.highlightColor === "string") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString(),
|
3248
|
+
fillStyle = highlightColor,
|
3249
|
+
barLeft;
|
3250
|
+
|
3251
|
+
switch (series.bars.align) {
|
3252
|
+
case "left":
|
3253
|
+
barLeft = 0;
|
3254
|
+
break;
|
3255
|
+
case "right":
|
3256
|
+
barLeft = -series.bars.barWidth;
|
3257
|
+
break;
|
3258
|
+
default:
|
3259
|
+
barLeft = -series.bars.barWidth / 2;
|
3260
|
+
}
|
3261
|
+
|
2492
3262
|
octx.lineWidth = series.bars.lineWidth;
|
2493
|
-
octx.strokeStyle =
|
2494
|
-
|
2495
|
-
var barLeft = series.bars.align == "left" ? 0 : -series.bars.barWidth/2;
|
3263
|
+
octx.strokeStyle = highlightColor;
|
3264
|
+
|
2496
3265
|
drawBar(point[0], point[1], point[2] || 0, barLeft, barLeft + series.bars.barWidth,
|
2497
|
-
|
3266
|
+
function () { return fillStyle; }, series.xaxis, series.yaxis, octx, series.bars.horizontal, series.bars.lineWidth);
|
2498
3267
|
}
|
2499
3268
|
|
2500
3269
|
function getColorOrGradient(spec, bottom, top, defaultColor) {
|
@@ -2505,25 +3274,27 @@
|
|
2505
3274
|
// supports a simple vertical gradient properly, so that's
|
2506
3275
|
// what we support too
|
2507
3276
|
var gradient = ctx.createLinearGradient(0, top, 0, bottom);
|
2508
|
-
|
3277
|
+
|
2509
3278
|
for (var i = 0, l = spec.colors.length; i < l; ++i) {
|
2510
3279
|
var c = spec.colors[i];
|
2511
3280
|
if (typeof c != "string") {
|
2512
3281
|
var co = $.color.parse(defaultColor);
|
2513
3282
|
if (c.brightness != null)
|
2514
|
-
co = co.scale('rgb', c.brightness)
|
3283
|
+
co = co.scale('rgb', c.brightness);
|
2515
3284
|
if (c.opacity != null)
|
2516
3285
|
co.a *= c.opacity;
|
2517
3286
|
c = co.toString();
|
2518
3287
|
}
|
2519
3288
|
gradient.addColorStop(i / (l - 1), c);
|
2520
3289
|
}
|
2521
|
-
|
3290
|
+
|
2522
3291
|
return gradient;
|
2523
3292
|
}
|
2524
3293
|
}
|
2525
3294
|
}
|
2526
3295
|
|
3296
|
+
// Add the plot function to the top level of the jQuery object
|
3297
|
+
|
2527
3298
|
$.plot = function(placeholder, data, options) {
|
2528
3299
|
//var t0 = new Date();
|
2529
3300
|
var plot = new Plot($(placeholder), data, options, $.plot.plugins);
|
@@ -2531,69 +3302,21 @@
|
|
2531
3302
|
return plot;
|
2532
3303
|
};
|
2533
3304
|
|
2534
|
-
$.plot.version = "0.
|
2535
|
-
|
3305
|
+
$.plot.version = "0.8.3";
|
3306
|
+
|
2536
3307
|
$.plot.plugins = [];
|
2537
3308
|
|
2538
|
-
//
|
2539
|
-
|
2540
|
-
|
2541
|
-
|
2542
|
-
|
2543
|
-
};
|
2544
|
-
|
2545
|
-
var r = [];
|
2546
|
-
var escape = false, padNext = false;
|
2547
|
-
var hours = d.getUTCHours();
|
2548
|
-
var isAM = hours < 12;
|
2549
|
-
if (monthNames == null)
|
2550
|
-
monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
2551
|
-
|
2552
|
-
if (fmt.search(/%p|%P/) != -1) {
|
2553
|
-
if (hours > 12) {
|
2554
|
-
hours = hours - 12;
|
2555
|
-
} else if (hours == 0) {
|
2556
|
-
hours = 12;
|
2557
|
-
}
|
2558
|
-
}
|
2559
|
-
for (var i = 0; i < fmt.length; ++i) {
|
2560
|
-
var c = fmt.charAt(i);
|
2561
|
-
|
2562
|
-
if (escape) {
|
2563
|
-
switch (c) {
|
2564
|
-
case 'h': c = "" + hours; break;
|
2565
|
-
case 'H': c = leftPad(hours); break;
|
2566
|
-
case 'M': c = leftPad(d.getUTCMinutes()); break;
|
2567
|
-
case 'S': c = leftPad(d.getUTCSeconds()); break;
|
2568
|
-
case 'd': c = "" + d.getUTCDate(); break;
|
2569
|
-
case 'm': c = "" + (d.getUTCMonth() + 1); break;
|
2570
|
-
case 'y': c = "" + d.getUTCFullYear(); break;
|
2571
|
-
case 'b': c = "" + monthNames[d.getUTCMonth()]; break;
|
2572
|
-
case 'p': c = (isAM) ? ("" + "am") : ("" + "pm"); break;
|
2573
|
-
case 'P': c = (isAM) ? ("" + "AM") : ("" + "PM"); break;
|
2574
|
-
case '0': c = ""; padNext = true; break;
|
2575
|
-
}
|
2576
|
-
if (c && padNext) {
|
2577
|
-
c = leftPad(c);
|
2578
|
-
padNext = false;
|
2579
|
-
}
|
2580
|
-
r.push(c);
|
2581
|
-
if (!padNext)
|
2582
|
-
escape = false;
|
2583
|
-
}
|
2584
|
-
else {
|
2585
|
-
if (c == "%")
|
2586
|
-
escape = true;
|
2587
|
-
else
|
2588
|
-
r.push(c);
|
2589
|
-
}
|
2590
|
-
}
|
2591
|
-
return r.join("");
|
3309
|
+
// Also add the plot function as a chainable property
|
3310
|
+
|
3311
|
+
$.fn.plot = function(data, options) {
|
3312
|
+
return this.each(function() {
|
3313
|
+
$.plot(this, data, options);
|
3314
|
+
});
|
2592
3315
|
};
|
2593
|
-
|
3316
|
+
|
2594
3317
|
// round to nearby lower multiple of base
|
2595
3318
|
function floorInBase(n, base) {
|
2596
3319
|
return base * Math.floor(n / base);
|
2597
3320
|
}
|
2598
|
-
|
3321
|
+
|
2599
3322
|
})(jQuery);
|