[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2024-07-10 UTC"],[[["\u003cp\u003eThis library enables developers to connect their data to Google Visualization charts using Java.\u003c/p\u003e\n"],["\u003cp\u003eKey classes include \u003ccode\u003eDataSourceServlet\u003c/code\u003e, \u003ccode\u003eDataTable\u003c/code\u003e, \u003ccode\u003eQuery\u003c/code\u003e, and \u003ccode\u003eDataSourceHelper\u003c/code\u003e for building data source implementations.\u003c/p\u003e\n"],["\u003cp\u003eThe library provides packages for data source management (\u003ccode\u003edatasource\u003c/code\u003e), base functionalities (\u003ccode\u003ebase\u003c/code\u003e), data table structure (\u003ccode\u003edatatable\u003c/code\u003e), query handling (\u003ccode\u003equery\u003c/code\u003e), response formatting (\u003ccode\u003erender\u003c/code\u003e), and utility functions (\u003ccode\u003eutil\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can leverage helper functions for CSV and SQL data stores through \u003ccode\u003eCsvDataSourceHelper\u003c/code\u003e and \u003ccode\u003eSqlDataSourceHelper\u003c/code\u003e, respectively.\u003c/p\u003e\n"],["\u003cp\u003eFor simple implementations, inherit from \u003ccode\u003eDataSourceServlet\u003c/code\u003e and implement \u003ccode\u003egenerateDataTable()\u003c/code\u003e; for complex cases, use \u003ccode\u003eDataSourceHelper\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Library Packages and Key Classes\n\nFor an introduction to the most commonly used classes, see [key\nclasses](#keyclasses).\n\nFor an introduction to the data source Java library packages follow\nthe links below:\n\n- [datasource](#datasource \"datasource\")\n- [datasource.base](#base)\n- [datasource.datatable](#datatable)\n- [datasource.query](#query)\n- [datasource.render](#render)\n- [datasource.util](#util)\n\nKey Classes\n-----------\n\nThe key classes are [DataSourceServlet](https://code.google.com/p/google-visualization-java/source/browse/trunk/src/main/java/com/google/visualization/datasource/DataSourceServlet.java), [DataTable](https://code.google.com/p/google-visualization-java/source/browse/trunk/src/main/java/com/google/visualization/datasource/datatable/DataTable.java),\n[Query](https://code.google.com/p/google-visualization-java/source/browse/trunk/src/main/java/com/google/visualization/datasource/query/Query.java) and [DataSourceHelper](https://code.google.com/p/google-visualization-java/source/browse/trunk/src/main/java/com/google/visualization/datasource/DataSourceHelper.java).\n\nThe simplest implementation of the library involves inheriting from `DataSourceServlet`,\nwriting your own implementation of `generateDataTable()` and\nthen running the implementation within a servlet. This type of implementation\nis described in the [Getting\nStarted](/chart/interactive/docs/dev/dsl_get_started) section.\n\nThe `DataTable` class defines the columns, column types,\nlabels, ids, and custom properties for a data table.\n\nThe `Query` class is the base class for data queries, it\nhandles a visualization-generated query.\n\nFor more complex\nuse cases, the helper class `DataSourceHelper` provides\na set of helper functions. This type of implementation\nis described in [Defining Capabilities and the Flow of Events](/chart/interactive/docs/dev/dsl_httpservlet).\n\n`datasource`\n------------\n\nThis is the [top\nlevel package](http://code.google.com/p/google-visualization-java/source/browse/#svn/trunk/src/java/com/google/chart/interactive/datasource%3Fstate%3Dclosed) and contains the API classes with which\nmost data source developers interact.\n\nAlso at this top level is `Capabilities`, which is\nused to define the data source's query [capabilities](/chart/interactive/docs/dev/dsl_key_concepts#capabilities).\n\n\n`base`\n------\n\n[This\npackage](http://code.google.com/p/google-visualization-java/source/browse/#svn/trunk/src/java/com/google/chart/interactive/datasource/base) contains all classes that are used by more than one package\nto prevent circular dependencies between the packages. The most notable\nitems are error messages in the default locale of US English. To internationalize\nyour implementation, you will need to translate these messages.\n\n`datatable`\n-----------\n\n[This\npackage](http://code.google.com/p/google-visualization-java/source/browse/#svn/trunk/src/java/com/google/chart/interactive/datasource/datatable) contains classes that handle data table structure (columns,\nrows, cells) and functionality (insert, add).\n\nThis package also contains the `value` package that handles\nvalues and value types supported by the library. Available value types\nare defined in the `ValueType` enumeration and include: boolean,\ndate, time of day, date and time, null, number, and text.\n\n`query`\n-------\n\n[This\npackage](http://code.google.com/p/google-visualization-java/source/browse/#svn/trunk/src/java/com/google/chart/interactive/datasource/query) contains classes that handle queries, the base class is `Query`.\nThis package also contains the following packages:\n\n- `parser` - classes that handle query parsing. \n- `engine` - classes that handle query execution.\n- `scalarfunction` - classes that handle scalar functions used in a query.\n\n`render`\n--------\n\n[This\npackage](http://code.google.com/p/google-visualization-java/source/browse/#svn/trunk/src/java/com/google/chart/interactive/datasource/render) contains the classes that format a response. For example:\n\n- `CsvRenderer` renders a data table as CSV.\n- `HtmlRenderer` renders a data table as HTML.\n- `JsonRenderer` renders a data table as JSON.\n- `EscapeUtil` provides a utility to escape strings.\n\n`util`\n------\n\n[This\npackage](http://code.google.com/p/google-visualization-java/source/browse/#svn/trunk/src/java/com/google/chart/interactive/datasource/util) provides two sets of helper functions:\n\n- `CsvDataSourceHelper` and `CsvDataSourceException` provide helper functions for using a CSV file as a data store, they do not provide a complete implementation of a data source. For an example implementation, see [Using an External Data Store](/chart/interactive/docs/dev/dsl_csv).\n- `SqlDataSourceHelper` and `SqlDatabaseDescription` provide helper functions for using a mySQL database as a data store, they do not provide a complete implementation of a data source. For an example implementation, see `SqlDataSourceServlet` in the `examples` package."]]