diff --git a/.github/workflows/skills-check.yml b/.github/workflows/skills-check.yml index 210fed7..4d51379 100644 --- a/.github/workflows/skills-check.yml +++ b/.github/workflows/skills-check.yml @@ -19,7 +19,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '20' - name: Run skills add command run: npx skills add antvis/chart-visualization-skills diff --git a/AGENTS.md b/AGENTS.md index aaef28d..324bf2e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -57,24 +57,19 @@ Skills are the **single source of truth** for chart generation knowledge. ### 2. CLI Tool (`src/`) -The build script (`src/scripts/build.ts`) parses all skill markdown files and generates JSON index files (`src/index/*.index.json`). Each index stores two things: the `skills[]` array (reference docs) and `info` (SKILL.md metadata including `constraintsContent` — the core constraints section up to ``). +The build script (`src/scripts/build.ts`) reads all skill markdown files directly from `src/content/` and generates zvec vector collections (`src/index/*.zvec/`) with full FTS indexes on title, description, tags, content, use_cases, and anti_patterns. All metadata (including frontmatter `id`, `category`, `tags`, etc.) is stored in zvec fields via `@antv/context`, so no intermediate JSON index is needed. -A second build step (`src/scripts/build-zvec.ts`) embeds all skill texts and writes them into zvec vector collections (`src/index/*.zvec/`) with full FTS indexes on title, description, tags, content, use_cases, and anti_patterns. +The CLI (`antv` command) provides one command: -The CLI (`antv` command) provides four commands: - -- `antv retrieve ` - zvec hybrid search (FTS + vector + RRF fusion); `--content` returns reference doc markdown and auto-prepends the core constraints block as the first result -- `antv get ` - Get a single skill by exact ID -- `antv list` - List/filter available skills -- `antv info ` - Show library core constraints (SKILL.md Section 1-2) +- `antv retrieve ` - zvec hybrid search (FTS + vector + RRF fusion); `--content` returns reference doc markdown; constraints docs are indexed as regular skill documents and appear naturally in search results The retrieval engine uses **zvec** (in-process vector database) with two strategies: - **`hybrid`** (default): zvec native multiQuery — FTS (jieba tokenizer, raw text) + Vector (HNSW ANN, 512d) + RRF fusion - **`vector`**: Pure ANN vector similarity search -Embedding is handled by `SimpleEmbedder` (tokenizer + multi-hash, 512d, synchronous). No model download required. +Embedding is handled by `@antv/context`'s built-in embedder (tokenizer + multi-hash, 512d, synchronous). -Public API (`src/api.ts`) exports `retrieve()`, `info()`, `getSkillById()`, `libraries()`, and `listSkills()` for programmatic use. +Public API (`src/api.ts`) exports `retrieve()` and `libraries()` for programmatic use. ### HTTP Server (`http-server/`) @@ -86,10 +81,7 @@ cd http-server && npm run dev # starts on http://localhost:3100 (configurable | Endpoint | Method | Description | |---|---|---| -| `/retrieve` | POST | Retrieve skills by query (hybrid/vector search). Body: `{query, library, topK, content, includeConstraints, strategy, maxTokens, progressiveLevel}` | -| `/info` | POST | Get library core constraints. Body: `{library}` | -| `/get` | POST | Get single skill by exact ID. Body: `{id, library}` | -| `/list` | POST | List/filter skills. Body: `{library, category, tags}` | +| `/retrieve` | POST | Retrieve skills by query (hybrid/vector search). Body: `{query, library, topK, content, strategy, maxTokens, progressiveLevel}` | | `/libraries` | GET | List available library names | ### 3. Evaluation (`eval/`) @@ -136,11 +128,11 @@ Two retrieval modes: ├── src/ # Core library: CLI, API, zvec retriever, build scripts │ ├── index.ts # CLI entry point (Commander.js) │ ├── api.ts # Public Node.js API -│ ├── commands/ # CLI commands (retrieve, list, info, get) -│ ├── core/ # Types, zvec retriever, embedder -│ │ └── retrieval/ # zvec-store, embedder -│ ├── scripts/ # Build scripts (markdown → JSON index + zvec index) -│ └── index/ # Generated JSON + zvec index files +│ ├── commands/ # CLI commands (retrieve) +│ ├── core/ # Types, zvec retriever, synonyms, token-budget +│ ├── scripts/ # Build script (build.ts only) +│ ├── content/ # Skill markdown source files (with frontmatter) +│ └── index/ # Generated zvec index files only ├── http-server/ # Standalone HTTP API deployment ├── skills/ # Skill definitions (markdown + YAML frontmatter) ├── eval/ # Evaluation framework and test datasets @@ -153,12 +145,11 @@ Two retrieval modes: ## Key Commands ```bash -# Build: parse skills → generate JSON index → build zvec index → compile TS +# Build: build zvec index → compile TS → copy index pnpm build -# Build individual steps -pnpm build:index:json # JSON index only -pnpm build:index:zvec # zvec vector index only +# Build individual step +pnpm build:index # zvec vector index only # Test pnpm test diff --git a/README.md b/README.md index 015e490..700d02f 100644 --- a/README.md +++ b/README.md @@ -90,32 +90,17 @@ We also provide a CLI tool named `antv` for easy usage in your terminal, Install npm install -g @antv/chart-visualization-skills ``` -**Retrieve or list skills by query**: +**Retrieve skills by query**: ```bash # Retrieve skills by query (metadata only) antv retrieve "bar chart" --library g2 --topk 10 -# Retrieve skills with full markdown content (core constraints auto-prepended) +# Retrieve skills with full markdown content antv retrieve "bar chart" --library g2 --content # Retrieve skills and output as JSON antv retrieve "bar chart" --library g2 --output json - -# Get a skill by its exact ID -antv get g2-mark-interval-basic --library g2 - -# List all available skills -antv list --library g2 --category core - -# List skills and output as JSON -antv list --output json - -# Show skill info (core constraints from SKILL.md) -antv info --library g2 - -# Show skill info as JSON -antv info --library g2 --output json ``` **Usage for the command**: @@ -131,35 +116,29 @@ Options: Commands: retrieve [options] Search for skills matching a query - get [options] Get a skill by its exact ID - list [options] List all available skills - info [options] Show skill info from SKILL.md help [command] display help for command Options for retrieve: --library Filter by library (e.g. g2, g6, x6) --topk Number of results to return (default: 7) --strategy Retrieval strategy: hybrid | vector (default: hybrid) - --content Include markdown content body in results; core constraints (SKILL.md Section 1-2) are always prepended as the first result + --content Include markdown content body in results --output Output format: json | text (default: "text") ``` -> Note: `--content` always prepends the library's core constraints (Section 1 & 2 of SKILL.md, up to the `` marker) as the first result, ensuring the model receives essential rules alongside the reference documents. +> Note: Constraints docs (category `__constraints__`) are indexed as regular skill documents and appear naturally in search results when the query matches their content. ### API Usage ```typescript import { retrieve } from '@antv/chart-visualization-skills'; -// With full markdown content and constraints (defaults) +// With full markdown content (defaults) const skills = retrieve('bar chart', { library: 'g2', topK: 5 }); -// Metadata only (no content body or constraints) +// Metadata only (no content body) const skills = retrieve('bar chart', { library: 'g2', topK: 5, content: false }); -// Explicit constraints control -const skills = retrieve('bar chart', { library: 'g2', content: true, includeConstraints: false }); - // With token budget — content trimmed to fit 4000 tokens, summary + code only const skills = retrieve('bar chart', { library: 'g2', @@ -169,13 +148,12 @@ const skills = retrieve('bar chart', { ``` ```typescript -retrieve(query: string, options?: RetrieveOptions): Promise +retrieve(query: string, options?: RetrieveOptions): Promise interface RetrieveOptions { library?: string; // Library filter, e.g. 'g2' or 'g6' topK?: number; // Number of results (default: 7) content?: boolean; // Include markdown content body (default: true) - includeConstraints?: boolean; // Prepend constraints as first result (default: same as content) strategy?: 'hybrid' | 'vector'; // Retrieval strategy (default: 'hybrid') maxTokens?: number; // Token budget — content trimmed to fit when set progressiveLevel?: 0 | 1 | 2; // 0=full, 1=summary+code, 2=summary (default: 1) @@ -187,7 +165,6 @@ interface RetrieveOptions { | `library` | `string` | all | Library filter (`g2` / `g6` / `x6`) | | `topK` | `number` | `7` | Number of results | | `content` | `boolean` | `true` | Include markdown content body | -| `includeConstraints` | `boolean` | same as `content` | Prepend constraints as first result | | `strategy` | `'hybrid' \| 'vector'` | `'hybrid'` | Retrieval strategy | | `maxTokens` | `number` | — | Token budget; content trimmed to fit when set | | `progressiveLevel` | `0 \| 1 \| 2` | `1` | 0=full, 1=summary+code, 2=summary only | @@ -196,31 +173,9 @@ interface RetrieveOptions { > - Default retrieval uses **hybrid** strategy: zvec native FTS (jieba) + Vector (HNSW ANN) + RRF fusion. > - `strategy: 'vector'` uses pure ANN vector similarity search. > - `content: true` returns markdown content body (frontmatter metadata is excluded). -> - When `includeConstraints` is true, the core constraints block is injected as the first element (id prefixed with `__info__`). +> - Constraints docs (category `__constraints__`) are indexed as regular skill documents and appear naturally in search results. > - When `maxTokens` is set, skill content is formatted and trimmed to fit the budget according to `progressiveLevel`. -```typescript -import { info } from '@antv/chart-visualization-skills'; - -const skillInfo = info('g2'); -// => { name: 'antv-g2-chart', description: '...', content: '...', constraintsContent: '...' } -``` - -```typescript -info(library?: string): SkillInfo | undefined - -interface SkillInfo { - name: string; - description: string; - content: string; // Full SKILL.md body (after frontmatter) - constraintsContent: string; // SKILL.md body up to marker; injected by retrieve when includeConstraints: true -} -``` - -| Parameter | Type | Default | Description | -| :--- | :--- | :--- | :--- | -| `library` | `string` | `'g2'` | Library to get info for (`g2` or `g6`) | - ## License MIT License - see the [LICENSE](LICENSE) file for details. diff --git a/__tests__/embedder.test.ts b/__tests__/embedder.test.ts deleted file mode 100644 index 41ded22..0000000 --- a/__tests__/embedder.test.ts +++ /dev/null @@ -1,120 +0,0 @@ -import { describe, it, expect } from 'vitest'; -import { SimpleEmbedder, isCJK } from '../src/core/retrieval/embedder'; - -describe('embedder', () => { - describe('isCJK', () => { - it('should identify CJK Unified characters', () => { - expect(isCJK('桑')).toBe(true); - expect(isCJK('图')).toBe(true); - expect(isCJK('树')).toBe(true); - }); - - it('should identify CJK Extension A characters', () => { - // CJK Ext-A range: 0x3400–0x4DBF - expect(isCJK('\u3447')).toBe(true); - }); - - it('should identify Hiragana and Katakana', () => { - expect(isCJK('\u3042')).toBe(true); // Hiragana あ - expect(isCJK('\u30AB')).toBe(true); // Katakana カ - }); - - it('should identify Hangul', () => { - expect(isCJK('\uAC00')).toBe(true); // Hangul 가 - }); - - it('should not identify ASCII as CJK', () => { - expect(isCJK('a')).toBe(false); - expect(isCJK('Z')).toBe(false); - expect(isCJK('0')).toBe(false); - }); - - it('should not identify common punctuation as CJK', () => { - expect(isCJK('.')).toBe(false); - expect(isCJK('-')).toBe(false); - expect(isCJK(' ')).toBe(false); - }); - }); - - describe('SimpleEmbedder', () => { - const embedder = new SimpleEmbedder(); - - it('should produce vectors of the correct dimension', async () => { - const vec = await embedder.embed('test query'); - expect(vec.length).toBe(512); - }); - - it('should produce normalized vectors (L2 norm ≈ 1)', async () => { - const vec = await embedder.embed('test query'); - let norm = 0; - for (const v of vec) norm += v * v; - norm = Math.sqrt(norm); - expect(Math.abs(norm - 1)).toBeLessThan(0.01); - }); - - it('should produce non-zero vectors for meaningful text', async () => { - const vec = await embedder.embed('桑基图 sankey'); - const nonZeroCount = vec.filter(v => v !== 0).length; - expect(nonZeroCount).toBeGreaterThan(0); - }); - - it('should produce similar vectors for synonymous terms', async () => { - const vec1 = await embedder.embed('桑基图'); - const vec2 = await embedder.embed('sankey'); - // Both should expand to include each other's tokens via synonyms - // so their vectors should have some overlap - let dot = 0; - for (let i = 0; i < vec1.length; i++) dot += vec1[i] * vec2[i]; - // Cosine similarity should be positive (they share synonym-expanded tokens) - expect(dot).toBeGreaterThan(0); - }); - - it('should produce different vectors for unrelated terms', async () => { - const vec1 = await embedder.embed('桑基图'); - const vec2 = await embedder.embed('热力图'); - let dot = 0; - for (let i = 0; i < vec1.length; i++) dot += vec1[i] * vec2[i]; - // They may share some unigram overlap but should not be identical - expect(Math.abs(dot - 1)).toBeGreaterThan(0.01); - }); - - it('should support synchronous embedding via embedSync', () => { - const vec = embedder.embedSync('test query'); - expect(vec.length).toBe(512); - }); - - it('should support batch embedding', async () => { - const vecs = await embedder.embedBatch(['query one', 'query two']); - expect(vecs.length).toBe(2); - expect(vecs[0].length).toBe(512); - expect(vecs[1].length).toBe(512); - }); - - it('should handle empty text gracefully', async () => { - const vec = await embedder.embed(''); - // Empty text should still produce a 512-d vector (all zeros or near-zero) - expect(vec.length).toBe(512); - }); - - it('should weight CJK trigrams higher than unigrams', async () => { - // A query with trigrams should produce a vector with higher peak values - // than one with only unigrams (due to trigram weight = 2.0 vs unigram = 0.15) - const vecTrigram = await embedder.embed('矩形树图'); - const maxTrigram = Math.max(...vecTrigram.map(Math.abs)); - const vecUnigram = await embedder.embed('图型'); - const maxUnigram = Math.max(...vecUnigram.map(Math.abs)); - // Trigrams get higher weight, so peak values should be larger - expect(maxTrigram).toBeGreaterThan(maxUnigram * 0.5); - }); - - it('should expand synonyms during embedding', async () => { - // '树图' should get synonym expansion to 'treemap' - // So the embedding of '树图' should share hash buckets with 'treemap' - const vec1 = await embedder.embed('树图'); - const vec2 = await embedder.embed('treemap'); - let dot = 0; - for (let i = 0; i < vec1.length; i++) dot += vec1[i] * vec2[i]; - expect(dot).toBeGreaterThan(0); - }); - }); -}); diff --git a/__tests__/info.test.ts b/__tests__/info.test.ts deleted file mode 100644 index 0b01593..0000000 --- a/__tests__/info.test.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { describe, it, expect } from 'vitest'; -import { info } from '../src/api'; - -describe('info API', () => { - it('should return doc info for default library', () => { - const result = info(); - expect(result).toBeDefined(); - expect(result!.name).toBe('antv-g2-chart'); - expect(result!.description.length).toBeGreaterThan(0); - expect(result!.content.length).toBeGreaterThan(0); - }); - - it('should return doc info for g2 library', () => { - const result = info('g2'); - expect(result).toBeDefined(); - expect(result).toHaveProperty('name'); - expect(result).toHaveProperty('description'); - expect(result).toHaveProperty('content'); - }); - - it('should return undefined for library without DOC.md', () => { - const result = info('g6'); - // g6 may or may not have a SKILL.md - expect(result === undefined || typeof result.name === 'string').toBe(true); - }); -}); diff --git a/__tests__/retrieve.test.ts b/__tests__/retrieve.test.ts index 6109fb1..5a90b08 100644 --- a/__tests__/retrieve.test.ts +++ b/__tests__/retrieve.test.ts @@ -1,70 +1,60 @@ -import { describe, it, expect, beforeAll } from 'vitest'; +import { describe, it, expect } from 'vitest'; import { retrieve } from '../src/api'; -import { isZvecAvailable } from '../src/core/retrieval/zvec-store'; - -const zvecReady = isZvecAvailable(); describe('retrieve API', () => { - // When zvec is not available, vector/hybrid retrieval returns empty results. - // These tests work in both environments. - const expectResults = (results: unknown[], minExpected = 0) => { - if (zvecReady) { - expect(results.length).toBeGreaterThan(minExpected); - } else { - // Without zvec, vector/hybrid returns empty – that's expected - expect(results.length).toBe(0); - } - }; - it('should retrieve docs with default parameters', async () => { const results = await retrieve('折线图'); - // Defaults: content=true, includeConstraints=true - if (zvecReady) { - expect(results.length).toBeGreaterThan(0); + // When context is available, results should be non-empty. + // When context is unavailable (model not downloaded), returns empty. + expect(Array.isArray(results)).toBe(true); + if (results.length > 0) { expect(results[0]).toHaveProperty('id'); expect(results[0]).toHaveProperty('title'); - expect(typeof results[0].content).toBe('string'); - expect((results[0].content || '').length).toBeGreaterThan(0); - } else { - expect(results.length).toBe(0); } }); it('should respect topk parameter', async () => { const results = await retrieve('bar chart', { - library: 'g2', topK: 3, includeConstraints: false, + library: 'g2', + topK: 3, }); - if (zvecReady) { - expect(results.length).toBeGreaterThan(0); + expect(Array.isArray(results)).toBe(true); + if (results.length > 0) { expect(results.length).toBeLessThanOrEqual(3); } }); it('should support g6 library parameter', async () => { const results = await retrieve('graph layout', { - library: 'g6', includeConstraints: false, + library: 'g6', }); expect(Array.isArray(results)).toBe(true); }); it('should handle mixed Chinese/English query', async () => { const results = await retrieve('饼图 tooltip', { - library: 'g2', topK: 5, includeConstraints: false, + library: 'g2', + topK: 5, }); - if (zvecReady) { - expect(results.length).toBeGreaterThan(0); + expect(Array.isArray(results)).toBe(true); + if (results.length > 0) { expect(results.length).toBeLessThanOrEqual(5); } }); - it('should load markdown content on demand', async () => { - // Legacy positional overload — still works - const results = await retrieve('折线图', 'g2', 1, true); - if (zvecReady) { - expect(results.length).toBeGreaterThan(0); - expect(typeof results[0].content).toBe('string'); - expect((results[0].content || '').length).toBeGreaterThan(0); - expect(results[0].content).not.toMatch(/^---\n/); + it('should include constraints docs as regular search results', async () => { + const results = await retrieve('核心约束 MUST', { + library: 'g2', + topK: 5, + }); + expect(Array.isArray(results)).toBe(true); + // Constraints docs (category: __constraints__) may appear in results + // when the query matches their content. + if (results.length > 0) { + const constraintDocs = results.filter((d) => d.category === '__constraints__'); + // Constraints are indexed as regular docs — they appear naturally in search. + // No assertion on count since it depends on search relevance. + expect(constraintDocs.every((d) => d.id.includes('constraints'))).toBe(true); } }); }); diff --git a/__tests__/token-budget.test.ts b/__tests__/token-budget.test.ts index 25aa4eb..59b108e 100644 --- a/__tests__/token-budget.test.ts +++ b/__tests__/token-budget.test.ts @@ -136,42 +136,17 @@ describe('token-budget', () => { content }); - it('should give full budget to __info__ and trim remaining docs', () => { + it('should distribute budget evenly across all docs', () => { const docs: Doc[] = [ - { - ...makeDoc('__info__g2', 'Core constraints text that is important'), - category: '__info__' - }, makeDoc('doc-1', 'Content for doc one'), makeDoc('doc-2', 'Content for doc two') ]; const result = applyTokenBudget(docs, 20, 1); - // __info__ should keep its content expect(result[0].content).toBeDefined(); }); - it('should set content to undefined when budget exhausted', () => { - const docs: Doc[] = [ - { - ...makeDoc( - '__info__g2', - 'Very long constraints content eating all budget' - ), - category: '__info__' - }, - makeDoc('doc-1', 'Short content'), - makeDoc('doc-2', 'Another content') - ]; - - // Very small budget — info consumes it all - const result = applyTokenBudget(docs, 5, 1); - // Docs after info should have no content - expect(result[1].content).toBeUndefined(); - expect(result[2].content).toBeUndefined(); - }); - - it('should handle no __info__ doc gracefully', () => { + it('should handle single doc gracefully', () => { const docs: Doc[] = [makeDoc('doc-1', 'Content for doc one')]; const result = applyTokenBudget(docs, 50, 0); diff --git a/eval/result/eval-zvec-g2-dataset-174-Kimi-K2.5-2026-07-08.json b/eval/result/eval-zvec-g2-dataset-174-Kimi-K2.5-2026-07-08.json new file mode 100644 index 0000000..4e6403f --- /dev/null +++ b/eval/result/eval-zvec-g2-dataset-174-Kimi-K2.5-2026-07-08.json @@ -0,0 +1,18151 @@ +{ + "id": "e9208b0f-7ac6-4c8d-af44-e336ad750cd9", + "provider": "kimi", + "model": "Kimi-K2.5", + "dataset": "g2-dataset-174.json", + "algorithm": "zvec", + "timestamp": "2026-07-08T14:38:31.862Z", + "status": "completed", + "endTime": "2026-07-08T15:11:08.603Z", + "summary": { + "totalTests": 174, + "successCount": 174, + "avgDuration": 22416.954022988506, + "avgSimilarity": 0.6664384303505472, + "highSimilarityCount": 157, + "issuesCount": 7, + "skillHitRate": 1 + }, + "results": [ + { + "id": "case-0", + "query": "根据描述绘制图表,使用 G2 渲染一个基于日期数据的二维热力图(cell chart),展示每日最高温度(temp_max)的分布情况,数据按月份分组,颜色映射为温度最大值,使用 'gnBu' 调色板,并启用渐入动画效果。参考数据:\n[{\"date\":\"2012-01-01\",\"precipitation\":0,\"temp_max\":12.8,\"temp_min\":5,\"wind\":4.7,\"weather\":\"drizzle\"},{\"date\":\"2012-01-02\",\"precipitation\":10.9,\"temp_max\":10.6,\"temp_min\":2.8,\"wind\":4.5,\"weather\":\"rain\"},{\"date\":\"2012-01-03\",\"precipitation\":0.8,\"temp_max\":11.7,\"temp_min\":7.2,\"wind\":2.3,\"weather\":\"rain\"},{\"date\":\"2012-01-04\",\"precipitation\":20.3,\"temp_max\":12.2,\"temp_min\":5.6,\"wind\":4.7,\"weather\":\"rain\"},{\"date\":\"2012-01-05\",\"precipitation\":1.3,\"temp_max\":8.9,\"temp_min\":2.8,\"wind\":6.1,\"weather\":\"rain\"},{\"date\":\"2012-01-06\",\"precipitation\":2.5,\"temp_max\":4.4,\"temp_min\":2.2,\"wind\":2.2,\"weather\":\"rain\"},{\"date\":\"2012-01-07\",\"precipitation\":0,\"temp_max\":7.2,\"temp_min\":2.8,\"wind\":2.3,\"weather\":\"rain\"},{\"date\":\"2012-01-08\",\"precipitation\":0,\"temp_max\":10,\"temp_min\":2.8,\"wind\":2,\"weather\":\"sun\"},{\"date\":\"2012-01-09\",\"precipitation\":4.3,\"temp_max\":9.4,\"temp_min\":5,\"wind\":3.4,\"weather\":\"rain\"},{\"date\":\"2012-01-10\",\"precipitation\":1,\"temp_max\":6.1,\"temp_min\":0.6,\"wind\":3.4,\"weather\":\"rain\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"height\": 300,\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": {\n \"type\": \"inline\",\n \"value\": [\n {\n \"date\": \"2012-01-01\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 5,\n \"wind\": 4.7,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-01-02\",\n \"precipitation\": 10.9,\n \"temp_max\": 10.6,\n \"temp_min\": 2.8,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-03\",\n \"precipitation\": 0.8,\n \"temp_max\": 11.7,\n \"temp_min\": 7.2,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-04\",\n \"precipitation\": 20.3,\n \"temp_max\": 12.2,\n \"temp_min\": 5.6,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-05\",\n \"precipitation\": 1.3,\n \"temp_max\": 8.9,\n \"temp_min\": 2.8,\n \"wind\": 6.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-06\",\n \"precipitation\": 2.5,\n \"temp_max\": 4.4,\n \"temp_min\": 2.2,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-07\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 2.8,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-08\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 2.8,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-01-09\",\n \"precipitation\": 4.3,\n \"temp_max\": 9.4,\n \"temp_min\": 5,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-10\",\n \"precipitation\": 1,\n \"temp_max\": 6.1,\n \"temp_min\": 0.6,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-11\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": -1.1,\n \"wind\": 5.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-01-12\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": -1.7,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-01-13\",\n \"precipitation\": 0,\n \"temp_max\": 5,\n \"temp_min\": -2.8,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-01-14\",\n \"precipitation\": 4.1,\n \"temp_max\": 4.4,\n \"temp_min\": 0.6,\n \"wind\": 5.3,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-01-15\",\n \"precipitation\": 5.3,\n \"temp_max\": 1.1,\n \"temp_min\": -3.3,\n \"wind\": 3.2,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-01-16\",\n \"precipitation\": 2.5,\n \"temp_max\": 1.7,\n \"temp_min\": -2.8,\n \"wind\": 5,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-01-17\",\n \"precipitation\": 8.1,\n \"temp_max\": 3.3,\n \"temp_min\": 0,\n \"wind\": 5.6,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-01-18\",\n \"precipitation\": 19.8,\n \"temp_max\": 0,\n \"temp_min\": -2.8,\n \"wind\": 5,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-01-19\",\n \"precipitation\": 15.2,\n \"temp_max\": -1.1,\n \"temp_min\": -2.8,\n \"wind\": 1.6,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-01-20\",\n \"precipitation\": 13.5,\n \"temp_max\": 7.2,\n \"temp_min\": -1.1,\n \"wind\": 2.3,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-01-21\",\n \"precipitation\": 3,\n \"temp_max\": 8.3,\n \"temp_min\": 3.3,\n \"wind\": 8.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-22\",\n \"precipitation\": 6.1,\n \"temp_max\": 6.7,\n \"temp_min\": 2.2,\n \"wind\": 4.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-23\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 1.1,\n \"wind\": 3.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-24\",\n \"precipitation\": 8.6,\n \"temp_max\": 10,\n \"temp_min\": 2.2,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-25\",\n \"precipitation\": 8.1,\n \"temp_max\": 8.9,\n \"temp_min\": 4.4,\n \"wind\": 5.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-26\",\n \"precipitation\": 4.8,\n \"temp_max\": 8.9,\n \"temp_min\": 1.1,\n \"wind\": 4.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-27\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": -2.2,\n \"wind\": 1.4,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-01-28\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": 0.6,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-29\",\n \"precipitation\": 27.7,\n \"temp_max\": 9.4,\n \"temp_min\": 3.9,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-30\",\n \"precipitation\": 3.6,\n \"temp_max\": 8.3,\n \"temp_min\": 6.1,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-31\",\n \"precipitation\": 1.8,\n \"temp_max\": 9.4,\n \"temp_min\": 6.1,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-01\",\n \"precipitation\": 13.5,\n \"temp_max\": 8.9,\n \"temp_min\": 3.3,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-02\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 1.7,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-03\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 2.2,\n \"wind\": 5.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-04\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 5,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-05\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 1.7,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-06\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 1.7,\n \"wind\": 5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-07\",\n \"precipitation\": 0.3,\n \"temp_max\": 15.6,\n \"temp_min\": 7.8,\n \"wind\": 5.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-08\",\n \"precipitation\": 2.8,\n \"temp_max\": 10,\n \"temp_min\": 5,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-09\",\n \"precipitation\": 2.5,\n \"temp_max\": 11.1,\n \"temp_min\": 7.8,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-10\",\n \"precipitation\": 2.5,\n \"temp_max\": 12.8,\n \"temp_min\": 6.7,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-11\",\n \"precipitation\": 0.8,\n \"temp_max\": 8.9,\n \"temp_min\": 5.6,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-12\",\n \"precipitation\": 1,\n \"temp_max\": 8.3,\n \"temp_min\": 5,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-13\",\n \"precipitation\": 11.4,\n \"temp_max\": 7.2,\n \"temp_min\": 4.4,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-14\",\n \"precipitation\": 2.5,\n \"temp_max\": 6.7,\n \"temp_min\": 1.1,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-15\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 0.6,\n \"wind\": 1.8,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-02-16\",\n \"precipitation\": 1.8,\n \"temp_max\": 7.2,\n \"temp_min\": 3.3,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-17\",\n \"precipitation\": 17.3,\n \"temp_max\": 10,\n \"temp_min\": 4.4,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-18\",\n \"precipitation\": 6.4,\n \"temp_max\": 6.7,\n \"temp_min\": 3.9,\n \"wind\": 8.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-19\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": 2.2,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-20\",\n \"precipitation\": 3,\n \"temp_max\": 7.8,\n \"temp_min\": 1.7,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-21\",\n \"precipitation\": 0.8,\n \"temp_max\": 10,\n \"temp_min\": 7.8,\n \"wind\": 7.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-22\",\n \"precipitation\": 8.6,\n \"temp_max\": 10,\n \"temp_min\": 2.8,\n \"wind\": 5.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-23\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 2.8,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-24\",\n \"precipitation\": 11.4,\n \"temp_max\": 6.7,\n \"temp_min\": 4.4,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-25\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 2.8,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-26\",\n \"precipitation\": 1.3,\n \"temp_max\": 5,\n \"temp_min\": -1.1,\n \"wind\": 3.4,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-02-27\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": -2.2,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-28\",\n \"precipitation\": 3.6,\n \"temp_max\": 6.7,\n \"temp_min\": -0.6,\n \"wind\": 4.2,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-02-29\",\n \"precipitation\": 0.8,\n \"temp_max\": 5,\n \"temp_min\": 1.1,\n \"wind\": 7,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-03-01\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": 1.1,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-03-02\",\n \"precipitation\": 2,\n \"temp_max\": 6.7,\n \"temp_min\": 3.9,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-03\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 6.7,\n \"wind\": 7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-03-04\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 6.7,\n \"wind\": 5.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-05\",\n \"precipitation\": 6.9,\n \"temp_max\": 7.8,\n \"temp_min\": 1.1,\n \"wind\": 6.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-06\",\n \"precipitation\": 0.5,\n \"temp_max\": 6.7,\n \"temp_min\": 0,\n \"wind\": 2.7,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-03-07\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": -1.7,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-03-08\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 0.6,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-03-09\",\n \"precipitation\": 3.6,\n \"temp_max\": 9.4,\n \"temp_min\": 5,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-10\",\n \"precipitation\": 10.4,\n \"temp_max\": 7.2,\n \"temp_min\": 6.1,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-11\",\n \"precipitation\": 13.7,\n \"temp_max\": 6.7,\n \"temp_min\": 2.8,\n \"wind\": 5.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-12\",\n \"precipitation\": 19.3,\n \"temp_max\": 8.3,\n \"temp_min\": 0.6,\n \"wind\": 6.2,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-03-13\",\n \"precipitation\": 9.4,\n \"temp_max\": 5.6,\n \"temp_min\": 0.6,\n \"wind\": 5.3,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-03-14\",\n \"precipitation\": 8.6,\n \"temp_max\": 7.8,\n \"temp_min\": 1.1,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-15\",\n \"precipitation\": 23.9,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 5.8,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-03-16\",\n \"precipitation\": 8.4,\n \"temp_max\": 8.9,\n \"temp_min\": 3.9,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-17\",\n \"precipitation\": 9.4,\n \"temp_max\": 10,\n \"temp_min\": 0.6,\n \"wind\": 3.8,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-03-18\",\n \"precipitation\": 3.6,\n \"temp_max\": 5,\n \"temp_min\": -0.6,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-19\",\n \"precipitation\": 2,\n \"temp_max\": 7.2,\n \"temp_min\": -1.1,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-20\",\n \"precipitation\": 3.6,\n \"temp_max\": 7.8,\n \"temp_min\": 2.2,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-21\",\n \"precipitation\": 1.3,\n \"temp_max\": 8.9,\n \"temp_min\": 1.1,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-22\",\n \"precipitation\": 4.1,\n \"temp_max\": 10,\n \"temp_min\": 1.7,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-23\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 0.6,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-03-24\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 3.3,\n \"wind\": 5.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-03-25\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 2.2,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-26\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 6.1,\n \"wind\": 4.3,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-03-27\",\n \"precipitation\": 4.8,\n \"temp_max\": 14.4,\n \"temp_min\": 6.7,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-28\",\n \"precipitation\": 1.3,\n \"temp_max\": 10.6,\n \"temp_min\": 7.2,\n \"wind\": 5.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-29\",\n \"precipitation\": 27.4,\n \"temp_max\": 10,\n \"temp_min\": 6.1,\n \"wind\": 4.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-30\",\n \"precipitation\": 5.6,\n \"temp_max\": 9.4,\n \"temp_min\": 5,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-31\",\n \"precipitation\": 13.2,\n \"temp_max\": 10,\n \"temp_min\": 2.8,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-01\",\n \"precipitation\": 1.5,\n \"temp_max\": 8.9,\n \"temp_min\": 4.4,\n \"wind\": 6.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-02\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 4.4,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-03\",\n \"precipitation\": 1.5,\n \"temp_max\": 11.7,\n \"temp_min\": 3.3,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-04\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 2.8,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-05\",\n \"precipitation\": 4.6,\n \"temp_max\": 9.4,\n \"temp_min\": 2.8,\n \"wind\": 1.8,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-04-06\",\n \"precipitation\": 0.3,\n \"temp_max\": 11.1,\n \"temp_min\": 3.3,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-07\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 1.7,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-08\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 7.2,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-09\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 6.1,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-10\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 8.9,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-11\",\n \"precipitation\": 2.3,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-12\",\n \"precipitation\": 0.5,\n \"temp_max\": 13.9,\n \"temp_min\": 5.6,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-13\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 3.9,\n \"wind\": 4,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-04-14\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 3.3,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-15\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 7.2,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-16\",\n \"precipitation\": 8.1,\n \"temp_max\": 13.3,\n \"temp_min\": 6.7,\n \"wind\": 5.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-17\",\n \"precipitation\": 1.8,\n \"temp_max\": 10,\n \"temp_min\": 4.4,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-18\",\n \"precipitation\": 1.8,\n \"temp_max\": 13.3,\n \"temp_min\": 7.2,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-19\",\n \"precipitation\": 10.9,\n \"temp_max\": 13.9,\n \"temp_min\": 5,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-20\",\n \"precipitation\": 6.6,\n \"temp_max\": 13.3,\n \"temp_min\": 6.7,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-21\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 4.4,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-22\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 8.3,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-23\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 8.9,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-24\",\n \"precipitation\": 4.3,\n \"temp_max\": 13.9,\n \"temp_min\": 10,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-25\",\n \"precipitation\": 10.7,\n \"temp_max\": 16.7,\n \"temp_min\": 8.9,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-26\",\n \"precipitation\": 3.8,\n \"temp_max\": 13.9,\n \"temp_min\": 6.7,\n \"wind\": 5.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-27\",\n \"precipitation\": 0.8,\n \"temp_max\": 13.3,\n \"temp_min\": 6.1,\n \"wind\": 4.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-28\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 8.3,\n \"wind\": 2.5,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-04-29\",\n \"precipitation\": 4.3,\n \"temp_max\": 15.6,\n \"temp_min\": 8.9,\n \"wind\": 1.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-30\",\n \"precipitation\": 4.3,\n \"temp_max\": 12.8,\n \"temp_min\": 7.2,\n \"wind\": 8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-01\",\n \"precipitation\": 0.5,\n \"temp_max\": 11.7,\n \"temp_min\": 6.1,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-02\",\n \"precipitation\": 0.5,\n \"temp_max\": 13.3,\n \"temp_min\": 5.6,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-03\",\n \"precipitation\": 18.5,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-04\",\n \"precipitation\": 1.8,\n \"temp_max\": 12.2,\n \"temp_min\": 6.1,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-05\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 5,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-06\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 5,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-07\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 6.1,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-08\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 9.4,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-09\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 6.7,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-10\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 3.9,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-11\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 4.4,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-12\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 6.7,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-13\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 9.4,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-14\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.8,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-15\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 9.4,\n \"wind\": 4.1,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-05-16\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 9.4,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-17\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 6.7,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-18\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 7.8,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-19\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 7.2,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-20\",\n \"precipitation\": 6.4,\n \"temp_max\": 14.4,\n \"temp_min\": 11.7,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-21\",\n \"precipitation\": 14,\n \"temp_max\": 16.7,\n \"temp_min\": 10,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-22\",\n \"precipitation\": 6.1,\n \"temp_max\": 12.8,\n \"temp_min\": 8.9,\n \"wind\": 4.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-23\",\n \"precipitation\": 0.3,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 6.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-24\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 8.9,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-25\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 8.9,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-26\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 8.9,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-27\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 11.7,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-28\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 10,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-29\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 7.8,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-30\",\n \"precipitation\": 0.3,\n \"temp_max\": 18.9,\n \"temp_min\": 11.1,\n \"wind\": 1.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-31\",\n \"precipitation\": 3.8,\n \"temp_max\": 17.8,\n \"temp_min\": 12.2,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-01\",\n \"precipitation\": 6.6,\n \"temp_max\": 20,\n \"temp_min\": 12.8,\n \"wind\": 3.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-02\",\n \"precipitation\": 0.3,\n \"temp_max\": 18.9,\n \"temp_min\": 10.6,\n \"wind\": 3.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-03\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 9.4,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-04\",\n \"precipitation\": 1.3,\n \"temp_max\": 12.8,\n \"temp_min\": 8.9,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-05\",\n \"precipitation\": 16,\n \"temp_max\": 13.3,\n \"temp_min\": 8.3,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-06\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 6.1,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-07\",\n \"precipitation\": 16.5,\n \"temp_max\": 16.1,\n \"temp_min\": 8.9,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-08\",\n \"precipitation\": 1.5,\n \"temp_max\": 15,\n \"temp_min\": 8.3,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-09\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 8.3,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-10\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 10,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-11\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 10,\n \"wind\": 1.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-12\",\n \"precipitation\": 0.8,\n \"temp_max\": 18.3,\n \"temp_min\": 12.8,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-13\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 11.1,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-14\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 10,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-15\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 9.4,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-16\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 15,\n \"wind\": 4.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-17\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 11.7,\n \"wind\": 6.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-18\",\n \"precipitation\": 3,\n \"temp_max\": 17.2,\n \"temp_min\": 10,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-19\",\n \"precipitation\": 1,\n \"temp_max\": 19.4,\n \"temp_min\": 10,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-20\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 10,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-21\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 11.7,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-22\",\n \"precipitation\": 15.7,\n \"temp_max\": 13.9,\n \"temp_min\": 11.7,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-23\",\n \"precipitation\": 8.6,\n \"temp_max\": 15.6,\n \"temp_min\": 9.4,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-24\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 9.4,\n \"wind\": 2,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-06-25\",\n \"precipitation\": 0.5,\n \"temp_max\": 19.4,\n \"temp_min\": 11.1,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-26\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10.6,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-27\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 8.9,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-28\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 11.7,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-29\",\n \"precipitation\": 0.3,\n \"temp_max\": 21.7,\n \"temp_min\": 15,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-30\",\n \"precipitation\": 3,\n \"temp_max\": 20,\n \"temp_min\": 13.3,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-01\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 12.2,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-02\",\n \"precipitation\": 2,\n \"temp_max\": 18.9,\n \"temp_min\": 11.7,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-03\",\n \"precipitation\": 5.8,\n \"temp_max\": 18.3,\n \"temp_min\": 10.6,\n \"wind\": 6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-04\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 9.4,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-05\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 10.6,\n \"wind\": 3.1,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-07-06\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 11.1,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-07\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.8,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-08\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 14.4,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-09\",\n \"precipitation\": 1.5,\n \"temp_max\": 25,\n \"temp_min\": 12.8,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-10\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 11.1,\n \"wind\": 2.3,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-07-11\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.3,\n \"wind\": 2.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2012-07-12\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 13.3,\n \"wind\": 2.7,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-07-13\",\n \"precipitation\": 0.5,\n \"temp_max\": 23.3,\n \"temp_min\": 13.9,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-14\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 15,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-15\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 13.3,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-16\",\n \"precipitation\": 0.3,\n \"temp_max\": 26.1,\n \"temp_min\": 13.3,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-17\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 15,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-18\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 14.4,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-19\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 14.4,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-20\",\n \"precipitation\": 15.2,\n \"temp_max\": 19.4,\n \"temp_min\": 13.9,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-21\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.9,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-22\",\n \"precipitation\": 1,\n \"temp_max\": 20.6,\n \"temp_min\": 12.2,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-23\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 11.1,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-24\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 12.2,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-25\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.8,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-26\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 12.8,\n \"wind\": 2.2,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-07-27\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 13.9,\n \"wind\": 2.8,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-07-28\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 13.3,\n \"wind\": 1.7,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-07-29\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 15,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-30\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 13.3,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-31\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 13.9,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-01\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.3,\n \"wind\": 2.2,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-08-02\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 12.2,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-03\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 12.8,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-04\",\n \"precipitation\": 0,\n \"temp_max\": 33.9,\n \"temp_min\": 16.7,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-05\",\n \"precipitation\": 0,\n \"temp_max\": 33.9,\n \"temp_min\": 17.8,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-06\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 15.6,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-08-07\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 15,\n \"wind\": 2.6,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-08-08\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 15,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-09\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 14.4,\n \"wind\": 3.8,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-08-10\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 12.2,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-11\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 13.3,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-12\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 15,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-13\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 15,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-14\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 13.9,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-15\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 16.7,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-16\",\n \"precipitation\": 0,\n \"temp_max\": 34.4,\n \"temp_min\": 18.3,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-17\",\n \"precipitation\": 0,\n \"temp_max\": 32.8,\n \"temp_min\": 16.1,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-18\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 14.4,\n \"wind\": 3,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-08-19\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 15,\n \"wind\": 2.7,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-08-20\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 15,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-21\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 13.3,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-08-22\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 13.3,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-23\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 13.9,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-24\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 10,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-25\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 11.7,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-26\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 12.2,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-27\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.3,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-28\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 12.2,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-29\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 13.3,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-30\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 12.8,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-31\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 10.6,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-01\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 10.6,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-02\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 10,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-03\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 12.8,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-04\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 11.1,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-05\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 11.7,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-06\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 14.4,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-07\",\n \"precipitation\": 0,\n \"temp_max\": 32.2,\n \"temp_min\": 13.3,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-08\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 13.3,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-09\",\n \"precipitation\": 0.3,\n \"temp_max\": 18.9,\n \"temp_min\": 13.9,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-09-10\",\n \"precipitation\": 0.3,\n \"temp_max\": 20,\n \"temp_min\": 11.7,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-09-11\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 8.9,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-12\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 10,\n \"wind\": 5.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-13\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 11.7,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-14\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 11.1,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-15\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 11.1,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-16\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 9.4,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-17\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 11.7,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2012-09-18\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 11.7,\n \"wind\": 1.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-19\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 11.7,\n \"wind\": 1.9,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-09-20\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 10,\n \"wind\": 2.5,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-09-21\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 12.8,\n \"wind\": 2.1,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-09-22\",\n \"precipitation\": 0.3,\n \"temp_max\": 19.4,\n \"temp_min\": 11.7,\n \"wind\": 1.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-09-23\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 10,\n \"wind\": 1.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2012-09-24\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 10,\n \"wind\": 1.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2012-09-25\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 11.1,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-26\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 9.4,\n \"wind\": 1.7,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-09-27\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 10,\n \"wind\": 1.7,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-09-28\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 12.2,\n \"wind\": 1.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-09-29\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 12.2,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-30\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 7.8,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-01\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 8.9,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-02\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 10,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-03\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 7.8,\n \"wind\": 7.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-04\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 8.3,\n \"wind\": 6.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-05\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 8.9,\n \"wind\": 5.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-06\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 7.8,\n \"wind\": 5.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-07\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 7.8,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-08\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 7.8,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-09\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 8.9,\n \"wind\": 1.6,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-10-10\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 8.3,\n \"wind\": 1.4,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-10-11\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 7.2,\n \"wind\": 1.3,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-10-12\",\n \"precipitation\": 2,\n \"temp_max\": 13.9,\n \"temp_min\": 8.9,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-13\",\n \"precipitation\": 4.8,\n \"temp_max\": 15.6,\n \"temp_min\": 12.2,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-14\",\n \"precipitation\": 16.5,\n \"temp_max\": 17.8,\n \"temp_min\": 13.3,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-15\",\n \"precipitation\": 7.9,\n \"temp_max\": 17.2,\n \"temp_min\": 11.1,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-16\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 8.3,\n \"wind\": 5.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-17\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 6.1,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-18\",\n \"precipitation\": 20.8,\n \"temp_max\": 17.8,\n \"temp_min\": 6.7,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-19\",\n \"precipitation\": 4.8,\n \"temp_max\": 15,\n \"temp_min\": 9.4,\n \"wind\": 5.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-20\",\n \"precipitation\": 0.5,\n \"temp_max\": 11.1,\n \"temp_min\": 6.1,\n \"wind\": 5.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-21\",\n \"precipitation\": 6.4,\n \"temp_max\": 11.7,\n \"temp_min\": 4.4,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-22\",\n \"precipitation\": 8.9,\n \"temp_max\": 7.8,\n \"temp_min\": 3.3,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-23\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-24\",\n \"precipitation\": 7.1,\n \"temp_max\": 11.7,\n \"temp_min\": 6.1,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-25\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 6.7,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-26\",\n \"precipitation\": 1.5,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-27\",\n \"precipitation\": 23.1,\n \"temp_max\": 14.4,\n \"temp_min\": 9.4,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-28\",\n \"precipitation\": 6.1,\n \"temp_max\": 14.4,\n \"temp_min\": 10,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-29\",\n \"precipitation\": 10.9,\n \"temp_max\": 15.6,\n \"temp_min\": 10,\n \"wind\": 4.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-30\",\n \"precipitation\": 34.5,\n \"temp_max\": 15,\n \"temp_min\": 12.2,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-31\",\n \"precipitation\": 14.5,\n \"temp_max\": 15.6,\n \"temp_min\": 11.1,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-01\",\n \"precipitation\": 9.7,\n \"temp_max\": 15,\n \"temp_min\": 10.6,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-02\",\n \"precipitation\": 5.6,\n \"temp_max\": 15,\n \"temp_min\": 10.6,\n \"wind\": 1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-03\",\n \"precipitation\": 0.5,\n \"temp_max\": 15.6,\n \"temp_min\": 11.1,\n \"wind\": 3.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-04\",\n \"precipitation\": 8.1,\n \"temp_max\": 17.8,\n \"temp_min\": 12.8,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-05\",\n \"precipitation\": 0.8,\n \"temp_max\": 15,\n \"temp_min\": 7.8,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-06\",\n \"precipitation\": 0.3,\n \"temp_max\": 12.8,\n \"temp_min\": 6.7,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-07\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 3.9,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-08\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 1.1,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-09\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 1.1,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-10\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": -0.6,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-11-11\",\n \"precipitation\": 15.2,\n \"temp_max\": 8.9,\n \"temp_min\": 1.1,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-12\",\n \"precipitation\": 3.6,\n \"temp_max\": 12.8,\n \"temp_min\": 6.1,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-13\",\n \"precipitation\": 5.3,\n \"temp_max\": 11.1,\n \"temp_min\": 7.8,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-14\",\n \"precipitation\": 0.8,\n \"temp_max\": 11.1,\n \"temp_min\": 5,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-15\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 2.8,\n \"wind\": 2.4,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-11-16\",\n \"precipitation\": 5.6,\n \"temp_max\": 9.4,\n \"temp_min\": 2.2,\n \"wind\": 1.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-17\",\n \"precipitation\": 6.1,\n \"temp_max\": 12.2,\n \"temp_min\": 6.1,\n \"wind\": 5.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-18\",\n \"precipitation\": 7.9,\n \"temp_max\": 10,\n \"temp_min\": 6.1,\n \"wind\": 4.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-19\",\n \"precipitation\": 54.1,\n \"temp_max\": 13.3,\n \"temp_min\": 8.3,\n \"wind\": 6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-20\",\n \"precipitation\": 3.8,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-21\",\n \"precipitation\": 11.2,\n \"temp_max\": 8.3,\n \"temp_min\": 3.9,\n \"wind\": 5.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-22\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 2.8,\n \"wind\": 1.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-23\",\n \"precipitation\": 32,\n \"temp_max\": 9.4,\n \"temp_min\": 6.1,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-24\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 3.9,\n \"wind\": 1.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-25\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 1.1,\n \"wind\": 3.6,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-11-26\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 1.7,\n \"wind\": 3.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2012-11-27\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 1.7,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-11-28\",\n \"precipitation\": 2.8,\n \"temp_max\": 9.4,\n \"temp_min\": 2.2,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-29\",\n \"precipitation\": 1.5,\n \"temp_max\": 12.8,\n \"temp_min\": 7.8,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-30\",\n \"precipitation\": 35.6,\n \"temp_max\": 15,\n \"temp_min\": 7.8,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-01\",\n \"precipitation\": 4.1,\n \"temp_max\": 13.3,\n \"temp_min\": 8.3,\n \"wind\": 5.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-02\",\n \"precipitation\": 19.6,\n \"temp_max\": 8.3,\n \"temp_min\": 7.2,\n \"wind\": 6.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-03\",\n \"precipitation\": 13,\n \"temp_max\": 9.4,\n \"temp_min\": 7.2,\n \"wind\": 4.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-04\",\n \"precipitation\": 14.2,\n \"temp_max\": 11.7,\n \"temp_min\": 7.2,\n \"wind\": 6.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-05\",\n \"precipitation\": 1.5,\n \"temp_max\": 8.9,\n \"temp_min\": 4.4,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-06\",\n \"precipitation\": 1.5,\n \"temp_max\": 7.2,\n \"temp_min\": 6.1,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-07\",\n \"precipitation\": 1,\n \"temp_max\": 7.8,\n \"temp_min\": 3.3,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-08\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": 3.3,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-12-09\",\n \"precipitation\": 1.5,\n \"temp_max\": 6.7,\n \"temp_min\": 2.8,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-10\",\n \"precipitation\": 0.5,\n \"temp_max\": 7.2,\n \"temp_min\": 5.6,\n \"wind\": 1.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-11\",\n \"precipitation\": 3,\n \"temp_max\": 7.8,\n \"temp_min\": 5.6,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-12\",\n \"precipitation\": 8.1,\n \"temp_max\": 6.7,\n \"temp_min\": 4.4,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-13\",\n \"precipitation\": 2.3,\n \"temp_max\": 7.2,\n \"temp_min\": 3.3,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-14\",\n \"precipitation\": 7.9,\n \"temp_max\": 6.1,\n \"temp_min\": 1.1,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-15\",\n \"precipitation\": 5.3,\n \"temp_max\": 4.4,\n \"temp_min\": 0.6,\n \"wind\": 5.1,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-12-16\",\n \"precipitation\": 22.6,\n \"temp_max\": 6.7,\n \"temp_min\": 3.3,\n \"wind\": 5.5,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-12-17\",\n \"precipitation\": 2,\n \"temp_max\": 8.3,\n \"temp_min\": 1.7,\n \"wind\": 9.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-18\",\n \"precipitation\": 3.3,\n \"temp_max\": 3.9,\n \"temp_min\": 0.6,\n \"wind\": 5.3,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-12-19\",\n \"precipitation\": 13.7,\n \"temp_max\": 8.3,\n \"temp_min\": 1.7,\n \"wind\": 5.8,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-12-20\",\n \"precipitation\": 13.2,\n \"temp_max\": 7.2,\n \"temp_min\": 0.6,\n \"wind\": 3.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-21\",\n \"precipitation\": 1.8,\n \"temp_max\": 8.3,\n \"temp_min\": -1.7,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-22\",\n \"precipitation\": 3.3,\n \"temp_max\": 8.3,\n \"temp_min\": 3.9,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-23\",\n \"precipitation\": 6.6,\n \"temp_max\": 7.2,\n \"temp_min\": 3.3,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-24\",\n \"precipitation\": 0.3,\n \"temp_max\": 5.6,\n \"temp_min\": 2.8,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-25\",\n \"precipitation\": 13.5,\n \"temp_max\": 5.6,\n \"temp_min\": 2.8,\n \"wind\": 4.2,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-12-26\",\n \"precipitation\": 4.6,\n \"temp_max\": 6.7,\n \"temp_min\": 3.3,\n \"wind\": 4.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-27\",\n \"precipitation\": 4.1,\n \"temp_max\": 7.8,\n \"temp_min\": 3.3,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-28\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 3.9,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-29\",\n \"precipitation\": 1.5,\n \"temp_max\": 5,\n \"temp_min\": 3.3,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-30\",\n \"precipitation\": 0,\n \"temp_max\": 4.4,\n \"temp_min\": 0,\n \"wind\": 1.8,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-12-31\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -1.1,\n \"wind\": 2,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-01\",\n \"precipitation\": 0,\n \"temp_max\": 5,\n \"temp_min\": -2.8,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-01-02\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": -1.1,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-01-03\",\n \"precipitation\": 4.1,\n \"temp_max\": 6.7,\n \"temp_min\": -1.7,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-04\",\n \"precipitation\": 2.5,\n \"temp_max\": 10,\n \"temp_min\": 2.2,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-05\",\n \"precipitation\": 3,\n \"temp_max\": 6.7,\n \"temp_min\": 4.4,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-06\",\n \"precipitation\": 2,\n \"temp_max\": 7.2,\n \"temp_min\": 2.8,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-07\",\n \"precipitation\": 2.3,\n \"temp_max\": 10,\n \"temp_min\": 4.4,\n \"wind\": 7.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-08\",\n \"precipitation\": 16.3,\n \"temp_max\": 11.7,\n \"temp_min\": 5.6,\n \"wind\": 6.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-09\",\n \"precipitation\": 38.4,\n \"temp_max\": 10,\n \"temp_min\": 1.7,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-10\",\n \"precipitation\": 0.3,\n \"temp_max\": 3.3,\n \"temp_min\": -0.6,\n \"wind\": 2.1,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2013-01-11\",\n \"precipitation\": 0,\n \"temp_max\": 2.8,\n \"temp_min\": -2.8,\n \"wind\": 1.9,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-12\",\n \"precipitation\": 0,\n \"temp_max\": 2.8,\n \"temp_min\": -3.9,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-01-13\",\n \"precipitation\": 0,\n \"temp_max\": 2.2,\n \"temp_min\": -4.4,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-01-14\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -2.2,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-01-15\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": -0.6,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-01-16\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": -3.9,\n \"wind\": 1.8,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-17\",\n \"precipitation\": 0,\n \"temp_max\": 3.9,\n \"temp_min\": -2.8,\n \"wind\": 1,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-18\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -1.1,\n \"wind\": 1.3,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-19\",\n \"precipitation\": 0,\n \"temp_max\": 1.1,\n \"temp_min\": -0.6,\n \"wind\": 1.9,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-20\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -0.6,\n \"wind\": 2.1,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-21\",\n \"precipitation\": 0,\n \"temp_max\": 2.2,\n \"temp_min\": -1.7,\n \"wind\": 1.1,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-22\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -1.7,\n \"wind\": 0.6,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-23\",\n \"precipitation\": 5.1,\n \"temp_max\": 7.2,\n \"temp_min\": 2.2,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-24\",\n \"precipitation\": 5.8,\n \"temp_max\": 7.2,\n \"temp_min\": 1.1,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-25\",\n \"precipitation\": 3,\n \"temp_max\": 10.6,\n \"temp_min\": 2.8,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-26\",\n \"precipitation\": 2.3,\n \"temp_max\": 8.3,\n \"temp_min\": 3.9,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-27\",\n \"precipitation\": 1.8,\n \"temp_max\": 5.6,\n \"temp_min\": 3.9,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-28\",\n \"precipitation\": 7.9,\n \"temp_max\": 6.1,\n \"temp_min\": 3.3,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-29\",\n \"precipitation\": 4.3,\n \"temp_max\": 8.3,\n \"temp_min\": 5,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-30\",\n \"precipitation\": 3.6,\n \"temp_max\": 8.9,\n \"temp_min\": 6.7,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-31\",\n \"precipitation\": 3,\n \"temp_max\": 9.4,\n \"temp_min\": 7.2,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-01\",\n \"precipitation\": 0.3,\n \"temp_max\": 11.7,\n \"temp_min\": 5,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-02\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": 2.8,\n \"wind\": 2,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-02-03\",\n \"precipitation\": 2.3,\n \"temp_max\": 8.9,\n \"temp_min\": 2.8,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-04\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 6.7,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-05\",\n \"precipitation\": 3.3,\n \"temp_max\": 10,\n \"temp_min\": 6.7,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-06\",\n \"precipitation\": 1,\n \"temp_max\": 10.6,\n \"temp_min\": 6.1,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-07\",\n \"precipitation\": 1.3,\n \"temp_max\": 9.4,\n \"temp_min\": 3.3,\n \"wind\": 4.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-08\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 2.2,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-02-09\",\n \"precipitation\": 0.3,\n \"temp_max\": 8.3,\n \"temp_min\": 4.4,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-10\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 1.7,\n \"wind\": 2,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-02-11\",\n \"precipitation\": 0.3,\n \"temp_max\": 8.3,\n \"temp_min\": 4.4,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-12\",\n \"precipitation\": 1,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 5.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-13\",\n \"precipitation\": 2.3,\n \"temp_max\": 9.4,\n \"temp_min\": 7.2,\n \"wind\": 4.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-14\",\n \"precipitation\": 1,\n \"temp_max\": 9.4,\n \"temp_min\": 5.6,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-15\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 5,\n \"wind\": 2.4,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-02-16\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 3.9,\n \"wind\": 5.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-17\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 4.4,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-18\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 3.9,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-19\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 1.7,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-02-20\",\n \"precipitation\": 1.5,\n \"temp_max\": 7.8,\n \"temp_min\": 1.1,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-21\",\n \"precipitation\": 0.5,\n \"temp_max\": 6.7,\n \"temp_min\": 3.9,\n \"wind\": 6.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-22\",\n \"precipitation\": 9.4,\n \"temp_max\": 7.8,\n \"temp_min\": 3.9,\n \"wind\": 8.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-23\",\n \"precipitation\": 0.3,\n \"temp_max\": 10,\n \"temp_min\": 3.9,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-24\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 5,\n \"wind\": 5.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-25\",\n \"precipitation\": 2.3,\n \"temp_max\": 10.6,\n \"temp_min\": 3.3,\n \"wind\": 7.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-26\",\n \"precipitation\": 0.5,\n \"temp_max\": 8.9,\n \"temp_min\": 3.9,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-27\",\n \"precipitation\": 4.6,\n \"temp_max\": 10,\n \"temp_min\": 4.4,\n \"wind\": 1.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-28\",\n \"precipitation\": 8.1,\n \"temp_max\": 11.7,\n \"temp_min\": 6.7,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-01\",\n \"precipitation\": 4.1,\n \"temp_max\": 15,\n \"temp_min\": 11.1,\n \"wind\": 5.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-02\",\n \"precipitation\": 0.8,\n \"temp_max\": 13.9,\n \"temp_min\": 5,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-03\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 2.2,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-04\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 0,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-05\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 6.1,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-06\",\n \"precipitation\": 11.9,\n \"temp_max\": 7.2,\n \"temp_min\": 5,\n \"wind\": 4.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-07\",\n \"precipitation\": 7.4,\n \"temp_max\": 12.2,\n \"temp_min\": 5,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-08\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 2.2,\n \"wind\": 2.6,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-03-09\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 1.1,\n \"wind\": 1.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-03-10\",\n \"precipitation\": 0.8,\n \"temp_max\": 7.8,\n \"temp_min\": 3.9,\n \"wind\": 1.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-11\",\n \"precipitation\": 1.3,\n \"temp_max\": 10.6,\n \"temp_min\": 6.1,\n \"wind\": 1.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-12\",\n \"precipitation\": 2,\n \"temp_max\": 12.8,\n \"temp_min\": 10,\n \"wind\": 5.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-13\",\n \"precipitation\": 2.3,\n \"temp_max\": 11.7,\n \"temp_min\": 9.4,\n \"wind\": 3.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-14\",\n \"precipitation\": 2.8,\n \"temp_max\": 11.7,\n \"temp_min\": 9.4,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-15\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-16\",\n \"precipitation\": 4.3,\n \"temp_max\": 10.6,\n \"temp_min\": 4.4,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-17\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 3.9,\n \"wind\": 6.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-18\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 3.9,\n \"wind\": 5.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-19\",\n \"precipitation\": 11.7,\n \"temp_max\": 12.8,\n \"temp_min\": 1.7,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-20\",\n \"precipitation\": 9.9,\n \"temp_max\": 11.1,\n \"temp_min\": 4.4,\n \"wind\": 7.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-21\",\n \"precipitation\": 8.1,\n \"temp_max\": 10,\n \"temp_min\": 2.2,\n \"wind\": 4.9,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2013-03-22\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 0.6,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-23\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 1.1,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-24\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 0.6,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-25\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 4.4,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-26\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 6.1,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-27\",\n \"precipitation\": 0.3,\n \"temp_max\": 13.3,\n \"temp_min\": 7.2,\n \"wind\": 1.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-28\",\n \"precipitation\": 2,\n \"temp_max\": 16.1,\n \"temp_min\": 8.3,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-29\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 7.8,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-30\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 5.6,\n \"wind\": 4.4,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-03-31\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 6.7,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-01\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 8.3,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-02\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 8.9,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-03\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 7.8,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-04\",\n \"precipitation\": 8.4,\n \"temp_max\": 14.4,\n \"temp_min\": 10,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-05\",\n \"precipitation\": 18.5,\n \"temp_max\": 13.9,\n \"temp_min\": 10,\n \"wind\": 5.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-06\",\n \"precipitation\": 12.7,\n \"temp_max\": 12.2,\n \"temp_min\": 7.2,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-07\",\n \"precipitation\": 39.1,\n \"temp_max\": 8.3,\n \"temp_min\": 5,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-08\",\n \"precipitation\": 0.8,\n \"temp_max\": 13.3,\n \"temp_min\": 6.1,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-09\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 6.1,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-10\",\n \"precipitation\": 9.4,\n \"temp_max\": 15,\n \"temp_min\": 8.9,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-11\",\n \"precipitation\": 1.5,\n \"temp_max\": 12.2,\n \"temp_min\": 6.7,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-12\",\n \"precipitation\": 9.7,\n \"temp_max\": 7.8,\n \"temp_min\": 4.4,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-13\",\n \"precipitation\": 9.4,\n \"temp_max\": 10.6,\n \"temp_min\": 3.3,\n \"wind\": 5.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-14\",\n \"precipitation\": 5.8,\n \"temp_max\": 12.8,\n \"temp_min\": 4.4,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-15\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 4.4,\n \"wind\": 2.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-04-16\",\n \"precipitation\": 0.3,\n \"temp_max\": 13.9,\n \"temp_min\": 3.3,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-17\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 3.9,\n \"wind\": 3.3,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-04-18\",\n \"precipitation\": 5.3,\n \"temp_max\": 11.7,\n \"temp_min\": 6.7,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-19\",\n \"precipitation\": 20.6,\n \"temp_max\": 13.3,\n \"temp_min\": 9.4,\n \"wind\": 4.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-20\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 8.3,\n \"wind\": 5.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-21\",\n \"precipitation\": 3.3,\n \"temp_max\": 12.2,\n \"temp_min\": 6.7,\n \"wind\": 4.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-22\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 5,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-23\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 3.9,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-24\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 6.1,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-25\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 6.7,\n \"wind\": 1.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-26\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 8.3,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-04-27\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 10.6,\n \"wind\": 5.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-28\",\n \"precipitation\": 1,\n \"temp_max\": 15,\n \"temp_min\": 9.4,\n \"wind\": 5.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-29\",\n \"precipitation\": 3.8,\n \"temp_max\": 13.9,\n \"temp_min\": 6.7,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-30\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 4.4,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-01\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 3.3,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-02\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 6.7,\n \"wind\": 4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-03\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 9.4,\n \"wind\": 4.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-04\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 11.1,\n \"wind\": 6.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-05\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 11.7,\n \"wind\": 5.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-06\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 12.2,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-07\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 11.1,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-08\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 11.1,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-09\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 10,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-10\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 9.4,\n \"wind\": 1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-11\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 12.2,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-12\",\n \"precipitation\": 6.6,\n \"temp_max\": 21.7,\n \"temp_min\": 13.9,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-13\",\n \"precipitation\": 3.3,\n \"temp_max\": 18.9,\n \"temp_min\": 9.4,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-14\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 7.8,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-15\",\n \"precipitation\": 1,\n \"temp_max\": 17.2,\n \"temp_min\": 8.9,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-16\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 12.2,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-05-17\",\n \"precipitation\": 0.5,\n \"temp_max\": 17.2,\n \"temp_min\": 11.7,\n \"wind\": 3.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-18\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 11.1,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-19\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10.6,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-20\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 9.4,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-21\",\n \"precipitation\": 13.7,\n \"temp_max\": 15.6,\n \"temp_min\": 8.3,\n \"wind\": 4.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-22\",\n \"precipitation\": 13.7,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-23\",\n \"precipitation\": 4.1,\n \"temp_max\": 12.2,\n \"temp_min\": 6.7,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-24\",\n \"precipitation\": 0.3,\n \"temp_max\": 16.7,\n \"temp_min\": 8.9,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-25\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 10,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-26\",\n \"precipitation\": 1.5,\n \"temp_max\": 18.3,\n \"temp_min\": 10.6,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-27\",\n \"precipitation\": 9.7,\n \"temp_max\": 16.7,\n \"temp_min\": 11.1,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-28\",\n \"precipitation\": 0.5,\n \"temp_max\": 17.2,\n \"temp_min\": 11.7,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-29\",\n \"precipitation\": 5.6,\n \"temp_max\": 16.1,\n \"temp_min\": 9.4,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-30\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 9.4,\n \"wind\": 5.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-31\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 11.1,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-01\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 12.2,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-02\",\n \"precipitation\": 1,\n \"temp_max\": 20.6,\n \"temp_min\": 12.2,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-03\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 11.1,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-04\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 12.2,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-05\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 14.4,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-06\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.2,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-07\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 13.3,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-08\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 12.8,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-09\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 11.1,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-10\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 11.7,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-11\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 10,\n \"wind\": 5.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-12\",\n \"precipitation\": 0.3,\n \"temp_max\": 20.6,\n \"temp_min\": 11.7,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-13\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 11.7,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-14\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 12.2,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-15\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 10,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-16\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 12.8,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-17\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 13.9,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-18\",\n \"precipitation\": 0.3,\n \"temp_max\": 23.3,\n \"temp_min\": 13.3,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-19\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 12.8,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-20\",\n \"precipitation\": 3,\n \"temp_max\": 17.2,\n \"temp_min\": 12.8,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-21\",\n \"precipitation\": 0.3,\n \"temp_max\": 20.6,\n \"temp_min\": 12.2,\n \"wind\": 1.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-22\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 11.7,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-23\",\n \"precipitation\": 7.9,\n \"temp_max\": 22.2,\n \"temp_min\": 15,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-24\",\n \"precipitation\": 4.8,\n \"temp_max\": 21.1,\n \"temp_min\": 13.9,\n \"wind\": 3.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-25\",\n \"precipitation\": 9.9,\n \"temp_max\": 23.3,\n \"temp_min\": 14.4,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-26\",\n \"precipitation\": 2,\n \"temp_max\": 22.2,\n \"temp_min\": 15,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-27\",\n \"precipitation\": 3.6,\n \"temp_max\": 21.1,\n \"temp_min\": 16.7,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-28\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 16.1,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-29\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 18.3,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-30\",\n \"precipitation\": 0,\n \"temp_max\": 33.9,\n \"temp_min\": 17.2,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-01\",\n \"precipitation\": 0,\n \"temp_max\": 31.7,\n \"temp_min\": 18.3,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-02\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 15.6,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-03\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 16.7,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-04\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 13.9,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-07-05\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 13.9,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-06\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 13.3,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-07\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.9,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-08\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 13.3,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-09\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 15,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-10\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 13.9,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-11\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 12.2,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-12\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 13.3,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-13\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 11.1,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-14\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 12.8,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-15\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 14.4,\n \"wind\": 4.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-16\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 18.3,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-17\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 15,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-18\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 13.9,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-19\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.3,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-20\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 13.3,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-21\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 12.8,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-22\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 13.3,\n \"wind\": 2.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-07-23\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 13.9,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-24\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 14.4,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-25\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 12.8,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-26\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 14.4,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-27\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 12.8,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-28\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 12.2,\n \"wind\": 3.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-07-29\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 13.3,\n \"wind\": 1.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-30\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 13.3,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-31\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 13.3,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-01\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 13.3,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-02\",\n \"precipitation\": 2,\n \"temp_max\": 17.2,\n \"temp_min\": 15,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-03\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 15.6,\n \"wind\": 2.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-08-04\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 15,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-05\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 15,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-06\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 13.9,\n \"wind\": 1.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-07\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 13.9,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-08\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 14.4,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-09\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 14.4,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-10\",\n \"precipitation\": 2.3,\n \"temp_max\": 25.6,\n \"temp_min\": 15,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-11\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 14.4,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-12\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 16.1,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-13\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 15,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-14\",\n \"precipitation\": 0.8,\n \"temp_max\": 27.2,\n \"temp_min\": 15,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-15\",\n \"precipitation\": 1.8,\n \"temp_max\": 21.1,\n \"temp_min\": 17.2,\n \"wind\": 1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-16\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 16.1,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-08-17\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 17.2,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-18\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 15.6,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-19\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 15.6,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-20\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 16.1,\n \"wind\": 4.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-21\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 15,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-22\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 15,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-23\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 16.1,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-24\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 16.7,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-25\",\n \"precipitation\": 0.3,\n \"temp_max\": 22.2,\n \"temp_min\": 16.1,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-26\",\n \"precipitation\": 1,\n \"temp_max\": 24.4,\n \"temp_min\": 16.1,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-27\",\n \"precipitation\": 1.3,\n \"temp_max\": 26.7,\n \"temp_min\": 17.2,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-28\",\n \"precipitation\": 5.6,\n \"temp_max\": 26.7,\n \"temp_min\": 15.6,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-29\",\n \"precipitation\": 19.3,\n \"temp_max\": 23.9,\n \"temp_min\": 18.3,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-30\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 16.1,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-31\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.9,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-01\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 15.6,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-02\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 17.2,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-03\",\n \"precipitation\": 2.3,\n \"temp_max\": 25,\n \"temp_min\": 16.7,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-04\",\n \"precipitation\": 0.3,\n \"temp_max\": 22.8,\n \"temp_min\": 16.1,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-05\",\n \"precipitation\": 27.7,\n \"temp_max\": 20,\n \"temp_min\": 15.6,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-06\",\n \"precipitation\": 21.3,\n \"temp_max\": 21.7,\n \"temp_min\": 16.1,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-07\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 17.2,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-08\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 14.4,\n \"wind\": 1.5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-09-09\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 13.9,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-10\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 15,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-11\",\n \"precipitation\": 0,\n \"temp_max\": 33.9,\n \"temp_min\": 16.1,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-12\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 15,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-13\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 15.6,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-14\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 15.6,\n \"wind\": 1.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-09-15\",\n \"precipitation\": 3.3,\n \"temp_max\": 18.9,\n \"temp_min\": 14.4,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-16\",\n \"precipitation\": 0.3,\n \"temp_max\": 21.7,\n \"temp_min\": 15,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-17\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 13.9,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-18\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 13.3,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-19\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 10,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-20\",\n \"precipitation\": 3.6,\n \"temp_max\": 23.3,\n \"temp_min\": 13.3,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-21\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 13.3,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-22\",\n \"precipitation\": 13.5,\n \"temp_max\": 17.2,\n \"temp_min\": 13.3,\n \"wind\": 5.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-23\",\n \"precipitation\": 2.8,\n \"temp_max\": 16.1,\n \"temp_min\": 11.1,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-24\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 10,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-25\",\n \"precipitation\": 2,\n \"temp_max\": 16.1,\n \"temp_min\": 9.4,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-26\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 7.2,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-27\",\n \"precipitation\": 1,\n \"temp_max\": 13.9,\n \"temp_min\": 10.6,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-28\",\n \"precipitation\": 43.4,\n \"temp_max\": 16.7,\n \"temp_min\": 11.7,\n \"wind\": 6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-29\",\n \"precipitation\": 16.8,\n \"temp_max\": 14.4,\n \"temp_min\": 11.1,\n \"wind\": 7.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-30\",\n \"precipitation\": 18.5,\n \"temp_max\": 13.9,\n \"temp_min\": 10,\n \"wind\": 6.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-01\",\n \"precipitation\": 7.9,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-02\",\n \"precipitation\": 5.3,\n \"temp_max\": 12.8,\n \"temp_min\": 9.4,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-03\",\n \"precipitation\": 0.8,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 0.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-04\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 5.6,\n \"wind\": 1.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-05\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 8.3,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-06\",\n \"precipitation\": 4.1,\n \"temp_max\": 22.8,\n \"temp_min\": 7.8,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-07\",\n \"precipitation\": 0.5,\n \"temp_max\": 16.1,\n \"temp_min\": 11.7,\n \"wind\": 6.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-08\",\n \"precipitation\": 6.9,\n \"temp_max\": 13.9,\n \"temp_min\": 7.8,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-09\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 5.6,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-10\",\n \"precipitation\": 1,\n \"temp_max\": 14.4,\n \"temp_min\": 8.3,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-11\",\n \"precipitation\": 9.1,\n \"temp_max\": 13.9,\n \"temp_min\": 10.6,\n \"wind\": 1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-12\",\n \"precipitation\": 1,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-13\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 6.7,\n \"wind\": 1.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-10-14\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 3.9,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-15\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 5,\n \"wind\": 0.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-16\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 8.9,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-10-17\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 1.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-10-18\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 7.2,\n \"wind\": 1.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-19\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 7.8,\n \"wind\": 1.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-20\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 7.8,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-21\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 8.3,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-22\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 7.2,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-23\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 6.1,\n \"wind\": 0.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-24\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 6.1,\n \"wind\": 0.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-25\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 7.8,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-26\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 8.3,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-27\",\n \"precipitation\": 1.8,\n \"temp_max\": 13.9,\n \"temp_min\": 8.3,\n \"wind\": 4.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-28\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 7.2,\n \"wind\": 5.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-29\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 3.3,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-30\",\n \"precipitation\": 0.5,\n \"temp_max\": 15,\n \"temp_min\": 5.6,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-31\",\n \"precipitation\": 0.3,\n \"temp_max\": 14.4,\n \"temp_min\": 10.6,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-01\",\n \"precipitation\": 1.3,\n \"temp_max\": 17.8,\n \"temp_min\": 11.7,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-02\",\n \"precipitation\": 12.7,\n \"temp_max\": 14.4,\n \"temp_min\": 8.3,\n \"wind\": 7.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-03\",\n \"precipitation\": 0.5,\n \"temp_max\": 12.2,\n \"temp_min\": 4.4,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-04\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 3.9,\n \"wind\": 1.6,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-11-05\",\n \"precipitation\": 2.5,\n \"temp_max\": 13.3,\n \"temp_min\": 7.2,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-06\",\n \"precipitation\": 3.8,\n \"temp_max\": 12.8,\n \"temp_min\": 7.8,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-07\",\n \"precipitation\": 30,\n \"temp_max\": 11.1,\n \"temp_min\": 10,\n \"wind\": 7.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-08\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 7.2,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-09\",\n \"precipitation\": 1.8,\n \"temp_max\": 11.1,\n \"temp_min\": 5,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-10\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 8.3,\n \"wind\": 4.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-11\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 6.1,\n \"wind\": 2.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-11-12\",\n \"precipitation\": 4.1,\n \"temp_max\": 15.6,\n \"temp_min\": 8.9,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-13\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 10.6,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-14\",\n \"precipitation\": 1.3,\n \"temp_max\": 11.1,\n \"temp_min\": 6.1,\n \"wind\": 1.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-15\",\n \"precipitation\": 3,\n \"temp_max\": 10.6,\n \"temp_min\": 7.2,\n \"wind\": 6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-16\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 5,\n \"wind\": 4.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-17\",\n \"precipitation\": 5.3,\n \"temp_max\": 11.7,\n \"temp_min\": 7.2,\n \"wind\": 5.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-18\",\n \"precipitation\": 26.2,\n \"temp_max\": 12.8,\n \"temp_min\": 9.4,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-19\",\n \"precipitation\": 1,\n \"temp_max\": 13.3,\n \"temp_min\": 4.4,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-20\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 1.7,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-21\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": -0.5,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-22\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 0,\n \"wind\": 4.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-23\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 1.1,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-24\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 0.6,\n \"wind\": 0.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-11-25\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 2.2,\n \"wind\": 0.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-26\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 2.8,\n \"wind\": 1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-27\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 5.6,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-28\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 3.3,\n \"wind\": 0.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-29\",\n \"precipitation\": 0.5,\n \"temp_max\": 9.4,\n \"temp_min\": 5,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-30\",\n \"precipitation\": 2.3,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-01\",\n \"precipitation\": 3,\n \"temp_max\": 13.3,\n \"temp_min\": 7.8,\n \"wind\": 8.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-02\",\n \"precipitation\": 4.6,\n \"temp_max\": 7.8,\n \"temp_min\": 1.7,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-03\",\n \"precipitation\": 0,\n \"temp_max\": 5,\n \"temp_min\": -0.5,\n \"wind\": 5.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-04\",\n \"precipitation\": 0,\n \"temp_max\": 4.4,\n \"temp_min\": -2.1,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-05\",\n \"precipitation\": 0,\n \"temp_max\": 1.1,\n \"temp_min\": -4.9,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-06\",\n \"precipitation\": 0,\n \"temp_max\": 1.1,\n \"temp_min\": -4.3,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-07\",\n \"precipitation\": 0,\n \"temp_max\": 0,\n \"temp_min\": -7.1,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-08\",\n \"precipitation\": 0,\n \"temp_max\": 2.2,\n \"temp_min\": -6.6,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-09\",\n \"precipitation\": 0,\n \"temp_max\": 1.1,\n \"temp_min\": -4.9,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-10\",\n \"precipitation\": 0,\n \"temp_max\": 5.6,\n \"temp_min\": 0.6,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-11\",\n \"precipitation\": 0,\n \"temp_max\": 5,\n \"temp_min\": -1.6,\n \"wind\": 0.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-12\",\n \"precipitation\": 6.9,\n \"temp_max\": 5.6,\n \"temp_min\": -0.5,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-13\",\n \"precipitation\": 0.5,\n \"temp_max\": 9.4,\n \"temp_min\": 5.6,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-14\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 6.1,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-15\",\n \"precipitation\": 1.3,\n \"temp_max\": 11.7,\n \"temp_min\": 8.3,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-16\",\n \"precipitation\": 0.3,\n \"temp_max\": 10,\n \"temp_min\": 4.4,\n \"wind\": 1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-17\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 4.4,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-18\",\n \"precipitation\": 1.3,\n \"temp_max\": 7.8,\n \"temp_min\": 2.2,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-19\",\n \"precipitation\": 0,\n \"temp_max\": 5,\n \"temp_min\": 0,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-20\",\n \"precipitation\": 5.6,\n \"temp_max\": 8.3,\n \"temp_min\": 0.6,\n \"wind\": 3.7,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2013-12-21\",\n \"precipitation\": 5.6,\n \"temp_max\": 8.9,\n \"temp_min\": 5.6,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-22\",\n \"precipitation\": 10.7,\n \"temp_max\": 10.6,\n \"temp_min\": 8.3,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-23\",\n \"precipitation\": 1.5,\n \"temp_max\": 11.7,\n \"temp_min\": 6.1,\n \"wind\": 5.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-24\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 2.8,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-25\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": 1.7,\n \"wind\": 0.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-26\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": 0.6,\n \"wind\": 0.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-27\",\n \"precipitation\": 0.3,\n \"temp_max\": 8.9,\n \"temp_min\": 0,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-28\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 3.3,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-29\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 1.7,\n \"wind\": 1.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-30\",\n \"precipitation\": 0.3,\n \"temp_max\": 8.9,\n \"temp_min\": 4.4,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-31\",\n \"precipitation\": 0.5,\n \"temp_max\": 8.3,\n \"temp_min\": 5,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-01\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 3.3,\n \"wind\": 1.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-02\",\n \"precipitation\": 4.1,\n \"temp_max\": 10.6,\n \"temp_min\": 6.1,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-03\",\n \"precipitation\": 1.5,\n \"temp_max\": 8.9,\n \"temp_min\": 2.8,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-04\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 0.6,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-01-05\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": -0.5,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-06\",\n \"precipitation\": 0.3,\n \"temp_max\": 7.8,\n \"temp_min\": -0.5,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-07\",\n \"precipitation\": 12.2,\n \"temp_max\": 8.3,\n \"temp_min\": 5,\n \"wind\": 1.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-08\",\n \"precipitation\": 9.7,\n \"temp_max\": 10,\n \"temp_min\": 7.2,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-09\",\n \"precipitation\": 5.8,\n \"temp_max\": 9.4,\n \"temp_min\": 5.6,\n \"wind\": 6.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-10\",\n \"precipitation\": 4.3,\n \"temp_max\": 12.8,\n \"temp_min\": 8.3,\n \"wind\": 7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-11\",\n \"precipitation\": 21.3,\n \"temp_max\": 14.4,\n \"temp_min\": 7.2,\n \"wind\": 8.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-12\",\n \"precipitation\": 1.5,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 8.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-13\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 10,\n \"wind\": 7.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-14\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-15\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-16\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": 4.4,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-17\",\n \"precipitation\": 0,\n \"temp_max\": 5.6,\n \"temp_min\": 2.8,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-18\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 0.6,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-19\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": 3.3,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-20\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 2.8,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-21\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 1.7,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-22\",\n \"precipitation\": 0.5,\n \"temp_max\": 9.4,\n \"temp_min\": 5.6,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-23\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 2.8,\n \"wind\": 5.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-01-24\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 1.1,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-25\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 1.1,\n \"wind\": 0.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-26\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 0.6,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-27\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 1.7,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-28\",\n \"precipitation\": 8.9,\n \"temp_max\": 11.1,\n \"temp_min\": 6.1,\n \"wind\": 1.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-29\",\n \"precipitation\": 21.6,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-30\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 6.1,\n \"wind\": 6.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-31\",\n \"precipitation\": 2.3,\n \"temp_max\": 7.8,\n \"temp_min\": 5.6,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-01\",\n \"precipitation\": 2,\n \"temp_max\": 7.8,\n \"temp_min\": 2.8,\n \"wind\": 0.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-02\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 1.1,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-03\",\n \"precipitation\": 0,\n \"temp_max\": 5,\n \"temp_min\": 0,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-04\",\n \"precipitation\": 0,\n \"temp_max\": 2.8,\n \"temp_min\": -2.1,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-05\",\n \"precipitation\": 0,\n \"temp_max\": -0.5,\n \"temp_min\": -5.5,\n \"wind\": 6.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-06\",\n \"precipitation\": 0,\n \"temp_max\": -1.6,\n \"temp_min\": -6,\n \"wind\": 4.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-07\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -4.9,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-08\",\n \"precipitation\": 5.1,\n \"temp_max\": 5.6,\n \"temp_min\": -0.5,\n \"wind\": 4.6,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2014-02-09\",\n \"precipitation\": 0.5,\n \"temp_max\": 3.9,\n \"temp_min\": 0,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-10\",\n \"precipitation\": 18.3,\n \"temp_max\": 10,\n \"temp_min\": 2.2,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-11\",\n \"precipitation\": 17,\n \"temp_max\": 12.2,\n \"temp_min\": 5.6,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-12\",\n \"precipitation\": 4.6,\n \"temp_max\": 12.2,\n \"temp_min\": 7.2,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-13\",\n \"precipitation\": 1.8,\n \"temp_max\": 12.8,\n \"temp_min\": 7.8,\n \"wind\": 6.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-14\",\n \"precipitation\": 9.4,\n \"temp_max\": 11.7,\n \"temp_min\": 6.1,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-15\",\n \"precipitation\": 11.7,\n \"temp_max\": 11.1,\n \"temp_min\": 5,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-16\",\n \"precipitation\": 26.4,\n \"temp_max\": 9.4,\n \"temp_min\": 3.9,\n \"wind\": 7.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-17\",\n \"precipitation\": 14.5,\n \"temp_max\": 8.3,\n \"temp_min\": 4.4,\n \"wind\": 5.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-18\",\n \"precipitation\": 15.2,\n \"temp_max\": 8.9,\n \"temp_min\": 5,\n \"wind\": 6.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-19\",\n \"precipitation\": 1,\n \"temp_max\": 8.3,\n \"temp_min\": 3.9,\n \"wind\": 6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-20\",\n \"precipitation\": 3,\n \"temp_max\": 10,\n \"temp_min\": 5.6,\n \"wind\": 6.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-21\",\n \"precipitation\": 2.8,\n \"temp_max\": 6.7,\n \"temp_min\": 3.9,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-22\",\n \"precipitation\": 2.5,\n \"temp_max\": 5.6,\n \"temp_min\": 2.8,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-23\",\n \"precipitation\": 6.1,\n \"temp_max\": 7.2,\n \"temp_min\": 3.9,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-24\",\n \"precipitation\": 13,\n \"temp_max\": 6.7,\n \"temp_min\": 3.3,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-25\",\n \"precipitation\": 0.3,\n \"temp_max\": 12.2,\n \"temp_min\": 3.9,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-26\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 5.6,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-27\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 4.4,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-28\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 4.4,\n \"wind\": 5.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-01\",\n \"precipitation\": 0.5,\n \"temp_max\": 7.2,\n \"temp_min\": 4.4,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-02\",\n \"precipitation\": 19.1,\n \"temp_max\": 11.1,\n \"temp_min\": 2.8,\n \"wind\": 5.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-03\",\n \"precipitation\": 10.7,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-04\",\n \"precipitation\": 16.5,\n \"temp_max\": 13.9,\n \"temp_min\": 7.8,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-05\",\n \"precipitation\": 46.7,\n \"temp_max\": 15.6,\n \"temp_min\": 10.6,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-06\",\n \"precipitation\": 3,\n \"temp_max\": 13.3,\n \"temp_min\": 10,\n \"wind\": 6.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-07\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 8.9,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-08\",\n \"precipitation\": 32.3,\n \"temp_max\": 12.8,\n \"temp_min\": 6.7,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-09\",\n \"precipitation\": 4.3,\n \"temp_max\": 15,\n \"temp_min\": 9.4,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-10\",\n \"precipitation\": 18.8,\n \"temp_max\": 12.2,\n \"temp_min\": 6.1,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-11\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 4.4,\n \"wind\": 2.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-03-12\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 3.3,\n \"wind\": 1.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-03-13\",\n \"precipitation\": 0.5,\n \"temp_max\": 13.9,\n \"temp_min\": 5,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-14\",\n \"precipitation\": 6.9,\n \"temp_max\": 14.4,\n \"temp_min\": 8.3,\n \"wind\": 6.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-15\",\n \"precipitation\": 8.1,\n \"temp_max\": 16.7,\n \"temp_min\": 4.4,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-16\",\n \"precipitation\": 27.7,\n \"temp_max\": 10.6,\n \"temp_min\": 4.4,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-17\",\n \"precipitation\": 0.3,\n \"temp_max\": 10,\n \"temp_min\": 2.8,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-18\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 3.3,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-19\",\n \"precipitation\": 0.5,\n \"temp_max\": 11.1,\n \"temp_min\": 3.3,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-20\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 1.7,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-21\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 2.8,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-22\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 1.1,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-23\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 4.4,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-24\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 2.8,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-25\",\n \"precipitation\": 4.1,\n \"temp_max\": 13.9,\n \"temp_min\": 6.7,\n \"wind\": 4.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-26\",\n \"precipitation\": 3.6,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-27\",\n \"precipitation\": 0.3,\n \"temp_max\": 12.2,\n \"temp_min\": 6.7,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-28\",\n \"precipitation\": 22.1,\n \"temp_max\": 11.7,\n \"temp_min\": 7.2,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-29\",\n \"precipitation\": 14,\n \"temp_max\": 11.7,\n \"temp_min\": 7.2,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-30\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 5,\n \"wind\": 5.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-31\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 2.2,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-01\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 6.7,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-02\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 5.6,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-03\",\n \"precipitation\": 2.5,\n \"temp_max\": 13.3,\n \"temp_min\": 6.1,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-04\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 6.1,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-05\",\n \"precipitation\": 4.6,\n \"temp_max\": 11.7,\n \"temp_min\": 7.8,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-06\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 8.3,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-07\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 9.4,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-08\",\n \"precipitation\": 4.6,\n \"temp_max\": 15.6,\n \"temp_min\": 8.3,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-09\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 6.7,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-10\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 6.7,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-11\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 5,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-12\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 7.8,\n \"wind\": 4.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-13\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 5.6,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-14\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 5.6,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-15\",\n \"precipitation\": 0.5,\n \"temp_max\": 14.4,\n \"temp_min\": 7.8,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-16\",\n \"precipitation\": 10.9,\n \"temp_max\": 11.1,\n \"temp_min\": 8.9,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-17\",\n \"precipitation\": 18.5,\n \"temp_max\": 11.7,\n \"temp_min\": 7.2,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-18\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 5.6,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-19\",\n \"precipitation\": 13.7,\n \"temp_max\": 11.7,\n \"temp_min\": 5.6,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-20\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 5.6,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-21\",\n \"precipitation\": 5.1,\n \"temp_max\": 17.2,\n \"temp_min\": 7.8,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-22\",\n \"precipitation\": 14.2,\n \"temp_max\": 12.2,\n \"temp_min\": 5,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-23\",\n \"precipitation\": 8.9,\n \"temp_max\": 11.7,\n \"temp_min\": 6.1,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-24\",\n \"precipitation\": 12.4,\n \"temp_max\": 13.9,\n \"temp_min\": 6.1,\n \"wind\": 5.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-25\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 5.6,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-26\",\n \"precipitation\": 3.3,\n \"temp_max\": 15,\n \"temp_min\": 5.6,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-27\",\n \"precipitation\": 6.9,\n \"temp_max\": 11.1,\n \"temp_min\": 6.1,\n \"wind\": 5.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-28\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 4.4,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-29\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 9.4,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-30\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 9.4,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-01\",\n \"precipitation\": 0,\n \"temp_max\": 29.4,\n \"temp_min\": 11.1,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-02\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10.6,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-03\",\n \"precipitation\": 33.3,\n \"temp_max\": 15,\n \"temp_min\": 8.9,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-04\",\n \"precipitation\": 16,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-05\",\n \"precipitation\": 5.1,\n \"temp_max\": 15.6,\n \"temp_min\": 9.4,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-06\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 8.3,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-07\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 7.2,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-08\",\n \"precipitation\": 13.7,\n \"temp_max\": 13.9,\n \"temp_min\": 9.4,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-09\",\n \"precipitation\": 2,\n \"temp_max\": 13.3,\n \"temp_min\": 7.2,\n \"wind\": 5.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-10\",\n \"precipitation\": 0.5,\n \"temp_max\": 15.6,\n \"temp_min\": 7.2,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-11\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 8.3,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-12\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 9.4,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-13\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.8,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-14\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.3,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-15\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.8,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-16\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 11.7,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-17\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 11.7,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-18\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 10.6,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-19\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 10,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-20\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 10,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-21\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 10.6,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-22\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 11.7,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-23\",\n \"precipitation\": 3.8,\n \"temp_max\": 20,\n \"temp_min\": 12.8,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-24\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 11.1,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-25\",\n \"precipitation\": 5.6,\n \"temp_max\": 15,\n \"temp_min\": 10.6,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-26\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 11.1,\n \"wind\": 4.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-27\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 10,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-28\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 10,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-29\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 11.1,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-30\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 8.9,\n \"wind\": 4.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-31\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 10,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-01\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 10.6,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-02\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 11.1,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-03\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 11.1,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-04\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 10,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-05\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 10,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-06\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 10.6,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-07\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 13.3,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-08\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 12.2,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-09\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 13.3,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-10\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 12.2,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-11\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 11.1,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-12\",\n \"precipitation\": 1.8,\n \"temp_max\": 21.7,\n \"temp_min\": 12.2,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-13\",\n \"precipitation\": 6.4,\n \"temp_max\": 15.6,\n \"temp_min\": 11.1,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-14\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 11.7,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-15\",\n \"precipitation\": 0.5,\n \"temp_max\": 18.3,\n \"temp_min\": 10,\n \"wind\": 3.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-16\",\n \"precipitation\": 3.6,\n \"temp_max\": 17.8,\n \"temp_min\": 8.9,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-17\",\n \"precipitation\": 1.3,\n \"temp_max\": 17.8,\n \"temp_min\": 10,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-18\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 11.1,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-19\",\n \"precipitation\": 0.8,\n \"temp_max\": 25.6,\n \"temp_min\": 11.7,\n \"wind\": 3.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-20\",\n \"precipitation\": 0.3,\n \"temp_max\": 20,\n \"temp_min\": 10,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-21\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 10.6,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-22\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 11.1,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-23\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 13.3,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-24\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 14.4,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-25\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 13.9,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-26\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 14.4,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-27\",\n \"precipitation\": 1.8,\n \"temp_max\": 21.1,\n \"temp_min\": 13.9,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-28\",\n \"precipitation\": 2.3,\n \"temp_max\": 20,\n \"temp_min\": 13.3,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-29\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 12.8,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-30\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 12.8,\n \"wind\": 4.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-01\",\n \"precipitation\": 0,\n \"temp_max\": 34.4,\n \"temp_min\": 15.6,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-02\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 14.4,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-03\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 13.9,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-04\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.9,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-05\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 13.3,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-07-06\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 15,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-07\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 17.8,\n \"wind\": 4.1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-07-08\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 15.6,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-09\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 13.9,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-10\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 12.8,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-07-11\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 15,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-12\",\n \"precipitation\": 0,\n \"temp_max\": 32.2,\n \"temp_min\": 16.7,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-13\",\n \"precipitation\": 0,\n \"temp_max\": 29.4,\n \"temp_min\": 15,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-14\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 15,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-15\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 13.9,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-16\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 14.4,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-17\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 13.9,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-18\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 11.7,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-19\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 15,\n \"wind\": 5.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-07-20\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 14.4,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-21\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.3,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-22\",\n \"precipitation\": 0.3,\n \"temp_max\": 21.1,\n \"temp_min\": 13.3,\n \"wind\": 1.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-07-23\",\n \"precipitation\": 19.3,\n \"temp_max\": 18.9,\n \"temp_min\": 13.3,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-07-24\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 12.8,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-25\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 12.2,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-26\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 13.3,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-27\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 15,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-28\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 15,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-29\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 15.6,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-30\",\n \"precipitation\": 0,\n \"temp_max\": 29.4,\n \"temp_min\": 14.4,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-31\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 17.8,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-01\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 15,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-02\",\n \"precipitation\": 0.5,\n \"temp_max\": 29.4,\n \"temp_min\": 15.6,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-08-03\",\n \"precipitation\": 0,\n \"temp_max\": 31.7,\n \"temp_min\": 14.4,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-04\",\n \"precipitation\": 0,\n \"temp_max\": 32.8,\n \"temp_min\": 16.1,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-05\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 13.9,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-06\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 15,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-08-07\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 13.3,\n \"wind\": 2.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-08-08\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 13.3,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-09\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 15.6,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-10\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 13.9,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-11\",\n \"precipitation\": 0.5,\n \"temp_max\": 35.6,\n \"temp_min\": 17.8,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-08-12\",\n \"precipitation\": 12.7,\n \"temp_max\": 27.2,\n \"temp_min\": 17.2,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-08-13\",\n \"precipitation\": 21.6,\n \"temp_max\": 23.3,\n \"temp_min\": 15,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-08-14\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 17.2,\n \"wind\": 0.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-15\",\n \"precipitation\": 1,\n \"temp_max\": 24.4,\n \"temp_min\": 16.7,\n \"wind\": 1.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-08-16\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 15.6,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-17\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 15,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-18\",\n \"precipitation\": 0,\n \"temp_max\": 29.4,\n \"temp_min\": 15.6,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-19\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 15.6,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-20\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 13.9,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-21\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 11.1,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-22\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.3,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-23\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.9,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-24\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 13.3,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-25\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 14.4,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-26\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 15.6,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-27\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 16.1,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-28\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 14.4,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-29\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 15,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-30\",\n \"precipitation\": 8.4,\n \"temp_max\": 17.8,\n \"temp_min\": 15,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-08-31\",\n \"precipitation\": 1.3,\n \"temp_max\": 21.1,\n \"temp_min\": 13.9,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-01\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 12.8,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-02\",\n \"precipitation\": 3,\n \"temp_max\": 20,\n \"temp_min\": 13.9,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-03\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 12.8,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-04\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 11.1,\n \"wind\": 3.1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-09-05\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.9,\n \"wind\": 6.5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-09-06\",\n \"precipitation\": 0,\n \"temp_max\": 32.2,\n \"temp_min\": 15,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-07\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 13.3,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-08\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 13.3,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-09\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 13.3,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-10\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 12.2,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-11\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 12.8,\n \"wind\": 5.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-12\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 12.8,\n \"wind\": 5.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-13\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 10,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-14\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 11.7,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-15\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 12.2,\n \"wind\": 1.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-16\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 13.9,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-17\",\n \"precipitation\": 0.5,\n \"temp_max\": 22.8,\n \"temp_min\": 14.4,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-18\",\n \"precipitation\": 0.3,\n \"temp_max\": 19.4,\n \"temp_min\": 15,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-19\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 16.1,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-20\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 14.4,\n \"wind\": 4.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-09-21\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 12.8,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-22\",\n \"precipitation\": 0.3,\n \"temp_max\": 22.2,\n \"temp_min\": 15,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-23\",\n \"precipitation\": 18.3,\n \"temp_max\": 18.9,\n \"temp_min\": 14.4,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-24\",\n \"precipitation\": 20.3,\n \"temp_max\": 18.9,\n \"temp_min\": 14.4,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-25\",\n \"precipitation\": 4.3,\n \"temp_max\": 21.7,\n \"temp_min\": 14.4,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-26\",\n \"precipitation\": 8.9,\n \"temp_max\": 20,\n \"temp_min\": 13.9,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-27\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 11.7,\n \"wind\": 3.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-09-28\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 12.2,\n \"wind\": 2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-09-29\",\n \"precipitation\": 0.8,\n \"temp_max\": 16.7,\n \"temp_min\": 11.1,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-30\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 12.2,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-01\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 11.1,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-02\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 10,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-03\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 8.9,\n \"wind\": 1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-04\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 12.2,\n \"wind\": 1.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-05\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 11.7,\n \"wind\": 1.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-10-06\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 13.3,\n \"wind\": 2.5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-10-07\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 13.9,\n \"wind\": 1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-10-08\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 12.8,\n \"wind\": 1.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-10-09\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 11.1,\n \"wind\": 1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-10-10\",\n \"precipitation\": 0.3,\n \"temp_max\": 18.3,\n \"temp_min\": 10,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-11\",\n \"precipitation\": 7.4,\n \"temp_max\": 18.3,\n \"temp_min\": 11.7,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-12\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 11.7,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-13\",\n \"precipitation\": 7.6,\n \"temp_max\": 21.1,\n \"temp_min\": 10,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-14\",\n \"precipitation\": 7.1,\n \"temp_max\": 16.7,\n \"temp_min\": 11.7,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-15\",\n \"precipitation\": 8.6,\n \"temp_max\": 16.1,\n \"temp_min\": 11.7,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-16\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 11.1,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-17\",\n \"precipitation\": 3.3,\n \"temp_max\": 16.7,\n \"temp_min\": 11.7,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-18\",\n \"precipitation\": 15,\n \"temp_max\": 19.4,\n \"temp_min\": 13.9,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-19\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 12.8,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-20\",\n \"precipitation\": 11.7,\n \"temp_max\": 16.1,\n \"temp_min\": 12.2,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-21\",\n \"precipitation\": 1,\n \"temp_max\": 16.1,\n \"temp_min\": 11.7,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-22\",\n \"precipitation\": 32,\n \"temp_max\": 15.6,\n \"temp_min\": 11.7,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-23\",\n \"precipitation\": 9.4,\n \"temp_max\": 14.4,\n \"temp_min\": 8.3,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-24\",\n \"precipitation\": 4.1,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-25\",\n \"precipitation\": 6.1,\n \"temp_max\": 16.7,\n \"temp_min\": 8.3,\n \"wind\": 5.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-26\",\n \"precipitation\": 1.5,\n \"temp_max\": 12.8,\n \"temp_min\": 7.8,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-27\",\n \"precipitation\": 0.8,\n \"temp_max\": 15.6,\n \"temp_min\": 6.7,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-28\",\n \"precipitation\": 12.7,\n \"temp_max\": 15,\n \"temp_min\": 9.4,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-29\",\n \"precipitation\": 0.5,\n \"temp_max\": 16.7,\n \"temp_min\": 11.7,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-30\",\n \"precipitation\": 25.4,\n \"temp_max\": 15.6,\n \"temp_min\": 11.1,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-31\",\n \"precipitation\": 17,\n \"temp_max\": 12.8,\n \"temp_min\": 8.3,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-01\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 1.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-11-02\",\n \"precipitation\": 1.8,\n \"temp_max\": 13.3,\n \"temp_min\": 7.2,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-03\",\n \"precipitation\": 10.9,\n \"temp_max\": 13.9,\n \"temp_min\": 11.1,\n \"wind\": 4.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-04\",\n \"precipitation\": 4.1,\n \"temp_max\": 14.4,\n \"temp_min\": 10.6,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-05\",\n \"precipitation\": 4.8,\n \"temp_max\": 15,\n \"temp_min\": 10.6,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-06\",\n \"precipitation\": 4.1,\n \"temp_max\": 16.7,\n \"temp_min\": 10.6,\n \"wind\": 6.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-07\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 7.2,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-08\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 3.9,\n \"wind\": 0.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-11-09\",\n \"precipitation\": 5.1,\n \"temp_max\": 13.3,\n \"temp_min\": 7.8,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-10\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-11\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 1.1,\n \"wind\": 7.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-12\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": 0,\n \"wind\": 7.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-13\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 0.6,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-14\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": -2.1,\n \"wind\": 4.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-15\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": -1.6,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-16\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": -2.1,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-17\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": -2.1,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-18\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": -0.5,\n \"wind\": 0.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-19\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 2.2,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-20\",\n \"precipitation\": 3.6,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-21\",\n \"precipitation\": 15.2,\n \"temp_max\": 11.1,\n \"temp_min\": 8.3,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-22\",\n \"precipitation\": 0.5,\n \"temp_max\": 9.4,\n \"temp_min\": 6.7,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-23\",\n \"precipitation\": 11.9,\n \"temp_max\": 12.8,\n \"temp_min\": 5.6,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-24\",\n \"precipitation\": 1.3,\n \"temp_max\": 11.7,\n \"temp_min\": 4.4,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-25\",\n \"precipitation\": 18.3,\n \"temp_max\": 13.9,\n \"temp_min\": 9.4,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-26\",\n \"precipitation\": 0.3,\n \"temp_max\": 15,\n \"temp_min\": 12.2,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-27\",\n \"precipitation\": 3.3,\n \"temp_max\": 14.4,\n \"temp_min\": 11.7,\n \"wind\": 6.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-28\",\n \"precipitation\": 34.3,\n \"temp_max\": 12.8,\n \"temp_min\": 3.3,\n \"wind\": 5.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-29\",\n \"precipitation\": 3.6,\n \"temp_max\": 4.4,\n \"temp_min\": -4.3,\n \"wind\": 5.3,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2014-11-30\",\n \"precipitation\": 0,\n \"temp_max\": 2.8,\n \"temp_min\": -4.9,\n \"wind\": 4.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-01\",\n \"precipitation\": 0,\n \"temp_max\": 4.4,\n \"temp_min\": -3.2,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-02\",\n \"precipitation\": 0,\n \"temp_max\": 5.6,\n \"temp_min\": -3.2,\n \"wind\": 5.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-12-03\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 0,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-04\",\n \"precipitation\": 0.8,\n \"temp_max\": 8.3,\n \"temp_min\": 3.9,\n \"wind\": 1.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-05\",\n \"precipitation\": 3,\n \"temp_max\": 12.8,\n \"temp_min\": 6.7,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-06\",\n \"precipitation\": 7.4,\n \"temp_max\": 11.7,\n \"temp_min\": 7.8,\n \"wind\": 3.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-07\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 6.1,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-08\",\n \"precipitation\": 9.1,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-09\",\n \"precipitation\": 9.9,\n \"temp_max\": 16.1,\n \"temp_min\": 10.6,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-10\",\n \"precipitation\": 13,\n \"temp_max\": 18.9,\n \"temp_min\": 10,\n \"wind\": 6.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-11\",\n \"precipitation\": 6.9,\n \"temp_max\": 14.4,\n \"temp_min\": 8.3,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-12\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-13\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 3.9,\n \"wind\": 1.1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-12-14\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 1.7,\n \"wind\": 3.5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-12-15\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 6.7,\n \"wind\": 5.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-16\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 8.3,\n \"wind\": 4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-17\",\n \"precipitation\": 2.8,\n \"temp_max\": 8.9,\n \"temp_min\": 6.1,\n \"wind\": 1.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-18\",\n \"precipitation\": 13,\n \"temp_max\": 9.4,\n \"temp_min\": 6.7,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-19\",\n \"precipitation\": 3,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-20\",\n \"precipitation\": 19.6,\n \"temp_max\": 12.8,\n \"temp_min\": 6.7,\n \"wind\": 5.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-21\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 10,\n \"wind\": 5.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-22\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 6.1,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-23\",\n \"precipitation\": 20.6,\n \"temp_max\": 12.2,\n \"temp_min\": 5,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-24\",\n \"precipitation\": 5.3,\n \"temp_max\": 7.2,\n \"temp_min\": 3.9,\n \"wind\": 1.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-25\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 2.8,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-12-26\",\n \"precipitation\": 0,\n \"temp_max\": 5.6,\n \"temp_min\": 1.7,\n \"wind\": 1.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-12-27\",\n \"precipitation\": 3.3,\n \"temp_max\": 9.4,\n \"temp_min\": 4.4,\n \"wind\": 4.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-28\",\n \"precipitation\": 4.1,\n \"temp_max\": 6.7,\n \"temp_min\": 2.8,\n \"wind\": 1.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-29\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": 0.6,\n \"wind\": 4.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-12-30\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -2.1,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-31\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -2.7,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-01-01\",\n \"precipitation\": 0,\n \"temp_max\": 5.6,\n \"temp_min\": -3.2,\n \"wind\": 1.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-01-02\",\n \"precipitation\": 1.5,\n \"temp_max\": 5.6,\n \"temp_min\": 0,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-03\",\n \"precipitation\": 0,\n \"temp_max\": 5,\n \"temp_min\": 1.7,\n \"wind\": 1.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-04\",\n \"precipitation\": 10.2,\n \"temp_max\": 10.6,\n \"temp_min\": 3.3,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-05\",\n \"precipitation\": 8.1,\n \"temp_max\": 12.2,\n \"temp_min\": 9.4,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-06\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 6.1,\n \"wind\": 1.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-07\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 5.6,\n \"wind\": 1.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-08\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 1.7,\n \"wind\": 2.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-09\",\n \"precipitation\": 0.3,\n \"temp_max\": 10,\n \"temp_min\": 3.3,\n \"wind\": 0.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-10\",\n \"precipitation\": 5.8,\n \"temp_max\": 7.8,\n \"temp_min\": 6.1,\n \"wind\": 0.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-11\",\n \"precipitation\": 1.5,\n \"temp_max\": 9.4,\n \"temp_min\": 7.2,\n \"wind\": 1.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-12\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 4.4,\n \"wind\": 1.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-13\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 2.8,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-14\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": 0.6,\n \"wind\": 2.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-15\",\n \"precipitation\": 9.7,\n \"temp_max\": 7.8,\n \"temp_min\": 1.1,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-16\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 5.6,\n \"wind\": 4.5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-17\",\n \"precipitation\": 26.2,\n \"temp_max\": 13.3,\n \"temp_min\": 3.3,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-18\",\n \"precipitation\": 21.3,\n \"temp_max\": 13.9,\n \"temp_min\": 7.2,\n \"wind\": 6.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-19\",\n \"precipitation\": 0.5,\n \"temp_max\": 10,\n \"temp_min\": 6.1,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-20\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 3.3,\n \"wind\": 3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-21\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": -0.5,\n \"wind\": 1.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-22\",\n \"precipitation\": 0.8,\n \"temp_max\": 9.4,\n \"temp_min\": 6.1,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-23\",\n \"precipitation\": 5.8,\n \"temp_max\": 12.2,\n \"temp_min\": 8.3,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-24\",\n \"precipitation\": 0.5,\n \"temp_max\": 14.4,\n \"temp_min\": 11.1,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-25\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 7.2,\n \"wind\": 1.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-26\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 6.1,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-27\",\n \"precipitation\": 0.8,\n \"temp_max\": 11.1,\n \"temp_min\": 8.3,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-28\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 5,\n \"wind\": 1.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-29\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 3.3,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-01-30\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 1.1,\n \"wind\": 0.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-31\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 3.3,\n \"wind\": 1.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-02-01\",\n \"precipitation\": 1.5,\n \"temp_max\": 9.4,\n \"temp_min\": 4.4,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-02\",\n \"precipitation\": 7.4,\n \"temp_max\": 11.1,\n \"temp_min\": 5,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-03\",\n \"precipitation\": 1.3,\n \"temp_max\": 10,\n \"temp_min\": 5.6,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-04\",\n \"precipitation\": 8.4,\n \"temp_max\": 10.6,\n \"temp_min\": 4.4,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-05\",\n \"precipitation\": 26.2,\n \"temp_max\": 13.3,\n \"temp_min\": 8.3,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-06\",\n \"precipitation\": 17.3,\n \"temp_max\": 14.4,\n \"temp_min\": 10,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-07\",\n \"precipitation\": 23.6,\n \"temp_max\": 12.2,\n \"temp_min\": 9.4,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-08\",\n \"precipitation\": 3.6,\n \"temp_max\": 15,\n \"temp_min\": 8.3,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-09\",\n \"precipitation\": 6.1,\n \"temp_max\": 13.3,\n \"temp_min\": 8.3,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-10\",\n \"precipitation\": 0.3,\n \"temp_max\": 12.8,\n \"temp_min\": 8.3,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-11\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 5.6,\n \"wind\": 1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-02-12\",\n \"precipitation\": 1,\n \"temp_max\": 16.7,\n \"temp_min\": 9.4,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-13\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 6.7,\n \"wind\": 1.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-02-14\",\n \"precipitation\": 0.3,\n \"temp_max\": 14.4,\n \"temp_min\": 6.7,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-15\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 3.9,\n \"wind\": 4.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-02-16\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 5.6,\n \"wind\": 6.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-02-17\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 4.4,\n \"wind\": 4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-02-18\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 4.4,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-02-19\",\n \"precipitation\": 4.6,\n \"temp_max\": 10.6,\n \"temp_min\": 8.3,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-20\",\n \"precipitation\": 0.8,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 0.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-21\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 5.6,\n \"wind\": 4.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-02-22\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 3.3,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-02-23\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 0.6,\n \"wind\": 1.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-02-24\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 2.2,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-02-25\",\n \"precipitation\": 4.1,\n \"temp_max\": 10,\n \"temp_min\": 6.7,\n \"wind\": 1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-26\",\n \"precipitation\": 9.4,\n \"temp_max\": 11.7,\n \"temp_min\": 7.8,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-27\",\n \"precipitation\": 18.3,\n \"temp_max\": 10,\n \"temp_min\": 6.7,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-28\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 3.3,\n \"wind\": 5.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-01\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 1.1,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-02\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 4.4,\n \"wind\": 4.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-03\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 0,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-04\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": -0.5,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-05\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 2.8,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-06\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 3.3,\n \"wind\": 1.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-07\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 3.9,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-03-08\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 3.9,\n \"wind\": 1.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-03-09\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 4.4,\n \"wind\": 1.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-03-10\",\n \"precipitation\": 0.8,\n \"temp_max\": 13.3,\n \"temp_min\": 5,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-11\",\n \"precipitation\": 2.5,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-12\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 9.4,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-13\",\n \"precipitation\": 2,\n \"temp_max\": 17.2,\n \"temp_min\": 7.8,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-14\",\n \"precipitation\": 17,\n \"temp_max\": 13.9,\n \"temp_min\": 9.4,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-15\",\n \"precipitation\": 55.9,\n \"temp_max\": 10.6,\n \"temp_min\": 6.1,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-16\",\n \"precipitation\": 1,\n \"temp_max\": 13.9,\n \"temp_min\": 6.1,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-17\",\n \"precipitation\": 0.8,\n \"temp_max\": 13.3,\n \"temp_min\": 4.4,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-18\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 7.2,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-19\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 8.3,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-20\",\n \"precipitation\": 4.1,\n \"temp_max\": 13.9,\n \"temp_min\": 8.9,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-21\",\n \"precipitation\": 3.8,\n \"temp_max\": 13.3,\n \"temp_min\": 8.3,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-22\",\n \"precipitation\": 1,\n \"temp_max\": 11.7,\n \"temp_min\": 6.1,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-23\",\n \"precipitation\": 8.1,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-24\",\n \"precipitation\": 7.6,\n \"temp_max\": 12.8,\n \"temp_min\": 6.1,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-25\",\n \"precipitation\": 5.1,\n \"temp_max\": 14.4,\n \"temp_min\": 7.2,\n \"wind\": 4.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-26\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 10,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-27\",\n \"precipitation\": 1,\n \"temp_max\": 18.3,\n \"temp_min\": 8.9,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-28\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 9.4,\n \"wind\": 5.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-29\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 8.9,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-30\",\n \"precipitation\": 1.8,\n \"temp_max\": 17.8,\n \"temp_min\": 10.6,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-31\",\n \"precipitation\": 1,\n \"temp_max\": 12.8,\n \"temp_min\": 6.1,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-01\",\n \"precipitation\": 5.1,\n \"temp_max\": 12.8,\n \"temp_min\": 5.6,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-02\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 5.6,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-03\",\n \"precipitation\": 1.5,\n \"temp_max\": 11.1,\n \"temp_min\": 5,\n \"wind\": 3.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-04\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 3.9,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-05\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 2.8,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-06\",\n \"precipitation\": 1,\n \"temp_max\": 13.9,\n \"temp_min\": 6.7,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-07\",\n \"precipitation\": 0.5,\n \"temp_max\": 14.4,\n \"temp_min\": 6.7,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-08\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 6.1,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-09\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 6.1,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-10\",\n \"precipitation\": 10.9,\n \"temp_max\": 13.9,\n \"temp_min\": 7.8,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-11\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 5.6,\n \"wind\": 6.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-12\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 5.6,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-13\",\n \"precipitation\": 14,\n \"temp_max\": 11.7,\n \"temp_min\": 3.9,\n \"wind\": 3.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-14\",\n \"precipitation\": 3.3,\n \"temp_max\": 11.7,\n \"temp_min\": 2.8,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-15\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 3.3,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-16\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 3.9,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-17\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 6.1,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-18\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 8.3,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-19\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 8.3,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-20\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 7.8,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-21\",\n \"precipitation\": 5.6,\n \"temp_max\": 17.2,\n \"temp_min\": 6.7,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-22\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 5,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-23\",\n \"precipitation\": 3,\n \"temp_max\": 12.2,\n \"temp_min\": 6.7,\n \"wind\": 4.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-24\",\n \"precipitation\": 3.3,\n \"temp_max\": 12.2,\n \"temp_min\": 6.1,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-25\",\n \"precipitation\": 1.3,\n \"temp_max\": 13.3,\n \"temp_min\": 5.6,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-26\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 4.4,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-04-27\",\n \"precipitation\": 0.3,\n \"temp_max\": 25,\n \"temp_min\": 10.6,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-28\",\n \"precipitation\": 1.8,\n \"temp_max\": 15.6,\n \"temp_min\": 8.9,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-29\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 7.2,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-30\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 7.8,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-01\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 8.9,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-02\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 7.8,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-03\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 7.8,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-04\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 7.2,\n \"wind\": 5.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-05\",\n \"precipitation\": 6.1,\n \"temp_max\": 14.4,\n \"temp_min\": 7.2,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-05-06\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 7.2,\n \"wind\": 2.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-05-07\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 6.1,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-08\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 8.3,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-09\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 9.4,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-10\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 11.1,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-11\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 10,\n \"wind\": 2.5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-05-12\",\n \"precipitation\": 4.3,\n \"temp_max\": 15.6,\n \"temp_min\": 10.6,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-05-13\",\n \"precipitation\": 4.1,\n \"temp_max\": 12.2,\n \"temp_min\": 10,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-05-14\",\n \"precipitation\": 0.3,\n \"temp_max\": 17.8,\n \"temp_min\": 9.4,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-05-15\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 9.4,\n \"wind\": 2.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-05-16\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 11.1,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-17\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 10.6,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-18\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 12.2,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-19\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 11.7,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-20\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 10.6,\n \"wind\": 1.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-05-21\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 11.7,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-22\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 11.7,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-23\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 11.7,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-24\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 11.1,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-25\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 11.1,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-26\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 11.7,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-27\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 11.7,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-28\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 12.2,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-29\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 12.8,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-30\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 10,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-31\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 11.7,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-01\",\n \"precipitation\": 4.6,\n \"temp_max\": 16.1,\n \"temp_min\": 11.7,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-06-02\",\n \"precipitation\": 0.5,\n \"temp_max\": 17.8,\n \"temp_min\": 12.8,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-06-03\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 11.7,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-04\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 11.7,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-05\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.8,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-06\",\n \"precipitation\": 0,\n \"temp_max\": 29.4,\n \"temp_min\": 13.3,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-07\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 15.6,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-08\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 14.4,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-09\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 14.4,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-10\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 11.1,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-11\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 11.1,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-12\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 11.7,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-13\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 9.4,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-14\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 11.7,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-15\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 16.1,\n \"wind\": 3.5,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2015-06-16\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 11.1,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-17\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 11.1,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-18\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 13.9,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-19\",\n \"precipitation\": 0.5,\n \"temp_max\": 23.9,\n \"temp_min\": 13.3,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-06-20\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 12.8,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-21\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 13.9,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-22\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 12.8,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-23\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 11.7,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-24\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 16.1,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-25\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 15.6,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-26\",\n \"precipitation\": 0,\n \"temp_max\": 31.7,\n \"temp_min\": 17.8,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-27\",\n \"precipitation\": 0,\n \"temp_max\": 33.3,\n \"temp_min\": 17.2,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-28\",\n \"precipitation\": 0.3,\n \"temp_max\": 28.3,\n \"temp_min\": 18.3,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-06-29\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 17.2,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-30\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 15,\n \"wind\": 3.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-07-01\",\n \"precipitation\": 0,\n \"temp_max\": 32.2,\n \"temp_min\": 17.2,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-02\",\n \"precipitation\": 0,\n \"temp_max\": 33.9,\n \"temp_min\": 17.8,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-03\",\n \"precipitation\": 0,\n \"temp_max\": 33.3,\n \"temp_min\": 17.8,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-04\",\n \"precipitation\": 0,\n \"temp_max\": 33.3,\n \"temp_min\": 15,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-05\",\n \"precipitation\": 0,\n \"temp_max\": 32.8,\n \"temp_min\": 16.7,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-06\",\n \"precipitation\": 0,\n \"temp_max\": 29.4,\n \"temp_min\": 15.6,\n \"wind\": 3.2,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2015-07-07\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 13.9,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-08\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 14.4,\n \"wind\": 1.9,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2015-07-09\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 14.4,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-10\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 16.7,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-11\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 16.7,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-12\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 16.7,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-13\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 16.1,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-14\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 16.1,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-15\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 14.4,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-16\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 15,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-17\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.9,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-18\",\n \"precipitation\": 0,\n \"temp_max\": 33.3,\n \"temp_min\": 17.8,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-19\",\n \"precipitation\": 0,\n \"temp_max\": 35,\n \"temp_min\": 17.2,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-20\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 16.7,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-21\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 15,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-22\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.9,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-23\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 14.4,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-24\",\n \"precipitation\": 0.3,\n \"temp_max\": 22.8,\n \"temp_min\": 13.3,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-07-25\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 14.4,\n \"wind\": 2.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-07-26\",\n \"precipitation\": 2,\n \"temp_max\": 22.2,\n \"temp_min\": 13.9,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-07-27\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 12.2,\n \"wind\": 1.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-07-28\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.9,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-29\",\n \"precipitation\": 0,\n \"temp_max\": 32.2,\n \"temp_min\": 14.4,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-30\",\n \"precipitation\": 0,\n \"temp_max\": 34.4,\n \"temp_min\": 17.2,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-31\",\n \"precipitation\": 0,\n \"temp_max\": 34.4,\n \"temp_min\": 17.8,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-01\",\n \"precipitation\": 0,\n \"temp_max\": 33.3,\n \"temp_min\": 15.6,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-02\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 16.1,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-03\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 17.2,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-04\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 14.4,\n \"wind\": 2.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-08-05\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 12.2,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-06\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 15,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-07\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 15.6,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-08\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 15.6,\n \"wind\": 3.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-08-09\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 15,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-10\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 16.1,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-11\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 16.7,\n \"wind\": 4.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-12\",\n \"precipitation\": 7.6,\n \"temp_max\": 28.3,\n \"temp_min\": 16.7,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-08-13\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 15.6,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-14\",\n \"precipitation\": 30.5,\n \"temp_max\": 18.3,\n \"temp_min\": 15,\n \"wind\": 5.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-08-15\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 13.9,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-16\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 14.4,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-17\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 13.9,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-18\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 15,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-19\",\n \"precipitation\": 0,\n \"temp_max\": 31.7,\n \"temp_min\": 16.1,\n \"wind\": 2.1,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2015-08-20\",\n \"precipitation\": 2,\n \"temp_max\": 22.8,\n \"temp_min\": 14.4,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-08-21\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 14.4,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-22\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.2,\n \"wind\": 2.5,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2015-08-23\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.9,\n \"wind\": 1.8,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2015-08-24\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 12.2,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-25\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 12.2,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-26\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 13.9,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-27\",\n \"precipitation\": 0,\n \"temp_max\": 29.4,\n \"temp_min\": 14.4,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-28\",\n \"precipitation\": 0.5,\n \"temp_max\": 23.3,\n \"temp_min\": 15.6,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-08-29\",\n \"precipitation\": 32.5,\n \"temp_max\": 22.2,\n \"temp_min\": 13.3,\n \"wind\": 5.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-08-30\",\n \"precipitation\": 10.2,\n \"temp_max\": 20,\n \"temp_min\": 12.8,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-08-31\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 16.1,\n \"wind\": 5.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-01\",\n \"precipitation\": 5.8,\n \"temp_max\": 19.4,\n \"temp_min\": 13.9,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-02\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 11.1,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-03\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10.6,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-04\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-05\",\n \"precipitation\": 0.3,\n \"temp_max\": 20.6,\n \"temp_min\": 8.9,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-06\",\n \"precipitation\": 5.3,\n \"temp_max\": 16.1,\n \"temp_min\": 11.7,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-07\",\n \"precipitation\": 0.3,\n \"temp_max\": 21.1,\n \"temp_min\": 13.3,\n \"wind\": 1.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-08\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 13.3,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-09\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 13.9,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-10\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 14.4,\n \"wind\": 3.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-09-11\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 15,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-12\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 14.4,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-13\",\n \"precipitation\": 0.5,\n \"temp_max\": 20.6,\n \"temp_min\": 12.8,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-14\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 10.6,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-15\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 10,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-16\",\n \"precipitation\": 1,\n \"temp_max\": 20,\n \"temp_min\": 10,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-17\",\n \"precipitation\": 1.8,\n \"temp_max\": 18.3,\n \"temp_min\": 12.8,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-18\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 12.8,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-19\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 14.4,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-20\",\n \"precipitation\": 4.1,\n \"temp_max\": 22.8,\n \"temp_min\": 12.2,\n \"wind\": 6.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-21\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 9.4,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-09-22\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 7.8,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-23\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 8.3,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-24\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 11.1,\n \"wind\": 2.5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-09-25\",\n \"precipitation\": 2,\n \"temp_max\": 15.6,\n \"temp_min\": 12.8,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-26\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-27\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 7.2,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-28\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 9.4,\n \"wind\": 5.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-29\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 8.9,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-30\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10,\n \"wind\": 1.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-01\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 9.4,\n \"wind\": 1.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-02\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 10,\n \"wind\": 2.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-03\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 11.1,\n \"wind\": 4.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-10-04\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 10,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-10-05\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 9.4,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-10-06\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10,\n \"wind\": 2.6,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2015-10-07\",\n \"precipitation\": 9.9,\n \"temp_max\": 16.1,\n \"temp_min\": 13.9,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-08\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 13.3,\n \"wind\": 1.1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-09\",\n \"precipitation\": 0.3,\n \"temp_max\": 19.4,\n \"temp_min\": 12.2,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-10\",\n \"precipitation\": 28.7,\n \"temp_max\": 21.1,\n \"temp_min\": 13.3,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-11\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 10.6,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-10-12\",\n \"precipitation\": 4.6,\n \"temp_max\": 18.3,\n \"temp_min\": 10.6,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-13\",\n \"precipitation\": 1.3,\n \"temp_max\": 16.7,\n \"temp_min\": 9.4,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-14\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 10,\n \"wind\": 5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-15\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 9.4,\n \"wind\": 3.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-16\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 8.9,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-10-17\",\n \"precipitation\": 0.3,\n \"temp_max\": 19.4,\n \"temp_min\": 11.7,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-18\",\n \"precipitation\": 3.8,\n \"temp_max\": 15,\n \"temp_min\": 12.8,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-19\",\n \"precipitation\": 0.3,\n \"temp_max\": 17.2,\n \"temp_min\": 12.2,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-20\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 10.6,\n \"wind\": 1.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-21\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 8.3,\n \"wind\": 1.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-22\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 8.9,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-23\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 7.2,\n \"wind\": 2.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-24\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 8.9,\n \"wind\": 2.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-25\",\n \"precipitation\": 8.9,\n \"temp_max\": 19.4,\n \"temp_min\": 8.9,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-26\",\n \"precipitation\": 6.9,\n \"temp_max\": 12.2,\n \"temp_min\": 10,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-27\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 7.8,\n \"wind\": 1.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-28\",\n \"precipitation\": 3.3,\n \"temp_max\": 13.9,\n \"temp_min\": 11.1,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-29\",\n \"precipitation\": 1.8,\n \"temp_max\": 15,\n \"temp_min\": 12.2,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-30\",\n \"precipitation\": 19.3,\n \"temp_max\": 17.2,\n \"temp_min\": 11.7,\n \"wind\": 6.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-31\",\n \"precipitation\": 33,\n \"temp_max\": 15.6,\n \"temp_min\": 11.7,\n \"wind\": 7.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-01\",\n \"precipitation\": 26.2,\n \"temp_max\": 12.2,\n \"temp_min\": 8.9,\n \"wind\": 6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-02\",\n \"precipitation\": 0.3,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-03\",\n \"precipitation\": 0.8,\n \"temp_max\": 10.6,\n \"temp_min\": 5,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-04\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 3.3,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-11-05\",\n \"precipitation\": 1.3,\n \"temp_max\": 11.7,\n \"temp_min\": 7.8,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-06\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 8.3,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-11-07\",\n \"precipitation\": 12.7,\n \"temp_max\": 12.2,\n \"temp_min\": 9.4,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-08\",\n \"precipitation\": 6.6,\n \"temp_max\": 11.1,\n \"temp_min\": 7.8,\n \"wind\": 1.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-09\",\n \"precipitation\": 3.3,\n \"temp_max\": 10,\n \"temp_min\": 5,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-10\",\n \"precipitation\": 1.3,\n \"temp_max\": 11.1,\n \"temp_min\": 3.9,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-11\",\n \"precipitation\": 1.5,\n \"temp_max\": 11.1,\n \"temp_min\": 6.1,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-12\",\n \"precipitation\": 9.9,\n \"temp_max\": 11.1,\n \"temp_min\": 5,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-13\",\n \"precipitation\": 33.5,\n \"temp_max\": 13.3,\n \"temp_min\": 9.4,\n \"wind\": 6.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-14\",\n \"precipitation\": 47.2,\n \"temp_max\": 9.4,\n \"temp_min\": 6.1,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-15\",\n \"precipitation\": 22.4,\n \"temp_max\": 8.9,\n \"temp_min\": 2.2,\n \"wind\": 4.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-16\",\n \"precipitation\": 2,\n \"temp_max\": 8.9,\n \"temp_min\": 1.7,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-17\",\n \"precipitation\": 29.5,\n \"temp_max\": 13.3,\n \"temp_min\": 6.7,\n \"wind\": 8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-18\",\n \"precipitation\": 1.5,\n \"temp_max\": 8.9,\n \"temp_min\": 3.3,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-19\",\n \"precipitation\": 2,\n \"temp_max\": 8.9,\n \"temp_min\": 2.8,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-20\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 0.6,\n \"wind\": 4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-11-21\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 0.6,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-11-22\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 1.7,\n \"wind\": 3.1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-11-23\",\n \"precipitation\": 3,\n \"temp_max\": 6.7,\n \"temp_min\": 0,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-24\",\n \"precipitation\": 7.1,\n \"temp_max\": 6.7,\n \"temp_min\": 2.8,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-25\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 0,\n \"wind\": 5.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-11-26\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": -1,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-11-27\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": -1.6,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-11-28\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": -2.7,\n \"wind\": 1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-11-29\",\n \"precipitation\": 0,\n \"temp_max\": 1.7,\n \"temp_min\": -2.1,\n \"wind\": 0.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-11-30\",\n \"precipitation\": 0.5,\n \"temp_max\": 5.6,\n \"temp_min\": -3.8,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-01\",\n \"precipitation\": 12.2,\n \"temp_max\": 10,\n \"temp_min\": 3.9,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-02\",\n \"precipitation\": 2.5,\n \"temp_max\": 10.6,\n \"temp_min\": 4.4,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-03\",\n \"precipitation\": 12.7,\n \"temp_max\": 15.6,\n \"temp_min\": 7.8,\n \"wind\": 5.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-04\",\n \"precipitation\": 2,\n \"temp_max\": 10.6,\n \"temp_min\": 6.1,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-05\",\n \"precipitation\": 15.7,\n \"temp_max\": 10,\n \"temp_min\": 6.1,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-06\",\n \"precipitation\": 11.2,\n \"temp_max\": 12.8,\n \"temp_min\": 7.2,\n \"wind\": 5.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-07\",\n \"precipitation\": 27.4,\n \"temp_max\": 11.1,\n \"temp_min\": 8.3,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-08\",\n \"precipitation\": 54.1,\n \"temp_max\": 15.6,\n \"temp_min\": 10,\n \"wind\": 6.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-09\",\n \"precipitation\": 13.5,\n \"temp_max\": 12.2,\n \"temp_min\": 7.8,\n \"wind\": 6.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-10\",\n \"precipitation\": 9.4,\n \"temp_max\": 11.7,\n \"temp_min\": 6.1,\n \"wind\": 7.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-11\",\n \"precipitation\": 0.3,\n \"temp_max\": 9.4,\n \"temp_min\": 4.4,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-12\",\n \"precipitation\": 16,\n \"temp_max\": 8.9,\n \"temp_min\": 5.6,\n \"wind\": 5.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-13\",\n \"precipitation\": 1.3,\n \"temp_max\": 7.8,\n \"temp_min\": 6.1,\n \"wind\": 6.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-14\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 1.7,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-12-15\",\n \"precipitation\": 1.5,\n \"temp_max\": 6.7,\n \"temp_min\": 1.1,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-16\",\n \"precipitation\": 3.6,\n \"temp_max\": 6.1,\n \"temp_min\": 2.8,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-17\",\n \"precipitation\": 21.8,\n \"temp_max\": 6.7,\n \"temp_min\": 3.9,\n \"wind\": 6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-18\",\n \"precipitation\": 18.5,\n \"temp_max\": 8.9,\n \"temp_min\": 4.4,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-19\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 2.8,\n \"wind\": 4.1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-12-20\",\n \"precipitation\": 4.3,\n \"temp_max\": 7.8,\n \"temp_min\": 4.4,\n \"wind\": 6.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-21\",\n \"precipitation\": 27.4,\n \"temp_max\": 5.6,\n \"temp_min\": 2.8,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-22\",\n \"precipitation\": 4.6,\n \"temp_max\": 7.8,\n \"temp_min\": 2.8,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-23\",\n \"precipitation\": 6.1,\n \"temp_max\": 5,\n \"temp_min\": 2.8,\n \"wind\": 7.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-24\",\n \"precipitation\": 2.5,\n \"temp_max\": 5.6,\n \"temp_min\": 2.2,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-25\",\n \"precipitation\": 5.8,\n \"temp_max\": 5,\n \"temp_min\": 2.2,\n \"wind\": 1.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-26\",\n \"precipitation\": 0,\n \"temp_max\": 4.4,\n \"temp_min\": 0,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-12-27\",\n \"precipitation\": 8.6,\n \"temp_max\": 4.4,\n \"temp_min\": 1.7,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-28\",\n \"precipitation\": 1.5,\n \"temp_max\": 5,\n \"temp_min\": 1.7,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-29\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 0.6,\n \"wind\": 2.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-12-30\",\n \"precipitation\": 0,\n \"temp_max\": 5.6,\n \"temp_min\": -1,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-12-31\",\n \"precipitation\": 0,\n \"temp_max\": 5.6,\n \"temp_min\": -2.1,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n }\n ]\n },\n \"transform\": [\n {\n \"type\": \"group\",\n \"color\": \"max\"\n }\n ],\n \"encode\": {\n \"x\": (d) => new Date(d.date).getUTCDate(),\n \"y\": (d) => new Date(d.date).getUTCMonth(),\n \"color\": \"temp_max\"\n },\n \"style\": {\n \"inset\": 0.5\n },\n \"scale\": {\n \"color\": {\n \"palette\": \"gnBu\"\n }\n },\n \"animate\": {\n \"enter\": {\n \"type\": \"fadeIn\"\n }\n },\n \"type\": \"cell\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"date\":\"2012-01-01\",\"precipitation\":0,\"temp_max\":12.8,\"temp_min\":5,\"wind\":4.7,\"weather\":\"drizzle\"},\n {\"date\":\"2012-01-02\",\"precipitation\":10.9,\"temp_max\":10.6,\"temp_min\":2.8,\"wind\":4.5,\"weather\":\"rain\"},\n {\"date\":\"2012-01-03\",\"precipitation\":0.8,\"temp_max\":11.7,\"temp_min\":7.2,\"wind\":2.3,\"weather\":\"rain\"},\n {\"date\":\"2012-01-04\",\"precipitation\":20.3,\"temp_max\":12.2,\"temp_min\":5.6,\"wind\":4.7,\"weather\":\"rain\"},\n {\"date\":\"2012-01-05\",\"precipitation\":1.3,\"temp_max\":8.9,\"temp_min\":2.8,\"wind\":6.1,\"weather\":\"rain\"},\n {\"date\":\"2012-01-06\",\"precipitation\":2.5,\"temp_max\":4.4,\"temp_min\":2.2,\"wind\":2.2,\"weather\":\"rain\"},\n {\"date\":\"2012-01-07\",\"precipitation\":0,\"temp_max\":7.2,\"temp_min\":2.8,\"wind\":2.3,\"weather\":\"rain\"},\n {\"date\":\"2012-01-08\",\"precipitation\":0,\"temp_max\":10,\"temp_min\":2.8,\"wind\":2,\"weather\":\"sun\"},\n {\"date\":\"2012-01-09\",\"precipitation\":4.3,\"temp_max\":9.4,\"temp_min\":5,\"wind\":3.4,\"weather\":\"rain\"},\n {\"date\":\"2012-01-10\",\"precipitation\":1,\"temp_max\":6.1,\"temp_min\":0.6,\"wind\":3.4,\"weather\":\"rain\"}\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'cell',\n data,\n encode: {\n x: (d) => new Date(d.date).getUTCDate(),\n y: (d) => new Date(d.date).getUTCMonth(),\n color: 'temp_max',\n },\n transform: [{ type: 'group', color: 'max' }],\n scale: {\n color: {\n type: 'sequential',\n palette: 'gnBu',\n },\n },\n style: {\n inset: 0.5,\n },\n animate: {\n enter: {\n type: 'fadeIn',\n duration: 1000,\n },\n },\n});\n\nchart.render();", + "duration": 13714, + "retrievedSkillIds": [ + "g2-mark-heatmap", + "g2-mark-cell-heatmap", + "g2-scale-sequential", + "g2-mark-contourline", + "g2-palette-category10" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1600, + "expectedLength": 218484, + "similarity": 0.5495883873293347, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"date\":\"2012-01-01\",\"precipitation\":0,\"temp_max\":12.8,\"temp_min\":5,\"wind\":4.7,\"weather\":\"drizzle\"},\n {\"date\":\"2012-01-02\",\"precipitation\":10.9,\"temp_max\":10.6,\"temp_min\":2.8,\"wind\":4.5,\"weather\":\"rain\"},\n {\"date\":\"2012-01-03\",\"precipitation\":0.8,\"temp_max\":11.7,\"temp_min\":7.2,\"wind\":2.3,\"weather\":\"rain\"},\n {\"date\":\"2012-01-04\",\"precipitation\":20.3,\"temp_max\":12.2,\"temp_min\":5.6,\"wind\":4.7,\"weather\":\"rain\"},\n {\"date\":\"2012-01-05\",\"precipitation\":1.3,\"temp_max\":8.9,\"temp_min\":2.8,\"wind\":6.1,\"weather\":\"rain\"},\n {\"date\":\"2012-01-06\",\"precipitation\":2.5,\"temp_max\":4.4,\"temp_min\":2.2,\"wind\":2.2,\"weather\":\"rain\"},\n {\"date\":\"2012-01-07\",\"precipitation\":0,\"temp_max\":7.2,\"temp_min\":2.8,\"wind\":2.3,\"weather\":\"rain\"},\n {\"date\":\"2012-01-08\",\"precipitation\":0,\"temp_max\":10,\"temp_min\":2.8,\"wind\":2,\"weather\":\"sun\"},\n {\"date\":\"2012-01-09\",\"precipitation\":4.3,\"temp_max\":9.4,\"temp_min\":5,\"wind\":3.4,\"weather\":\"rain\"},\n {\"date\":\"2012-01-10\",\"precipitation\":1,\"temp_max\":6.1,\"temp_min\":0.6,\"wind\":3.4,\"weather\":\"rain\"}\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'cell',\n data,\n encode: {\n x: (d) => new Date(d.date).getUTCDate(),\n y: (d) => new Date(d.date).getUTCMonth(),\n color: 'temp_max',\n },\n transform: [{ type: 'group', color: 'max' }],\n scale: {\n color: {\n type: 'sequential',\n palette: 'gnBu',\n },\n },\n style: {\n inset: 0.5,\n },\n animate: {\n enter: {\n type: 'fadeIn',\n duration: 1000,\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "Date", + "getUTCDate", + "Date", + "getUTCMonth", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "encode", + "x", + "y", + "color", + "transform", + "type", + "color", + "scale", + "color", + "type", + "palette", + "style", + "inset", + "animate", + "enter", + "type", + "duration" + ], + "stringLiterals": [ + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "animate" + ] + } + } + }, + { + "id": "case-1", + "query": "根据描述绘制图表,使用 G2 绘制一张横向分组柱状图,展示多个城市门店的数值对比,并按区域进行颜色区分。图表通过转置坐标系实现横向布局,同时使用分组变换以实现分组效果,图例位于顶部。\n参考数据:[{\"category\":\"北京朝阳店\",\"value\":142,\"group\":\"华北区\"},{\"category\":\"北京海淀店\",\"value\":135,\"group\":\"华北区\"},{\"category\":\"北京西城店\",\"value\":128,\"group\":\"华北区\"},{\"category\":\"天津滨海店\",\"value\":156,\"group\":\"华北区\"},{\"category\":\"石家庄裕华店\",\"value\":98,\"group\":\"华北区\"},{\"category\":\"太原迎泽店\",\"value\":89,\"group\":\"华北区\"},{\"category\":\"呼和浩特新城店\",\"value\":67,\"group\":\"华北区\"},{\"category\":\"上海浦东店\",\"value\":189,\"group\":\"华东区\"},{\"category\":\"上海静安店\",\"value\":167,\"group\":\"华东区\"},{\"category\":\"杭州西湖店\",\"value\":145,\"group\":\"华东区\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n autoFit: true,\n});\n\nconst manyCategories = [\n { category: '北京朝阳店', value: 142, group: '华北区' },\n { category: '北京海淀店', value: 135, group: '华北区' },\n { category: '北京西城店', value: 128, group: '华北区' },\n { category: '天津滨海店', value: 156, group: '华北区' },\n { category: '石家庄裕华店', value: 98, group: '华北区' },\n { category: '太原迎泽店', value: 89, group: '华北区' },\n { category: '呼和浩特新城店', value: 67, group: '华北区' },\n { category: '上海浦东店', value: 189, group: '华东区' },\n { category: '上海静安店', value: 167, group: '华东区' },\n { category: '杭州西湖店', value: 145, group: '华东区' },\n { category: '南京鼓楼店', value: 134, group: '华东区' },\n { category: '苏州园区店', value: 123, group: '华东区' },\n { category: '无锡新区店', value: 112, group: '华东区' },\n { category: '宁波海曙店', value: 101, group: '华东区' },\n { category: '合肥蜀山店', value: 95, group: '华东区' },\n { category: '福州鼓楼店', value: 87, group: '华东区' },\n { category: '厦门思明店', value: 79, group: '华东区' },\n { category: '南昌东湖店', value: 72, group: '华东区' },\n { category: '济南历下店', value: 88, group: '华东区' },\n { category: '青岛市南店', value: 94, group: '华东区' },\n { category: '烟台芝罘店', value: 76, group: '华东区' },\n { category: '潍坊奎文店', value: 68, group: '华东区' },\n { category: '临沂兰山店', value: 63, group: '华东区' },\n { category: '淄博张店', value: 58, group: '华东区' },\n { category: '威海环翠店', value: 54, group: '华东区' },\n];\n\nchart.options({\n type: 'interval',\n data: manyCategories,\n encode: { x: 'category', y: 'value', color: 'group' },\n transform: [{ type: 'dodgeX' }],\n coordinate: { transform: [{ type: 'transpose' }] },\n legend: { color: { position: 'top' } },\n});\n\nchart.render();", + "generatedCode": "", + "duration": 61850, + "retrievedSkillIds": [ + "g2-mark-interval-grouped", + "g2-mark-arc-pie", + "g2-mark-interval-basic", + "g2-concept-chart-selection", + "g2-mark-histogram" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": true, + "issues": [ + "缺少 import/require 语句", + "缺少 Chart/Graph 实例化", + "缺少 render() 调用" + ], + "warnings": [], + "codeLength": 0, + "expectedLength": 1689, + "similarity": 0, + "extractedCode": "", + "structuralFeatures": { + "imports": [], + "functionCalls": [], + "objectKeys": [], + "stringLiterals": [], + "apiPatterns": [] + } + } + }, + { + "id": "case-2", + "query": "根据描述绘制图表,使用 G2 渲染一个热力图,展示小时和星期二维网格上的强度分布,颜色映射到强度值。\n参考数据:\n[{\"hour\":0,\"day\":0,\"intensity\":50},{\"hour\":0,\"day\":1,\"intensity\":50},{\"hour\":0,\"day\":2,\"intensity\":50},{\"hour\":0,\"day\":3,\"intensity\":50},{\"hour\":0,\"day\":4,\"intensity\":50},{\"hour\":0,\"day\":5,\"intensity\":50},{\"hour\":0,\"day\":6,\"intensity\":50},{\"hour\":0,\"day\":7,\"intensity\":50},{\"hour\":0,\"day\":8,\"intensity\":50},{\"hour\":0,\"day\":9,\"intensity\":50}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst data = [];\nfor (let x = 0; x < 12; x++) {\n for (let y = 0; y < 24; y++) {\n data.push({\n hour: x,\n day: y,\n intensity: Math.round(50 + 50 * Math.sin(x / 2) * Math.cos(y / 3)),\n });\n }\n}\n\nconst chart = new Chart({ container: 'container', autoFit: true });\nchart.options({\n type: 'heatmap',\n data,\n encode: { x: 'hour', y: 'day', color: 'intensity' },\n style: { stroke: '#eee', lineWidth: 1 },\n axis: { x: { title: '小时' }, y: { title: '星期' } },\n});\nchart.render();\n", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"hour\":0,\"day\":0,\"intensity\":50},\n {\"hour\":0,\"day\":1,\"intensity\":50},\n {\"hour\":0,\"day\":2,\"intensity\":50},\n {\"hour\":0,\"day\":3,\"intensity\":50},\n {\"hour\":0,\"day\":4,\"intensity\":50},\n {\"hour\":0,\"day\":5,\"intensity\":50},\n {\"hour\":0,\"day\":6,\"intensity\":50},\n {\"hour\":0,\"day\":7,\"intensity\":50},\n {\"hour\":0,\"day\":8,\"intensity\":50},\n {\"hour\":0,\"day\":9,\"intensity\":50}\n];\n\nchart.options({\n type: 'cell',\n data: data,\n encode: {\n x: 'hour',\n y: 'day',\n color: 'intensity',\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'YlOrRd',\n },\n },\n style: {\n inset: 1,\n },\n axis: {\n x: { title: '小时' },\n y: { title: '日期' },\n },\n});\n\nchart.render();", + "duration": 9919, + "retrievedSkillIds": [ + "g2-mark-heatmap", + "g2-mark-cell-heatmap", + "g2-mark-contourline", + "g2-scale-time", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 813, + "expectedLength": 531, + "similarity": 0.5667437825332562, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"hour\":0,\"day\":0,\"intensity\":50},\n {\"hour\":0,\"day\":1,\"intensity\":50},\n {\"hour\":0,\"day\":2,\"intensity\":50},\n {\"hour\":0,\"day\":3,\"intensity\":50},\n {\"hour\":0,\"day\":4,\"intensity\":50},\n {\"hour\":0,\"day\":5,\"intensity\":50},\n {\"hour\":0,\"day\":6,\"intensity\":50},\n {\"hour\":0,\"day\":7,\"intensity\":50},\n {\"hour\":0,\"day\":8,\"intensity\":50},\n {\"hour\":0,\"day\":9,\"intensity\":50}\n];\n\nchart.options({\n type: 'cell',\n data: data,\n encode: {\n x: 'hour',\n y: 'day',\n color: 'intensity',\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'YlOrRd',\n },\n },\n style: {\n inset: 1,\n },\n axis: {\n x: { title: '小时' },\n y: { title: '日期' },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "encode", + "x", + "y", + "color", + "scale", + "color", + "type", + "palette", + "style", + "inset", + "axis", + "x", + "title", + "y", + "title" + ], + "stringLiterals": [ + "hour", + "day", + "intensity", + "hour", + "day", + "intensity", + "hour", + "day", + "intensity", + "hour", + "day", + "intensity", + "hour", + "day", + "intensity", + "hour", + "day", + "intensity", + "hour", + "day", + "intensity", + "hour", + "day", + "intensity", + "hour", + "day", + "intensity", + "hour", + "day", + "intensity" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale" + ] + } + } + }, + { + "id": "case-3", + "query": "根据描述绘制图表,使用 G2 绘制一个带有径向坐标系的环形柱状图,中心位置放置一张图片。图表展示不同时间段的数值分布情况,并对部分区间进行高亮处理,同时关闭坐标轴和图例显示,具备元素高亮交互功能。\n参考数据:[{\"type\":\"1-3秒\",\"value\":0.16},{\"type\":\"4-10秒\",\"value\":0.125},{\"type\":\"11-30秒\",\"value\":0.2},{\"type\":\"1-3分\",\"value\":0.2},{\"type\":\"3-10分\",\"value\":0.05},{\"type\":\"10-30分\",\"value\":0.01},{\"type\":\"30+分\",\"value\":0.015}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"theme\": \"dark\",\n \"data\": [\n {\n \"type\": \"1-3秒\",\n \"value\": 0.16\n },\n {\n \"type\": \"4-10秒\",\n \"value\": 0.125\n },\n {\n \"type\": \"11-30秒\",\n \"value\": 0.2\n },\n {\n \"type\": \"1-3分\",\n \"value\": 0.2\n },\n {\n \"type\": \"3-10分\",\n \"value\": 0.05\n },\n {\n \"type\": \"10-30分\",\n \"value\": 0.01\n },\n {\n \"type\": \"30+分\",\n \"value\": 0.015\n }\n ],\n \"coordinate\": {\n \"type\": \"radial\",\n \"innerRadius\": 0.35\n },\n \"type\": \"view\",\n \"children\": [\n {\n \"encode\": {\n \"x\": \"type\",\n \"y\": 0.2\n },\n \"style\": {\n \"fill\": \"#202020\"\n },\n \"state\": {\n \"active\": {\n \"strokeWidth\": 0\n }\n },\n \"tooltip\": false,\n \"type\": \"interval\"\n },\n {\n \"encode\": {\n \"x\": \"type\",\n \"y\": \"value\",\n \"color\": [\n (val) => (val.type === '10-30分' || val.type === '30+分' ? 'high' : 'low')\n ]\n },\n \"scale\": {\n \"color\": {\n \"range\": [\n \"#5B8FF9\",\n \"#ff4d4f\"\n ]\n }\n },\n \"style\": {\n \"radius\": 20\n },\n \"tooltip\": {\n \"items\": [\n (item) => ({\n name: item.type,\n value: item.value,\n })\n ]\n },\n \"axis\": false,\n \"legend\": false,\n \"state\": {\n \"active\": {\n \"fillOpacity\":1\n },\n \"inactive\":{\n \"fillOpacity\":0.5\n }\n },\n \"interaction\": {\n \"elementHighlight\": true\n },\n \"type\": \"interval\"\n },\n {\n \"style\": {\n \"x\": \"50%\",\n \"y\": \"50%\",\n \"width\": 100,\n \"height\": 80\n },\n \"encode\": {\n \"src\": \"https://gw.alipayobjects.com/mdn/rms_ef85c6/afts/img/A*0DYiQKP08cQAAAAAAAAAAAAAARQnAQ\"\n },\n \"tooltip\": false,\n \"type\": \"image\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { type: \"1-3秒\", value: 0.16, highlight: false },\n { type: \"4-10秒\", value: 0.125, highlight: false },\n { type: \"11-30秒\", value: 0.2, highlight: true },\n { type: \"1-3分\", value: 0.2, highlight: true },\n { type: \"3-10分\", value: 0.05, highlight: false },\n { type: \"10-30分\", value: 0.01, highlight: false },\n { type: \"30+分\", value: 0.015, highlight: false }\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 600,\n});\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'interval',\n encode: {\n x: 'type',\n y: 'value',\n color: 'highlight',\n },\n coordinate: {\n type: 'radial',\n innerRadius: 0.4,\n outerRadius: 0.85,\n },\n scale: {\n color: {\n domain: [false, true],\n range: ['#5B8FF9', '#FAAD14'],\n },\n },\n style: {\n radius: 4,\n },\n axis: false,\n legend: false,\n interaction: {\n elementHighlight: true,\n },\n },\n {\n type: 'image',\n data: [{ url: 'https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*ELYbTIVCgWaAAAAAAAAAAABkARQnAQ' }],\n encode: {\n src: 'url',\n },\n style: {\n x: '50%',\n y: '50%',\n width: 80,\n height: 80,\n },\n },\n ],\n});\n\nchart.render();", + "duration": 41590, + "retrievedSkillIds": [ + "g2-mark-interval-basic", + "g2-interaction-legend-highlight", + "g2-mark-arc-pie", + "g2-interaction-element-highlight", + "g2-mark-arc-donut" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1378, + "expectedLength": 2040, + "similarity": 0.5791808242220353, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { type: \"1-3秒\", value: 0.16, highlight: false },\n { type: \"4-10秒\", value: 0.125, highlight: false },\n { type: \"11-30秒\", value: 0.2, highlight: true },\n { type: \"1-3分\", value: 0.2, highlight: true },\n { type: \"3-10分\", value: 0.05, highlight: false },\n { type: \"10-30分\", value: 0.01, highlight: false },\n { type: \"30+分\", value: 0.015, highlight: false }\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 600,\n});\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'interval',\n encode: {\n x: 'type',\n y: 'value',\n color: 'highlight',\n },\n coordinate: {\n type: 'radial',\n innerRadius: 0.4,\n outerRadius: 0.85,\n },\n scale: {\n color: {\n domain: [false, true],\n range: ['#5B8FF9', '#FAAD14'],\n },\n },\n style: {\n radius: 4,\n },\n axis: false,\n legend: false,\n interaction: {\n elementHighlight: true,\n },\n },\n {\n type: 'image',\n data: [{ url: 'https://gw.alipayobjects.com/mdn/rms_2274c3/afts/img/A*ELYbTIVCgWaAAAAAAAAAAABkARQnAQ' }],\n encode: {\n src: 'url',\n },\n style: {\n x: '50%',\n y: '50%',\n width: 80,\n height: 80,\n },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "type", + "value", + "highlight", + "type", + "value", + "highlight", + "type", + "value", + "highlight", + "type", + "value", + "highlight", + "type", + "value", + "highlight", + "type", + "value", + "highlight", + "type", + "value", + "highlight", + "container", + "autoFit", + "height", + "type", + "children", + "type", + "encode", + "x", + "y", + "color", + "coordinate", + "type", + "innerRadius", + "outerRadius", + "scale", + "color", + "domain", + "range", + "style", + "radius", + "axis", + "legend", + "interaction", + "elementHighlight", + "type", + "data", + "url", + "https", + "encode", + "src", + "style", + "x", + "y", + "width", + "height" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale", + "view.children", + "type.view", + "type.interval", + "interaction" + ] + } + } + }, + { + "id": "case-4", + "query": "根据描述绘制图表,使用堆叠面积图展示不同大洲在不同年份的人口数量变化情况,通过颜色区分各大洲,呈现数据随时间的堆积趋势。参考数据:[{\"country\":\"Asia\",\"year\":\"1750\",\"value\":502},{\"country\":\"Asia\",\"year\":\"1800\",\"value\":635},{\"country\":\"Asia\",\"year\":\"1850\",\"value\":809},{\"country\":\"Asia\",\"year\":\"1900\",\"value\":947},{\"country\":\"Asia\",\"year\":\"1950\",\"value\":1402},{\"country\":\"Asia\",\"year\":\"1999\",\"value\":3634},{\"country\":\"Asia\",\"year\":\"2050\",\"value\":5268},{\"country\":\"Africa\",\"year\":\"1750\",\"value\":106},{\"country\":\"Africa\",\"year\":\"1800\",\"value\":107},{\"country\":\"Africa\",\"year\":\"1850\",\"value\":111}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'area',\n data: [\n { country: 'Asia', year: '1750', value: 502 },\n { country: 'Asia', year: '1800', value: 635 },\n { country: 'Asia', year: '1850', value: 809 },\n { country: 'Asia', year: '1900', value: 947 },\n { country: 'Asia', year: '1950', value: 1402 },\n { country: 'Asia', year: '1999', value: 3634 },\n { country: 'Asia', year: '2050', value: 5268 },\n { country: 'Africa', year: '1750', value: 106 },\n { country: 'Africa', year: '1800', value: 107 },\n { country: 'Africa', year: '1850', value: 111 },\n { country: 'Africa', year: '1900', value: 133 },\n { country: 'Africa', year: '1950', value: 221 },\n { country: 'Africa', year: '1999', value: 767 },\n { country: 'Africa', year: '2050', value: 1766 },\n { country: 'Europe', year: '1750', value: 163 },\n { country: 'Europe', year: '1800', value: 203 },\n { country: 'Europe', year: '1850', value: 276 },\n { country: 'Europe', year: '1900', value: 408 },\n { country: 'Europe', year: '1950', value: 547 },\n { country: 'Europe', year: '1999', value: 729 },\n { country: 'Europe', year: '2050', value: 628 },\n ],\n encode: {\n x: 'year', // 配置x通道\n y: 'value', // 配置y通道\n color: 'country', // 配置color通道\n },\n transform: [{ type: 'stackY' }], // 按照指定通道分组,对每组的 y 和 y1 通道进行堆叠,实现堆叠效果\n style: { fillOpacity: 0.3 }, // 配置area标记的填充透明度为 0.3\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'area',\n data: [\n {\"country\":\"Asia\",\"year\":\"1750\",\"value\":502},\n {\"country\":\"Asia\",\"year\":\"1800\",\"value\":635},\n {\"country\":\"Asia\",\"year\":\"1850\",\"value\":809},\n {\"country\":\"Asia\",\"year\":\"1900\",\"value\":947},\n {\"country\":\"Asia\",\"year\":\"1950\",\"value\":1402},\n {\"country\":\"Asia\",\"year\":\"1999\",\"value\":3634},\n {\"country\":\"Asia\",\"year\":\"2050\",\"value\":5268},\n {\"country\":\"Africa\",\"year\":\"1750\",\"value\":106},\n {\"country\":\"Africa\",\"year\":\"1800\",\"value\":107},\n {\"country\":\"Africa\",\"year\":\"1850\",\"value\":111}\n ],\n encode: {\n x: 'year',\n y: 'value',\n color: 'country',\n },\n transform: [{ type: 'stackY' }],\n});\n\nchart.render();", + "duration": 5328, + "retrievedSkillIds": [ + "g2-mark-area-stacked", + "g2-mark-area-basic", + "g2-mark-interval-stacked", + "g2-transform-sorty", + "g2-scale-sequential" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 801, + "expectedLength": 1490, + "similarity": 0.7794078947368421, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'area',\n data: [\n {\"country\":\"Asia\",\"year\":\"1750\",\"value\":502},\n {\"country\":\"Asia\",\"year\":\"1800\",\"value\":635},\n {\"country\":\"Asia\",\"year\":\"1850\",\"value\":809},\n {\"country\":\"Asia\",\"year\":\"1900\",\"value\":947},\n {\"country\":\"Asia\",\"year\":\"1950\",\"value\":1402},\n {\"country\":\"Asia\",\"year\":\"1999\",\"value\":3634},\n {\"country\":\"Asia\",\"year\":\"2050\",\"value\":5268},\n {\"country\":\"Africa\",\"year\":\"1750\",\"value\":106},\n {\"country\":\"Africa\",\"year\":\"1800\",\"value\":107},\n {\"country\":\"Africa\",\"year\":\"1850\",\"value\":111}\n ],\n encode: {\n x: 'year',\n y: 'value',\n color: 'country',\n },\n transform: [{ type: 'stackY' }],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "encode", + "x", + "y", + "color", + "transform", + "type" + ], + "stringLiterals": [ + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform" + ] + } + } + }, + { + "id": "case-5", + "query": "根据描述绘制图表,通过横向排列的区间条和点元素,展示多种系统资源的使用情况,包括每项资源的当前使用率、目标阈值,并根据是否超出目标值对颜色进行区分,同时添加了坐标轴和标签说明。参考数据:[{\"resource\":\"CPU使用率\",\"ranges\":100,\"measures\":65,\"target\":80},{\"resource\":\"内存使用率\",\"ranges\":100,\"measures\":45,\"target\":70},{\"resource\":\"磁盘使用率\",\"ranges\":100,\"measures\":88,\"target\":85},{\"resource\":\"网络带宽\",\"ranges\":100,\"measures\":72,\"target\":75}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nconst resourceData = [\n {\n resource: 'CPU使用率',\n ranges: 100,\n measures: 65,\n target: 80,\n },\n {\n resource: '内存使用率',\n ranges: 100,\n measures: 45,\n target: 70,\n },\n {\n resource: '磁盘使用率',\n ranges: 100,\n measures: 88,\n target: 85,\n },\n {\n resource: '网络带宽',\n ranges: 100,\n measures: 72,\n target: 75,\n },\n];\n\nchart.options({\n type: 'view',\n coordinate: { transform: [{ type: 'transpose' }] },\n children: [\n {\n type: 'interval',\n data: resourceData,\n encode: { x: 'resource', y: 'ranges', color: '#f5f5f5' },\n style: { maxWidth: 30 },\n },\n {\n type: 'interval',\n data: resourceData,\n encode: {\n x: 'resource',\n y: 'measures',\n color: (d) => (d.measures > d.target ? '#ff7875' : '#52c41a'),\n },\n style: { maxWidth: 20 },\n label: {\n text: 'measures',\n position: 'right',\n textAlign: 'left',\n dx: 5,\n formatter: (d) => `${d}%`,\n },\n },\n {\n type: 'point',\n data: resourceData,\n encode: {\n x: 'resource',\n y: 'target',\n shape: 'line',\n color: '#1890ff',\n size: 6,\n },\n axis: {\n y: {\n grid: true,\n title: '使用率 (%)',\n },\n x: {\n title: '系统资源',\n },\n },\n },\n ],\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"resource\":\"CPU使用率\",\"ranges\":100,\"measures\":65,\"target\":80},\n {\"resource\":\"内存使用率\",\"ranges\":100,\"measures\":45,\"target\":70},\n {\"resource\":\"磁盘使用率\",\"ranges\":100,\"measures\":88,\"target\":85},\n {\"resource\":\"网络带宽\",\"ranges\":100,\"measures\":72,\"target\":75}\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nchart.options({\n type: 'view',\n data,\n coordinate: {\n transform: [{ type: 'transpose' }]\n },\n children: [\n {\n type: 'interval',\n encode: {\n x: 'resource',\n y: 'ranges',\n color: () => '#f0f0f0'\n },\n style: {\n fillOpacity: 0.6\n }\n },\n {\n type: 'interval',\n encode: {\n x: 'resource',\n y: 'measures',\n color: (d) => d.measures > d.target ? '#ff4d4f' : '#1890ff'\n },\n style: {\n radius: 4\n }\n },\n {\n type: 'point',\n encode: {\n x: 'resource',\n y: 'target',\n shape: 'line'\n },\n style: {\n stroke: '#000000',\n lineWidth: 3,\n size: 12\n }\n }\n ],\n axis: {\n x: {\n title: '资源类型',\n grid: false\n },\n y: {\n title: '使用率 (%)',\n labelFormatter: (d) => `${d}%`,\n grid: true\n }\n },\n labels: [\n {\n text: 'measures',\n position: 'right',\n formatter: (d) => `${d.measures}%`,\n style: {\n fill: '#595959',\n fontSize: 12,\n fontWeight: 500\n }\n }\n ],\n legend: false\n});\n\nchart.render();", + "duration": 36792, + "retrievedSkillIds": [ + "g2-mark-interval-basic", + "g2-mark-rangex", + "g2-transform-sortx", + "g2-comp-legend-config", + "g2-mark-arc-pie" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1542, + "expectedLength": 1485, + "similarity": 0.7005237184627722, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"resource\":\"CPU使用率\",\"ranges\":100,\"measures\":65,\"target\":80},\n {\"resource\":\"内存使用率\",\"ranges\":100,\"measures\":45,\"target\":70},\n {\"resource\":\"磁盘使用率\",\"ranges\":100,\"measures\":88,\"target\":85},\n {\"resource\":\"网络带宽\",\"ranges\":100,\"measures\":72,\"target\":75}\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nchart.options({\n type: 'view',\n data,\n coordinate: {\n transform: [{ type: 'transpose' }]\n },\n children: [\n {\n type: 'interval',\n encode: {\n x: 'resource',\n y: 'ranges',\n color: () => '#f0f0f0'\n },\n style: {\n fillOpacity: 0.6\n }\n },\n {\n type: 'interval',\n encode: {\n x: 'resource',\n y: 'measures',\n color: (d) => d.measures > d.target ? '#ff4d4f' : '#1890ff'\n },\n style: {\n radius: 4\n }\n },\n {\n type: 'point',\n encode: {\n x: 'resource',\n y: 'target',\n shape: 'line'\n },\n style: {\n stroke: '#000000',\n lineWidth: 3,\n size: 12\n }\n }\n ],\n axis: {\n x: {\n title: '资源类型',\n grid: false\n },\n y: {\n title: '使用率 (%)',\n labelFormatter: (d) => `${d}%`,\n grid: true\n }\n },\n labels: [\n {\n text: 'measures',\n position: 'right',\n formatter: (d) => `${d.measures}%`,\n style: {\n fill: '#595959',\n fontSize: 12,\n fontWeight: 500\n }\n }\n ],\n legend: false\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "coordinate", + "transform", + "type", + "children", + "type", + "encode", + "x", + "y", + "color", + "style", + "fillOpacity", + "type", + "encode", + "x", + "y", + "color", + "style", + "radius", + "type", + "encode", + "x", + "y", + "shape", + "style", + "stroke", + "lineWidth", + "size", + "axis", + "x", + "title", + "grid", + "y", + "title", + "labelFormatter", + "grid", + "labels", + "text", + "position", + "formatter", + "style", + "fill", + "fontSize", + "fontWeight", + "legend" + ], + "stringLiterals": [ + "resource", + "ranges", + "measures", + "target", + "resource", + "ranges", + "measures", + "target", + "resource", + "ranges", + "measures", + "target", + "resource", + "ranges", + "measures", + "target" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "view.children", + "type.view", + "type.interval", + "type.point", + "x6.labels" + ] + } + } + }, + { + "id": "case-6", + "query": "根据描述绘制图表,使用极坐标玫瑰图可视化一周内服务器负载的周期性分布,通过按周枚举的柱状区间展示每日负载值,坐标轴设置范围并添加交互高亮。参考数据:\n[{\"week\":\"周一\",\"load\":72},{\"week\":\"周二\",\"load\":68},{\"week\":\"周三\",\"load\":75},{\"week\":\"周四\",\"load\":81},{\"week\":\"周五\",\"load\":92},{\"week\":\"周六\",\"load\":88},{\"week\":\"周日\",\"load\":65}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'interval',\n autoFit: true,\n coordinate: { type: 'polar' },\n data: [\n { week: '周一', load: 72 },\n { week: '周二', load: 68 },\n { week: '周三', load: 75 },\n { week: '周四', load: 81 },\n { week: '周五', load: 92 },\n { week: '周六', load: 88 },\n { week: '周日', load: 65 }\n ],\n encode: { x: 'week', y: 'load', color: 'week' },\n scale: { y: { min: 0, max: 100 } },\n style: { radius: 0.8, fillOpacity: 0.7, stroke: '#333', lineWidth: 1 },\n axis: { x: { tickSpacing: 10 }, y: { grid: true, labelFormatter: null } },\n title: '周服务器负载周期分布 - 玫瑰图周期可视化',\n interaction: [{ type: 'elementHighlightByColor' }]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"week\":\"周一\",\"load\":72},\n {\"week\":\"周二\",\"load\":68},\n {\"week\":\"周三\",\"load\":75},\n {\"week\":\"周四\",\"load\":81},\n {\"week\":\"周五\",\"load\":92},\n {\"week\":\"周六\",\"load\":88},\n {\"week\":\"周日\",\"load\":65}\n ],\n encode: {\n x: 'week',\n y: 'load',\n color: 'week',\n },\n coordinate: {\n type: 'polar',\n },\n scale: {\n y: {\n domain: [0, 100],\n },\n },\n interaction: {\n elementHighlight: true,\n },\n style: {\n stroke: 'white',\n lineWidth: 1,\n },\n});\n\nchart.render();", + "duration": 6768, + "retrievedSkillIds": [ + "g2-mark-rose", + "g2-coord-polar", + "g2-mark-interval-basic", + "g2-mark-arc-pie", + "g2-coord-helix" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 649, + "expectedLength": 769, + "similarity": 0.7804967377816916, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"week\":\"周一\",\"load\":72},\n {\"week\":\"周二\",\"load\":68},\n {\"week\":\"周三\",\"load\":75},\n {\"week\":\"周四\",\"load\":81},\n {\"week\":\"周五\",\"load\":92},\n {\"week\":\"周六\",\"load\":88},\n {\"week\":\"周日\",\"load\":65}\n ],\n encode: {\n x: 'week',\n y: 'load',\n color: 'week',\n },\n coordinate: {\n type: 'polar',\n },\n scale: {\n y: {\n domain: [0, 100],\n },\n },\n interaction: {\n elementHighlight: true,\n },\n style: {\n stroke: 'white',\n lineWidth: 1,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "encode", + "x", + "y", + "color", + "coordinate", + "type", + "scale", + "y", + "domain", + "interaction", + "elementHighlight", + "style", + "stroke", + "lineWidth" + ], + "stringLiterals": [ + "week", + "load", + "week", + "load", + "week", + "load", + "week", + "load", + "week", + "load", + "week", + "load", + "week", + "load" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale", + "type.interval", + "interaction" + ] + } + } + }, + { + "id": "case-7", + "query": "根据描述绘制图表,使用G2渲染一个横向对称漏斗图,展示A、B、C、D四类数据的数值分布,并在每个漏斗段右侧标注其与前一段的转换率百分比。同时绘制一条从A到D数值的连接线,并在左侧标注总转换率和标签。参考数据:\n[{\"text\":\"A\",\"value\":12000},{\"text\":\"B\",\"value\":9800},{\"text\":\"C\",\"value\":6789},{\"text\":\"D\",\"value\":4569}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\nconst r = (start, end) => `${(((start - end) / start) * 100).toFixed(2)} %`;\nconst encodeX = 'text';\nconst encodeY = 'value';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"paddingRight\": 60,\n \"coordinate\": {\n \"transform\": [\n {\n \"type\": \"transpose\"\n }\n ]\n },\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": [\n {\n \"text\": \"A\",\n \"value\": 12000\n },\n {\n \"text\": \"B\",\n \"value\": 9800\n },\n {\n \"text\": \"C\",\n \"value\": 6789\n },\n {\n \"text\": \"D\",\n \"value\": 4569\n }\n ],\n \"transform\": [\n {\n \"type\": \"symmetryY\"\n }\n ],\n \"axis\": false,\n \"legend\": false,\n \"encode\": {\n \"x\": \"text\",\n \"y\": \"value\",\n \"color\": \"text\",\n \"shape\": \"funnel\"\n },\n \"scale\": {\n \"x\": {\n \"paddingOuter\": 0,\n \"paddingInner\": 0\n }\n },\n \"labels\": [\n {\n \"text\": (d) => `${d[encodeX]} ${d[encodeY]}`,\n \"position\": \"inside\",\n \"fontSize\": 20\n },\n {\n \"text\": \"\",\n \"render\": (_d, i, data) =>\n i !== 0\n ? `
`\n : '',\n \"position\": \"top-right\"\n },\n {\n \"text\": (_d, i) => (i !== 0 ? '转换率' : ''),\n \"position\": \"top-right\",\n \"textAlign\": \"left\",\n \"textBaseline\": \"middle\",\n \"fill\": \"#aaa\",\n \"dx\": 60\n },\n {\n \"text\": (_d, i, data) =>\n i !== 0 ? r(data[i - 1][encodeY], data[i][encodeY]) : '',\n \"position\": \"top-right\",\n \"textAlign\": \"left\",\n \"textBaseline\": \"middle\",\n \"dx\": 60,\n \"dy\": 15\n }\n ],\n \"type\": \"interval\"\n },\n {\n \"data\": [\n {\n \"startX\": \"A\",\n \"startY\": \"D\",\n \"endX\": 0,\n \"endY\": 3715.5\n }\n ],\n \"encode\": {\n \"x\": \"startX\",\n \"x1\": \"startY\",\n \"y\": \"endX\",\n \"y1\": \"endY\"\n },\n \"labels\": [\n {\n \"text\": \"转换率\",\n \"position\": \"left\",\n \"textAlign\": \"start\",\n \"textBaseline\": \"middle\",\n \"fill\": \"#aaa\",\n \"dx\": 10\n },\n {\n \"text\": \"61.92 %\",\n \"position\": \"left\",\n \"textAlign\": \"start\",\n \"dy\": 15,\n \"dx\": 10,\n \"fill\": \"#000\"\n }\n ],\n \"style\": {\n \"stroke\": \"#aaa\",\n \"markerEnd\": false,\n \"connectLength1\": -12,\n \"offset2\": -20\n },\n \"type\": \"connector\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "", + "duration": 37347, + "retrievedSkillIds": [ + "g2-mark-funnel", + "g2-mark-histogram", + "g2-transform-binx", + "g2-mark-linex-liney", + "g2-scale-linear" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": true, + "issues": [ + "缺少 import/require 语句", + "缺少 Chart/Graph 实例化", + "缺少 render() 调用" + ], + "warnings": [], + "codeLength": 0, + "expectedLength": 2800, + "similarity": 0, + "extractedCode": "", + "structuralFeatures": { + "imports": [], + "functionCalls": [], + "objectKeys": [], + "stringLiterals": [], + "apiPatterns": [] + } + } + }, + { + "id": "case-8", + "query": "根据描述绘制图表,使用随机生成的数据绘制一个直方图,将数据按值分布划分为30个区间,并根据数值范围设置不同颜色。数值在40到60之间的数据使用绿色填充,其余数据使用灰色填充,用于展示数据的频数分布情况。参考数据:[{\"value\":7.894792053848505},{\"value\":58.15232781692175},{\"value\":12.903659483417869},{\"value\":57.368316082283854},{\"value\":1.0589697393588722},{\"value\":59.61116428952664},{\"value\":28.427108987234533},{\"value\":30.94372609623242},{\"value\":52.52069826237857},{\"value\":8.365064114332199}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const data = Array.from({ length: 500 }, () => ({\n value: Math.random() < 0.5 ? 30*Math.random()**2 : 60 - 20*Math.random()**2\n}));\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n autoFit: true,\n});\n\nchart.options({\n type: 'rect',\n data: data,\n encode: { x: 'value' },\n transform: [{ type: 'binX', y: 'count', thresholds: 30 }],\n style: {\n fill: (d) => d.value >= 40 && d.value <= 60 ? '#52C41A' : '#BFBFBF',\n fillOpacity: 0.9\n },\n axis: { x: { title: 'Value' }, y: { title: '频数' } }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n {\"value\":7.894792053848505},\n {\"value\":58.15232781692175},\n {\"value\":12.903659483417869},\n {\"value\":57.368316082283854},\n {\"value\":1.0589697393588722},\n {\"value\":59.61116428952664},\n {\"value\":28.427108987234533},\n {\"value\":30.94372609623242},\n {\"value\":52.52069826237857},\n {\"value\":8.365064114332199}\n];\n\nchart.options({\n type: 'rect',\n data,\n encode: {\n x: 'value',\n y: 'y',\n color: (d) => {\n const mid = (d.x + d.x1) / 2;\n return mid >= 40 && mid <= 60 ? '#52c41a' : '#bfbfbf';\n }\n },\n transform: [\n { type: 'binX', y: 'count', thresholds: 30 }\n ],\n style: {\n inset: 0.5\n },\n axis: {\n x: { title: '数值' },\n y: { title: '频数' }\n }\n});\n\nchart.render();", + "duration": 29794, + "retrievedSkillIds": [ + "g2-transform-binx", + "g2-mark-distribution-curve", + "g2-mark-histogram", + "g2-comp-legend-continuous", + "g2-data-fold" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 845, + "expectedLength": 544, + "similarity": 0.6052968104692242, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n {\"value\":7.894792053848505},\n {\"value\":58.15232781692175},\n {\"value\":12.903659483417869},\n {\"value\":57.368316082283854},\n {\"value\":1.0589697393588722},\n {\"value\":59.61116428952664},\n {\"value\":28.427108987234533},\n {\"value\":30.94372609623242},\n {\"value\":52.52069826237857},\n {\"value\":8.365064114332199}\n];\n\nchart.options({\n type: 'rect',\n data,\n encode: {\n x: 'value',\n y: 'y',\n color: (d) => {\n const mid = (d.x + d.x1) / 2;\n return mid >= 40 && mid <= 60 ? '#52c41a' : '#bfbfbf';\n }\n },\n transform: [\n { type: 'binX', y: 'count', thresholds: 30 }\n ],\n style: {\n inset: 0.5\n },\n axis: {\n x: { title: '数值' },\n y: { title: '频数' }\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "color", + "transform", + "type", + "y", + "thresholds", + "style", + "inset", + "axis", + "x", + "title", + "y", + "title" + ], + "stringLiterals": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform" + ] + } + } + }, + { + "id": "case-9", + "query": "根据描述绘制图表,使用 G2 基于职级和月薪数据绘制箱线图,展示不同职级(初级、中级、高级)的月薪分布情况,包括箱体、五数概括和异常点。参考数据:\n[{\"level\":\"初级\",\"income\":4.5},{\"level\":\"初级\",\"income\":5},{\"level\":\"初级\",\"income\":5.2},{\"level\":\"初级\",\"income\":5.5},{\"level\":\"初级\",\"income\":5.8},{\"level\":\"初级\",\"income\":6},{\"level\":\"中级\",\"income\":8},{\"level\":\"中级\",\"income\":8.5},{\"level\":\"中级\",\"income\":9},{\"level\":\"中级\",\"income\":9.5}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { level: '初级', income: 4.5 }, { level: '初级', income: 5.0 }, { level: '初级', income: 5.2 },\n { level: '初级', income: 5.5 }, { level: '初级', income: 5.8 }, { level: '初级', income: 6.0 },\n { level: '中级', income: 8.0 }, { level: '中级', income: 8.5 }, { level: '中级', income: 9.0 },\n { level: '中级', income: 9.5 }, { level: '中级', income: 10.0 }, { level: '中级', income: 12.0 },\n { level: '高级', income: 15.0 }, { level: '高级', income: 16.5 }, { level: '高级', income: 17.0 },\n { level: '高级', income: 18.0 }, { level: '高级', income: 20.0 }, { level: '高级', income: 25.0 }\n];\n\nconst chart = new Chart({ container: 'container', theme: 'classic' });\nchart.options({\n type: 'boxplot',\n data: data,\n encode: { x: 'level', y: 'income', color: 'level' },\n style: { boxWidth: 0.7, whiskerStrokeDash: [4, 4], pointR: 3 },\n legend: { position: 'bottom' },\n axis: {\n y: { title: '月薪 (万元)', grid: true },\n x: { title: '职级', labelFill: '#333' }\n }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"level\":\"初级\",\"income\":4.5},\n {\"level\":\"初级\",\"income\":5},\n {\"level\":\"初级\",\"income\":5.2},\n {\"level\":\"初级\",\"income\":5.5},\n {\"level\":\"初级\",\"income\":5.8},\n {\"level\":\"初级\",\"income\":6},\n {\"level\":\"中级\",\"income\":8},\n {\"level\":\"中级\",\"income\":8.5},\n {\"level\":\"中级\",\"income\":9},\n {\"level\":\"中级\",\"income\":9.5}\n];\n\nchart.options({\n type: 'boxplot',\n data: data,\n encode: {\n x: 'level',\n y: 'income',\n color: 'level',\n },\n style: {\n boxFillOpacity: 0.3,\n boxStroke: '#5B8FF9',\n medianStroke: '#ff4d4f',\n medianLineWidth: 2,\n whiskerStroke: '#666',\n outlierFill: '#ff4d4f',\n outlierR: 4,\n },\n axis: {\n y: { \n title: '月薪(万元)',\n grid: true \n },\n x: { \n title: '职级' \n }\n },\n legend: {\n color: false\n }\n});\n\nchart.render();", + "duration": 10374, + "retrievedSkillIds": [ + "g2-mark-boxplot", + "g2-mark-box-boxplot", + "g2-mark-interval-basic", + "g2-comp-space-layer", + "g2-mark-line-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 913, + "expectedLength": 1004, + "similarity": 0.6283641474325984, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"level\":\"初级\",\"income\":4.5},\n {\"level\":\"初级\",\"income\":5},\n {\"level\":\"初级\",\"income\":5.2},\n {\"level\":\"初级\",\"income\":5.5},\n {\"level\":\"初级\",\"income\":5.8},\n {\"level\":\"初级\",\"income\":6},\n {\"level\":\"中级\",\"income\":8},\n {\"level\":\"中级\",\"income\":8.5},\n {\"level\":\"中级\",\"income\":9},\n {\"level\":\"中级\",\"income\":9.5}\n];\n\nchart.options({\n type: 'boxplot',\n data: data,\n encode: {\n x: 'level',\n y: 'income',\n color: 'level',\n },\n style: {\n boxFillOpacity: 0.3,\n boxStroke: '#5B8FF9',\n medianStroke: '#ff4d4f',\n medianLineWidth: 2,\n whiskerStroke: '#666',\n outlierFill: '#ff4d4f',\n outlierR: 4,\n },\n axis: {\n y: { \n title: '月薪(万元)',\n grid: true \n },\n x: { \n title: '职级' \n }\n },\n legend: {\n color: false\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "encode", + "x", + "y", + "color", + "style", + "boxFillOpacity", + "boxStroke", + "medianStroke", + "medianLineWidth", + "whiskerStroke", + "outlierFill", + "outlierR", + "axis", + "y", + "title", + "grid", + "x", + "title", + "legend", + "color" + ], + "stringLiterals": [ + "level", + "income", + "level", + "income", + "level", + "income", + "level", + "income", + "level", + "income", + "level", + "income", + "level", + "income", + "level", + "income", + "level", + "income", + "level", + "income" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode" + ] + } + } + }, + { + "id": "case-10", + "query": "根据描述绘制图表,使用树图展示每日摄入的热量数据,数据包含碳水、蛋白质、脂肪及其子类、酒精等分类及其对应的千卡值,通过不同矩形区域大小表示各类别的热量占比,并支持高亮交互和详细信息提示。参考数据:[{\"name\":\"碳水\",\"value\":1800,\"unit\":\"kcal\"},{\"name\":\"蛋白质\",\"value\":900,\"unit\":\"kcal\"},{\"name\":\"脂肪\",\"value\":1200,\"children\":[{\"name\":\"饱和脂肪\",\"value\":400},{\"name\":\"不饱和脂肪\",\"value\":800}]},{\"name\":\"酒精\",\"value\":300}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n autoFit: true,\n});\n\nconst calorieData = {\n name: '每日摄入',\n children: [\n { name: '碳水', value: 1800, unit: 'kcal' },\n { name: '蛋白质', value: 900, unit: 'kcal' },\n {\n name: '脂肪',\n value: 1200,\n children: [\n { name: '饱和脂肪', value: 400 },\n { name: '不饱和脂肪', value: 800 },\n ],\n },\n { name: '酒精', value: 300 },\n ],\n};\n\nchart.options({\n type: 'treemap',\n data: { value: calorieData },\n layout: { tile: 'treemapSquarify', paddingInner: 3, paddingOuter: 2 },\n encode: {\n value: 'value',\n },\n style: {\n labelText: (d) => d.data.name,\n labelFill: '#fff',\n labelFontSize: 12,\n labelFontWeight: '600',\n stroke: '#fff',\n lineWidth: 2,\n radius: 6,\n },\n interaction: [{ type: 'elementHighlight', scale: { value: 1.05 } }],\n tooltip: {\n title: (d) => d.data.name,\n items: [\n { field: 'value', name: '千卡', valueFormatter: (v) => `${v} kcal` },\n ],\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = {\n name: '每日摄入',\n children: [\n { name: '碳水', value: 1800, unit: 'kcal' },\n { name: '蛋白质', value: 900, unit: 'kcal' },\n {\n name: '脂肪',\n children: [\n { name: '饱和脂肪', value: 400, unit: 'kcal' },\n { name: '不饱和脂肪', value: 800, unit: 'kcal' }\n ]\n },\n { name: '酒精', value: 300, unit: 'kcal' }\n ]\n};\n\nchart.options({\n type: 'treemap',\n data: { value: data },\n encode: {\n value: 'value',\n color: (d) => d.path?.[1] || d.data?.name,\n },\n scale: {\n color: {\n type: 'ordinal',\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A'],\n },\n },\n layout: {\n tile: 'treemapSquarify',\n paddingInner: 2,\n paddingTop: 4,\n },\n style: {\n labelText: (d) => {\n const name = d.data?.name || '';\n const value = d.data?.value;\n return value ? `${name}\\n${value} kcal` : name;\n },\n labelFill: '#fff',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n fillOpacity: 0.9,\n stroke: '#fff',\n lineWidth: 1,\n },\n tooltip: {\n title: (d) => d.data?.name,\n items: [\n (d) => ({\n name: '热量',\n value: `${d.data?.value} ${d.data?.unit || 'kcal'}`,\n }),\n (d) => ({\n name: '占比',\n value: d.parent?.value ? `${((d.data?.value / d.parent.value) * 100).toFixed(1)}%` : '',\n }),\n ],\n },\n legend: false,\n});\n\nchart.render();", + "duration": 51166, + "retrievedSkillIds": [ + "g2-mark-sankey", + "g2-mark-treemap", + "g2-concept-chart-selection", + "g2-mark-cell-heatmap", + "g2-mark-arc-donut" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1492, + "expectedLength": 1059, + "similarity": 0.8529357897004957, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = {\n name: '每日摄入',\n children: [\n { name: '碳水', value: 1800, unit: 'kcal' },\n { name: '蛋白质', value: 900, unit: 'kcal' },\n {\n name: '脂肪',\n children: [\n { name: '饱和脂肪', value: 400, unit: 'kcal' },\n { name: '不饱和脂肪', value: 800, unit: 'kcal' }\n ]\n },\n { name: '酒精', value: 300, unit: 'kcal' }\n ]\n};\n\nchart.options({\n type: 'treemap',\n data: { value: data },\n encode: {\n value: 'value',\n color: (d) => d.path?.[1] || d.data?.name,\n },\n scale: {\n color: {\n type: 'ordinal',\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A'],\n },\n },\n layout: {\n tile: 'treemapSquarify',\n paddingInner: 2,\n paddingTop: 4,\n },\n style: {\n labelText: (d) => {\n const name = d.data?.name || '';\n const value = d.data?.value;\n return value ? `${name}\\n${value} kcal` : name;\n },\n labelFill: '#fff',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n fillOpacity: 0.9,\n stroke: '#fff',\n lineWidth: 1,\n },\n tooltip: {\n title: (d) => d.data?.name,\n items: [\n (d) => ({\n name: '热量',\n value: `${d.data?.value} ${d.data?.unit || 'kcal'}`,\n }),\n (d) => ({\n name: '占比',\n value: d.parent?.value ? `${((d.data?.value / d.parent.value) * 100).toFixed(1)}%` : '',\n }),\n ],\n },\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "name", + "children", + "name", + "value", + "unit", + "name", + "value", + "unit", + "name", + "children", + "name", + "value", + "unit", + "name", + "value", + "unit", + "name", + "value", + "unit", + "type", + "data", + "value", + "encode", + "value", + "color", + "scale", + "color", + "type", + "range", + "layout", + "tile", + "paddingInner", + "paddingTop", + "style", + "labelText", + "labelFill", + "labelFontSize", + "labelFontWeight", + "fillOpacity", + "stroke", + "lineWidth", + "tooltip", + "title", + "items", + "name", + "value", + "name", + "value", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "view.children" + ] + } + } + }, + { + "id": "case-11", + "query": "根据描述绘制图表,使用G2绘制折线图,展示2024年1月15日8:00至17:00每小时的活跃用户数变化趋势,配置了x轴旋转以适配时间标签,y轴带有格式化标签和网格线。参考数据:\n[{\"time\":\"2024-01-15 08:00\",\"activeUsers\":1200},{\"time\":\"2024-01-15 09:00\",\"activeUsers\":1800},{\"time\":\"2024-01-15 10:00\",\"activeUsers\":2800},{\"time\":\"2024-01-15 11:00\",\"activeUsers\":3200},{\"time\":\"2024-01-15 12:00\",\"activeUsers\":4500},{\"time\":\"2024-01-15 13:00\",\"activeUsers\":4200},{\"time\":\"2024-01-15 14:00\",\"activeUsers\":3200},{\"time\":\"2024-01-15 15:00\",\"activeUsers\":3600},{\"time\":\"2024-01-15 16:00\",\"activeUsers\":3800},{\"time\":\"2024-01-15 17:00\",\"activeUsers\":4800}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'line',\n width: 600, // 减小宽度以触发旋转\n marginBottom: 30, // 预留旋转的空间\n data: [\n { time: '2024-01-15 08:00', activeUsers: 1200 },\n { time: '2024-01-15 09:00', activeUsers: 1800 },\n { time: '2024-01-15 10:00', activeUsers: 2800 },\n { time: '2024-01-15 11:00', activeUsers: 3200 },\n { time: '2024-01-15 12:00', activeUsers: 4500 },\n { time: '2024-01-15 13:00', activeUsers: 4200 },\n { time: '2024-01-15 14:00', activeUsers: 3200 },\n { time: '2024-01-15 15:00', activeUsers: 3600 },\n { time: '2024-01-15 16:00', activeUsers: 3800 },\n { time: '2024-01-15 17:00', activeUsers: 4800 },\n { time: '2024-01-15 18:00', activeUsers: 5200 },\n { time: '2024-01-15 19:00', activeUsers: 4800 },\n { time: '2024-01-15 20:00', activeUsers: 4100 },\n { time: '2024-01-15 21:00', activeUsers: 3500 },\n { time: '2024-01-15 22:00', activeUsers: 2600 },\n { time: '2024-01-15 23:00', activeUsers: 1900 },\n ],\n encode: { x: 'time', y: 'activeUsers' },\n style: { stroke: '#5B8FF9', lineWidth: 2 },\n axis: {\n x: {\n title: '时间',\n labelFontSize: 10,\n // 旋转方案:适合时间标签\n size: 100,\n transform: [\n {\n type: 'rotate',\n optionalAngles: [0, 30, 45, 60, 90], // 尝试多个角度\n recoverWhenFailed: true, // 失败时恢复默认角度\n },\n ],\n },\n y: {\n title: '活跃用户数',\n labelFormatter: ',.0f',\n grid: true,\n gridStroke: '#e6e6e6',\n gridLineDash: [3, 3],\n },\n },\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst rawData = [\n {\"time\":\"2024-01-15 08:00\",\"activeUsers\":1200},\n {\"time\":\"2024-01-15 09:00\",\"activeUsers\":1800},\n {\"time\":\"2024-01-15 10:00\",\"activeUsers\":2800},\n {\"time\":\"2024-01-15 11:00\",\"activeUsers\":3200},\n {\"time\":\"2024-01-15 12:00\",\"activeUsers\":4500},\n {\"time\":\"2024-01-15 13:00\",\"activeUsers\":4200},\n {\"time\":\"2024-01-15 14:00\",\"activeUsers\":3200},\n {\"time\":\"2024-01-15 15:00\",\"activeUsers\":3600},\n {\"time\":\"2024-01-15 16:00\",\"activeUsers\":3800},\n {\"time\":\"2024-01-15 17:00\",\"activeUsers\":4800}\n];\n\nconst data = rawData.map(d => ({\n ...d,\n time: new Date(d.time)\n}));\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400\n});\n\nchart.options({\n type: 'line',\n data,\n encode: {\n x: 'time',\n y: 'activeUsers'\n },\n axis: {\n x: {\n labelAutoRotate: true,\n labelFormatter: 'HH:mm',\n title: '时间'\n },\n y: {\n labelFormatter: (v) => `${v.toLocaleString()}人`,\n grid: true,\n title: '活跃用户数'\n }\n },\n style: {\n lineWidth: 2,\n stroke: '#5B8FF9'\n },\n tooltip: {\n items: [\n { field: 'activeUsers', name: '活跃用户' }\n ]\n }\n});\n\nchart.render();", + "duration": 13154, + "retrievedSkillIds": [ + "g2-mark-line-multi", + "g2-mark-line-basic", + "g2-scale-time", + "g2-scale-linear", + "g2-mark-arc-pie" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1184, + "expectedLength": 1589, + "similarity": 0.5519941779631561, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst rawData = [\n {\"time\":\"2024-01-15 08:00\",\"activeUsers\":1200},\n {\"time\":\"2024-01-15 09:00\",\"activeUsers\":1800},\n {\"time\":\"2024-01-15 10:00\",\"activeUsers\":2800},\n {\"time\":\"2024-01-15 11:00\",\"activeUsers\":3200},\n {\"time\":\"2024-01-15 12:00\",\"activeUsers\":4500},\n {\"time\":\"2024-01-15 13:00\",\"activeUsers\":4200},\n {\"time\":\"2024-01-15 14:00\",\"activeUsers\":3200},\n {\"time\":\"2024-01-15 15:00\",\"activeUsers\":3600},\n {\"time\":\"2024-01-15 16:00\",\"activeUsers\":3800},\n {\"time\":\"2024-01-15 17:00\",\"activeUsers\":4800}\n];\n\nconst data = rawData.map(d => ({\n ...d,\n time: new Date(d.time)\n}));\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400\n});\n\nchart.options({\n type: 'line',\n data,\n encode: {\n x: 'time',\n y: 'activeUsers'\n },\n axis: {\n x: {\n labelAutoRotate: true,\n labelFormatter: 'HH:mm',\n title: '时间'\n },\n y: {\n labelFormatter: (v) => `${v.toLocaleString()}人`,\n grid: true,\n title: '活跃用户数'\n }\n },\n style: {\n lineWidth: 2,\n stroke: '#5B8FF9'\n },\n tooltip: {\n items: [\n { field: 'activeUsers', name: '活跃用户' }\n ]\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "map", + "Date", + "Chart", + "options", + "toLocaleString", + "render" + ], + "objectKeys": [ + "08", + "09", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "time", + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "axis", + "x", + "labelAutoRotate", + "labelFormatter", + "HH", + "title", + "y", + "labelFormatter", + "grid", + "title", + "style", + "lineWidth", + "stroke", + "tooltip", + "items", + "field", + "name" + ], + "stringLiterals": [ + "time", + "activeUsers", + "time", + "activeUsers", + "time", + "activeUsers", + "time", + "activeUsers", + "time", + "activeUsers", + "time", + "activeUsers", + "time", + "activeUsers", + "time", + "activeUsers", + "time", + "activeUsers", + "time", + "activeUsers" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "type.line" + ] + } + } + }, + { + "id": "case-12", + "query": "根据描述绘制图表,使用G2渲染一个树图(treemap),展示世界各大洲及其主要国家的人口数据,以嵌套矩形区域表示层级和数值大小,通过颜色区分大洲及国家。参考数据:{\"name\":\"世界人口\",\"children\":[{\"name\":\"亚洲\",\"children\":[{\"name\":\"中国\",\"value\":1412},{\"name\":\"印度\",\"value\":1380},{\"name\":\"印尼\",\"value\":273}]},{\"name\":\"非洲\",\"children\":[{\"name\":\"尼日利亚\",\"value\":206},{\"name\":\"埃塞俄比亚\",\"value\":115},{\"name\":\"埃及\",\"value\":102}]},{\"name\":\"欧洲\",\"children\":[{\"name\":\"俄罗斯\",\"value\":144},{\"name\":\"德国\",\"value\":83},{\"name\":\"英国\",\"value\":67}]}]}", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n autoFit: true,\n});\n\nconst populationData = {\n name: '世界人口',\n children: [\n {\n name: '亚洲',\n children: [\n { name: '中国', value: 1412 },\n { name: '印度', value: 1380 },\n { name: '印尼', value: 273 },\n ],\n },\n {\n name: '非洲',\n children: [\n { name: '尼日利亚', value: 206 },\n { name: '埃塞俄比亚', value: 115 },\n { name: '埃及', value: 102 },\n ],\n },\n {\n name: '欧洲',\n children: [\n { name: '俄罗斯', value: 144 },\n { name: '德国', value: 83 },\n { name: '英国', value: 67 },\n ],\n },\n ],\n};\n\nchart.options({\n type: 'treemap',\n data: { value: populationData },\n layout: { tile: 'treemapBinary', paddingInner: 4, paddingOuter: 2 },\n encode: {\n value: 'value',\n \n },\n scale: {\n color: { range: ['#FFE0B2', '#FFA726', '#7E57C2', '#42A5F5'] },\n value: { formatter: (v) => `${v}M` },\n },\n style: {\n labelText: (d) => d.data.name,\n labelFill: '#333',\n labelFontSize: (d) => (d.depth === 0 ? 16 : 12),\n stroke: '#fff',\n lineWidth: 1.5,\n fillOpacity: (d) => 0.3 + 0.7 * (d.depth / 2),\n },\n legend: { color: { position: 'right' } },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '世界人口',\n children: [\n {\n name: '亚洲',\n children: [\n { name: '中国', value: 1412 },\n { name: '印度', value: 1380 },\n { name: '印尼', value: 273 }\n ]\n },\n {\n name: '非洲',\n children: [\n { name: '尼日利亚', value: 206 },\n { name: '埃塞俄比亚', value: 115 },\n { name: '埃及', value: 102 }\n ]\n },\n {\n name: '欧洲',\n children: [\n { name: '俄罗斯', value: 144 },\n { name: '德国', value: 83 },\n { name: '英国', value: 67 }\n ]\n }\n ]\n};\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 500\n});\n\nchart.options({\n type: 'treemap',\n data: { value: data },\n encode: {\n value: 'value',\n color: (d) => d.path?.[1] || d.data?.name\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A']\n }\n },\n layout: {\n tile: 'treemapSquarify',\n paddingInner: 2,\n paddingTop: 20\n },\n style: {\n labelText: (d) => d.data?.name,\n labelFill: '#fff',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n fillOpacity: 0.9,\n stroke: '#fff',\n lineWidth: 1.5\n },\n legend: {\n color: {\n position: 'top',\n title: '大洲'\n }\n },\n interaction: {\n treemapDrillDown: true\n }\n});\n\nchart.render();", + "duration": 36867, + "retrievedSkillIds": [ + "g2-mark-tree", + "g2-mark-treemap", + "g2-interaction-treemap-drilldown", + "g2-comp-geoview", + "g2-mark-partition" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1325, + "expectedLength": 1286, + "similarity": 0.8000970842882608, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '世界人口',\n children: [\n {\n name: '亚洲',\n children: [\n { name: '中国', value: 1412 },\n { name: '印度', value: 1380 },\n { name: '印尼', value: 273 }\n ]\n },\n {\n name: '非洲',\n children: [\n { name: '尼日利亚', value: 206 },\n { name: '埃塞俄比亚', value: 115 },\n { name: '埃及', value: 102 }\n ]\n },\n {\n name: '欧洲',\n children: [\n { name: '俄罗斯', value: 144 },\n { name: '德国', value: 83 },\n { name: '英国', value: 67 }\n ]\n }\n ]\n};\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 500\n});\n\nchart.options({\n type: 'treemap',\n data: { value: data },\n encode: {\n value: 'value',\n color: (d) => d.path?.[1] || d.data?.name\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A']\n }\n },\n layout: {\n tile: 'treemapSquarify',\n paddingInner: 2,\n paddingTop: 20\n },\n style: {\n labelText: (d) => d.data?.name,\n labelFill: '#fff',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n fillOpacity: 0.9,\n stroke: '#fff',\n lineWidth: 1.5\n },\n legend: {\n color: {\n position: 'top',\n title: '大洲'\n }\n },\n interaction: {\n treemapDrillDown: true\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "name", + "children", + "name", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "container", + "width", + "height", + "type", + "data", + "value", + "encode", + "value", + "color", + "scale", + "color", + "range", + "layout", + "tile", + "paddingInner", + "paddingTop", + "style", + "labelText", + "labelFill", + "labelFontSize", + "labelFontWeight", + "fillOpacity", + "stroke", + "lineWidth", + "legend", + "color", + "position", + "title", + "interaction", + "treemapDrillDown" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "view.children", + "interaction" + ] + } + } + }, + { + "id": "case-13", + "query": "根据描述绘制图表,使用 G2 创建一个折线图与点图组合的可视化,数据为年份和数值对,Y 轴使用对数刻度并自定义标签格式化函数,将数值映射为 log10(v) + 1 的形式。参考数据:\n[{\"year\":\"1991\",\"value\":1},{\"year\":\"1992\",\"value\":10},{\"year\":\"1993\",\"value\":1000},{\"year\":\"1994\",\"value\":0.1},{\"year\":\"1995\",\"value\":100}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'view',\n autoFit: true,\n height: 300,\n data: [\n { year: '1991', value: 1 },\n { year: '1992', value: 10 },\n { year: '1993', value: 1000 },\n { year: '1994', value: 0.1 },\n { year: '1995', value: 100 },\n ],\n encode: { x: 'year', y: 'value' },\n scale: { x: { range: [0, 1] }, y: { type: 'log', tickCount: 4 } },\n axis: {\n y: {\n labelFormatter: (v) => {\n return Math.log10(v) + 1;\n },\n },\n },\n children: [\n {\n type: 'line',\n labels: [\n {\n text: 'value',\n formatter: (v) => {\n return Math.log10(v) + 1;\n },\n style: { dx: -10, dy: -12 },\n },\n ],\n },\n { type: 'point', style: { fill: 'white' }, tooltip: false },\n ],\n});\n\nchart.render(); // 渲染图标", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst rawData = [\n {\"year\":\"1991\",\"value\":1},\n {\"year\":\"1992\",\"value\":10},\n {\"year\":\"1993\",\"value\":1000},\n {\"year\":\"1994\",\"value\":0.1},\n {\"year\":\"1995\",\"value\":100}\n];\n\nconst data = rawData.map(d => ({\n year: new Date(d.year),\n value: d.value\n}));\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'line',\n encode: {\n x: 'year',\n y: 'value',\n },\n style: {\n lineWidth: 2,\n stroke: '#5B8FF9',\n },\n },\n {\n type: 'point',\n encode: {\n x: 'year',\n y: 'value',\n shape: 'circle',\n },\n style: {\n r: 4,\n fill: '#fff',\n stroke: '#5B8FF9',\n lineWidth: 2,\n },\n },\n ],\n scale: {\n y: {\n type: 'log',\n base: 10,\n nice: true,\n },\n },\n axis: {\n x: {\n labelFormatter: 'YYYY',\n },\n y: {\n labelFormatter: (v) => {\n const formatted = Math.log10(v) + 1;\n return formatted.toFixed(1);\n },\n },\n },\n});\n\nchart.render();", + "duration": 14043, + "retrievedSkillIds": [ + "g2-scale-linear", + "g2-mark-line-basic", + "g2-comp-space-layer", + "g2-scale-log", + "g2-scale-time" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1145, + "expectedLength": 886, + "similarity": 0.703657262277952, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst rawData = [\n {\"year\":\"1991\",\"value\":1},\n {\"year\":\"1992\",\"value\":10},\n {\"year\":\"1993\",\"value\":1000},\n {\"year\":\"1994\",\"value\":0.1},\n {\"year\":\"1995\",\"value\":100}\n];\n\nconst data = rawData.map(d => ({\n year: new Date(d.year),\n value: d.value\n}));\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'line',\n encode: {\n x: 'year',\n y: 'value',\n },\n style: {\n lineWidth: 2,\n stroke: '#5B8FF9',\n },\n },\n {\n type: 'point',\n encode: {\n x: 'year',\n y: 'value',\n shape: 'circle',\n },\n style: {\n r: 4,\n fill: '#fff',\n stroke: '#5B8FF9',\n lineWidth: 2,\n },\n },\n ],\n scale: {\n y: {\n type: 'log',\n base: 10,\n nice: true,\n },\n },\n axis: {\n x: {\n labelFormatter: 'YYYY',\n },\n y: {\n labelFormatter: (v) => {\n const formatted = Math.log10(v) + 1;\n return formatted.toFixed(1);\n },\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "map", + "Date", + "options", + "log10", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "year", + "value", + "type", + "children", + "type", + "encode", + "x", + "y", + "style", + "lineWidth", + "stroke", + "type", + "encode", + "x", + "y", + "shape", + "style", + "r", + "fill", + "stroke", + "lineWidth", + "scale", + "y", + "type", + "base", + "nice", + "axis", + "x", + "labelFormatter", + "y", + "labelFormatter" + ], + "stringLiterals": [ + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "view.children", + "type.view", + "type.line", + "type.point", + "x6.shape.circle" + ] + } + } + }, + { + "id": "case-14", + "query": "根据描述绘制图表,使用 G2 渲染一个水波图(Liquid Chart),展示达成率 68% 的可视化进度,水波形态为'pin',配置了颜色、边框、波浪参数及中心文本样式。参考数据:\n[0.68]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 240\n});\n\nchart.options({\n type: 'liquid',\n data: 0.68,\n style: {\n shape: 'pin',\n fill: '#1890FF',\n backgroundFill: '#E6F7FF',\n stroke: '#33CCFF',\n outlineBorder: 6,\n outlineDistance: 12,\n waveLength: 160,\n waveCount: 2,\n contentText: '达成率',\n contentFill: '#003A8C',\n contentFontSize: 28,\n contentLineWidth: 2,\n contentStroke: '#BEE6FF'\n }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 400,\n height: 400,\n});\n\nchart.options({\n type: 'liquid',\n data: 0.68,\n style: {\n shape: 'pin',\n fill: '#5B8FF9',\n fillOpacity: 0.85,\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 28,\n fontWeight: 'bold',\n fill: '#fff',\n formatter: (v) => `${(v * 100).toFixed(0)}%`,\n },\n },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "duration": 8863, + "retrievedSkillIds": [ + "g2-mark-liquid", + "g2-mark-chord", + "g2-mark-arc-donut", + "g2-palette-category10", + "g2-mark-cell-heatmap" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 601, + "expectedLength": 516, + "similarity": 0.6500223914017017, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 400,\n height: 400,\n});\n\nchart.options({\n type: 'liquid',\n data: 0.68,\n style: {\n shape: 'pin',\n fill: '#5B8FF9',\n fillOpacity: 0.85,\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 28,\n fontWeight: 'bold',\n fill: '#fff',\n formatter: (v) => `${(v * 100).toFixed(0)}%`,\n },\n },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "style", + "shape", + "fill", + "fillOpacity", + "outlineBorder", + "outlineDistance", + "waveLength", + "background", + "fill", + "text", + "style", + "fontSize", + "fontWeight", + "fill", + "formatter", + "axis", + "legend", + "tooltip" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "x6.background" + ] + } + } + }, + { + "id": "case-15", + "query": "根据描述绘制图表,使用 G2 创建一个仪表盘图表,展示单个指标的当前值及其在预设阈值区间内的表现情况,通过不同颜色区分各个数值范围,暗色风格。\n参考数据:[{\"value\":{\"target\":48,\"total\":60,\"name\":\"响应时长\",\"unit\":\"min\",\"thresholds\":[15,30,45,60]}}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'gauge',\n data: {\n value: {\n target: 48,\n total: 60,\n name: '响应时长',\n unit: 'min',\n thresholds: [15, 30, 45, 60]\n }\n },\n theme: {\n type: 'classicDark',\n view: {\n viewFill: '#141414',\n },\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#E8E15B', '#F68484']\n }\n },\n style: {\n arcLineWidth: 1,\n bandSize: 8,\n bandGap: 2,\n titleFontSize: 12,\n valueFontSize: 22\n },\n legend: false\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 400,\n height: 400,\n theme: 'classicDark',\n});\n\nconst gaugeData = {\n target: 48,\n total: 60,\n name: '响应时长',\n unit: 'min',\n thresholds: [15, 30, 45, 60],\n};\n\nchart.options({\n type: 'gauge',\n data: {\n value: gaugeData,\n },\n scale: {\n color: {\n range: ['#30BF78', '#FAAD14', '#F4664A', '#D62728'],\n },\n },\n style: {\n textContent: (target, total) => `${target}${gaugeData.unit}\\n${gaugeData.name}`,\n textFontSize: 20,\n textFill: '#fff',\n },\n legend: false,\n});\n\nchart.render();", + "duration": 35845, + "retrievedSkillIds": [ + "g2-mark-gauge", + "g2-mark-bullet", + "g2-mark-rangex", + "g2-palette-category10", + "g2-mark-linex-liney" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 606, + "expectedLength": 616, + "similarity": 0.7350694042799305, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 400,\n height: 400,\n theme: 'classicDark',\n});\n\nconst gaugeData = {\n target: 48,\n total: 60,\n name: '响应时长',\n unit: 'min',\n thresholds: [15, 30, 45, 60],\n};\n\nchart.options({\n type: 'gauge',\n data: {\n value: gaugeData,\n },\n scale: {\n color: {\n range: ['#30BF78', '#FAAD14', '#F4664A', '#D62728'],\n },\n },\n style: {\n textContent: (target, total) => `${target}${gaugeData.unit}\\n${gaugeData.name}`,\n textFontSize: 20,\n textFill: '#fff',\n },\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "theme", + "target", + "total", + "name", + "unit", + "thresholds", + "type", + "data", + "value", + "scale", + "color", + "range", + "style", + "textContent", + "textFontSize", + "textFill", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "scale", + "x6.target" + ] + } + } + }, + { + "id": "case-16", + "query": "根据描述绘制图表,使用 KDE 密度估计和箱线图结合的方式,对三组实验数据的分布情况进行可视化分析,每组包含大量随机生成的数值点。参考数据:[{\"group\":\"A\",\"value\":12.34},{\"group\":\"A\",\"value\":18.56},{\"group\":\"A\",\"value\":9.78},{\"group\":\"A\",\"value\":15.21},{\"group\":\"A\",\"value\":13.45},{\"group\":\"B\",\"value\":32.67},{\"group\":\"B\",\"value\":37.89},{\"group\":\"B\",\"value\":30.12},{\"group\":\"B\",\"value\":34.34},{\"group\":\"B\",\"value\":31.56}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { group: 'A', value: Math.random() * 30 },\n { group: 'A', value: Math.random() * 30 + 10 },\n { group: 'B', value: Math.random() * 20 + 20 },\n { group: 'B', value: Math.random() * 20 + 30 },\n { group: 'C', value: Math.random() * 15 + 40 },\n { group: 'C', value: Math.random() * 15 + 35 }\n].flatMap((d, i) => Array.from({ length: 50 }, (_, j) => ({ ...d, value: d.value + (Math.random() - 0.5) * 10 })));\n\nconst chart = new Chart({ container: 'container', theme: 'classic' });\nchart.options({\n type: 'view',\n data: data,\n children: [\n {\n type: 'density',\n data: { transform: [{ type: 'kde', field: 'value', groupBy: ['group'], bandwidth: 2 }] },\n encode: { x: 'group', y: 'value', color: 'group', size: 'size' },\n style: { fillOpacity: 0.35, stroke: '#333' },\n tooltip: false\n },\n {\n type: 'boxplot',\n encode: { x: 'group', y: 'value', color: 'group', shape: 'violin' },\n style: { opacity: 0.7, point: false }\n }\n ],\n axis: { y: { title: '观测值' }, x: { title: '实验组' } },\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\n// 生成三组实验数据(每组 80 个随机点,模拟正态分布)\nconst generateData = () => {\n const data = [];\n const groups = ['A', 'B', 'C'];\n const means = [15, 35, 55];\n const stdDevs = [3, 4, 5];\n \n groups.forEach((group, idx) => {\n for (let i = 0; i < 80; i++) {\n // Box-Muller 变换生成正态分布随机数\n const u1 = Math.random();\n const u2 = Math.random();\n const z = Math.sqrt(-2 * Math.log(u1)) * Math.cos(2 * Math.PI * u2);\n const value = means[idx] + z * stdDevs[idx];\n data.push({ group, value: parseFloat(value.toFixed(2)) });\n }\n });\n return data;\n};\n\nconst data = generateData();\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'density',\n data: {\n transform: [\n {\n type: 'kde',\n field: 'value',\n groupBy: ['group'],\n size: 30,\n },\n ],\n },\n encode: {\n x: 'group',\n y: 'value',\n series: 'group',\n color: 'group',\n size: 'size',\n },\n style: {\n fillOpacity: 0.6,\n },\n tooltip: false,\n },\n {\n type: 'boxplot',\n encode: {\n x: 'group',\n y: 'value',\n series: 'group',\n color: 'group',\n shape: 'violin',\n },\n style: {\n opacity: 0.5,\n strokeOpacity: 0.6,\n point: false,\n },\n },\n ],\n axis: {\n x: { title: '实验组别' },\n y: { title: '测量数值' },\n },\n legend: {\n color: { title: '组别', position: 'right' },\n },\n});\n\nchart.render();", + "duration": 6713, + "retrievedSkillIds": [ + "g2-mark-distribution-curve", + "g2-mark-violin", + "g2-transform-binx", + "g2-mark-box-boxplot", + "g2-mark-boxplot" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1617, + "expectedLength": 1101, + "similarity": 0.64071804762258, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\n// 生成三组实验数据(每组 80 个随机点,模拟正态分布)\nconst generateData = () => {\n const data = [];\n const groups = ['A', 'B', 'C'];\n const means = [15, 35, 55];\n const stdDevs = [3, 4, 5];\n \n groups.forEach((group, idx) => {\n for (let i = 0; i < 80; i++) {\n // Box-Muller 变换生成正态分布随机数\n const u1 = Math.random();\n const u2 = Math.random();\n const z = Math.sqrt(-2 * Math.log(u1)) * Math.cos(2 * Math.PI * u2);\n const value = means[idx] + z * stdDevs[idx];\n data.push({ group, value: parseFloat(value.toFixed(2)) });\n }\n });\n return data;\n};\n\nconst data = generateData();\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'density',\n data: {\n transform: [\n {\n type: 'kde',\n field: 'value',\n groupBy: ['group'],\n size: 30,\n },\n ],\n },\n encode: {\n x: 'group',\n y: 'value',\n series: 'group',\n color: 'group',\n size: 'size',\n },\n style: {\n fillOpacity: 0.6,\n },\n tooltip: false,\n },\n {\n type: 'boxplot',\n encode: {\n x: 'group',\n y: 'value',\n series: 'group',\n color: 'group',\n shape: 'violin',\n },\n style: {\n opacity: 0.5,\n strokeOpacity: 0.6,\n point: false,\n },\n },\n ],\n axis: {\n x: { title: '实验组别' },\n y: { title: '测量数值' },\n },\n legend: {\n color: { title: '组别', position: 'right' },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "forEach", + "random", + "random", + "sqrt", + "log", + "cos", + "push", + "parseFloat", + "toFixed", + "generateData", + "options", + "render" + ], + "objectKeys": [ + "container", + "theme", + "value", + "type", + "children", + "type", + "data", + "transform", + "type", + "field", + "groupBy", + "size", + "encode", + "x", + "y", + "series", + "color", + "size", + "style", + "fillOpacity", + "tooltip", + "type", + "encode", + "x", + "y", + "series", + "color", + "shape", + "style", + "opacity", + "strokeOpacity", + "point", + "axis", + "x", + "title", + "y", + "title", + "legend", + "color", + "title", + "position" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "view.children", + "type.view" + ] + } + } + }, + { + "id": "case-17", + "query": "根据描述绘制图表,使用 K 线图展示股票或指数在多个时间点的开盘价、收盘价、最高价、最低价和成交量,通过颜色区分上涨和下跌状态,并提供交互式提示信息。参考数据:[{\"time\":\"09:30\",\"open\":3250,\"high\":3258,\"low\":3245,\"close\":3252,\"volume\":180},{\"time\":\"09:45\",\"open\":3253,\"high\":3260,\"low\":3248,\"close\":3249,\"volume\":203},{\"time\":\"10:00\",\"open\":3250,\"high\":3255,\"low\":3238,\"close\":3242,\"volume\":217},{\"time\":\"10:15\",\"open\":3243,\"high\":3270,\"low\":3240,\"close\":3265,\"volume\":420},{\"time\":\"10:30\",\"open\":3266,\"high\":3268,\"low\":3255,\"close\":3259,\"volume\":190}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { time: '09:30', open: 3250, high: 3258, low: 3245, close: 3252, volume: 180 },\n { time: '09:45', open: 3253, high: 3260, low: 3248, close: 3249, volume: 203 },\n { time: '10:00', open: 3250, high: 3255, low: 3238, close: 3242, volume: 217 },\n { time: '10:15', open: 3243, high: 3270, low: 3240, close: 3265, volume: 420 },\n { time: '10:30', open: 3266, high: 3268, low: 3255, close: 3259, volume: 190 },\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 300,\n});\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'time',\n color: (d) => d.close >= d.open ? '上涨' : '下跌',\n },\n scale: {\n color: {\n domain: ['上涨', '下跌'],\n range: ['#e41a1c', '#2c7bb6'],\n },\n x: { padding: 0.2 },\n },\n children: [\n {\n type: 'link',\n encode: { y: ['low', 'high'] },\n style: { stroke: '#999', lineWidth: 1 }\n },\n {\n type: 'interval',\n encode: { y: ['open', 'close'] },\n style: {\n fillOpacity: 1,\n strokeWidth: 1.5,\n stroke: (d) => d.open === d.close ? '#aaa' : undefined,\n cornerRadiusTop: (d) => d.open > d.close ? 0 : 3,\n cornerRadiusBottom: (d) => d.open < d.close ? 0 : 3\n }\n }\n ],\n axis: {\n y: { labelFormatter: '~s', title: '指数点位' },\n x: { labelAutoRotate: false, tickCount: 5 },\n },\n legend: { position: 'bottom' },\n tooltip: {\n title: 'time',\n items: [\n { field: 'open', name: '开盘' },\n { field: 'close', name: '收盘' },\n { field: 'high', name: '最高' },\n { field: 'low', name: '最低' },\n { field: 'volume', name: '成交量', formatter: '~s' },\n ],\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"time\":\"09:30\",\"open\":3250,\"high\":3258,\"low\":3245,\"close\":3252,\"volume\":180},\n {\"time\":\"09:45\",\"open\":3253,\"high\":3260,\"low\":3248,\"close\":3249,\"volume\":203},\n {\"time\":\"10:00\",\"open\":3250,\"high\":3255,\"low\":3238,\"close\":3242,\"volume\":217},\n {\"time\":\"10:15\",\"open\":3243,\"high\":3270,\"low\":3240,\"close\":3265,\"volume\":420},\n {\"time\":\"10:30\",\"open\":3266,\"high\":3268,\"low\":3255,\"close\":3259,\"volume\":190}\n];\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'time',\n color: (d) => d.close > d.open ? '上涨' : '下跌',\n },\n scale: {\n color: { domain: ['上涨', '下跌'], range: ['#e41a1c', '#4daf4a'] },\n },\n tooltip: {\n items: [\n { field: 'open', name: '开盘价' },\n { field: 'close', name: '收盘价' },\n { field: 'high', name: '最高价' },\n { field: 'low', name: '最低价' },\n { field: 'volume', name: '成交量' },\n ],\n },\n children: [\n {\n type: 'link',\n encode: { y: 'low', y1: 'high' },\n },\n {\n type: 'interval',\n encode: { y: 'open', y1: 'close' },\n style: { fillOpacity: 1 },\n },\n {\n type: 'interval',\n encode: { \n y: 'volume',\n color: (d) => d.close > d.open ? '上涨' : '下跌',\n },\n scale: { y: { key: 'volume' } },\n axis: { y: { position: 'right', title: '成交量' } },\n style: { fillOpacity: 0.6 },\n },\n ],\n});\n\nchart.render();", + "duration": 42155, + "retrievedSkillIds": [ + "g2-mark-k-chart", + "g2-mark-line-multi", + "g2-mark-bullet", + "g2-mark-line-basic", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1460, + "expectedLength": 1697, + "similarity": 0.7519979143278837, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"time\":\"09:30\",\"open\":3250,\"high\":3258,\"low\":3245,\"close\":3252,\"volume\":180},\n {\"time\":\"09:45\",\"open\":3253,\"high\":3260,\"low\":3248,\"close\":3249,\"volume\":203},\n {\"time\":\"10:00\",\"open\":3250,\"high\":3255,\"low\":3238,\"close\":3242,\"volume\":217},\n {\"time\":\"10:15\",\"open\":3243,\"high\":3270,\"low\":3240,\"close\":3265,\"volume\":420},\n {\"time\":\"10:30\",\"open\":3266,\"high\":3268,\"low\":3255,\"close\":3259,\"volume\":190}\n];\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'time',\n color: (d) => d.close > d.open ? '上涨' : '下跌',\n },\n scale: {\n color: { domain: ['上涨', '下跌'], range: ['#e41a1c', '#4daf4a'] },\n },\n tooltip: {\n items: [\n { field: 'open', name: '开盘价' },\n { field: 'close', name: '收盘价' },\n { field: 'high', name: '最高价' },\n { field: 'low', name: '最低价' },\n { field: 'volume', name: '成交量' },\n ],\n },\n children: [\n {\n type: 'link',\n encode: { y: 'low', y1: 'high' },\n },\n {\n type: 'interval',\n encode: { y: 'open', y1: 'close' },\n style: { fillOpacity: 1 },\n },\n {\n type: 'interval',\n encode: { \n y: 'volume',\n color: (d) => d.close > d.open ? '上涨' : '下跌',\n },\n scale: { y: { key: 'volume' } },\n axis: { y: { position: 'right', title: '成交量' } },\n style: { fillOpacity: 0.6 },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "09", + "09", + "10", + "10", + "10", + "type", + "encode", + "x", + "color", + "scale", + "color", + "domain", + "range", + "tooltip", + "items", + "field", + "name", + "field", + "name", + "field", + "name", + "field", + "name", + "field", + "name", + "children", + "type", + "encode", + "y", + "y1", + "type", + "encode", + "y", + "y1", + "style", + "fillOpacity", + "type", + "encode", + "y", + "color", + "scale", + "y", + "key", + "axis", + "y", + "position", + "title", + "style", + "fillOpacity" + ], + "stringLiterals": [ + "time", + "open", + "high", + "low", + "close", + "volume", + "time", + "open", + "high", + "low", + "close", + "volume", + "time", + "open", + "high", + "low", + "close", + "volume", + "time", + "open", + "high", + "low", + "close", + "volume", + "time", + "open", + "high", + "low", + "close", + "volume" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "view.children", + "type.view", + "type.interval" + ] + } + } + }, + { + "id": "case-18", + "query": "根据描述绘制图表,使用 G2 创建一个散点图,渲染四组(组A、组B、组C、组D)模拟生成的点数据,每个点包含坐标、大小和分组信息。图表配置坐标轴范围、图例、动画入场效果,并添加鼠标悬停交互(提示框和悬停样式变化)。\n参考数据:\n[{\"x\":3.123456789,\"y\":2.87654321,\"size\":15.6789,\"group\":\"组A\",\"id\":\"组A-0\",\"value\":9},{\"x\":4.567890123,\"y\":4.321098765,\"size\":22.3456,\"group\":\"组A\",\"id\":\"组A-1\",\"value\":20},{\"x\":2.345678901,\"y\":3.654321098,\"size\":8.9012,\"group\":\"组A\",\"id\":\"组A-2\",\"value\":9},{\"x\":3.789012345,\"y\":2.210987654,\"size\":13.4567,\"group\":\"组A\",\"id\":\"组A-3\",\"value\":8},{\"x\":3.23456789,\"y\":3.456789012,\"size\":19.8765,\"group\":\"组A\",\"id\":\"组A-4\",\"value\":11},{\"x\":6.789012345,\"y\":6.123456789,\"size\":12.3456,\"group\":\"组B\",\"id\":\"组B-0\",\"value\":42},{\"x\":7.23456789,\"y\":7.345678901,\"size\":24.5678,\"group\":\"组B\",\"id\":\"组B-1\",\"value\":52},{\"x\":5.432109876,\"y\":7.890123456,\"size\":7.8901,\"group\":\"组B\",\"id\":\"组B-2\",\"value\":43},{\"x\":7.654321098,\"y\":5.678901234,\"size\":18.9012,\"group\":\"组B\",\"id\":\"组B-3\",\"value\":43},{\"x\":6.345678901,\"y\":6.789012345,\"size\":14.5678,\"group\":\"组B\",\"id\":\"组B-4\",\"value\":43}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\n// 生成模拟数据\nconst generateScatterData = () => {\n const data = [];\n const groups = ['组A', '组B', '组C', '组D'];\n const centers = [\n [3, 3],\n [7, 7],\n [3, 7],\n [7, 3],\n ];\n\n groups.forEach((group, i) => {\n const [centerX, centerY] = centers[i];\n for (let j = 0; j < 30; j++) {\n // 生成围绕中心点的随机散点\n const x = centerX + (Math.random() - 0.5) * 4;\n const y = centerY + (Math.random() - 0.5) * 4;\n const size = Math.random() * 20 + 5;\n data.push({\n x,\n y,\n size,\n group,\n id: `${group}-${j}`,\n value: Math.round(x * y),\n });\n }\n });\n return data;\n};\n\nconst data = generateScatterData();\n\nchart.options({\n type: 'point',\n data,\n encode: {\n x: 'x',\n y: 'y',\n color: 'group',\n size: 'size',\n shape: 'circle',\n },\n scale: {\n x: {\n nice: true,\n domain: [0, 10],\n },\n y: {\n nice: true,\n domain: [0, 10],\n },\n size: {\n domain: [5, 25],\n },\n color: {\n palette: 'category10',\n },\n },\n style: {\n fillOpacity: 0.65,\n stroke: '#fff',\n lineWidth: 1,\n },\n axis: {\n x: {\n title: 'X 轴',\n grid: true,\n },\n y: {\n title: 'Y 轴',\n grid: true,\n },\n },\n legend: {\n color: {\n position: 'top',\n flipPage: false,\n maxItemWidth: 80,\n itemMarginBottom: 8,\n layout: 'horizontal',\n },\n },\n animate: {\n enter: {\n type: 'fadeIn',\n duration: 800,\n delay: (d, i) => i * 10,\n },\n },\n});\n\nchart.render();\n\nchart.interaction('poptip', {\n offsetX: 15,\n offsetY: 15,\n tipBackgroundColor: 'rgba(0, 0, 0, 0.85)',\n tipBorderRadius: '6px',\n tipPadding: '10px 12px',\n tipFontSize: '12px',\n tipColor: '#fff',\n tipBoxShadow: '0 3px 6px -4px rgba(0, 0, 0, 0.48)',\n});\n\nchart.on('element:mouseenter', (event) => {\n const { element } = event;\n element.style.fillOpacity = 1;\n element.style.stroke = '#000';\n element.style.lineWidth = 2;\n chart.render();\n});\n\nchart.on('element:mouseleave', (event) => {\n const { element } = event;\n element.style.fillOpacity = 0.65;\n element.style.stroke = '#fff';\n element.style.lineWidth = 1;\n chart.render();\n});", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { x: 3.123456789, y: 2.87654321, size: 15.6789, group: '组A', id: '组A-0', value: 9 },\n { x: 4.567890123, y: 4.321098765, size: 22.3456, group: '组A', id: '组A-1', value: 20 },\n { x: 2.345678901, y: 3.654321098, size: 8.9012, group: '组A', id: '组A-2', value: 9 },\n { x: 3.789012345, y: 2.210987654, size: 13.4567, group: '组A', id: '组A-3', value: 8 },\n { x: 3.23456789, y: 3.456789012, size: 19.8765, group: '组A', id: '组A-4', value: 11 },\n { x: 6.789012345, y: 6.123456789, size: 12.3456, group: '组B', id: '组B-0', value: 42 },\n { x: 7.23456789, y: 7.345678901, size: 24.5678, group: '组B', id: '组B-1', value: 52 },\n { x: 5.432109876, y: 7.890123456, size: 7.8901, group: '组B', id: '组B-2', value: 43 },\n { x: 7.654321098, y: 5.678901234, size: 18.9012, group: '组B', id: '组B-3', value: 43 },\n { x: 6.345678901, y: 6.789012345, size: 14.5678, group: '组B', id: '组B-4', value: 43 },\n { x: 1.523456789, y: 6.27654321, size: 16.5432, group: '组C', id: '组C-0', value: 10 },\n { x: 2.867890123, y: 7.121098765, size: 9.3456, group: '组C', id: '组C-1', value: 20 },\n { x: 1.945678901, y: 5.854321098, size: 21.9012, group: '组C', id: '组C-2', value: 11 },\n { x: 2.589012345, y: 6.910987654, size: 13.4567, group: '组C', id: '组C-3', value: 18 },\n { x: 1.23456789, y: 7.556789012, size: 17.8765, group: '组C', id: '组C-4', value: 9 },\n { x: 6.523456789, y: 2.37654321, size: 11.6789, group: '组D', id: '组D-0', value: 15 },\n { x: 8.267890123, y: 3.121098765, size: 25.3456, group: '组D', id: '组D-1', value: 26 },\n { x: 7.145678901, y: 1.954321098, size: 8.9012, group: '组D', id: '组D-2', value: 14 },\n { x: 8.889012345, y: 2.810987654, size: 19.4567, group: '组D', id: '组D-3', value: 25 },\n { x: 6.93456789, y: 3.656789012, size: 14.8765, group: '组D', id: '组D-4', value: 25 },\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'point',\n data,\n encode: {\n x: 'x',\n y: 'y',\n size: 'size',\n color: 'group',\n },\n scale: {\n x: { domain: [0, 10], nice: true },\n y: { domain: [0, 10], nice: true },\n size: { range: [4, 20] },\n },\n legend: {\n color: { position: 'top', layout: { justifyContent: 'center' } },\n },\n animate: {\n enter: {\n type: 'fadeIn',\n duration: 800,\n delay: 100,\n },\n },\n interaction: [\n { type: 'tooltip' },\n { type: 'elementHighlight' },\n ],\n tooltip: {\n title: 'id',\n items: [\n { field: 'x', name: 'X坐标' },\n { field: 'y', name: 'Y坐标' },\n { field: 'size', name: '大小' },\n { field: 'value', name: '数值' },\n ],\n },\n});\n\nchart.render();", + "duration": 18716, + "retrievedSkillIds": [ + "g2-interaction-brush", + "g2-interaction-element-hover-scale", + "g2-mark-point-scatter", + "g2-interaction-element-point-move", + "g2-mark-image" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2641, + "expectedLength": 2271, + "similarity": 0.6513896266031097, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { x: 3.123456789, y: 2.87654321, size: 15.6789, group: '组A', id: '组A-0', value: 9 },\n { x: 4.567890123, y: 4.321098765, size: 22.3456, group: '组A', id: '组A-1', value: 20 },\n { x: 2.345678901, y: 3.654321098, size: 8.9012, group: '组A', id: '组A-2', value: 9 },\n { x: 3.789012345, y: 2.210987654, size: 13.4567, group: '组A', id: '组A-3', value: 8 },\n { x: 3.23456789, y: 3.456789012, size: 19.8765, group: '组A', id: '组A-4', value: 11 },\n { x: 6.789012345, y: 6.123456789, size: 12.3456, group: '组B', id: '组B-0', value: 42 },\n { x: 7.23456789, y: 7.345678901, size: 24.5678, group: '组B', id: '组B-1', value: 52 },\n { x: 5.432109876, y: 7.890123456, size: 7.8901, group: '组B', id: '组B-2', value: 43 },\n { x: 7.654321098, y: 5.678901234, size: 18.9012, group: '组B', id: '组B-3', value: 43 },\n { x: 6.345678901, y: 6.789012345, size: 14.5678, group: '组B', id: '组B-4', value: 43 },\n { x: 1.523456789, y: 6.27654321, size: 16.5432, group: '组C', id: '组C-0', value: 10 },\n { x: 2.867890123, y: 7.121098765, size: 9.3456, group: '组C', id: '组C-1', value: 20 },\n { x: 1.945678901, y: 5.854321098, size: 21.9012, group: '组C', id: '组C-2', value: 11 },\n { x: 2.589012345, y: 6.910987654, size: 13.4567, group: '组C', id: '组C-3', value: 18 },\n { x: 1.23456789, y: 7.556789012, size: 17.8765, group: '组C', id: '组C-4', value: 9 },\n { x: 6.523456789, y: 2.37654321, size: 11.6789, group: '组D', id: '组D-0', value: 15 },\n { x: 8.267890123, y: 3.121098765, size: 25.3456, group: '组D', id: '组D-1', value: 26 },\n { x: 7.145678901, y: 1.954321098, size: 8.9012, group: '组D', id: '组D-2', value: 14 },\n { x: 8.889012345, y: 2.810987654, size: 19.4567, group: '组D', id: '组D-3', value: 25 },\n { x: 6.93456789, y: 3.656789012, size: 14.8765, group: '组D', id: '组D-4', value: 25 },\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'point',\n data,\n encode: {\n x: 'x',\n y: 'y',\n size: 'size',\n color: 'group',\n },\n scale: {\n x: { domain: [0, 10], nice: true },\n y: { domain: [0, 10], nice: true },\n size: { range: [4, 20] },\n },\n legend: {\n color: { position: 'top', layout: { justifyContent: 'center' } },\n },\n animate: {\n enter: {\n type: 'fadeIn',\n duration: 800,\n delay: 100,\n },\n },\n interaction: [\n { type: 'tooltip' },\n { type: 'elementHighlight' },\n ],\n tooltip: {\n title: 'id',\n items: [\n { field: 'x', name: 'X坐标' },\n { field: 'y', name: 'Y坐标' },\n { field: 'size', name: '大小' },\n { field: 'value', name: '数值' },\n ],\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "x", + "y", + "size", + "group", + "id", + "value", + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "size", + "color", + "scale", + "x", + "domain", + "nice", + "y", + "domain", + "nice", + "size", + "range", + "legend", + "color", + "position", + "layout", + "justifyContent", + "animate", + "enter", + "type", + "duration", + "delay", + "interaction", + "type", + "type", + "tooltip", + "title", + "items", + "field", + "name", + "field", + "name", + "field", + "name", + "field", + "name" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "type.point", + "interaction", + "animate" + ] + } + } + }, + { + "id": "case-19", + "query": "根据描述绘制图表,使用 G2 创建一个密度分布图和小提琴箱线图的组合图表,展示系统负载数据按分组(低负荷、中负荷、高负荷)的分布情况,通过核密度估计生成密度曲线并叠加箱线统计图。\n参考数据:\n[{\"group\":\"低负荷\",\"value\":0},{\"group\":\"中负荷\",\"value\":20},{\"group\":\"中负荷\",\"value\":20},{\"group\":\"中负荷\",\"value\":20},{\"group\":\"中负荷\",\"value\":20},{\"group\":\"中负荷\",\"value\":20},{\"group\":\"中负荷\",\"value\":20},{\"group\":\"中负荷\",\"value\":20},{\"group\":\"中负荷\",\"value\":20},{\"group\":\"中负荷\",\"value\":20}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n ...Array.from({ length: 20 }, () => ({ group: '低负荷', value: 10 + Math.random() * 10 })),\n ...Array.from({ length: 100 }, () => ({ group: '中负荷', value: 20 + Math.random() * 50 })),\n ...Array.from({ length: 80 }, () => ({ group: '高负荷', value: 50 + Math.random() * 50 }))\n];\n\nconst chart = new Chart({ container: 'container', theme: 'classic' });\nchart.options({\n type: 'view',\n data: data,\n children: [\n {\n type: 'density',\n data: { transform: [{ type: 'kde', field: 'value', groupBy: ['group'], bandwidth: 2 }] },\n encode: { x: 'group', y: 'value', color: 'group', size: 'size' },\n style: { fill: '#7575FF', fillOpacity: 0.25, stroke: '#4c4cff' }\n },\n {\n type: 'boxplot',\n encode: { x: 'group', y: 'value', color: 'group', shape: 'violin' },\n style: { whiskerStroke: '#999', boxStroke: '#333', point: false }\n }\n ],\n scale: { color: { palette: 'blues' } },\n axis: { y: { title: '系统负载 (%)' } }\n});\nchart.render();", + "generatedCode": "", + "duration": 51673, + "retrievedSkillIds": [ + "g2-mark-distribution-curve", + "g2-mark-violin", + "g2-mark-boxplot", + "g2-transform-binx", + "g2-mark-box-boxplot" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": true, + "issues": [ + "缺少 import/require 语句", + "缺少 Chart/Graph 实例化", + "缺少 render() 调用" + ], + "warnings": [], + "codeLength": 0, + "expectedLength": 1018, + "similarity": 0, + "extractedCode": "", + "structuralFeatures": { + "imports": [], + "functionCalls": [], + "objectKeys": [], + "stringLiterals": [], + "apiPatterns": [] + } + } + }, + { + "id": "case-20", + "query": "根据描述绘制图表,使用 G2 创建一个极坐标面积图(雷达图),展示六项技能维度的评分数据,通过闭合区域直观对比各维度表现。\n参考数据:\n[{\"skill\":\"技术能力\",\"score\":85},{\"skill\":\"沟通能力\",\"score\":72},{\"skill\":\"创新思维\",\"score\":90},{\"skill\":\"团队协作\",\"score\":68},{\"skill\":\"项目管理\",\"score\":78},{\"skill\":\"学习能力\",\"score\":92}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'area',\n coordinate: {\n type: 'polar',\n },\n autoFit: true,\n data: [\n { skill: '技术能力', score: 85 },\n { skill: '沟通能力', score: 72 },\n { skill: '创新思维', score: 90 },\n { skill: '团队协作', score: 68 },\n { skill: '项目管理', score: 78 },\n { skill: '学习能力', score: 92 },\n ],\n encode: { x: 'skill', y: 'score' },\n scale: {\n x: { padding: 0.5, align: 0 },\n y: {\n domainMin: 0,\n domainMax: 100,\n tickCount: 5,\n label: false,\n },\n },\n style: {\n fill: '#1890ff',\n fillOpacity: 0.3,\n lineWidth: 2,\n stroke: '#1890ff',\n },\n axis: {\n x: { grid: true, labelFontSize: 12 },\n y: { tick: false, grid: true, title: false, zIndex: 1 },\n },\n interaction: {\n tooltip: { crosshairsLineDash: [4, 4] },\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 480,\n height: 480,\n});\n\nconst data = [\n { skill: '技术能力', score: 85 },\n { skill: '沟通能力', score: 72 },\n { skill: '创新思维', score: 90 },\n { skill: '团队协作', score: 68 },\n { skill: '项目管理', score: 78 },\n { skill: '学习能力', score: 92 }\n];\n\nchart.options({\n type: 'view',\n data,\n coordinate: { type: 'polar' },\n scale: {\n x: { padding: 0.5, align: 0 },\n y: { tickCount: 5, domainMin: 0, domainMax: 100 }\n },\n axis: {\n x: { grid: true, labelFontSize: 12 },\n y: { zIndex: 1, title: false }\n },\n children: [\n {\n type: 'area',\n encode: { x: 'skill', y: 'score' },\n style: { fillOpacity: 0.25 }\n },\n {\n type: 'line',\n encode: { x: 'skill', y: 'score' },\n style: { lineWidth: 2 }\n },\n {\n type: 'point',\n encode: { x: 'skill', y: 'score' },\n style: { r: 4 },\n labels: [{ text: (d) => d.score, position: 'top', style: { fontSize: 11 } }]\n }\n ]\n});\n\nchart.render();", + "duration": 12402, + "retrievedSkillIds": [ + "g2-mark-radar", + "g2-mark-arc-donut", + "g2-mark-arc-pie", + "g2-transform-binx", + "g2-comp-axis-radar" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1035, + "expectedLength": 912, + "similarity": 0.7494553724148656, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 480,\n height: 480,\n});\n\nconst data = [\n { skill: '技术能力', score: 85 },\n { skill: '沟通能力', score: 72 },\n { skill: '创新思维', score: 90 },\n { skill: '团队协作', score: 68 },\n { skill: '项目管理', score: 78 },\n { skill: '学习能力', score: 92 }\n];\n\nchart.options({\n type: 'view',\n data,\n coordinate: { type: 'polar' },\n scale: {\n x: { padding: 0.5, align: 0 },\n y: { tickCount: 5, domainMin: 0, domainMax: 100 }\n },\n axis: {\n x: { grid: true, labelFontSize: 12 },\n y: { zIndex: 1, title: false }\n },\n children: [\n {\n type: 'area',\n encode: { x: 'skill', y: 'score' },\n style: { fillOpacity: 0.25 }\n },\n {\n type: 'line',\n encode: { x: 'skill', y: 'score' },\n style: { lineWidth: 2 }\n },\n {\n type: 'point',\n encode: { x: 'skill', y: 'score' },\n style: { r: 4 },\n labels: [{ text: (d) => d.score, position: 'top', style: { fontSize: 11 } }]\n }\n ]\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "skill", + "score", + "skill", + "score", + "skill", + "score", + "skill", + "score", + "skill", + "score", + "skill", + "score", + "type", + "coordinate", + "type", + "scale", + "x", + "padding", + "align", + "y", + "tickCount", + "domainMin", + "domainMax", + "axis", + "x", + "grid", + "labelFontSize", + "y", + "zIndex", + "title", + "children", + "type", + "encode", + "x", + "y", + "style", + "fillOpacity", + "type", + "encode", + "x", + "y", + "style", + "lineWidth", + "type", + "encode", + "x", + "y", + "style", + "r", + "labels", + "text", + "position", + "style", + "fontSize" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale", + "view.children", + "type.view", + "type.line", + "type.point", + "x6.labels", + "x6.zIndex" + ] + } + } + }, + { + "id": "case-21", + "query": "根据描述绘制图表,使用 G2 渲染一个桑基图,展示不同地区之间的人口流动情况,特别是移民路径及其数量。数据来源于定义好的固定节点和连接关系,通过颜色区分不同来源地的流向。参考数据:[{\"source\":\"亚洲\",\"target\":\"北美洲\",\"value\":2200},{\"source\":\"亚洲\",\"target\":\"欧洲\",\"value\":1800},{\"source\":\"拉丁美洲\",\"target\":\"北美洲\",\"value\":2600},{\"source\":\"非洲\",\"target\":\"欧洲\",\"value\":900},{\"source\":\"北美洲\",\"target\":\"国际学生\",\"value\":1200},{\"source\":\"欧洲\",\"target\":\"技术移民\",\"value\":1100},{\"source\":\"欧洲\",\"target\":\"家庭团聚\",\"value\":700},{\"source\":\"亚洲\",\"target\":\"海湾国家\",\"value\":1400}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst immigration = {\n links: [\n { source: '亚洲', target: '北美洲', value: 2200 },\n { source: '亚洲', target: '欧洲', value: 1800 },\n { source: '拉丁美洲', target: '北美洲', value: 2600 },\n { source: '非洲', target: '欧洲', value: 900 },\n { source: '北美洲', target: '国际学生', value: 1200 },\n { source: '欧洲', target: '技术移民', value: 1100 },\n { source: '欧洲', target: '家庭团聚', value: 700 },\n { source: '亚洲', target: '海湾国家', value: 1400 }\n ]\n};\n\nconst chart = new Chart({ container: 'container', theme: 'classic' });\nchart.options({\n type: 'sankey',\n autoFit: true,\n data: { value: immigration },\n style: {\n labelSpacing: 6,\n linkFill: (d) => d.source === '亚洲' ? '#1890ff' : d.source === '非洲' ? '#d93f3a' : '#722ed1',\n linkFillOpacity: 0.55\n }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 900,\n height: 600,\n});\n\nconst links = [\n { source: '亚洲', target: '北美洲', value: 2200 },\n { source: '亚洲', target: '欧洲', value: 1800 },\n { source: '拉丁美洲', target: '北美洲', value: 2600 },\n { source: '非洲', target: '欧洲', value: 900 },\n { source: '北美洲', target: '国际学生', value: 1200 },\n { source: '欧洲', target: '技术移民', value: 1100 },\n { source: '欧洲', target: '家庭团聚', value: 700 },\n { source: '亚洲', target: '海湾国家', value: 1400 },\n];\n\nchart.options({\n type: 'sankey',\n data: {\n value: { links },\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.02,\n nodeWidth: 0.02,\n },\n style: {\n labelSpacing: 4,\n labelFontSize: 12,\n labelFontWeight: 'bold',\n linkFillOpacity: 0.4,\n nodeLineWidth: 1,\n nodeStroke: '#fff',\n },\n legend: false,\n});\n\nchart.render();", + "duration": 8573, + "retrievedSkillIds": [ + "g2-mark-sankey", + "g2-mark-chord", + "g2-concept-chart-selection", + "g2-mark-tree", + "g2-mark-line-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 884, + "expectedLength": 809, + "similarity": 0.7709474885844749, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 900,\n height: 600,\n});\n\nconst links = [\n { source: '亚洲', target: '北美洲', value: 2200 },\n { source: '亚洲', target: '欧洲', value: 1800 },\n { source: '拉丁美洲', target: '北美洲', value: 2600 },\n { source: '非洲', target: '欧洲', value: 900 },\n { source: '北美洲', target: '国际学生', value: 1200 },\n { source: '欧洲', target: '技术移民', value: 1100 },\n { source: '欧洲', target: '家庭团聚', value: 700 },\n { source: '亚洲', target: '海湾国家', value: 1400 },\n];\n\nchart.options({\n type: 'sankey',\n data: {\n value: { links },\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.02,\n nodeWidth: 0.02,\n },\n style: {\n labelSpacing: 4,\n labelFontSize: 12,\n labelFontWeight: 'bold',\n linkFillOpacity: 0.4,\n nodeLineWidth: 1,\n nodeStroke: '#fff',\n },\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "type", + "data", + "value", + "layout", + "nodeAlign", + "nodePadding", + "nodeWidth", + "style", + "labelSpacing", + "labelFontSize", + "labelFontWeight", + "linkFillOpacity", + "nodeLineWidth", + "nodeStroke", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-22", + "query": "根据描述绘制图表,使用 G2 创建一个组合图表,包含面积图和折线图,基于年份和数值字段绘制时间序列趋势,数据为 1991-1999 年的年度数值变化,面积图部分透明度较低,折线图覆盖其上。参考数据:\n[{\"year\":\"1991\",\"value\":15468},{\"year\":\"1992\",\"value\":16100},{\"year\":\"1993\",\"value\":15900},{\"year\":\"1994\",\"value\":17409},{\"year\":\"1995\",\"value\":17000},{\"year\":\"1996\",\"value\":31056},{\"year\":\"1997\",\"value\":31982},{\"year\":\"1998\",\"value\":32040},{\"year\":\"1999\",\"value\":33233}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"data\": [\n {\n \"year\": \"1991\",\n \"value\": 15468\n },\n {\n \"year\": \"1992\",\n \"value\": 16100\n },\n {\n \"year\": \"1993\",\n \"value\": 15900\n },\n {\n \"year\": \"1994\",\n \"value\": 17409\n },\n {\n \"year\": \"1995\",\n \"value\": 17000\n },\n {\n \"year\": \"1996\",\n \"value\": 31056\n },\n {\n \"year\": \"1997\",\n \"value\": 31982\n },\n {\n \"year\": \"1998\",\n \"value\": 32040\n },\n {\n \"year\": \"1999\",\n \"value\": 33233\n }\n ],\n \"type\": \"view\",\n \"children\": [\n {\n \"encode\": {\n \"x\": (d) => d.year,\n \"y\": \"value\",\n \"shape\": \"area\"\n },\n \"style\": {\n \"opacity\": 0.2\n },\n \"axis\": {\n \"y\": {\n \"labelFormatter\": \"~s\",\n \"title\": false\n }\n },\n \"type\": \"area\"\n },\n {\n \"encode\": {\n \"x\": \"year\",\n \"y\": \"value\",\n \"shape\": \"line\"\n },\n \"type\": \"line\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"year\":\"1991\",\"value\":15468},\n {\"year\":\"1992\",\"value\":16100},\n {\"year\":\"1993\",\"value\":15900},\n {\"year\":\"1994\",\"value\":17409},\n {\"year\":\"1995\",\"value\":17000},\n {\"year\":\"1996\",\"value\":31056},\n {\"year\":\"1997\",\"value\":31982},\n {\"year\":\"1998\",\"value\":32040},\n {\"year\":\"1999\",\"value\":33233}\n];\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'area',\n encode: { x: 'year', y: 'value' },\n style: { fill: '#1890ff', fillOpacity: 0.2 },\n },\n {\n type: 'line',\n encode: { x: 'year', y: 'value' },\n style: { stroke: '#1890ff', lineWidth: 2 },\n },\n ],\n});\n\nchart.render();", + "duration": 9571, + "retrievedSkillIds": [ + "g2-mark-area-basic", + "g2-mark-line-basic", + "g2-mark-area-stacked", + "g2-mark-line-multi", + "g2-comp-space-layer" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 765, + "expectedLength": 1122, + "similarity": 0.6227940742053646, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"year\":\"1991\",\"value\":15468},\n {\"year\":\"1992\",\"value\":16100},\n {\"year\":\"1993\",\"value\":15900},\n {\"year\":\"1994\",\"value\":17409},\n {\"year\":\"1995\",\"value\":17000},\n {\"year\":\"1996\",\"value\":31056},\n {\"year\":\"1997\",\"value\":31982},\n {\"year\":\"1998\",\"value\":32040},\n {\"year\":\"1999\",\"value\":33233}\n];\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'area',\n encode: { x: 'year', y: 'value' },\n style: { fill: '#1890ff', fillOpacity: 0.2 },\n },\n {\n type: 'line',\n encode: { x: 'year', y: 'value' },\n style: { stroke: '#1890ff', lineWidth: 2 },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "children", + "type", + "encode", + "x", + "y", + "style", + "fill", + "fillOpacity", + "type", + "encode", + "x", + "y", + "style", + "stroke", + "lineWidth" + ], + "stringLiterals": [ + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "view.children", + "type.view", + "type.line" + ] + } + } + }, + { + "id": "case-23", + "query": "根据描述绘制图表,使用 G2 创建一个极坐标折线图,渲染四类数据(Design、Development、Marketing、Users)在类型 'a' 下的得分情况,x 轴为分类项,y 轴为得分值,并配置了坐标轴样式、刻度范围和线条样式。参考数据:\n[{\"item\":\"Design\",\"type\":\"a\",\"score\":70},{\"item\":\"Development\",\"type\":\"a\",\"score\":60},{\"item\":\"Marketing\",\"type\":\"a\",\"score\":50},{\"item\":\"Users\",\"type\":\"a\",\"score\":40}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"coordinate\": {\n \"type\": \"polar\",\n \"startAngle\": -2.356194490192345,\n \"endAngle\": 3.9269908169872414\n },\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": [\n {\n \"item\": \"Design\",\n \"type\": \"a\",\n \"score\": 70\n },\n {\n \"item\": \"Development\",\n \"type\": \"a\",\n \"score\": 60\n },\n {\n \"item\": \"Marketing\",\n \"type\": \"a\",\n \"score\": 50\n },\n {\n \"item\": \"Users\",\n \"type\": \"a\",\n \"score\": 40\n }\n ],\n \"encode\": {\n \"x\": \"item\",\n \"y\": \"score\"\n },\n \"scale\": {\n \"x\": {\n \"padding\": 0.5,\n \"align\": 0\n },\n \"y\": {\n \"domainMin\": 0,\n \"domainMax\": 80\n }\n },\n \"style\": {\n \"zIndex\": 0,\n \"lineWidth\": 5,\n \"lineJoin\": \"round\"\n },\n \"axis\": {\n \"x\": {\n \"grid\": true,\n \"zIndex\": 1,\n \"title\": false,\n \"gridLineWidth\": 1,\n \"gridLineDash\": null\n },\n \"y\": {\n \"titleOpacity\": \"0\",\n \"gridConnect\": \"line\",\n \"gridLineWidth\": 1,\n \"gridLineDash\": [\n 0,\n 0\n ],\n \"gridAreaFill\": \"rgba(0, 0, 0, 0.04)\"\n }\n },\n \"type\": \"line\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n {\"item\":\"Design\",\"type\":\"a\",\"score\":70},\n {\"item\":\"Development\",\"type\":\"a\",\"score\":60},\n {\"item\":\"Marketing\",\"type\":\"a\",\"score\":50},\n {\"item\":\"Users\",\"type\":\"a\",\"score\":40}\n];\n\n// 复制第一个数据点到最后,使雷达图线条闭合\nconst closedData = [...data, data[0]];\n\nchart.options({\n type: 'line',\n data: closedData,\n encode: {\n x: 'item',\n y: 'score',\n },\n coordinate: {\n type: 'polar',\n },\n scale: {\n y: {\n domain: [0, 80],\n nice: true,\n },\n },\n style: {\n lineWidth: 2,\n stroke: '#5B8FF9',\n },\n axis: {\n x: {\n grid: true,\n line: true,\n tick: true,\n label: true,\n },\n y: {\n grid: true,\n line: true,\n tick: true,\n label: true,\n },\n },\n});\n\nchart.render();", + "duration": 67492, + "retrievedSkillIds": [ + "g2-scale-linear", + "g2-mark-line-basic", + "g2-mark-partition", + "g2-mark-arc-pie", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 868, + "expectedLength": 1505, + "similarity": 0.540062874251497, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n {\"item\":\"Design\",\"type\":\"a\",\"score\":70},\n {\"item\":\"Development\",\"type\":\"a\",\"score\":60},\n {\"item\":\"Marketing\",\"type\":\"a\",\"score\":50},\n {\"item\":\"Users\",\"type\":\"a\",\"score\":40}\n];\n\n// 复制第一个数据点到最后,使雷达图线条闭合\nconst closedData = [...data, data[0]];\n\nchart.options({\n type: 'line',\n data: closedData,\n encode: {\n x: 'item',\n y: 'score',\n },\n coordinate: {\n type: 'polar',\n },\n scale: {\n y: {\n domain: [0, 80],\n nice: true,\n },\n },\n style: {\n lineWidth: 2,\n stroke: '#5B8FF9',\n },\n axis: {\n x: {\n grid: true,\n line: true,\n tick: true,\n label: true,\n },\n y: {\n grid: true,\n line: true,\n tick: true,\n label: true,\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "encode", + "x", + "y", + "coordinate", + "type", + "scale", + "y", + "domain", + "nice", + "style", + "lineWidth", + "stroke", + "axis", + "x", + "grid", + "line", + "tick", + "label", + "y", + "grid", + "line", + "tick", + "label" + ], + "stringLiterals": [ + "item", + "type", + "score", + "item", + "type", + "score", + "item", + "type", + "score", + "item", + "type", + "score" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale", + "type.line", + "x6.label" + ] + } + } + }, + { + "id": "case-24", + "query": "根据描述绘制图表,使用 G2 渲染一个 beeswarm(蜂群)图,展示 300 个数据点在 6 个分组(G1-G6)上的 y 值分布,点的大小由 radius 字段控制,颜色按 x 分组,图形带有阴影、描边和悬停指针效果。参考数据:\n[{\"x\":\"G1\",\"y\":40.123456789,\"radius\":0.123456789},{\"x\":\"G2\",\"y\":40.234567891,\"radius\":0.234567891},{\"x\":\"G3\",\"y\":40.345678912,\"radius\":0.345678912},{\"x\":\"G4\",\"y\":40.456789123,\"radius\":0.456789123},{\"x\":\"G5\",\"y\":40.567891234,\"radius\":0.567891234},{\"x\":\"G6\",\"y\":40.678912345,\"radius\":0.678912345},{\"x\":\"G1\",\"y\":40.789123456,\"radius\":0.789123456},{\"x\":\"G2\",\"y\":40.891234567,\"radius\":0.891234567},{\"x\":\"G3\",\"y\":40.912345678,\"radius\":0.912345678},{\"x\":\"G4\",\"y\":41.012345678,\"radius\":0.012345678}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nconst data = Array.from({ length: 300 }, (_, i) => {\n return {\n x: `G${(i % 6) + 1}`,\n y: 40 + Math.random() * 220,\n radius: Math.random(),\n };\n});\n\nchart.options({\n type: 'beeswarm',\n style: {\n fill: 'skyblue', // 图形填充颜色,支持颜色字符串,优先级高于color通道\n fillOpacity: 0.9, // 填充颜色透明度,范围 0-1\n stroke: '#FADC7C', // 图形描边颜色\n lineWidth: 3, // 描边宽度(像素)\n lineDash: [1, 2], // 虚线配置[实线长度, 间隔长度],[0,0]表示无描边\n strokeOpacity: 0.95, // 描边透明度,范围 0-1\n opacity: 0.9, // 整体透明度,影响填充和描边\n shadowColor: 'black', // 阴影颜色\n shadowBlur: 10, // 阴影模糊程度(像素)\n shadowOffsetX: 5, // 阴影水平偏移量(像素)\n shadowOffsetY: 5, // 阴影垂直偏移量(像素)\n cursor: 'pointer', // 鼠标悬停样式(同CSS cursor属性)\n },\n data,\n encode: {\n x: 'x',\n y: 'y',\n size: 'radius',\n color: 'x',\n shape: 'point'\n },\n scale: {\n y: {\n nice: true,\n domainMin: 0,\n },\n size: { range: [3, 6] },\n },\n legend: {\n size: false,\n },\n axis: {\n x: { title: false },\n y: { title: false },\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\n// 生成 300 条模拟数据,分布在 6 个分组上\nconst data = [];\nconst groups = ['G1', 'G2', 'G3', 'G4', 'G5', 'G6'];\nfor (let i = 0; i < 300; i++) {\n data.push({\n x: groups[Math.floor(Math.random() * groups.length)],\n y: 35 + Math.random() * 15, // 35-50 之间的分布\n radius: 0.05 + Math.random() * 0.95 // 0.05-1.0 之间的 radius 值\n });\n}\n\nconst chart = new Chart({\n container: 'container',\n height: 600,\n autoFit: true\n});\n\nchart.options({\n type: 'point',\n data,\n encode: {\n x: 'x',\n y: 'y',\n color: 'x',\n size: 'radius'\n },\n scale: {\n size: {\n range: [4, 16] // 将 radius 字段映射到 4-16 像素的大小\n }\n },\n layout: {\n type: 'beeswarm',\n padding: 1.5\n },\n style: {\n shadowBlur: 10,\n shadowColor: 'rgba(0, 0, 0, 0.3)',\n shadowOffsetX: 3,\n shadowOffsetY: 3,\n stroke: '#ffffff',\n lineWidth: 1.5,\n fillOpacity: 0.85,\n cursor: 'pointer'\n },\n interaction: {\n elementHighlight: {\n style: {\n fillOpacity: 1,\n stroke: '#333333',\n lineWidth: 2,\n shadowBlur: 15,\n shadowColor: 'rgba(0, 0, 0, 0.5)'\n }\n }\n }\n});\n\nchart.render();", + "duration": 28245, + "retrievedSkillIds": [ + "g2-interaction-element-point-move", + "g2-mark-beeswarm", + "g2-scale-point", + "g2-mark-point-scatter", + "g2-mark-box-boxplot" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1142, + "expectedLength": 1098, + "similarity": 0.5993051203127249, + "extractedCode": "import { Chart } from '@antv/g2';\n\n// 生成 300 条模拟数据,分布在 6 个分组上\nconst data = [];\nconst groups = ['G1', 'G2', 'G3', 'G4', 'G5', 'G6'];\nfor (let i = 0; i < 300; i++) {\n data.push({\n x: groups[Math.floor(Math.random() * groups.length)],\n y: 35 + Math.random() * 15, // 35-50 之间的分布\n radius: 0.05 + Math.random() * 0.95 // 0.05-1.0 之间的 radius 值\n });\n}\n\nconst chart = new Chart({\n container: 'container',\n height: 600,\n autoFit: true\n});\n\nchart.options({\n type: 'point',\n data,\n encode: {\n x: 'x',\n y: 'y',\n color: 'x',\n size: 'radius'\n },\n scale: {\n size: {\n range: [4, 16] // 将 radius 字段映射到 4-16 像素的大小\n }\n },\n layout: {\n type: 'beeswarm',\n padding: 1.5\n },\n style: {\n shadowBlur: 10,\n shadowColor: 'rgba(0, 0, 0, 0.3)',\n shadowOffsetX: 3,\n shadowOffsetY: 3,\n stroke: '#ffffff',\n lineWidth: 1.5,\n fillOpacity: 0.85,\n cursor: 'pointer'\n },\n interaction: {\n elementHighlight: {\n style: {\n fillOpacity: 1,\n stroke: '#333333',\n lineWidth: 2,\n shadowBlur: 15,\n shadowColor: 'rgba(0, 0, 0, 0.5)'\n }\n }\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "push", + "floor", + "random", + "random", + "random", + "Chart", + "options", + "rgba", + "rgba", + "render" + ], + "objectKeys": [ + "x", + "y", + "radius", + "container", + "height", + "autoFit", + "type", + "encode", + "x", + "y", + "color", + "size", + "scale", + "size", + "range", + "layout", + "type", + "padding", + "style", + "shadowBlur", + "shadowColor", + "shadowOffsetX", + "shadowOffsetY", + "stroke", + "lineWidth", + "fillOpacity", + "cursor", + "interaction", + "elementHighlight", + "style", + "fillOpacity", + "stroke", + "lineWidth", + "shadowBlur", + "shadowColor" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "type.point", + "interaction" + ] + } + } + }, + { + "id": "case-25", + "query": "根据描述绘制图表,使用 G2 渲染一个螺旋坐标系下的区间图,展示野生型(WT)和敲除型(KO)基因在72小时内log(FPKM)表达水平的动态变化,包含周期性波动、随机噪声和组间趋势差异的模拟数据。参考数据:\n[{\"time\":\"0h\",\"group\":\"WT\",\"logFPKM\":2.0995},{\"time\":\"0h\",\"group\":\"KO\",\"logFPKM\":2.3545},{\"time\":\"1h\",\"group\":\"WT\",\"logFPKM\":2.078},{\"time\":\"1h\",\"group\":\"KO\",\"logFPKM\":2.3742},{\"time\":\"2h\",\"group\":\"WT\",\"logFPKM\":2.0495},{\"time\":\"2h\",\"group\":\"KO\",\"logFPKM\":2.3567},{\"time\":\"3h\",\"group\":\"WT\",\"logFPKM\":2.0202},{\"time\":\"3h\",\"group\":\"KO\",\"logFPKM\":2.3701},{\"time\":\"4h\",\"group\":\"WT\",\"logFPKM\":2.0089},{\"time\":\"4h\",\"group\":\"KO\",\"logFPKM\":2.3874}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from \"@antv/g2\";\n\n// 模拟基因表达数据\nconst data = [];\nconst groups = ['WT', 'KO']; // 野生型和敲除型\nconst hours = 72; // 72小时时间序列\nconst baseValues = {\n WT: 2.0, // 野生型基础表达水平\n KO: 2.3, // 敲除型基础表达水平\n};\n\nfor (let i = 0; i < hours; i++) {\n const time = `${i}h`;\n groups.forEach((group) => {\n // 模拟基因表达的周期性变化和随机波动\n const cyclicPattern = Math.sin(i / 10) * 0.3; // 周期性模式\n const randomNoise = Math.random() * 0.4 - 0.2; // 随机噪声\n const trendFactor = group === 'KO' ? 0.1 : 0; // 敲除型可能有轻微上升趋势\n \n data.push({\n time,\n group,\n logFPKM: baseValues[group] + cyclicPattern + randomNoise + (i * trendFactor / 100)\n });\n });\n}\n\nconst chart = new Chart({ \n container: \"container\",\n autoFit: true,\n height: 600,\n padding: [50, 50, 50, 50]\n});\n\nchart.options({\n type: 'interval',\n data,\n coordinate: {\n type: 'helix',\n startAngle: 0.2 * Math.PI,\n endAngle: 6.5 * Math.PI,\n innerRadius: 0.1,\n },\n encode: {\n x: 'time',\n y: 'group',\n color: 'logFPKM'\n },\n scale: {\n color: {\n type: 'linear',\n range: ['#fff', '#ec4839']\n }\n },\n style: {\n fillOpacity: 0.8\n },\n tooltip: {\n title: 'time',\n items: [\n { field: 'group', name: '组别' },\n {\n field: 'logFPKM',\n name: 'log(FPKM)',\n valueFormatter: (value) => value.toFixed(2),\n },\n ],\n },\n animate: {\n enter: { type: 'fadeIn', duration: 1000 }\n },\n axis: {\n x: { title: '时间进程' },\n y: { title: '基因组别' }\n },\n legend: {\n color: { title: '基因表达水平 log(FPKM)' }\n },\n title: '基因表达螺旋图:WT vs KO (72小时)'\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\n// 生成72小时模拟数据:包含周期性波动(24小时周期)、随机噪声和组间趋势差异\nconst data = [];\nconst hours = 72;\nfor (let i = 0; i <= hours; i++) {\n // WT组:基础水平2.0,24小时周期性波动,轻微下降趋势,随机噪声\n const wtBase = 2.0;\n const wtCycle = 0.12 * Math.sin((i / 24) * Math.PI * 2); \n const wtTrend = -0.002 * i; \n const wtNoise = (Math.random() - 0.5) * 0.08;\n const wtValue = wtBase + wtCycle + wtTrend + wtNoise;\n \n // KO组:基础水平2.35,24小时周期性波动(相位偏移),轻微上升趋势,随机噪声\n const koBase = 2.35;\n const koCycle = 0.1 * Math.sin((i / 24) * Math.PI * 2 + 0.8); \n const koTrend = 0.0015 * i; \n const koNoise = (Math.random() - 0.5) * 0.08;\n const koValue = koBase + koCycle + koTrend + koNoise;\n \n data.push(\n { time: i, group: 'WT', logFPKM: Number(wtValue.toFixed(4)) },\n { time: i, group: 'KO', logFPKM: Number(koValue.toFixed(4)) }\n );\n}\n\nconst chart = new Chart({ \n container: 'container', \n width: 800, \n height: 800 \n});\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'time',\n y: 'logFPKM',\n color: 'group',\n },\n transform: [\n { type: 'dodgeX' }, // 避免WT和KO在同一时间点重叠\n ],\n scale: {\n color: {\n domain: ['WT', 'KO'],\n range: ['#5B8FF9', '#E8684A'],\n },\n x: {\n nice: true,\n },\n },\n coordinate: {\n type: 'helix',\n startAngle: 0,\n endAngle: Math.PI * 6, // 72小时 = 3天周期 = 3圈\n innerRadius: 0.15,\n outerRadius: 0.85,\n },\n style: {\n lineWidth: 0,\n },\n legend: {\n color: {\n position: 'bottom',\n title: false,\n },\n },\n axis: {\n x: false, // 隐藏时间轴,用螺旋位置表示\n y: false, // 隐藏径向轴\n },\n});\n\nchart.render();", + "duration": 21887, + "retrievedSkillIds": [ + "g2-coord-helix", + "g2-scale-time", + "g2-mark-bullet", + "g2-scale-point", + "g2-comp-facet-circle" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1595, + "expectedLength": 1601, + "similarity": 0.6116206323523397, + "extractedCode": "import { Chart } from '@antv/g2';\n\n// 生成72小时模拟数据:包含周期性波动(24小时周期)、随机噪声和组间趋势差异\nconst data = [];\nconst hours = 72;\nfor (let i = 0; i <= hours; i++) {\n // WT组:基础水平2.0,24小时周期性波动,轻微下降趋势,随机噪声\n const wtBase = 2.0;\n const wtCycle = 0.12 * Math.sin((i / 24) * Math.PI * 2); \n const wtTrend = -0.002 * i; \n const wtNoise = (Math.random() - 0.5) * 0.08;\n const wtValue = wtBase + wtCycle + wtTrend + wtNoise;\n \n // KO组:基础水平2.35,24小时周期性波动(相位偏移),轻微上升趋势,随机噪声\n const koBase = 2.35;\n const koCycle = 0.1 * Math.sin((i / 24) * Math.PI * 2 + 0.8); \n const koTrend = 0.0015 * i; \n const koNoise = (Math.random() - 0.5) * 0.08;\n const koValue = koBase + koCycle + koTrend + koNoise;\n \n data.push(\n { time: i, group: 'WT', logFPKM: Number(wtValue.toFixed(4)) },\n { time: i, group: 'KO', logFPKM: Number(koValue.toFixed(4)) }\n );\n}\n\nconst chart = new Chart({ \n container: 'container', \n width: 800, \n height: 800 \n});\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'time',\n y: 'logFPKM',\n color: 'group',\n },\n transform: [\n { type: 'dodgeX' }, // 避免WT和KO在同一时间点重叠\n ],\n scale: {\n color: {\n domain: ['WT', 'KO'],\n range: ['#5B8FF9', '#E8684A'],\n },\n x: {\n nice: true,\n },\n },\n coordinate: {\n type: 'helix',\n startAngle: 0,\n endAngle: Math.PI * 6, // 72小时 = 3天周期 = 3圈\n innerRadius: 0.15,\n outerRadius: 0.85,\n },\n style: {\n lineWidth: 0,\n },\n legend: {\n color: {\n position: 'bottom',\n title: false,\n },\n },\n axis: {\n x: false, // 隐藏时间轴,用螺旋位置表示\n y: false, // 隐藏径向轴\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "sin", + "random", + "sin", + "random", + "push", + "Number", + "toFixed", + "Number", + "toFixed", + "Chart", + "options", + "render" + ], + "objectKeys": [ + "time", + "group", + "logFPKM", + "time", + "group", + "logFPKM", + "container", + "width", + "height", + "type", + "encode", + "x", + "y", + "color", + "transform", + "type", + "scale", + "color", + "domain", + "range", + "x", + "nice", + "coordinate", + "type", + "startAngle", + "endAngle", + "innerRadius", + "outerRadius", + "style", + "lineWidth", + "legend", + "color", + "position", + "title", + "axis", + "x", + "y" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.interval" + ] + } + } + }, + { + "id": "case-26", + "query": "根据描述绘制图表,使用 G2 绘制一棵矩形树图,展示开源项目贡献者的分布情况,将不同类别的贡献者按照数值大小以嵌套矩形的形式进行可视化。参考数据:[{\"name\":\"核心维护者\",\"value\":5},{\"name\":\"主要贡献者\",\"value\":20},{\"name\":\"普通参与者\",\"value\":120},{\"name\":\"偶尔提交者\",\"value\":350}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n autoFit: true,\n});\n\nconst data = {\n name: '开源项目贡献者分布',\n children: [\n { name: '核心维护者', value: 5 },\n { name: '主要贡献者', value: 20 },\n { name: '普通参与者', value: 120 },\n { name: '偶尔提交者', value: 350 }\n ]\n};\n\nchart.options({\n type: 'treemap',\n data: { value: data },\n layout: {\n tile: 'treemapResquarify',\n paddingInner: 4\n },\n encode: {\n value: 'value'\n },\n scale: {\n color: {\n range: ['#fde0ef', '#ff6b9d']\n }\n },\n style: {\n labelText: (d) => `${d.data.name}\\n(${d.value}人)`,\n labelFill: '#000',\n labelFontSize: 13,\n stroke: '#fff',\n lineWidth: 2,\n radius: 8,\n fillOpacity: 0.85\n }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '贡献者分布',\n children: [\n { name: '核心维护者', value: 5 },\n { name: '主要贡献者', value: 20 },\n { name: '普通参与者', value: 120 },\n { name: '偶尔提交者', value: 350 },\n ],\n};\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 500,\n});\n\nchart.options({\n type: 'treemap',\n data: {\n value: data,\n },\n encode: {\n value: 'value',\n color: (d) => d.data?.name,\n },\n layout: {\n tile: 'treemapSquarify',\n paddingInner: 4,\n },\n style: {\n labelText: (d) => `${d.data?.name}\\n${d.value}人`,\n labelFill: '#fff',\n labelFontSize: 14,\n labelFontWeight: 'bold',\n stroke: '#fff',\n lineWidth: 2,\n fillOpacity: 0.9,\n },\n legend: {\n color: {\n position: 'top',\n layout: { justifyContent: 'center' },\n },\n },\n});\n\nchart.render();", + "duration": 10870, + "retrievedSkillIds": [ + "g2-interaction-treemap-drilldown", + "g2-mark-tree", + "g2-mark-treemap", + "g2-concept-chart-selection", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 845, + "expectedLength": 769, + "similarity": 0.7972305764411028, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '贡献者分布',\n children: [\n { name: '核心维护者', value: 5 },\n { name: '主要贡献者', value: 20 },\n { name: '普通参与者', value: 120 },\n { name: '偶尔提交者', value: 350 },\n ],\n};\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 500,\n});\n\nchart.options({\n type: 'treemap',\n data: {\n value: data,\n },\n encode: {\n value: 'value',\n color: (d) => d.data?.name,\n },\n layout: {\n tile: 'treemapSquarify',\n paddingInner: 4,\n },\n style: {\n labelText: (d) => `${d.data?.name}\\n${d.value}人`,\n labelFill: '#fff',\n labelFontSize: 14,\n labelFontWeight: 'bold',\n stroke: '#fff',\n lineWidth: 2,\n fillOpacity: 0.9,\n },\n legend: {\n color: {\n position: 'top',\n layout: { justifyContent: 'center' },\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "name", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "container", + "width", + "height", + "type", + "data", + "value", + "encode", + "value", + "color", + "layout", + "tile", + "paddingInner", + "style", + "labelText", + "labelFill", + "labelFontSize", + "labelFontWeight", + "stroke", + "lineWidth", + "fillOpacity", + "legend", + "color", + "position", + "layout", + "justifyContent" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "view.children" + ] + } + } + }, + { + "id": "case-27", + "query": "根据描述绘制图表,使用 G2 绘制一个横向的条形图,展示多个项目中各子任务的时间区间分布,并通过颜色和边框区分关键任务。参考数据:[{\"project\":\"APP重构\",\"task\":\"架构设计\",\"start\":1,\"end\":4,\"critical\":true},{\"project\":\"APP重构\",\"task\":\"接口开发\",\"start\":3,\"end\":8,\"critical\":false},{\"project\":\"APP重构\",\"task\":\"UI重构\",\"start\":5,\"end\":10,\"critical\":true},{\"project\":\"新官网\",\"task\":\"需求确认\",\"start\":2,\"end\":5,\"critical\":true},{\"project\":\"新官网\",\"task\":\"视觉输出\",\"start\":4,\"end\":9,\"critical\":false},{\"project\":\"新官网\",\"task\":\"前端实现\",\"start\":8,\"end\":14,\"critical\":true}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container', theme: 'classic' });\n\nchart.options({\n type: 'interval',\n autoFit: true,\n data: [\n { project: 'APP重构', task: '架构设计', start: 1, end: 4, critical: true },\n { project: 'APP重构', task: '接口开发', start: 3, end: 8, critical: false },\n { project: 'APP重构', task: 'UI重构', start: 5, end: 10, critical: true },\n { project: '新官网', task: '需求确认', start: 2, end: 5, critical: true },\n { project: '新官网', task: '视觉输出', start: 4, end: 9, critical: false },\n { project: '新官网', task: '前端实现', start: 8, end: 14, critical: true }\n ],\n encode: {\n x: (d) => `${d.project} - ${d.task}`,\n y: 'start',\n y1: 'end',\n color: (d) => d.critical ? '#ef4444' : '#94a3b8',\n },\n coordinate: { transform: [{ type: 'transpose' }] },\n style: {\n stroke: (d) => d.critical ? '#7f1d1d' : undefined,\n strokeWidth: (d) => d.critical ? 2 : 1\n },\n legend: false,\n axis: { x: { labelTransform: 'rotate(35)', title: '项目 - 子任务' }, y: { title: '周' } }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst rawData = [\n {\"project\":\"APP重构\",\"task\":\"架构设计\",\"start\":1,\"end\":4,\"critical\":true},\n {\"project\":\"APP重构\",\"task\":\"接口开发\",\"start\":3,\"end\":8,\"critical\":false},\n {\"project\":\"APP重构\",\"task\":\"UI重构\",\"start\":5,\"end\":10,\"critical\":true},\n {\"project\":\"新官网\",\"task\":\"需求确认\",\"start\":2,\"end\":5,\"critical\":true},\n {\"project\":\"新官网\",\"task\":\"视觉输出\",\"start\":4,\"end\":9,\"critical\":false},\n {\"project\":\"新官网\",\"task\":\"前端实现\",\"start\":8,\"end\":14,\"critical\":true}\n];\n\nconst data = rawData.map(d => ({\n ...d,\n fullTask: `${d.project} - ${d.task}`\n})).sort((a, b) => {\n if (a.project !== b.project) return a.project.localeCompare(b.project);\n return a.start - b.start;\n});\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 400,\n paddingLeft: 120,\n});\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'fullTask',\n y: 'start',\n y1: 'end',\n color: 'critical',\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n scale: {\n color: {\n domain: [true, false],\n range: ['#ff7875', '#69c0ff'],\n },\n },\n style: {\n stroke: (d) => d.critical ? '#cf1322' : 'transparent',\n lineWidth: 2,\n },\n axis: {\n x: { \n title: '时间周期',\n grid: true,\n },\n y: { \n title: '项目任务',\n labelAutoWrap: true,\n },\n },\n tooltip: {\n title: 'fullTask',\n items: [\n { field: 'start', name: '开始时间' },\n { field: 'end', name: '结束时间' },\n { field: 'critical', name: '关键任务', valueFormatter: (v) => v ? '是' : '否' },\n ],\n },\n});\n\nchart.render();", + "duration": 124805, + "retrievedSkillIds": [ + "g2-concept-chart-selection", + "g2-scale-time", + "g2-mark-chord", + "g2-mark-interval-basic", + "g2-interaction-element-point-move" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1560, + "expectedLength": 1051, + "similarity": 0.5162460317460318, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst rawData = [\n {\"project\":\"APP重构\",\"task\":\"架构设计\",\"start\":1,\"end\":4,\"critical\":true},\n {\"project\":\"APP重构\",\"task\":\"接口开发\",\"start\":3,\"end\":8,\"critical\":false},\n {\"project\":\"APP重构\",\"task\":\"UI重构\",\"start\":5,\"end\":10,\"critical\":true},\n {\"project\":\"新官网\",\"task\":\"需求确认\",\"start\":2,\"end\":5,\"critical\":true},\n {\"project\":\"新官网\",\"task\":\"视觉输出\",\"start\":4,\"end\":9,\"critical\":false},\n {\"project\":\"新官网\",\"task\":\"前端实现\",\"start\":8,\"end\":14,\"critical\":true}\n];\n\nconst data = rawData.map(d => ({\n ...d,\n fullTask: `${d.project} - ${d.task}`\n})).sort((a, b) => {\n if (a.project !== b.project) return a.project.localeCompare(b.project);\n return a.start - b.start;\n});\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 400,\n paddingLeft: 120,\n});\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'fullTask',\n y: 'start',\n y1: 'end',\n color: 'critical',\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n scale: {\n color: {\n domain: [true, false],\n range: ['#ff7875', '#69c0ff'],\n },\n },\n style: {\n stroke: (d) => d.critical ? '#cf1322' : 'transparent',\n lineWidth: 2,\n },\n axis: {\n x: { \n title: '时间周期',\n grid: true,\n },\n y: { \n title: '项目任务',\n labelAutoWrap: true,\n },\n },\n tooltip: {\n title: 'fullTask',\n items: [\n { field: 'start', name: '开始时间' },\n { field: 'end', name: '结束时间' },\n { field: 'critical', name: '关键任务', valueFormatter: (v) => v ? '是' : '否' },\n ],\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "map", + "sort", + "localeCompare", + "Chart", + "options", + "render" + ], + "objectKeys": [ + "fullTask", + "container", + "width", + "height", + "paddingLeft", + "type", + "encode", + "x", + "y", + "y1", + "color", + "coordinate", + "transform", + "type", + "scale", + "color", + "domain", + "range", + "style", + "stroke", + "lineWidth", + "axis", + "x", + "title", + "grid", + "y", + "title", + "labelAutoWrap", + "tooltip", + "title", + "items", + "field", + "name", + "field", + "name", + "field", + "name", + "valueFormatter" + ], + "stringLiterals": [ + "project", + "task", + "start", + "end", + "critical", + "project", + "task", + "start", + "end", + "critical", + "project", + "task", + "start", + "end", + "critical", + "project", + "task", + "start", + "end", + "critical", + "project", + "task", + "start", + "end", + "critical", + "project", + "task", + "start", + "end", + "critical" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.interval" + ] + } + } + }, + { + "id": "case-28", + "query": "根据描述绘制图表,基于随机生成的1000条数据,使用G2绘制矩形图(直方图),按value字段分25个箱进行X轴分箱,按source分组('Low'和'High'),Y轴显示频数,color编码区分来源,设置颜色范围、坐标轴格式、图例位置,并启用元素高亮交互。参考数据:\n[{\"value\":12.345,\"source\":\"Low\"},{\"value\":45.678,\"source\":\"Low\"},{\"value\":89.012,\"source\":\"High\"},{\"value\":23.456,\"source\":\"Low\"},{\"value\":67.89,\"source\":\"High\"},{\"value\":5.678,\"source\":\"Low\"},{\"value\":91.234,\"source\":\"High\"},{\"value\":34.567,\"source\":\"Low\"},{\"value\":78.901,\"source\":\"High\"},{\"value\":19.234,\"source\":\"Low\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst data = Array.from({ length: 1000 }, () => {\n const v1 = Math.random();\n return { value: v1 < 0.5 ? Math.random() * 30 : 30 + Math.random() * 70, source: v1 < 0.5 ? 'High' : 'Low' };\n});\n\nconst chart = new Chart({ container: 'container', autoFit: true });\nchart.options({\n type: 'rect',\n data: data,\n encode: { x: 'value', y: 'count', color: 'source' },\n transform: [{ type: 'binX', y: 'count', thresholds: 25, groupBy: ['source'] }],\n scale: { color: { range: ['#8c564b', '#e377c2'] }, x: { nice: false } },\n style: { fillOpacity: 0.8 },\n interaction: [{ type: 'elementHighlight' }],\n axis: { x: { labelFormatter: d => d.toFixed(0) }, y: { title: '频数' } },\n legend: { position: 'bottom' }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\n// 生成1000条随机数据\nconst data = Array.from({ length: 1000 }, () => ({\n value: Math.random() * 100,\n source: Math.random() > 0.5 ? 'High' : 'Low'\n}));\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400\n});\n\nchart.options({\n type: 'rect',\n data,\n encode: {\n x: 'value',\n y: 'count',\n color: 'source'\n },\n transform: [\n { \n type: 'binX', \n y: 'count', \n thresholds: 25,\n groupBy: ['source']\n },\n { type: 'stackY' }\n ],\n scale: {\n color: {\n range: ['#5B8FF9', '#F6BD16']\n }\n },\n axis: {\n x: { \n title: 'Value 分布',\n labelFormatter: (v) => v.toFixed(1)\n },\n y: { \n title: '频数',\n labelFormatter: (v) => Math.round(v)\n }\n },\n legend: {\n color: { \n position: 'right',\n title: 'Source'\n }\n },\n interaction: {\n elementHighlight: true\n },\n style: {\n inset: 0.5\n }\n});\n\nchart.render();", + "duration": 32896, + "retrievedSkillIds": [ + "g2-transform-binx", + "g2-mark-partition", + "g2-mark-interval-basic", + "g2-mark-histogram", + "g2-scale-linear" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 957, + "expectedLength": 760, + "similarity": 0.8123971414695067, + "extractedCode": "import { Chart } from '@antv/g2';\n\n// 生成1000条随机数据\nconst data = Array.from({ length: 1000 }, () => ({\n value: Math.random() * 100,\n source: Math.random() > 0.5 ? 'High' : 'Low'\n}));\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400\n});\n\nchart.options({\n type: 'rect',\n data,\n encode: {\n x: 'value',\n y: 'count',\n color: 'source'\n },\n transform: [\n { \n type: 'binX', \n y: 'count', \n thresholds: 25,\n groupBy: ['source']\n },\n { type: 'stackY' }\n ],\n scale: {\n color: {\n range: ['#5B8FF9', '#F6BD16']\n }\n },\n axis: {\n x: { \n title: 'Value 分布',\n labelFormatter: (v) => v.toFixed(1)\n },\n y: { \n title: '频数',\n labelFormatter: (v) => Math.round(v)\n }\n },\n legend: {\n color: { \n position: 'right',\n title: 'Source'\n }\n },\n interaction: {\n elementHighlight: true\n },\n style: {\n inset: 0.5\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "random", + "random", + "Chart", + "options", + "toFixed", + "round", + "render" + ], + "objectKeys": [ + "length", + "value", + "source", + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "color", + "transform", + "type", + "y", + "thresholds", + "groupBy", + "type", + "scale", + "color", + "range", + "axis", + "x", + "title", + "labelFormatter", + "y", + "title", + "labelFormatter", + "legend", + "color", + "position", + "title", + "interaction", + "elementHighlight", + "style", + "inset" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "interaction", + "x6.source" + ] + } + } + }, + { + "id": "case-29", + "query": "根据描述绘制图表,使用 G2 绘制一个环形图(theta 坐标系下的堆叠柱状图),展示四个分类 A、B、C、D 的数值占比情况,并通过不同的颜色进行区分,同时在图表上显示对应的分类标签。参考数据:[{\"category\":\"A\",\"value\":40},{\"category\":\"B\",\"value\":25},{\"category\":\"C\",\"value\":20},{\"category\":\"D\",\"value\":15}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'interval',\n data: [\n { category: 'A', value: 40 },\n { category: 'B', value: 25 },\n { category: 'C', value: 20 },\n { category: 'D', value: 15 },\n ],\n encode: { y: 'value', color: 'category' },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n startAngle: -Math.PI / 2, // 从π弧度开始\n endAngle: Math.PI * 3, // 到3π弧度结束\n },\n style: { stroke: 'white' },\n labels: [{ text: 'category', radius: 0.8 }],\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { category: 'A', value: 40 },\n { category: 'B', value: 25 },\n { category: 'C', value: 20 },\n { category: 'D', value: 15 },\n ],\n encode: {\n y: 'value',\n color: 'category',\n },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n outerRadius: 0.8,\n innerRadius: 0.5,\n },\n labels: [\n {\n text: 'category',\n position: 'outside',\n connector: true,\n },\n ],\n legend: {\n color: { position: 'bottom', layout: { justifyContent: 'center' } },\n },\n});\n\nchart.render();", + "duration": 11440, + "retrievedSkillIds": [ + "g2-mark-arc-pie", + "g2-coord-theta", + "g2-mark-arc-donut", + "g2-mark-interval-basic", + "g2-mark-interval-grouped" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 697, + "expectedLength": 574, + "similarity": 0.8441439157857067, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { category: 'A', value: 40 },\n { category: 'B', value: 25 },\n { category: 'C', value: 20 },\n { category: 'D', value: 15 },\n ],\n encode: {\n y: 'value',\n color: 'category',\n },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n outerRadius: 0.8,\n innerRadius: 0.5,\n },\n labels: [\n {\n text: 'category',\n position: 'outside',\n connector: true,\n },\n ],\n legend: {\n color: { position: 'bottom', layout: { justifyContent: 'center' } },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "category", + "value", + "category", + "value", + "category", + "value", + "category", + "value", + "encode", + "y", + "color", + "transform", + "type", + "coordinate", + "type", + "outerRadius", + "innerRadius", + "labels", + "text", + "position", + "connector", + "legend", + "color", + "position", + "layout", + "justifyContent" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-30", + "query": "根据描述绘制图表,使用 G2 绘制一个直方图,将数值型数据按区间分段统计频数,并以不同颜色区分小于 40 和大于等于 40 的数据区域,展示了数据的分布情况。参考数据:[{\"value\":12.34},{\"value\":45.67},{\"value\":18.92},{\"value\":51.23},{\"value\":7.89},{\"value\":42.11},{\"value\":29.56},{\"value\":48.78},{\"value\":33.45},{\"value\":16.78}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst data = Array.from({ length: 600 }, () => ({\n value: Math.random() > 0.5 ? Math.random() * 20 : 40 + Math.random() * 20,\n}));\n\nconst chart = new Chart({ container: 'container', autoFit: true, height: 300 });\nchart.options({\n type: 'rect',\n data: data,\n encode: { x: 'value' },\n transform: [{\n type: 'binX',\n y: 'count',\n }],\n scale: { y: { nice: true } },\n axis: { x: { title: '人工分段区间' }, y: { title: '频数' } },\n style: {\n fill: (d) => d.value < 40 ? '#13C2C2' : '#F04864',\n fillOpacity: 0.8,\ninset:1\n },\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst rawData = [\n {\"value\":12.34},\n {\"value\":45.67},\n {\"value\":18.92},\n {\"value\":51.23},\n {\"value\":7.89},\n {\"value\":42.11},\n {\"value\":29.56},\n {\"value\":48.78},\n {\"value\":33.45},\n {\"value\":16.78}\n];\n\nconst data = rawData.map(d => ({\n ...d,\n group: d.value < 40 ? '<40' : '>=40'\n}));\n\nchart.options({\n type: 'rect',\n data,\n encode: {\n x: 'value',\n y: 'count',\n color: 'group',\n },\n transform: [\n { type: 'binX', y: 'count', groupBy: ['group'], thresholds: 5 },\n { type: 'stackY' },\n ],\n style: {\n inset: 0.5,\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#F6BD16'],\n },\n },\n legend: {\n color: { title: '数值范围' },\n },\n axis: {\n x: { title: '数值区间' },\n y: { title: '频数' },\n },\n});\n\nchart.render();", + "duration": 32597, + "retrievedSkillIds": [ + "g2-transform-binx", + "g2-mark-histogram", + "g2-mark-distribution-curve", + "g2-comp-facet-circle", + "g2-data-fold" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 879, + "expectedLength": 586, + "similarity": 0.6234287741558496, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst rawData = [\n {\"value\":12.34},\n {\"value\":45.67},\n {\"value\":18.92},\n {\"value\":51.23},\n {\"value\":7.89},\n {\"value\":42.11},\n {\"value\":29.56},\n {\"value\":48.78},\n {\"value\":33.45},\n {\"value\":16.78}\n];\n\nconst data = rawData.map(d => ({\n ...d,\n group: d.value < 40 ? '<40' : '>=40'\n}));\n\nchart.options({\n type: 'rect',\n data,\n encode: {\n x: 'value',\n y: 'count',\n color: 'group',\n },\n transform: [\n { type: 'binX', y: 'count', groupBy: ['group'], thresholds: 5 },\n { type: 'stackY' },\n ],\n style: {\n inset: 0.5,\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#F6BD16'],\n },\n },\n legend: {\n color: { title: '数值范围' },\n },\n axis: {\n x: { title: '数值区间' },\n y: { title: '频数' },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "map", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "group", + "type", + "encode", + "x", + "y", + "color", + "transform", + "type", + "y", + "groupBy", + "thresholds", + "type", + "style", + "inset", + "scale", + "color", + "range", + "legend", + "color", + "title", + "axis", + "x", + "title", + "y", + "title" + ], + "stringLiterals": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale" + ] + } + } + }, + { + "id": "case-31", + "query": "根据描述绘制图表,使用极坐标系绘制一个暗色雷达图,展示多个因素的数值大小。每个因素对应一个点,点的位置由其数值决定,并通过线段连接形成闭合图形,用于可视化各维度的数据表现。参考数据:[{\"factor\":\"温度\",\"value\":75},{\"factor\":\"湿度\",\"value\":60},{\"factor\":\"风压\",\"value\":40},{\"factor\":\"光照\",\"value\":85},{\"factor\":\"土壤pH\",\"value\":58}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'view',\n theme: {\n type: 'dark',\n view: {\n viewFill: '#141414',\n },\n },\n data: [\n { factor: '温度', value: 75 },\n { factor: '湿度', value: 60 },\n { factor: '风压', value: 40 },\n { factor: '光照', value: 85 },\n { factor: '土壤pH', value: 58 }\n ],\n encode: { x: 'factor', y: 'value' },\n children: [\n {\n type: 'point',\n coordinate: { type: 'polar' },\n autoFit: true,\n scale: { y: { domainMin: 0, domainMax: 100 } },\n encode: { size: 12 },\n style: { shape: 'diamond', fill: null, stroke: 'red' },\n axis: {\n x: { grid: true, labelStroke: '#FFF' },\n y: { grid: true, title: false, labelFormatter: '.0f', labelStroke: '#FFF' }\n },\n },\n {\n type: 'line'\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 480,\n height: 480,\n theme: 'classicDark',\n});\n\nconst data = [\n { factor: '温度', value: 75 },\n { factor: '湿度', value: 60 },\n { factor: '风压', value: 40 },\n { factor: '光照', value: 85 },\n { factor: '土壤pH', value: 58 },\n];\n\nchart.options({\n type: 'view',\n data,\n coordinate: { type: 'polar' },\n scale: {\n x: { padding: 0.5, align: 0 },\n y: { domainMin: 0, domainMax: 100, tickCount: 5 },\n },\n axis: {\n x: { grid: true, title: false, labelSpacing: 10 },\n y: { grid: true, zIndex: 1, title: false },\n },\n children: [\n {\n type: 'area',\n encode: { x: 'factor', y: 'value' },\n style: { fill: '#00d9ff', fillOpacity: 0.3 },\n },\n {\n type: 'line',\n encode: { x: 'factor', y: 'value' },\n style: { stroke: '#00d9ff', lineWidth: 2 },\n },\n {\n type: 'point',\n encode: { x: 'factor', y: 'value' },\n style: { r: 4, fill: '#00d9ff', stroke: '#141414', lineWidth: 2 },\n labels: [{ text: 'value', position: 'top', style: { fontSize: 11, fill: '#fff' } }],\n },\n ],\n});\n\nchart.render();", + "duration": 10872, + "retrievedSkillIds": [ + "g2-mark-radar", + "g2-comp-axis-radar", + "g2-coord-polar", + "g2-mark-parallel", + "g2-mark-bullet" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1152, + "expectedLength": 904, + "similarity": 0.7881096619121891, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 480,\n height: 480,\n theme: 'classicDark',\n});\n\nconst data = [\n { factor: '温度', value: 75 },\n { factor: '湿度', value: 60 },\n { factor: '风压', value: 40 },\n { factor: '光照', value: 85 },\n { factor: '土壤pH', value: 58 },\n];\n\nchart.options({\n type: 'view',\n data,\n coordinate: { type: 'polar' },\n scale: {\n x: { padding: 0.5, align: 0 },\n y: { domainMin: 0, domainMax: 100, tickCount: 5 },\n },\n axis: {\n x: { grid: true, title: false, labelSpacing: 10 },\n y: { grid: true, zIndex: 1, title: false },\n },\n children: [\n {\n type: 'area',\n encode: { x: 'factor', y: 'value' },\n style: { fill: '#00d9ff', fillOpacity: 0.3 },\n },\n {\n type: 'line',\n encode: { x: 'factor', y: 'value' },\n style: { stroke: '#00d9ff', lineWidth: 2 },\n },\n {\n type: 'point',\n encode: { x: 'factor', y: 'value' },\n style: { r: 4, fill: '#00d9ff', stroke: '#141414', lineWidth: 2 },\n labels: [{ text: 'value', position: 'top', style: { fontSize: 11, fill: '#fff' } }],\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "theme", + "factor", + "value", + "factor", + "value", + "factor", + "value", + "factor", + "value", + "factor", + "value", + "type", + "coordinate", + "type", + "scale", + "x", + "padding", + "align", + "y", + "domainMin", + "domainMax", + "tickCount", + "axis", + "x", + "grid", + "title", + "labelSpacing", + "y", + "grid", + "zIndex", + "title", + "children", + "type", + "encode", + "x", + "y", + "style", + "fill", + "fillOpacity", + "type", + "encode", + "x", + "y", + "style", + "stroke", + "lineWidth", + "type", + "encode", + "x", + "y", + "style", + "r", + "fill", + "stroke", + "lineWidth", + "labels", + "text", + "position", + "style", + "fontSize", + "fill" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale", + "view.children", + "type.view", + "type.line", + "type.point", + "x6.labels", + "x6.zIndex" + ] + } + } + }, + { + "id": "case-32", + "query": "根据描述绘制图表,使用 G2 渲染一个韦恩图(Venn diagram),展示三个类别(保健、知识、娱乐)之间的集合交集关系和对应大小,标签仅在三集合交集处显示,并启用元素高亮交互。\n参考数据:\n[{\"sets\":[\"保健\"],\"size\":12,\"label\":\"健康\"},{\"sets\":[\"知识\"],\"size\":9,\"label\":\"教育\"},{\"sets\":[\"娱乐\"],\"size\":8,\"label\":\"快乐\"},{\"sets\":[\"保健\",\"知识\"],\"size\":4},{\"sets\":[\"保健\",\"娱乐\"],\"size\":3},{\"sets\":[\"知识\",\"娱乐\"],\"size\":2},{\"sets\":[\"保健\",\"知识\",\"娱乐\"],\"size\":1}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['保健'], size: 12, label: '健康' },\n { sets: ['知识'], size: 9, label: '教育' },\n { sets: ['娱乐'], size: 8, label: '快乐' },\n { sets: ['保健', '知识'], size: 4 },\n { sets: ['保健', '娱乐'], size: 3 },\n { sets: ['知识', '娱乐'], size: 2 },\n { sets: ['保健', '知识', '娱乐'], size: 1 }\n ],\n transform: [{ type: 'venn' }]\n },\n encode: {\n d: 'path',\n color: (d) => (d.sets.length === 1 ? '#bfa' : '#fd8'),\n },\nstyle:{\nfillOpacity:(d)=>d.sets.length === 3 ?1:0.3\n},\n labels: [{\n position: 'inside',\n text: (d) => d.sets.length === 3 ? '核心用户(1)' : '',\n style: { fontSize: 11, fill: '#333' }\n }],\n scale: { color: { type: 'ordinal' } },\n interaction: { elementHighlight: true },\n state: { inactive: { opacity: 0.2 }, active: { opacity: 0.8 } },\n legend: false\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['保健'], size: 12, label: '健康' },\n { sets: ['知识'], size: 9, label: '教育' },\n { sets: ['娱乐'], size: 8, label: '快乐' },\n { sets: ['保健', '知识'], size: 4 },\n { sets: ['保健', '娱乐'], size: 3 },\n { sets: ['知识', '娱乐'], size: 2 },\n { sets: ['保健', '知识', '娱乐'], size: 1, label: '综合' }\n ],\n transform: [{ type: 'venn' }],\n },\n encode: {\n d: 'path',\n color: 'key',\n },\n labels: [\n {\n position: 'inside',\n text: (d) => d.sets.length === 3 ? (d.label || '交集') : '',\n fontSize: 14,\n fontWeight: 'bold',\n },\n ],\n style: {\n opacity: (d) => (d.sets.length > 1 ? 0.3 : 0.7),\n },\n state: {\n inactive: { opacity: 0.2 },\n active: { opacity: 0.9 },\n },\n interaction: {\n elementHighlight: true,\n },\n});\n\nchart.render();", + "duration": 7514, + "retrievedSkillIds": [ + "g2-mark-venn", + "g2-interaction-legend-filter", + "g2-mark-arc-donut", + "g2-interaction-element-hover-scale", + "g2-interaction-legend-highlight" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 978, + "expectedLength": 1003, + "similarity": 0.9822222222222221, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['保健'], size: 12, label: '健康' },\n { sets: ['知识'], size: 9, label: '教育' },\n { sets: ['娱乐'], size: 8, label: '快乐' },\n { sets: ['保健', '知识'], size: 4 },\n { sets: ['保健', '娱乐'], size: 3 },\n { sets: ['知识', '娱乐'], size: 2 },\n { sets: ['保健', '知识', '娱乐'], size: 1, label: '综合' }\n ],\n transform: [{ type: 'venn' }],\n },\n encode: {\n d: 'path',\n color: 'key',\n },\n labels: [\n {\n position: 'inside',\n text: (d) => d.sets.length === 3 ? (d.label || '交集') : '',\n fontSize: 14,\n fontWeight: 'bold',\n },\n ],\n style: {\n opacity: (d) => (d.sets.length > 1 ? 0.3 : 0.7),\n },\n state: {\n inactive: { opacity: 0.2 },\n active: { opacity: 0.9 },\n },\n interaction: {\n elementHighlight: true,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "type", + "value", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "sets", + "size", + "sets", + "size", + "sets", + "size", + "label", + "transform", + "type", + "encode", + "d", + "color", + "labels", + "position", + "text", + "fontSize", + "fontWeight", + "style", + "opacity", + "3", + "state", + "inactive", + "opacity", + "active", + "opacity", + "interaction", + "elementHighlight" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "interaction", + "x6.labels", + "x6.label" + ] + } + } + }, + { + "id": "case-33", + "query": "根据描述绘制图表,通过模拟14天每小时的温度数据,使用螺旋坐标系展示工作日与周末的温度变化对比。颜色区分日期类型,呈现温度随时间的波动模式。参考数据:[{\"timestamp\":0,\"temperature\":33.24339401307134,\"dayType\":\"周末\"},{\"timestamp\":1,\"temperature\":29.357770878288935,\"dayType\":\"周末\"},{\"timestamp\":2,\"temperature\":24.086481281621595,\"dayType\":\"周末\"},{\"timestamp\":3,\"temperature\":19.18024258758691,\"dayType\":\"周末\"},{\"timestamp\":4,\"temperature\":16.22667247372655,\"dayType\":\"周末\"},{\"timestamp\":5,\"temperature\":15.789802121900095,\"dayType\":\"周末\"},{\"timestamp\":6,\"temperature\":18.34803263133988,\"dayType\":\"周末\"},{\"timestamp\":7,\"temperature\":23.193266590556835,\"dayType\":\"周末\"},{\"timestamp\":8,\"temperature\":28.59491933013373,\"dayType\":\"周末\"},{\"timestamp\":9,\"temperature\":33.57567139138874,\"dayType\":\"周末\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from \"@antv/g2\";\n\nconst data = [];\nfor (let hour = 0; hour < 24 * 14; hour++) { // 14天每小时\n const base = 28 + 12 * Math.sin((hour % 24) * Math.PI / 12);\n const noise = (Math.random() - 0.5) * 6;\n data.push({\n timestamp: hour,\n temperature: base + noise,\n dayType: hour % (24 * 7) < 48 ? \"周末\" : \"工作日\"\n });\n}\n\nconst chart = new Chart({ container: \"container\", autoFit: true, height: 520 });\nchart.options({\n type: \"interval\",\n data,\n encode: {\n x: \"timestamp\",\n y: \"temperature\",\n color: \"dayType\",\n },\n scale: {\n y: { nice: true },\n color: { palette: [\"#d6e685\", \"#8cc665\"] }\n },\n coordinate: {\n type: \"helix\",\n startAngle: Math.PI / 2,\n endAngle: Math.PI * 6,\n innerRadius: 0.2\n },\n axis: {\n y: { title: \"温度 (°C)\", gridLineWidth: 0.5 }\n },\n title: \"城市14天温度螺旋图:工作日 vs 周末对比\",\n tooltip: {\n title: \"时间戳\",\n items: [{\n field: \"temperature\",\n name: \"温度\",\n valueFormatter: \".1f\"\n }, {\n field: \"dayType\",\n name: \"日期类型\"\n }]\n }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\n// 生成14天每小时的温度数据(共336个数据点)\nconst data = [];\nfor (let day = 0; day < 14; day++) {\n for (let hour = 0; hour < 24; hour++) {\n const timestamp = day * 24 + hour;\n // 判断日期类型:假设第0天是周六,第1天周日,以此类推\n const dayOfWeek = day % 7;\n const dayType = (dayOfWeek === 0 || dayOfWeek === 1) ? '周末' : '工作日';\n \n // 模拟温度变化:凌晨低(15-17),上午上升,下午高(30-35),晚上下降\n let baseTemp;\n if (hour >= 0 && hour < 5) {\n baseTemp = 16 + Math.random() * 3; // 凌晨 16-19\n } else if (hour >= 5 && hour < 12) {\n baseTemp = 20 + (hour - 5) * 2 + Math.random() * 2; // 上午逐渐升温 20-34\n } else if (hour >= 12 && hour < 15) {\n baseTemp = 34 + Math.random() * 2; // 午后最高 34-36\n } else if (hour >= 15 && hour < 20) {\n baseTemp = 35 - (hour - 15) * 1.5 + Math.random() * 2; // 傍晚降温\n } else {\n baseTemp = 27 - (hour - 20) * 2 + Math.random() * 2; // 夜间 27-23\n }\n \n data.push({\n timestamp,\n hour,\n day: day + 1,\n temperature: parseFloat(baseTemp.toFixed(2)),\n dayType\n });\n }\n}\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 600\n});\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'timestamp',\n y: 'temperature',\n color: 'dayType'\n },\n scale: {\n color: {\n domain: ['周末', '工作日'],\n range: ['#5B8FF9', '#5AD8A6']\n }\n },\n coordinate: {\n type: 'helix',\n startAngle: Math.PI / 2,\n endAngle: Math.PI / 2 + 6 * Math.PI, // 3圈螺旋展示14天数据\n innerRadius: 0.1,\n outerRadius: 0.9\n },\n style: {\n lineWidth: 0\n },\n legend: {\n color: {\n title: '日期类型'\n }\n },\n tooltip: {\n title: (d) => `第${d.day}天 ${d.hour}:00`,\n items: [\n { field: 'temperature', name: '温度 (°C)' },\n { field: 'dayType', name: '类型' }\n ]\n }\n});\n\nchart.render();", + "duration": 18307, + "retrievedSkillIds": [ + "g2-coord-helix", + "g2-scale-time", + "g2-mark-cell-heatmap", + "g2-mark-helix", + "g2-mark-liquid" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1812, + "expectedLength": 1045, + "similarity": 0.7131248119616856, + "extractedCode": "import { Chart } from '@antv/g2';\n\n// 生成14天每小时的温度数据(共336个数据点)\nconst data = [];\nfor (let day = 0; day < 14; day++) {\n for (let hour = 0; hour < 24; hour++) {\n const timestamp = day * 24 + hour;\n // 判断日期类型:假设第0天是周六,第1天周日,以此类推\n const dayOfWeek = day % 7;\n const dayType = (dayOfWeek === 0 || dayOfWeek === 1) ? '周末' : '工作日';\n \n // 模拟温度变化:凌晨低(15-17),上午上升,下午高(30-35),晚上下降\n let baseTemp;\n if (hour >= 0 && hour < 5) {\n baseTemp = 16 + Math.random() * 3; // 凌晨 16-19\n } else if (hour >= 5 && hour < 12) {\n baseTemp = 20 + (hour - 5) * 2 + Math.random() * 2; // 上午逐渐升温 20-34\n } else if (hour >= 12 && hour < 15) {\n baseTemp = 34 + Math.random() * 2; // 午后最高 34-36\n } else if (hour >= 15 && hour < 20) {\n baseTemp = 35 - (hour - 15) * 1.5 + Math.random() * 2; // 傍晚降温\n } else {\n baseTemp = 27 - (hour - 20) * 2 + Math.random() * 2; // 夜间 27-23\n }\n \n data.push({\n timestamp,\n hour,\n day: day + 1,\n temperature: parseFloat(baseTemp.toFixed(2)),\n dayType\n });\n }\n}\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 600\n});\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'timestamp',\n y: 'temperature',\n color: 'dayType'\n },\n scale: {\n color: {\n domain: ['周末', '工作日'],\n range: ['#5B8FF9', '#5AD8A6']\n }\n },\n coordinate: {\n type: 'helix',\n startAngle: Math.PI / 2,\n endAngle: Math.PI / 2 + 6 * Math.PI, // 3圈螺旋展示14天数据\n innerRadius: 0.1,\n outerRadius: 0.9\n },\n style: {\n lineWidth: 0\n },\n legend: {\n color: {\n title: '日期类型'\n }\n },\n tooltip: {\n title: (d) => `第${d.day}天 ${d.hour}:00`,\n items: [\n { field: 'temperature', name: '温度 (°C)' },\n { field: 'dayType', name: '类型' }\n ]\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "random", + "random", + "random", + "random", + "random", + "push", + "parseFloat", + "toFixed", + "Chart", + "options", + "render" + ], + "objectKeys": [ + "day", + "temperature", + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "color", + "scale", + "color", + "domain", + "range", + "coordinate", + "type", + "startAngle", + "endAngle", + "innerRadius", + "outerRadius", + "style", + "lineWidth", + "legend", + "color", + "title", + "tooltip", + "title", + "items", + "field", + "name", + "field", + "name" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale", + "type.interval" + ] + } + } + }, + { + "id": "case-34", + "query": "根据描述绘制图表,使用点图展示不同自然灾害类型在各年份造成的死亡人数,通过点的大小表示死亡人数的多少,颜色区分不同的灾害类型。参考数据:[{\"Entity\":\"All natural disasters\",\"Year\":1900,\"Deaths\":1267360},{\"Entity\":\"All natural disasters\",\"Year\":1901,\"Deaths\":200018},{\"Entity\":\"All natural disasters\",\"Year\":1902,\"Deaths\":46037},{\"Entity\":\"All natural disasters\",\"Year\":1903,\"Deaths\":6506},{\"Entity\":\"All natural disasters\",\"Year\":1905,\"Deaths\":22758},{\"Entity\":\"All natural disasters\",\"Year\":1906,\"Deaths\":42970},{\"Entity\":\"All natural disasters\",\"Year\":1907,\"Deaths\":1325641},{\"Entity\":\"All natural disasters\",\"Year\":1908,\"Deaths\":75033},{\"Entity\":\"All natural disasters\",\"Year\":1909,\"Deaths\":1511524},{\"Entity\":\"All natural disasters\",\"Year\":1910,\"Deaths\":148233}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": {\n \"type\": \"inline\",\n \"value\": [\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1900,\n \"Deaths\": 1267360\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1901,\n \"Deaths\": 200018\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1902,\n \"Deaths\": 46037\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1903,\n \"Deaths\": 6506\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1905,\n \"Deaths\": 22758\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1906,\n \"Deaths\": 42970\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1907,\n \"Deaths\": 1325641\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1908,\n \"Deaths\": 75033\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1909,\n \"Deaths\": 1511524\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1910,\n \"Deaths\": 148233\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1911,\n \"Deaths\": 102408\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1912,\n \"Deaths\": 52093\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1913,\n \"Deaths\": 882\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1914,\n \"Deaths\": 289\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1915,\n \"Deaths\": 32167\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1916,\n \"Deaths\": 300\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1917,\n \"Deaths\": 2523507\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1918,\n \"Deaths\": 461113\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1919,\n \"Deaths\": 5500\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1920,\n \"Deaths\": 3204224\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1921,\n \"Deaths\": 1200000\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1922,\n \"Deaths\": 101243\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1923,\n \"Deaths\": 255701\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1924,\n \"Deaths\": 303009\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1925,\n \"Deaths\": 5832\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1926,\n \"Deaths\": 427852\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1927,\n \"Deaths\": 215160\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1928,\n \"Deaths\": 3004895\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1929,\n \"Deaths\": 8377\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1930,\n \"Deaths\": 10572\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1931,\n \"Deaths\": 3706227\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1932,\n \"Deaths\": 73296\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1933,\n \"Deaths\": 34296\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1934,\n \"Deaths\": 21087\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1935,\n \"Deaths\": 272817\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1936,\n \"Deaths\": 5301\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1937,\n \"Deaths\": 12025\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1938,\n \"Deaths\": 2225\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1939,\n \"Deaths\": 563178\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1940,\n \"Deaths\": 23023\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1941,\n \"Deaths\": 10195\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1942,\n \"Deaths\": 1608235\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1943,\n \"Deaths\": 1910322\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1944,\n \"Deaths\": 15906\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1945,\n \"Deaths\": 10376\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1946,\n \"Deaths\": 35490\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1947,\n \"Deaths\": 17647\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1948,\n \"Deaths\": 120131\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1949,\n \"Deaths\": 120370\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1950,\n \"Deaths\": 6728\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1951,\n \"Deaths\": 15042\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1952,\n \"Deaths\": 8965\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1953,\n \"Deaths\": 12956\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1954,\n \"Deaths\": 41872\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1955,\n \"Deaths\": 6026\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1956,\n \"Deaths\": 7737\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1957,\n \"Deaths\": 10603\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1958,\n \"Deaths\": 3950\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1959,\n \"Deaths\": 2013242\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1960,\n \"Deaths\": 39188\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1961,\n \"Deaths\": 17341\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1962,\n \"Deaths\": 17370\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1963,\n \"Deaths\": 37746\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1964,\n \"Deaths\": 12892\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1965,\n \"Deaths\": 1565517\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1966,\n \"Deaths\": 17181\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1967,\n \"Deaths\": 10103\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1968,\n \"Deaths\": 21461\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1969,\n \"Deaths\": 11687\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1970,\n \"Deaths\": 387507\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1971,\n \"Deaths\": 18086\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1972,\n \"Deaths\": 20045\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1973,\n \"Deaths\": 110555\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1974,\n \"Deaths\": 87504\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1975,\n \"Deaths\": 14858\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1976,\n \"Deaths\": 280469\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1977,\n \"Deaths\": 22406\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1978,\n \"Deaths\": 38096\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1979,\n \"Deaths\": 7341\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1980,\n \"Deaths\": 23089\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1981,\n \"Deaths\": 119697\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1982,\n \"Deaths\": 13973\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1983,\n \"Deaths\": 461561\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1984,\n \"Deaths\": 16273\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1985,\n \"Deaths\": 60232\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1986,\n \"Deaths\": 10349\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1987,\n \"Deaths\": 21533\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1988,\n \"Deaths\": 57464\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1989,\n \"Deaths\": 12611\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1990,\n \"Deaths\": 53141\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1991,\n \"Deaths\": 189707\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1992,\n \"Deaths\": 18911\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1993,\n \"Deaths\": 21821\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1994,\n \"Deaths\": 15590\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1995,\n \"Deaths\": 27166\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1996,\n \"Deaths\": 31595\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1997,\n \"Deaths\": 30124\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1998,\n \"Deaths\": 62672\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 1999,\n \"Deaths\": 76886\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2000,\n \"Deaths\": 16667\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2001,\n \"Deaths\": 39493\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2002,\n \"Deaths\": 21342\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2003,\n \"Deaths\": 113558\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2004,\n \"Deaths\": 244772\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2005,\n \"Deaths\": 93566\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2006,\n \"Deaths\": 29893\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2007,\n \"Deaths\": 22422\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2008,\n \"Deaths\": 242236\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2009,\n \"Deaths\": 16037\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2010,\n \"Deaths\": 329900\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2011,\n \"Deaths\": 34143\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2012,\n \"Deaths\": 11619\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2013,\n \"Deaths\": 22225\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2014,\n \"Deaths\": 20882\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2015,\n \"Deaths\": 23893\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2016,\n \"Deaths\": 10201\n },\n {\n \"Entity\": \"All natural disasters\",\n \"Year\": 2017,\n \"Deaths\": 2087\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1900,\n \"Deaths\": 1261000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1910,\n \"Deaths\": 85000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1920,\n \"Deaths\": 524000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1921,\n \"Deaths\": 1200000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1928,\n \"Deaths\": 3000000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1940,\n \"Deaths\": 20000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1942,\n \"Deaths\": 1500000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1943,\n \"Deaths\": 1900000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1946,\n \"Deaths\": 30000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1964,\n \"Deaths\": 50\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1965,\n \"Deaths\": 1502000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1966,\n \"Deaths\": 8000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1967,\n \"Deaths\": 600\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1973,\n \"Deaths\": 100000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1974,\n \"Deaths\": 19000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1978,\n \"Deaths\": 63\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1979,\n \"Deaths\": 18\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1981,\n \"Deaths\": 103000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1982,\n \"Deaths\": 280\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1983,\n \"Deaths\": 450520\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1984,\n \"Deaths\": 230\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1986,\n \"Deaths\": 84\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1987,\n \"Deaths\": 1317\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1988,\n \"Deaths\": 1600\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1989,\n \"Deaths\": 237\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1991,\n \"Deaths\": 2000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1997,\n \"Deaths\": 732\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1998,\n \"Deaths\": 20\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 1999,\n \"Deaths\": 361\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 2000,\n \"Deaths\": 80\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 2001,\n \"Deaths\": 99\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 2002,\n \"Deaths\": 588\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 2003,\n \"Deaths\": 9\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 2004,\n \"Deaths\": 80\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 2005,\n \"Deaths\": 149\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 2006,\n \"Deaths\": 134\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 2008,\n \"Deaths\": 8\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 2010,\n \"Deaths\": 20000\n },\n {\n \"Entity\": \"Drought\",\n \"Year\": 2015,\n \"Deaths\": 35\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1901,\n \"Deaths\": 18\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1902,\n \"Deaths\": 6747\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1903,\n \"Deaths\": 6000\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1905,\n \"Deaths\": 22500\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1906,\n \"Deaths\": 31966\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1907,\n \"Deaths\": 25641\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1908,\n \"Deaths\": 75000\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1909,\n \"Deaths\": 5146\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1910,\n \"Deaths\": 1762\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1912,\n \"Deaths\": 923\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1913,\n \"Deaths\": 150\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1914,\n \"Deaths\": 149\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1915,\n \"Deaths\": 29986\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1917,\n \"Deaths\": 19450\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1918,\n \"Deaths\": 10379\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1920,\n \"Deaths\": 180000\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1922,\n \"Deaths\": 1100\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1923,\n \"Deaths\": 152362\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1924,\n \"Deaths\": 767\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1925,\n \"Deaths\": 5013\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1926,\n \"Deaths\": 12\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1927,\n \"Deaths\": 206142\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1928,\n \"Deaths\": 635\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1929,\n \"Deaths\": 3317\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1930,\n \"Deaths\": 5081\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1931,\n \"Deaths\": 1537\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1932,\n \"Deaths\": 70006\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1933,\n \"Deaths\": 16180\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1934,\n \"Deaths\": 15496\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1935,\n \"Deaths\": 66110\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1936,\n \"Deaths\": 26\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1938,\n \"Deaths\": 166\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1939,\n \"Deaths\": 63094\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1940,\n \"Deaths\": 1275\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1941,\n \"Deaths\": 189\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1942,\n \"Deaths\": 7235\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1943,\n \"Deaths\": 4332\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1944,\n \"Deaths\": 14984\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1945,\n \"Deaths\": 5961\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1946,\n \"Deaths\": 5153\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1947,\n \"Deaths\": 633\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1948,\n \"Deaths\": 115618\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1949,\n \"Deaths\": 6486\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1950,\n \"Deaths\": 1833\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1951,\n \"Deaths\": 1554\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1952,\n \"Deaths\": 2432\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1953,\n \"Deaths\": 2717\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1954,\n \"Deaths\": 3344\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1955,\n \"Deaths\": 959\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1956,\n \"Deaths\": 763\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1957,\n \"Deaths\": 6993\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1958,\n \"Deaths\": 227\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1959,\n \"Deaths\": 103\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1960,\n \"Deaths\": 19395\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1961,\n \"Deaths\": 60\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1962,\n \"Deaths\": 12209\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1963,\n \"Deaths\": 1700\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1964,\n \"Deaths\": 335\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1965,\n \"Deaths\": 683\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1966,\n \"Deaths\": 2752\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1967,\n \"Deaths\": 1013\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1968,\n \"Deaths\": 10858\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1969,\n \"Deaths\": 3353\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1970,\n \"Deaths\": 78599\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1971,\n \"Deaths\": 1107\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1972,\n \"Deaths\": 15170\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1973,\n \"Deaths\": 552\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1974,\n \"Deaths\": 24808\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1975,\n \"Deaths\": 12632\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1976,\n \"Deaths\": 276994\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1977,\n \"Deaths\": 3098\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1978,\n \"Deaths\": 25162\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1979,\n \"Deaths\": 2100\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1980,\n \"Deaths\": 7730\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1981,\n \"Deaths\": 4206\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1982,\n \"Deaths\": 2120\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1983,\n \"Deaths\": 2148\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1984,\n \"Deaths\": 57\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1985,\n \"Deaths\": 9853\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1986,\n \"Deaths\": 1181\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1987,\n \"Deaths\": 5160\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1988,\n \"Deaths\": 27049\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1989,\n \"Deaths\": 650\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1990,\n \"Deaths\": 42853\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1991,\n \"Deaths\": 2454\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1992,\n \"Deaths\": 4033\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1993,\n \"Deaths\": 10088\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1994,\n \"Deaths\": 1242\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1995,\n \"Deaths\": 7739\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1996,\n \"Deaths\": 576\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1997,\n \"Deaths\": 3159\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1998,\n \"Deaths\": 9573\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 1999,\n \"Deaths\": 21869\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2000,\n \"Deaths\": 217\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2001,\n \"Deaths\": 21348\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2002,\n \"Deaths\": 1639\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2003,\n \"Deaths\": 29617\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2004,\n \"Deaths\": 227290\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2005,\n \"Deaths\": 76241\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2006,\n \"Deaths\": 6692\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2007,\n \"Deaths\": 780\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2008,\n \"Deaths\": 87918\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2009,\n \"Deaths\": 1893\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2010,\n \"Deaths\": 226733\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2011,\n \"Deaths\": 20946\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2012,\n \"Deaths\": 711\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2013,\n \"Deaths\": 1120\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2014,\n \"Deaths\": 774\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2015,\n \"Deaths\": 9550\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2016,\n \"Deaths\": 1311\n },\n {\n \"Entity\": \"Earthquake\",\n \"Year\": 2017,\n \"Deaths\": 49\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1900,\n \"Deaths\": 30\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1901,\n \"Deaths\": 200000\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1907,\n \"Deaths\": 1300000\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1909,\n \"Deaths\": 1500040\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1910,\n \"Deaths\": 60000\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1917,\n \"Deaths\": 2500000\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1918,\n \"Deaths\": 449700\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1920,\n \"Deaths\": 2500000\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1923,\n \"Deaths\": 100000\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1924,\n \"Deaths\": 300000\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1926,\n \"Deaths\": 423000\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1932,\n \"Deaths\": 16\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1935,\n \"Deaths\": 2000\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1940,\n \"Deaths\": 1500\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1947,\n \"Deaths\": 10276\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1953,\n \"Deaths\": 481\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1963,\n \"Deaths\": 1000\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1964,\n \"Deaths\": 617\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1965,\n \"Deaths\": 816\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1966,\n \"Deaths\": 200\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1967,\n \"Deaths\": 3137\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1968,\n \"Deaths\": 177\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1969,\n \"Deaths\": 3520\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1970,\n \"Deaths\": 939\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1971,\n \"Deaths\": 2313\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1972,\n \"Deaths\": 35\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1974,\n \"Deaths\": 1500\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1976,\n \"Deaths\": 396\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1977,\n \"Deaths\": 1184\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1978,\n \"Deaths\": 3060\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1979,\n \"Deaths\": 486\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1980,\n \"Deaths\": 1685\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1981,\n \"Deaths\": 2497\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1982,\n \"Deaths\": 2912\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1983,\n \"Deaths\": 1219\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1984,\n \"Deaths\": 7016\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1985,\n \"Deaths\": 5854\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1986,\n \"Deaths\": 3046\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1987,\n \"Deaths\": 2592\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1988,\n \"Deaths\": 15216\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1989,\n \"Deaths\": 1870\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1990,\n \"Deaths\": 2207\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1991,\n \"Deaths\": 30682\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1992,\n \"Deaths\": 6675\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1993,\n \"Deaths\": 651\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1994,\n \"Deaths\": 2505\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1995,\n \"Deaths\": 4428\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1996,\n \"Deaths\": 16887\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1997,\n \"Deaths\": 10674\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1998,\n \"Deaths\": 12931\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 1999,\n \"Deaths\": 6293\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2000,\n \"Deaths\": 6980\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2001,\n \"Deaths\": 8515\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2002,\n \"Deaths\": 8762\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2003,\n \"Deaths\": 3522\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2004,\n \"Deaths\": 3245\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2005,\n \"Deaths\": 3909\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2006,\n \"Deaths\": 6402\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2007,\n \"Deaths\": 5484\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2008,\n \"Deaths\": 6904\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2009,\n \"Deaths\": 4895\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2010,\n \"Deaths\": 12143\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2011,\n \"Deaths\": 3174\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2012,\n \"Deaths\": 1887\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2013,\n \"Deaths\": 529\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2014,\n \"Deaths\": 12911\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2015,\n \"Deaths\": 1032\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2016,\n \"Deaths\": 1520\n },\n {\n \"Entity\": \"Epidemic\",\n \"Year\": 2017,\n \"Deaths\": 386\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1936,\n \"Deaths\": 1693\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1951,\n \"Deaths\": 69\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1953,\n \"Deaths\": 669\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1955,\n \"Deaths\": 107\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1958,\n \"Deaths\": 651\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1961,\n \"Deaths\": 400\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1962,\n \"Deaths\": 50\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1963,\n \"Deaths\": 162\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1965,\n \"Deaths\": 100\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1966,\n \"Deaths\": 262\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1968,\n \"Deaths\": 153\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1971,\n \"Deaths\": 400\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1972,\n \"Deaths\": 110\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1973,\n \"Deaths\": 283\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1975,\n \"Deaths\": 140\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1978,\n \"Deaths\": 150\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1979,\n \"Deaths\": 470\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1980,\n \"Deaths\": 1389\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1981,\n \"Deaths\": 300\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1982,\n \"Deaths\": 400\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1983,\n \"Deaths\": 205\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1984,\n \"Deaths\": 290\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1985,\n \"Deaths\": 456\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1986,\n \"Deaths\": 50\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1987,\n \"Deaths\": 1220\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1988,\n \"Deaths\": 644\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1989,\n \"Deaths\": 381\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1990,\n \"Deaths\": 979\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1991,\n \"Deaths\": 835\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1992,\n \"Deaths\": 388\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1993,\n \"Deaths\": 106\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1994,\n \"Deaths\": 341\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1995,\n \"Deaths\": 1730\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1996,\n \"Deaths\": 300\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1997,\n \"Deaths\": 604\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1998,\n \"Deaths\": 3269\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 1999,\n \"Deaths\": 771\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2000,\n \"Deaths\": 941\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2001,\n \"Deaths\": 1787\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2002,\n \"Deaths\": 3369\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2003,\n \"Deaths\": 74698\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2004,\n \"Deaths\": 255\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2005,\n \"Deaths\": 1550\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2006,\n \"Deaths\": 4826\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2007,\n \"Deaths\": 1086\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2008,\n \"Deaths\": 1688\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2009,\n \"Deaths\": 1386\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2010,\n \"Deaths\": 57188\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2011,\n \"Deaths\": 435\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2012,\n \"Deaths\": 1834\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2013,\n \"Deaths\": 1821\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2014,\n \"Deaths\": 1168\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2015,\n \"Deaths\": 7425\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2016,\n \"Deaths\": 490\n },\n {\n \"Entity\": \"Extreme temperature\",\n \"Year\": 2017,\n \"Deaths\": 130\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1900,\n \"Deaths\": 6000\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1902,\n \"Deaths\": 600\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1903,\n \"Deaths\": 163\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1905,\n \"Deaths\": 240\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1906,\n \"Deaths\": 10298\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1909,\n \"Deaths\": 713\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1910,\n \"Deaths\": 30\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1911,\n \"Deaths\": 1000\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1912,\n \"Deaths\": 51170\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1913,\n \"Deaths\": 732\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1915,\n \"Deaths\": 2125\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1916,\n \"Deaths\": 300\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1917,\n \"Deaths\": 4057\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1918,\n \"Deaths\": 34\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1919,\n \"Deaths\": 500\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1920,\n \"Deaths\": 224\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1922,\n \"Deaths\": 100000\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1923,\n \"Deaths\": 3139\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1924,\n \"Deaths\": 2242\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1925,\n \"Deaths\": 819\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1926,\n \"Deaths\": 3568\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1927,\n \"Deaths\": 5772\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1928,\n \"Deaths\": 4224\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1930,\n \"Deaths\": 4082\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1931,\n \"Deaths\": 3200\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1932,\n \"Deaths\": 3244\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1933,\n \"Deaths\": 63\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1934,\n \"Deaths\": 5091\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1935,\n \"Deaths\": 62707\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1936,\n \"Deaths\": 3309\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1937,\n \"Deaths\": 11231\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1938,\n \"Deaths\": 905\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1939,\n \"Deaths\": 3\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1940,\n \"Deaths\": 123\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1941,\n \"Deaths\": 5006\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1942,\n \"Deaths\": 101000\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1943,\n \"Deaths\": 5000\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1944,\n \"Deaths\": 726\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1945,\n \"Deaths\": 4415\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1946,\n \"Deaths\": 337\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1947,\n \"Deaths\": 4738\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1948,\n \"Deaths\": 2971\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1949,\n \"Deaths\": 2804\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1950,\n \"Deaths\": 873\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1951,\n \"Deaths\": 2861\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1952,\n \"Deaths\": 6277\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1953,\n \"Deaths\": 1814\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1954,\n \"Deaths\": 2969\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1955,\n \"Deaths\": 3895\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1956,\n \"Deaths\": 3114\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1957,\n \"Deaths\": 1139\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1958,\n \"Deaths\": 2620\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1959,\n \"Deaths\": 9695\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1960,\n \"Deaths\": 9164\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1961,\n \"Deaths\": 12852\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1962,\n \"Deaths\": 1860\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1963,\n \"Deaths\": 29965\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1964,\n \"Deaths\": 10655\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1965,\n \"Deaths\": 59932\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1966,\n \"Deaths\": 2327\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1967,\n \"Deaths\": 2255\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1968,\n \"Deaths\": 1669\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1969,\n \"Deaths\": 3252\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1970,\n \"Deaths\": 304495\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1971,\n \"Deaths\": 10811\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1972,\n \"Deaths\": 1427\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1973,\n \"Deaths\": 4344\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1974,\n \"Deaths\": 11861\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1975,\n \"Deaths\": 1041\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1976,\n \"Deaths\": 1763\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1977,\n \"Deaths\": 15298\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1978,\n \"Deaths\": 3676\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1979,\n \"Deaths\": 2623\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1980,\n \"Deaths\": 1379\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1981,\n \"Deaths\": 3790\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1982,\n \"Deaths\": 2782\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1983,\n \"Deaths\": 3656\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1984,\n \"Deaths\": 5468\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1985,\n \"Deaths\": 17165\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1986,\n \"Deaths\": 1939\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1987,\n \"Deaths\": 2900\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1988,\n \"Deaths\": 3335\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1989,\n \"Deaths\": 4256\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1990,\n \"Deaths\": 4604\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1991,\n \"Deaths\": 146297\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1992,\n \"Deaths\": 1342\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1993,\n \"Deaths\": 2965\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1994,\n \"Deaths\": 4239\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1995,\n \"Deaths\": 3763\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1996,\n \"Deaths\": 4581\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1997,\n \"Deaths\": 6150\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1998,\n \"Deaths\": 24935\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 1999,\n \"Deaths\": 12270\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2000,\n \"Deaths\": 1354\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2001,\n \"Deaths\": 1911\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2002,\n \"Deaths\": 1382\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2003,\n \"Deaths\": 1049\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2004,\n \"Deaths\": 6547\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2005,\n \"Deaths\": 5251\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2006,\n \"Deaths\": 4329\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2007,\n \"Deaths\": 6035\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2008,\n \"Deaths\": 140985\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2009,\n \"Deaths\": 3287\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2010,\n \"Deaths\": 1564\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2011,\n \"Deaths\": 3103\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2012,\n \"Deaths\": 3105\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2013,\n \"Deaths\": 8603\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2014,\n \"Deaths\": 1424\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2015,\n \"Deaths\": 1270\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2016,\n \"Deaths\": 1760\n },\n {\n \"Entity\": \"Extreme weather\",\n \"Year\": 2017,\n \"Deaths\": 394\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1900,\n \"Deaths\": 300\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1903,\n \"Deaths\": 250\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1906,\n \"Deaths\": 6\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1909,\n \"Deaths\": 72\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1910,\n \"Deaths\": 1379\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1911,\n \"Deaths\": 100000\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1926,\n \"Deaths\": 1000\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1927,\n \"Deaths\": 3246\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1928,\n \"Deaths\": 36\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1931,\n \"Deaths\": 3700000\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1933,\n \"Deaths\": 18053\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1935,\n \"Deaths\": 142000\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1936,\n \"Deaths\": 200\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1937,\n \"Deaths\": 248\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1938,\n \"Deaths\": 954\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1939,\n \"Deaths\": 500010\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1940,\n \"Deaths\": 125\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1943,\n \"Deaths\": 990\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1947,\n \"Deaths\": 2000\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1948,\n \"Deaths\": 917\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1949,\n \"Deaths\": 97000\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1950,\n \"Deaths\": 3808\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1951,\n \"Deaths\": 5666\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1952,\n \"Deaths\": 199\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1953,\n \"Deaths\": 7125\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1954,\n \"Deaths\": 34436\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1955,\n \"Deaths\": 584\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1956,\n \"Deaths\": 3613\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1957,\n \"Deaths\": 2471\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1958,\n \"Deaths\": 400\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1959,\n \"Deaths\": 2003396\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1960,\n \"Deaths\": 10577\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1961,\n \"Deaths\": 3863\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1962,\n \"Deaths\": 1180\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1963,\n \"Deaths\": 1031\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1964,\n \"Deaths\": 1123\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1965,\n \"Deaths\": 1401\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1966,\n \"Deaths\": 1923\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1967,\n \"Deaths\": 2446\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1968,\n \"Deaths\": 7306\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1969,\n \"Deaths\": 1544\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1970,\n \"Deaths\": 3246\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1971,\n \"Deaths\": 2404\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1972,\n \"Deaths\": 2548\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1973,\n \"Deaths\": 1835\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1974,\n \"Deaths\": 29431\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1975,\n \"Deaths\": 848\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1976,\n \"Deaths\": 960\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1977,\n \"Deaths\": 2568\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1978,\n \"Deaths\": 5897\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1979,\n \"Deaths\": 1038\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1980,\n \"Deaths\": 10466\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1981,\n \"Deaths\": 5283\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1982,\n \"Deaths\": 4648\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1983,\n \"Deaths\": 2082\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1984,\n \"Deaths\": 2930\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1985,\n \"Deaths\": 4376\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1986,\n \"Deaths\": 1782\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1987,\n \"Deaths\": 6766\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1988,\n \"Deaths\": 8504\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1989,\n \"Deaths\": 4716\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1990,\n \"Deaths\": 2251\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1991,\n \"Deaths\": 5852\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1992,\n \"Deaths\": 5315\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1993,\n \"Deaths\": 6150\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1994,\n \"Deaths\": 6771\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1995,\n \"Deaths\": 7956\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1996,\n \"Deaths\": 8047\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1997,\n \"Deaths\": 7685\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1998,\n \"Deaths\": 10653\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 1999,\n \"Deaths\": 34807\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2000,\n \"Deaths\": 6025\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2001,\n \"Deaths\": 5014\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2002,\n \"Deaths\": 4236\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2003,\n \"Deaths\": 3910\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2004,\n \"Deaths\": 6982\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2005,\n \"Deaths\": 5754\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2006,\n \"Deaths\": 5843\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2007,\n \"Deaths\": 8607\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2008,\n \"Deaths\": 4007\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2009,\n \"Deaths\": 3627\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2010,\n \"Deaths\": 8356\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2011,\n \"Deaths\": 6163\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2012,\n \"Deaths\": 3544\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2013,\n \"Deaths\": 9836\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2014,\n \"Deaths\": 3532\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2015,\n \"Deaths\": 3495\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2016,\n \"Deaths\": 4720\n },\n {\n \"Entity\": \"Flood\",\n \"Year\": 2017,\n \"Deaths\": 648\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1909,\n \"Deaths\": 53\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1922,\n \"Deaths\": 100\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1923,\n \"Deaths\": 200\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1926,\n \"Deaths\": 128\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1930,\n \"Deaths\": 40\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1931,\n \"Deaths\": 190\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1932,\n \"Deaths\": 30\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1934,\n \"Deaths\": 500\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1936,\n \"Deaths\": 73\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1938,\n \"Deaths\": 200\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1941,\n \"Deaths\": 5000\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1948,\n \"Deaths\": 525\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1949,\n \"Deaths\": 12000\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1950,\n \"Deaths\": 130\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1951,\n \"Deaths\": 92\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1952,\n \"Deaths\": 28\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1954,\n \"Deaths\": 1086\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1955,\n \"Deaths\": 478\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1956,\n \"Deaths\": 236\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1958,\n \"Deaths\": 52\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1959,\n \"Deaths\": 48\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1960,\n \"Deaths\": 52\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1961,\n \"Deaths\": 166\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1962,\n \"Deaths\": 71\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1963,\n \"Deaths\": 2033\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1964,\n \"Deaths\": 108\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1965,\n \"Deaths\": 204\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1966,\n \"Deaths\": 604\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1967,\n \"Deaths\": 590\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1968,\n \"Deaths\": 1196\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1969,\n \"Deaths\": 18\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1970,\n \"Deaths\": 186\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1971,\n \"Deaths\": 1020\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1972,\n \"Deaths\": 755\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1973,\n \"Deaths\": 3541\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1974,\n \"Deaths\": 904\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1975,\n \"Deaths\": 195\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1976,\n \"Deaths\": 315\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1977,\n \"Deaths\": 40\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1978,\n \"Deaths\": 86\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1979,\n \"Deaths\": 338\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1980,\n \"Deaths\": 300\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1981,\n \"Deaths\": 421\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1982,\n \"Deaths\": 640\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1983,\n \"Deaths\": 1159\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1984,\n \"Deaths\": 228\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1985,\n \"Deaths\": 377\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1986,\n \"Deaths\": 501\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1987,\n \"Deaths\": 1204\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1988,\n \"Deaths\": 952\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1989,\n \"Deaths\": 445\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1990,\n \"Deaths\": 98\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1991,\n \"Deaths\": 728\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1992,\n \"Deaths\": 712\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1993,\n \"Deaths\": 1418\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1994,\n \"Deaths\": 307\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1995,\n \"Deaths\": 1521\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1996,\n \"Deaths\": 1155\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1997,\n \"Deaths\": 801\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1998,\n \"Deaths\": 1141\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 1999,\n \"Deaths\": 445\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2000,\n \"Deaths\": 1012\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2001,\n \"Deaths\": 786\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2002,\n \"Deaths\": 1100\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2003,\n \"Deaths\": 706\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2004,\n \"Deaths\": 313\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2005,\n \"Deaths\": 664\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2006,\n \"Deaths\": 1638\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2007,\n \"Deaths\": 271\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2008,\n \"Deaths\": 504\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2009,\n \"Deaths\": 723\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2010,\n \"Deaths\": 3427\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2011,\n \"Deaths\": 309\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2012,\n \"Deaths\": 501\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2013,\n \"Deaths\": 235\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2014,\n \"Deaths\": 943\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2015,\n \"Deaths\": 1006\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2016,\n \"Deaths\": 361\n },\n {\n \"Entity\": \"Landslide\",\n \"Year\": 2017,\n \"Deaths\": 405\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1903,\n \"Deaths\": 76\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1905,\n \"Deaths\": 18\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1908,\n \"Deaths\": 33\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1910,\n \"Deaths\": 62\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1915,\n \"Deaths\": 56\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1937,\n \"Deaths\": 40\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1955,\n \"Deaths\": 3\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1962,\n \"Deaths\": 2000\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1963,\n \"Deaths\": 150\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1965,\n \"Deaths\": 26\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1970,\n \"Deaths\": 42\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1971,\n \"Deaths\": 31\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1980,\n \"Deaths\": 50\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1982,\n \"Deaths\": 59\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1983,\n \"Deaths\": 466\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1985,\n \"Deaths\": 300\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1987,\n \"Deaths\": 183\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1988,\n \"Deaths\": 157\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1989,\n \"Deaths\": 55\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1990,\n \"Deaths\": 116\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1991,\n \"Deaths\": 86\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1992,\n \"Deaths\": 323\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 1993,\n \"Deaths\": 341\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 2000,\n \"Deaths\": 11\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 2002,\n \"Deaths\": 60\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 2004,\n \"Deaths\": 44\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 2006,\n \"Deaths\": 11\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 2008,\n \"Deaths\": 120\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 2009,\n \"Deaths\": 36\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 2012,\n \"Deaths\": 16\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 2013,\n \"Deaths\": 46\n },\n {\n \"Entity\": \"Mass movement (dry)\",\n \"Year\": 2015,\n \"Deaths\": 13\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1900,\n \"Deaths\": 30\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1902,\n \"Deaths\": 38690\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1903,\n \"Deaths\": 17\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1906,\n \"Deaths\": 700\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1909,\n \"Deaths\": 5500\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1911,\n \"Deaths\": 1335\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1914,\n \"Deaths\": 140\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1919,\n \"Deaths\": 5000\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1926,\n \"Deaths\": 144\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1929,\n \"Deaths\": 5000\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1930,\n \"Deaths\": 1369\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1931,\n \"Deaths\": 1300\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1937,\n \"Deaths\": 506\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1944,\n \"Deaths\": 26\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1948,\n \"Deaths\": 100\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1949,\n \"Deaths\": 2000\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1950,\n \"Deaths\": 84\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1951,\n \"Deaths\": 4800\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1952,\n \"Deaths\": 29\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1953,\n \"Deaths\": 150\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1954,\n \"Deaths\": 37\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1963,\n \"Deaths\": 1705\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1964,\n \"Deaths\": 4\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1965,\n \"Deaths\": 355\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1966,\n \"Deaths\": 1088\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1968,\n \"Deaths\": 90\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1975,\n \"Deaths\": 2\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1976,\n \"Deaths\": 41\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1977,\n \"Deaths\": 215\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1979,\n \"Deaths\": 268\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1980,\n \"Deaths\": 90\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1981,\n \"Deaths\": 192\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1982,\n \"Deaths\": 130\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1984,\n \"Deaths\": 37\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1985,\n \"Deaths\": 21800\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1986,\n \"Deaths\": 1746\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1988,\n \"Deaths\": 7\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1990,\n \"Deaths\": 33\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1991,\n \"Deaths\": 683\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1992,\n \"Deaths\": 1\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1993,\n \"Deaths\": 99\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1994,\n \"Deaths\": 101\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1996,\n \"Deaths\": 4\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 1997,\n \"Deaths\": 53\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 2002,\n \"Deaths\": 200\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 2004,\n \"Deaths\": 2\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 2005,\n \"Deaths\": 3\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 2006,\n \"Deaths\": 5\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 2007,\n \"Deaths\": 11\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 2008,\n \"Deaths\": 16\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 2010,\n \"Deaths\": 323\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 2011,\n \"Deaths\": 3\n },\n {\n \"Entity\": \"Volcanic activity\",\n \"Year\": 2014,\n \"Deaths\": 102\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1911,\n \"Deaths\": 73\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1918,\n \"Deaths\": 1000\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1922,\n \"Deaths\": 43\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1929,\n \"Deaths\": 60\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1939,\n \"Deaths\": 71\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1944,\n \"Deaths\": 170\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1949,\n \"Deaths\": 80\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1956,\n \"Deaths\": 11\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1966,\n \"Deaths\": 25\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1967,\n \"Deaths\": 62\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1968,\n \"Deaths\": 12\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1977,\n \"Deaths\": 3\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1978,\n \"Deaths\": 2\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1981,\n \"Deaths\": 8\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1982,\n \"Deaths\": 2\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1983,\n \"Deaths\": 106\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1984,\n \"Deaths\": 17\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1985,\n \"Deaths\": 51\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1986,\n \"Deaths\": 20\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1987,\n \"Deaths\": 191\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1989,\n \"Deaths\": 1\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1991,\n \"Deaths\": 90\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1992,\n \"Deaths\": 122\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1993,\n \"Deaths\": 3\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1994,\n \"Deaths\": 84\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1995,\n \"Deaths\": 29\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1996,\n \"Deaths\": 45\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1997,\n \"Deaths\": 266\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1998,\n \"Deaths\": 150\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 1999,\n \"Deaths\": 70\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2000,\n \"Deaths\": 47\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2001,\n \"Deaths\": 33\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2002,\n \"Deaths\": 6\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2003,\n \"Deaths\": 47\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2004,\n \"Deaths\": 14\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2005,\n \"Deaths\": 45\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2006,\n \"Deaths\": 13\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2007,\n \"Deaths\": 148\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2008,\n \"Deaths\": 86\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2009,\n \"Deaths\": 190\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2010,\n \"Deaths\": 166\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2011,\n \"Deaths\": 10\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2012,\n \"Deaths\": 21\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2013,\n \"Deaths\": 35\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2014,\n \"Deaths\": 16\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2015,\n \"Deaths\": 67\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2016,\n \"Deaths\": 39\n },\n {\n \"Entity\": \"Wildfire\",\n \"Year\": 2017,\n \"Deaths\": 75\n }\n ],\n \"transform\": [\n {\n \"type\": \"filter\",\n \"callback\": (d) => d.Entity !== 'All natural disasters'\n }\n ]\n },\n \"encode\": {\n \"x\": \"Year\",\n \"y\": \"Entity\",\n \"size\": \"Deaths\",\n \"color\": \"Entity\",\n \"shape\": \"point\"\n },\n \"scale\": {\n \"size\": {\n \"rangeMax\": 35\n }\n },\n \"legend\": false,\n \"style\": {\n \"stroke\": \"black\",\n \"strokeOpacity\": 0.1,\n \"opacity\": 0.8,\n \"lineWidth\": 1\n },\n \"type\": \"point\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'point',\n data: [\n {\"Entity\":\"All natural disasters\",\"Year\":1900,\"Deaths\":1267360},\n {\"Entity\":\"All natural disasters\",\"Year\":1901,\"Deaths\":200018},\n {\"Entity\":\"All natural disasters\",\"Year\":1902,\"Deaths\":46037},\n {\"Entity\":\"All natural disasters\",\"Year\":1903,\"Deaths\":6506},\n {\"Entity\":\"All natural disasters\",\"Year\":1905,\"Deaths\":22758},\n {\"Entity\":\"All natural disasters\",\"Year\":1906,\"Deaths\":42970},\n {\"Entity\":\"All natural disasters\",\"Year\":1907,\"Deaths\":1325641},\n {\"Entity\":\"All natural disasters\",\"Year\":1908,\"Deaths\":75033},\n {\"Entity\":\"All natural disasters\",\"Year\":1909,\"Deaths\":1511524},\n {\"Entity\":\"All natural disasters\",\"Year\":1910,\"Deaths\":148233}\n ],\n encode: {\n x: 'Year',\n y: 'Deaths',\n size: 'Deaths',\n color: 'Entity',\n },\n scale: {\n size: {\n range: [4, 30],\n },\n },\n axis: {\n y: {\n labelFormatter: (v) => `${(v / 10000).toFixed(0)}万`,\n },\n },\n tooltip: {\n items: [\n { field: 'Entity', name: '灾害类型' },\n { field: 'Year', name: '年份' },\n { field: 'Deaths', name: '死亡人数' },\n ],\n },\n labels: [\n {\n text: 'Deaths',\n formatter: (d) => d.Deaths > 1000000 ? `${(d.Deaths / 10000).toFixed(0)}万` : '',\n position: 'top',\n style: {\n fontSize: 10,\n fill: '#666',\n },\n },\n ],\n});\n\nchart.render();", + "duration": 8738, + "retrievedSkillIds": [ + "g2-mark-area-stacked", + "g2-concept-chart-selection", + "g2-mark-point-scatter", + "g2-mark-arc-donut", + "g2-interaction-element-point-move" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1492, + "expectedLength": 66221, + "similarity": 0.39401306754638776, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'point',\n data: [\n {\"Entity\":\"All natural disasters\",\"Year\":1900,\"Deaths\":1267360},\n {\"Entity\":\"All natural disasters\",\"Year\":1901,\"Deaths\":200018},\n {\"Entity\":\"All natural disasters\",\"Year\":1902,\"Deaths\":46037},\n {\"Entity\":\"All natural disasters\",\"Year\":1903,\"Deaths\":6506},\n {\"Entity\":\"All natural disasters\",\"Year\":1905,\"Deaths\":22758},\n {\"Entity\":\"All natural disasters\",\"Year\":1906,\"Deaths\":42970},\n {\"Entity\":\"All natural disasters\",\"Year\":1907,\"Deaths\":1325641},\n {\"Entity\":\"All natural disasters\",\"Year\":1908,\"Deaths\":75033},\n {\"Entity\":\"All natural disasters\",\"Year\":1909,\"Deaths\":1511524},\n {\"Entity\":\"All natural disasters\",\"Year\":1910,\"Deaths\":148233}\n ],\n encode: {\n x: 'Year',\n y: 'Deaths',\n size: 'Deaths',\n color: 'Entity',\n },\n scale: {\n size: {\n range: [4, 30],\n },\n },\n axis: {\n y: {\n labelFormatter: (v) => `${(v / 10000).toFixed(0)}万`,\n },\n },\n tooltip: {\n items: [\n { field: 'Entity', name: '灾害类型' },\n { field: 'Year', name: '年份' },\n { field: 'Deaths', name: '死亡人数' },\n ],\n },\n labels: [\n {\n text: 'Deaths',\n formatter: (d) => d.Deaths > 1000000 ? `${(d.Deaths / 10000).toFixed(0)}万` : '',\n position: 'top',\n style: {\n fontSize: 10,\n fill: '#666',\n },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "encode", + "x", + "y", + "size", + "color", + "scale", + "size", + "range", + "axis", + "y", + "labelFormatter", + "tooltip", + "items", + "field", + "name", + "field", + "name", + "field", + "name", + "labels", + "text", + "formatter", + "position", + "style", + "fontSize", + "fill" + ], + "stringLiterals": [ + "Entity", + "Year", + "Deaths", + "Entity", + "Year", + "Deaths", + "Entity", + "Year", + "Deaths", + "Entity", + "Year", + "Deaths", + "Entity", + "Year", + "Deaths", + "Entity", + "Year", + "Deaths", + "Entity", + "Year", + "Deaths", + "Entity", + "Year", + "Deaths", + "Entity", + "Year", + "Deaths", + "Entity", + "Year", + "Deaths" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "type.point", + "x6.labels" + ] + } + } + }, + { + "id": "case-35", + "query": "根据描述绘制图表,使用 G2 创建一个组合图表,包含柱状图(sales)、折线图(profit)和面积图(revenue),三者共享 x 轴(日期)但各自拥有独立的 y 轴,并通过缩略轴支持数据范围的滑动查看,用于展示 60 天内销售、利润和收入的趋势对比。参考数据:\n[{\"date\":\"Day-1\",\"sales\":813.42,\"profit\":124.31,\"revenue\":2065.12},{\"date\":\"Day-2\",\"sales\":830.82,\"profit\":124.02,\"revenue\":2095.79},{\"date\":\"Day-3\",\"sales\":847.14,\"profit\":123.13,\"revenue\":2123.59},{\"date\":\"Day-4\",\"sales\":861.34,\"profit\":121.66,\"revenue\":2148.01},{\"date\":\"Day-5\",\"sales\":872.42,\"profit\":119.61,\"revenue\":2168.63},{\"date\":\"Day-6\",\"sales\":879.53,\"profit\":117.03,\"revenue\":2185.14},{\"date\":\"Day-7\",\"sales\":882.04,\"profit\":113.95,\"revenue\":2197.26},{\"date\":\"Day-8\",\"sales\":879.56,\"profit\":110.43,\"revenue\":2204.81},{\"date\":\"Day-9\",\"sales\":872.02,\"profit\":106.53,\"revenue\":2207.68},{\"date\":\"Day-10\",\"sales\":859.61,\"profit\":102.32,\"revenue\":2205.83}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [];\nfor (let i = 0; i < 60; i++) {\n data.push({\n date: `Day-${i + 1}`,\n sales: Math.sin(i / 10) * 300 + 800 + Math.random() * 200,\n profit: Math.cos(i / 8) * 50 + 75 + Math.random() * 25,\n revenue: Math.sin(i / 12) * 800 + 1500 + Math.random() * 300,\n });\n}\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'interval',\n encode: { x: 'date', y: 'sales' },\n scale: { y: { nice: true } },\n style: { fill: '#1890ff', fillOpacity: 0.6 },\n },\n {\n type: 'line',\n encode: { x: 'date', y: 'profit' },\n scale: {\n y: {\n key: 'y1',\n independent: true,\n nice: true,\n },\n },\n style: { stroke: '#ff4d4f', lineWidth: 3 },\n },\n {\n type: 'area',\n encode: { x: 'date', y: 'revenue' },\n scale: {\n y: {\n key: 'y2',\n independent: true,\n nice: true,\n },\n },\n style: { fill: '#52c41a', fillOpacity: 0.4 },\n },\n ],\n // View 层级配置缩略轴,自适应同时影响所有轴\n slider: {\n x: {\n labelFormatter: (d) => d,\n },\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 900,\n height: 500,\n});\n\n// 生成 60 天模拟数据,基于提供的趋势模式\nconst data = Array.from({ length: 60 }, (_, i) => {\n const day = i + 1;\n const noise = () => (Math.random() - 0.5) * 40;\n \n // 模拟趋势:sales 波动变化,profit 缓慢下降后波动,revenue 整体上升趋势\n const sales = 850 + Math.sin(day / 8) * 80 + noise();\n const profit = Math.max(50, 120 - day * 0.4 + Math.sin(day / 6) * 15 + noise() * 0.6);\n const revenue = 2100 + day * 3 + Math.sin(day / 10) * 120 + noise() * 2;\n \n return {\n date: `Day-${day}`,\n sales: parseFloat(sales.toFixed(2)),\n profit: parseFloat(profit.toFixed(2)),\n revenue: parseFloat(revenue.toFixed(2)),\n };\n});\n\nchart.options({\n type: 'view',\n data,\n slider: {\n x: {\n values: [0.7, 1.0],\n },\n },\n children: [\n {\n type: 'interval',\n encode: {\n x: 'date',\n y: 'sales',\n color: () => 'Sales',\n },\n scale: {\n y: { key: 'sales' },\n },\n axis: {\n y: {\n position: 'left',\n title: 'Sales ($)',\n },\n },\n style: {\n fill: '#5B8FF9',\n },\n },\n {\n type: 'line',\n encode: {\n x: 'date',\n y: 'profit',\n color: () => 'Profit',\n shape: 'smooth',\n },\n scale: {\n y: { key: 'profit' },\n },\n axis: {\n y: {\n position: 'right',\n title: 'Profit ($)',\n },\n },\n style: {\n stroke: '#5AD8A6',\n lineWidth: 2,\n },\n },\n {\n type: 'area',\n encode: {\n x: 'date',\n y: 'revenue',\n color: () => 'Revenue',\n },\n scale: {\n y: { key: 'revenue' },\n },\n axis: {\n y: {\n position: 'right',\n title: 'Revenue ($)',\n },\n },\n style: {\n fill: '#F6BD16',\n fillOpacity: 0.3,\n },\n },\n ],\n});\n\nchart.render();", + "duration": 28996, + "retrievedSkillIds": [ + "g2-mark-line-basic", + "g2-mark-interval-grouped", + "g2-mark-interval-basic", + "g2-interaction-slider-filter", + "g2-mark-arc-pie" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1953, + "expectedLength": 1227, + "similarity": 0.6407020872865274, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 900,\n height: 500,\n});\n\n// 生成 60 天模拟数据,基于提供的趋势模式\nconst data = Array.from({ length: 60 }, (_, i) => {\n const day = i + 1;\n const noise = () => (Math.random() - 0.5) * 40;\n \n // 模拟趋势:sales 波动变化,profit 缓慢下降后波动,revenue 整体上升趋势\n const sales = 850 + Math.sin(day / 8) * 80 + noise();\n const profit = Math.max(50, 120 - day * 0.4 + Math.sin(day / 6) * 15 + noise() * 0.6);\n const revenue = 2100 + day * 3 + Math.sin(day / 10) * 120 + noise() * 2;\n \n return {\n date: `Day-${day}`,\n sales: parseFloat(sales.toFixed(2)),\n profit: parseFloat(profit.toFixed(2)),\n revenue: parseFloat(revenue.toFixed(2)),\n };\n});\n\nchart.options({\n type: 'view',\n data,\n slider: {\n x: {\n values: [0.7, 1.0],\n },\n },\n children: [\n {\n type: 'interval',\n encode: {\n x: 'date',\n y: 'sales',\n color: () => 'Sales',\n },\n scale: {\n y: { key: 'sales' },\n },\n axis: {\n y: {\n position: 'left',\n title: 'Sales ($)',\n },\n },\n style: {\n fill: '#5B8FF9',\n },\n },\n {\n type: 'line',\n encode: {\n x: 'date',\n y: 'profit',\n color: () => 'Profit',\n shape: 'smooth',\n },\n scale: {\n y: { key: 'profit' },\n },\n axis: {\n y: {\n position: 'right',\n title: 'Profit ($)',\n },\n },\n style: {\n stroke: '#5AD8A6',\n lineWidth: 2,\n },\n },\n {\n type: 'area',\n encode: {\n x: 'date',\n y: 'revenue',\n color: () => 'Revenue',\n },\n scale: {\n y: { key: 'revenue' },\n },\n axis: {\n y: {\n position: 'right',\n title: 'Revenue ($)',\n },\n },\n style: {\n fill: '#F6BD16',\n fillOpacity: 0.3,\n },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "random", + "sin", + "noise", + "max", + "sin", + "noise", + "sin", + "noise", + "parseFloat", + "toFixed", + "parseFloat", + "toFixed", + "parseFloat", + "toFixed", + "options", + "Sales", + "Profit", + "Revenue", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "length", + "date", + "sales", + "profit", + "revenue", + "type", + "slider", + "x", + "values", + "children", + "type", + "encode", + "x", + "y", + "color", + "scale", + "y", + "key", + "axis", + "y", + "position", + "title", + "style", + "fill", + "type", + "encode", + "x", + "y", + "color", + "shape", + "scale", + "y", + "key", + "axis", + "y", + "position", + "title", + "style", + "stroke", + "lineWidth", + "type", + "encode", + "x", + "y", + "color", + "scale", + "y", + "key", + "axis", + "y", + "position", + "title", + "style", + "fill", + "fillOpacity" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "view.children", + "type.view", + "type.interval", + "type.line" + ] + } + } + }, + { + "id": "case-36", + "query": "根据描述绘制图表,使用 G2 渲染一个仪表盘(gauge)图表,展示电池健康状态。数据包含目标值(88)、总量(100)、名称及阈值分段,样式配置了弧形宽度、角度范围、指针样式及动态文本内容(根据数值显示不同状态提示)。参考数据:\n[{\"value\":{\"target\":88,\"total\":100,\"name\":\"电池健康\",\"thresholds\":[20,50,80]}}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'gauge',\n data: {\n value: {\n target: 88,\n total: 100,\n name: '电池健康',\n thresholds: [20, 50, 80, 100],\n }\n },\n scale: {\n color: {\n range: ['#f5222d', '#faad14', '#52c41a', '#1890ff'],\n },\n },\n style: {\n arcLineWidth: 10,\n textContent: (t) => `${t}%\n${t < 20 ? '⚠ 应更换' : t < 50 ? '⚠ 建议更换' : '✅ 正常'}`,\n },\n legend: false,\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 400,\n height: 400,\n});\n\nconst gaugeData = {\n target: 88,\n total: 100,\n name: '电池健康',\n thresholds: [20, 50, 80, 100], // 补充至100以覆盖完整范围,对应4段配色\n};\n\nchart.options({\n type: 'gauge',\n data: { value: gaugeData },\n scale: {\n color: {\n range: ['#F4664A', '#FAAD14', '#1890ff', '#30BF78'], // 差(0-20)、一般(20-50)、良好(50-80)、健康(80-100)\n },\n },\n coordinate: {\n type: 'radial',\n innerRadius: 0.75,\n startAngle: (-5 / 6) * Math.PI,\n endAngle: (1 / 6) * Math.PI,\n },\n style: {\n arcLineWidth: 18,\n arcStroke: '#fff',\n pointerShape: 'line',\n pinShape: 'circle',\n textContent: (target, total) => {\n const percentage = (target / total) * 100;\n let status = '';\n if (percentage >= 80) status = '状态:健康';\n else if (percentage >= 50) status = '状态:良好';\n else if (percentage >= 20) status = '状态:一般';\n else status = '状态:较差';\n return `${gaugeData.name}\\n${target}%\\n${status}`;\n },\n textFontSize: 20,\n textFill: '#262626',\n textFontWeight: 'bold',\n },\n legend: false,\n});\n\nchart.render();", + "duration": 40213, + "retrievedSkillIds": [ + "g2-mark-gauge", + "g2-mark-bullet", + "g2-mark-arc-donut", + "g2-scale-linear", + "g2-scale-time" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1153, + "expectedLength": 521, + "similarity": 0.7263052592982289, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 400,\n height: 400,\n});\n\nconst gaugeData = {\n target: 88,\n total: 100,\n name: '电池健康',\n thresholds: [20, 50, 80, 100], // 补充至100以覆盖完整范围,对应4段配色\n};\n\nchart.options({\n type: 'gauge',\n data: { value: gaugeData },\n scale: {\n color: {\n range: ['#F4664A', '#FAAD14', '#1890ff', '#30BF78'], // 差(0-20)、一般(20-50)、良好(50-80)、健康(80-100)\n },\n },\n coordinate: {\n type: 'radial',\n innerRadius: 0.75,\n startAngle: (-5 / 6) * Math.PI,\n endAngle: (1 / 6) * Math.PI,\n },\n style: {\n arcLineWidth: 18,\n arcStroke: '#fff',\n pointerShape: 'line',\n pinShape: 'circle',\n textContent: (target, total) => {\n const percentage = (target / total) * 100;\n let status = '';\n if (percentage >= 80) status = '状态:健康';\n else if (percentage >= 50) status = '状态:良好';\n else if (percentage >= 20) status = '状态:一般';\n else status = '状态:较差';\n return `${gaugeData.name}\\n${target}%\\n${status}`;\n },\n textFontSize: 20,\n textFill: '#262626',\n textFontWeight: 'bold',\n },\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "target", + "total", + "name", + "thresholds", + "type", + "data", + "value", + "scale", + "color", + "range", + "coordinate", + "type", + "innerRadius", + "startAngle", + "endAngle", + "style", + "arcLineWidth", + "arcStroke", + "pointerShape", + "pinShape", + "textContent", + "textFontSize", + "textFill", + "textFontWeight", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "coordinate", + "scale", + "x6.target" + ] + } + } + }, + { + "id": "case-37", + "query": "根据描述绘制图表,使用径向坐标系展示不同产品在各季度的销售金额分布情况,通过折叠数据将季度字段转换为分类维度,以间隔条形图形式呈现各产品在四个季度中的数值变化。参考数据:[{\"product\":\"手机\",\"q1\":40,\"q2\":50,\"q3\":60,\"q4\":70},{\"product\":\"平板\",\"q1\":30,\"q2\":35,\"q3\":40,\"q4\":45},{\"product\":\"耳机\",\"q1\":20,\"q2\":25,\"q3\":30,\"q4\":35}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic'\n});\n\nchart.options({\n type: 'interval',\n data: {\n value: [\n { product: '手机', q1: 40, q2: 50, q3: 60, q4: 70 },\n { product: '平板', q1: 30, q2: 35, q3: 40, q4: 45 },\n { product: '耳机', q1: 20, q2: 25, q3: 30, q4: 35 }\n ],\n transform: [{ type: 'fold', fields: ['q1', 'q2', 'q3', 'q4'], key: 'quarter', value: 'amount' }],\n },\n coordinate: { type: 'radial', innerRadius: 0.3 },\n encode: {\n x: 'product',\n y: 'amount',\n color: 'product'\n },\n scale: {\n y: { domain: [0, 80] }\n },\n style: {\n radius: 4,\n },\n axis: {\n x: { label: { autoRotate: true } },\n y: false\n },\n legend: {\n color: {\n position: 'bottom',\n layout: { justifyContent: 'center' }\n }\n }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: {\n type: 'inline',\n value: [\n {\"product\":\"手机\",\"q1\":40,\"q2\":50,\"q3\":60,\"q4\":70},\n {\"product\":\"平板\",\"q1\":30,\"q2\":35,\"q3\":40,\"q4\":45},\n {\"product\":\"耳机\",\"q1\":20,\"q2\":25,\"q3\":30,\"q4\":35}\n ],\n transform: [\n {\n type: 'fold',\n fields: ['q1', 'q2', 'q3', 'q4'],\n key: 'quarter',\n value: 'value'\n }\n ]\n },\n encode: {\n x: 'quarter',\n y: 'value',\n color: 'product'\n },\n transform: [\n { type: 'dodgeX' }\n ],\n coordinate: {\n type: 'radial',\n innerRadius: 0.2\n },\n axis: {\n x: { title: '季度' },\n y: { title: '销售金额', grid: true }\n },\n legend: {\n color: { title: '产品' }\n }\n});\n\nchart.render();", + "duration": 30608, + "retrievedSkillIds": [ + "g2-mark-interval-basic", + "g2-mark-line-basic", + "g2-concept-chart-selection", + "g2-mark-interval-grouped", + "g2-comp-facet-circle" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 848, + "expectedLength": 845, + "similarity": 0.7470585070186266, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: {\n type: 'inline',\n value: [\n {\"product\":\"手机\",\"q1\":40,\"q2\":50,\"q3\":60,\"q4\":70},\n {\"product\":\"平板\",\"q1\":30,\"q2\":35,\"q3\":40,\"q4\":45},\n {\"product\":\"耳机\",\"q1\":20,\"q2\":25,\"q3\":30,\"q4\":35}\n ],\n transform: [\n {\n type: 'fold',\n fields: ['q1', 'q2', 'q3', 'q4'],\n key: 'quarter',\n value: 'value'\n }\n ]\n },\n encode: {\n x: 'quarter',\n y: 'value',\n color: 'product'\n },\n transform: [\n { type: 'dodgeX' }\n ],\n coordinate: {\n type: 'radial',\n innerRadius: 0.2\n },\n axis: {\n x: { title: '季度' },\n y: { title: '销售金额', grid: true }\n },\n legend: {\n color: { title: '产品' }\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "type", + "value", + "transform", + "type", + "fields", + "key", + "value", + "encode", + "x", + "y", + "color", + "transform", + "type", + "coordinate", + "type", + "innerRadius", + "axis", + "x", + "title", + "y", + "title", + "grid", + "legend", + "color", + "title" + ], + "stringLiterals": [ + "product", + "q1", + "q2", + "q3", + "q4", + "product", + "q1", + "q2", + "q3", + "q4", + "product", + "q1", + "q2", + "q3", + "q4" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval" + ] + } + } + }, + { + "id": "case-38", + "query": "根据描述绘制图表,使用 G2 创建一个柱状图(interval),展示字母和对应频率的数据分布;包含一个右侧独立 Y 轴(0 到 10 范围),Y 轴标签格式化为百分比;图表从内联数据中读取字母频率信息并渲染。参考数据:\n[{\"letter\":\"A\",\"frequency\":0.08167},{\"letter\":\"B\",\"frequency\":0.01492},{\"letter\":\"C\",\"frequency\":0.02782},{\"letter\":\"D\",\"frequency\":0.04253},{\"letter\":\"E\",\"frequency\":0.12702},{\"letter\":\"F\",\"frequency\":0.02288},{\"letter\":\"G\",\"frequency\":0.02015},{\"letter\":\"H\",\"frequency\":0.06094},{\"letter\":\"I\",\"frequency\":0.06966},{\"letter\":\"J\",\"frequency\":0.00153}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": {\n \"type\": \"inline\",\n \"value\": [\n {\n \"letter\": \"A\",\n \"frequency\": 0.08167\n },\n {\n \"letter\": \"B\",\n \"frequency\": 0.01492\n },\n {\n \"letter\": \"C\",\n \"frequency\": 0.02782\n },\n {\n \"letter\": \"D\",\n \"frequency\": 0.04253\n },\n {\n \"letter\": \"E\",\n \"frequency\": 0.12702\n },\n {\n \"letter\": \"F\",\n \"frequency\": 0.02288\n },\n {\n \"letter\": \"G\",\n \"frequency\": 0.02015\n },\n {\n \"letter\": \"H\",\n \"frequency\": 0.06094\n },\n {\n \"letter\": \"I\",\n \"frequency\": 0.06966\n },\n {\n \"letter\": \"J\",\n \"frequency\": 0.00153\n },\n {\n \"letter\": \"K\",\n \"frequency\": 0.00772\n },\n {\n \"letter\": \"L\",\n \"frequency\": 0.04025\n },\n {\n \"letter\": \"M\",\n \"frequency\": 0.02406\n },\n {\n \"letter\": \"N\",\n \"frequency\": 0.06749\n },\n {\n \"letter\": \"O\",\n \"frequency\": 0.07507\n },\n {\n \"letter\": \"P\",\n \"frequency\": 0.01929\n },\n {\n \"letter\": \"Q\",\n \"frequency\": 0.00095\n },\n {\n \"letter\": \"R\",\n \"frequency\": 0.05987\n },\n {\n \"letter\": \"S\",\n \"frequency\": 0.06327\n },\n {\n \"letter\": \"T\",\n \"frequency\": 0.09056\n },\n {\n \"letter\": \"U\",\n \"frequency\": 0.02758\n },\n {\n \"letter\": \"V\",\n \"frequency\": 0.00978\n },\n {\n \"letter\": \"W\",\n \"frequency\": 0.0236\n },\n {\n \"letter\": \"X\",\n \"frequency\": 0.0015\n },\n {\n \"letter\": \"Y\",\n \"frequency\": 0.01974\n },\n {\n \"letter\": \"Z\",\n \"frequency\": 0.00074\n }\n ]\n },\n \"encode\": {\n \"x\": \"letter\",\n \"y\": \"frequency\"\n },\n \"axis\": {\n \"y\": {\n \"labelFormatter\": \".0%\"\n }\n },\n \"type\": \"interval\"\n },\n {\n \"position\": \"right\",\n \"scale\": {\n \"y\": {\n \"type\": \"linear\",\n \"independent\": true,\n \"domain\": [\n 0,\n 10\n ],\n \"range\": [\n 1,\n 0\n ]\n }\n },\n \"style\": {\n \"grid\": false\n },\n \"type\": \"axisY\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 480,\n});\n\nconst data = [\n {\"letter\":\"A\",\"frequency\":0.08167},\n {\"letter\":\"B\",\"frequency\":0.01492},\n {\"letter\":\"C\",\"frequency\":0.02782},\n {\"letter\":\"D\",\"frequency\":0.04253},\n {\"letter\":\"E\",\"frequency\":0.12702},\n {\"letter\":\"F\",\"frequency\":0.02288},\n {\"letter\":\"G\",\"frequency\":0.02015},\n {\"letter\":\"H\",\"frequency\":0.06094},\n {\"letter\":\"I\",\"frequency\":0.06966},\n {\"letter\":\"J\",\"frequency\":0.00153}\n];\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'letter',\n y: (d) => d.frequency * 100,\n color: 'letter',\n },\n scale: {\n y: {\n domain: [0, 10],\n labelFormatter: (d) => `${d}%`,\n },\n },\n axis: {\n y: {\n position: 'right',\n },\n },\n});\n\nchart.render();", + "duration": 42215, + "retrievedSkillIds": [ + "g2-mark-interval-basic", + "g2-mark-histogram", + "g2-transform-binx", + "g2-mark-interval-grouped", + "g2-interaction-element-point-move" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 823, + "expectedLength": 2277, + "similarity": 0.5958762576662524, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 480,\n});\n\nconst data = [\n {\"letter\":\"A\",\"frequency\":0.08167},\n {\"letter\":\"B\",\"frequency\":0.01492},\n {\"letter\":\"C\",\"frequency\":0.02782},\n {\"letter\":\"D\",\"frequency\":0.04253},\n {\"letter\":\"E\",\"frequency\":0.12702},\n {\"letter\":\"F\",\"frequency\":0.02288},\n {\"letter\":\"G\",\"frequency\":0.02015},\n {\"letter\":\"H\",\"frequency\":0.06094},\n {\"letter\":\"I\",\"frequency\":0.06966},\n {\"letter\":\"J\",\"frequency\":0.00153}\n];\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'letter',\n y: (d) => d.frequency * 100,\n color: 'letter',\n },\n scale: {\n y: {\n domain: [0, 10],\n labelFormatter: (d) => `${d}%`,\n },\n },\n axis: {\n y: {\n position: 'right',\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "color", + "scale", + "y", + "domain", + "labelFormatter", + "axis", + "y", + "position" + ], + "stringLiterals": [ + "letter", + "frequency", + "letter", + "frequency", + "letter", + "frequency", + "letter", + "frequency", + "letter", + "frequency", + "letter", + "frequency", + "letter", + "frequency", + "letter", + "frequency", + "letter", + "frequency", + "letter", + "frequency" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "type.interval" + ] + } + } + }, + { + "id": "case-39", + "query": "根据描述绘制图表,使用 G2 创建一个螺旋坐标系下的柱状图,展示 300 个时间点上的正弦波动数据,并带有渐入动画和颜色映射。参考数据:\n[{\"time\":\"T+0\",\"value\":30.879652747252365},{\"time\":\"T+1\",\"value\":30.34871766717829},{\"time\":\"T+2\",\"value\":36.66728714115757},{\"time\":\"T+3\",\"value\":42.38781548269647},{\"time\":\"T+4\",\"value\":46.99296253615131},{\"time\":\"T+5\",\"value\":50.05379447021332},{\"time\":\"T+6\",\"value\":51.2931900823945},{\"time\":\"T+7\",\"value\":50.5964733388878},{\"time\":\"T+8\",\"value\":47.99805391245507},{\"time\":\"T+9\",\"value\":43.66183649379279}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from \"@antv/g2\";\n\nconst data = Array.from({ length: 300 }, (_, i) => ({\n time: `T+${i}`,\n value: 30 + 25 * Math.sin(i / 30) + Math.random() * 15\n}));\n\nconst chart = new Chart({ container: \"container\" });\n\nchart.options({\n type: \"interval\",\n data,\n encode: { x: \"time\", y: \"value\", color: \"value\" },\n scale: { color: { type: \"linear\", range: [\"#fef5e7\", \"#f47d24\"] } },\n coordinate: { type: \"helix\", startAngle: Math.PI / 2, endAngle: 10 * Math.PI },\n animate: { enter: { type: \"fadeIn\", duration: 2000 } },\n style: {\n strokeWidth: 8\n },\n title: \"正弦波动数据的螺旋轨迹\"\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\n// 生成 300 个时间点的正弦波动数据\nconst data = Array.from({ length: 300 }, (_, i) => {\n const t = (i / 300) * Math.PI * 4; // 2 个完整周期\n const base = 40;\n const amplitude = 12;\n const noise = (Math.random() - 0.5) * 4;\n const value = base + amplitude * Math.sin(t) + noise;\n return {\n time: `T+${i}`,\n value: Number(value.toFixed(2)),\n };\n});\n\nconst chart = new Chart({\n container: 'container',\n width: 600,\n height: 600,\n});\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'time',\n y: 'value',\n color: 'value',\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'rdYlBu',\n },\n },\n coordinate: {\n type: 'helix',\n startAngle: 0,\n endAngle: Math.PI * 6, // 3 圈螺旋\n innerRadius: 0.1,\n outerRadius: 0.9,\n },\n style: {\n lineWidth: 0,\n },\n animate: {\n enter: {\n type: 'fadeIn',\n duration: 1500,\n },\n },\n legend: false,\n});\n\nchart.render();", + "duration": 13593, + "retrievedSkillIds": [ + "g2-coord-helix", + "g2-mark-interval-basic", + "g2-mark-helix", + "g2-mark-arc-pie", + "g2-animation-keyframe" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 955, + "expectedLength": 610, + "similarity": 0.6790967425009979, + "extractedCode": "import { Chart } from '@antv/g2';\n\n// 生成 300 个时间点的正弦波动数据\nconst data = Array.from({ length: 300 }, (_, i) => {\n const t = (i / 300) * Math.PI * 4; // 2 个完整周期\n const base = 40;\n const amplitude = 12;\n const noise = (Math.random() - 0.5) * 4;\n const value = base + amplitude * Math.sin(t) + noise;\n return {\n time: `T+${i}`,\n value: Number(value.toFixed(2)),\n };\n});\n\nconst chart = new Chart({\n container: 'container',\n width: 600,\n height: 600,\n});\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'time',\n y: 'value',\n color: 'value',\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'rdYlBu',\n },\n },\n coordinate: {\n type: 'helix',\n startAngle: 0,\n endAngle: Math.PI * 6, // 3 圈螺旋\n innerRadius: 0.1,\n outerRadius: 0.9,\n },\n style: {\n lineWidth: 0,\n },\n animate: {\n enter: {\n type: 'fadeIn',\n duration: 1500,\n },\n },\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "random", + "sin", + "Number", + "toFixed", + "Chart", + "options", + "render" + ], + "objectKeys": [ + "length", + "time", + "value", + "container", + "width", + "height", + "type", + "encode", + "x", + "y", + "color", + "scale", + "color", + "type", + "palette", + "coordinate", + "type", + "startAngle", + "endAngle", + "innerRadius", + "outerRadius", + "style", + "lineWidth", + "animate", + "enter", + "type", + "duration", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale", + "type.interval", + "animate" + ] + } + } + }, + { + "id": "case-40", + "query": "根据描述绘制图表,使用 G2 渲染一个韦恩图(Venn Diagram),展示不同用户群体(会员、高消费、高活跃)及其交集的用户数量,仅在交集区域显示标签(如\"核心用户\")及对应人数,使用自定义颜色范围并支持悬停激活状态。\n参考数据:\n[{\"sets\":[\"会员\"],\"size\":2400},{\"sets\":[\"高消费\"],\"size\":1800},{\"sets\":[\"高活跃\"],\"size\":1600},{\"sets\":[\"会员\",\"高消费\"],\"size\":900},{\"sets\":[\"会员\",\"高活跃\"],\"size\":1100},{\"sets\":[\"高消费\",\"高活跃\"],\"size\":500},{\"sets\":[\"会员\",\"高消费\",\"高活跃\"],\"size\":300,\"label\":\"核心用户\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['会员'], size: 2400 },\n { sets: ['高消费'], size: 1800 },\n { sets: ['高活跃'], size: 1600 },\n { sets: ['会员', '高消费'], size: 900 },\n { sets: ['会员', '高活跃'], size: 1100 },\n { sets: ['高消费', '高活跃'], size: 500 },\n { sets: ['会员', '高消费', '高活跃'], size: 300, label: '核心用户' }\n ],\n transform: [{ type: 'venn', padding: 20 }],\n },\n encode: { d: 'path', color: 'key' },\n labels: [{\n position: 'inside',\n text: (d) => d.label ? `${d.label}\\n${d.size}人` : '',\n style: { fontSize: 11, fill: '#333' }\n }],\n style: { fillOpacity: 0.6, stroke: 'white', lineWidth: 1.5 },\n scale: { color: { range: ['#ffec3d', '#73d13d', '#36cfc9'] } },\n tooltip: { items: [{ name: '用户数', field: 'size' }, { name: '集合', field: 'key' }] },\n state: { active: { lineWidth: 4 } },\n legend: false,\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['会员'], size: 2400 },\n { sets: ['高消费'], size: 1800 },\n { sets: ['高活跃'], size: 1600 },\n { sets: ['会员', '高消费'], size: 900 },\n { sets: ['会员', '高活跃'], size: 1100 },\n { sets: ['高消费', '高活跃'], size: 500 },\n { sets: ['会员', '高消费', '高活跃'], size: 300, label: '核心用户' }\n ],\n transform: [{ type: 'venn' }],\n },\n encode: {\n d: 'path',\n color: 'key',\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A', '#6DC8EC', '#9270CA', '#FF9D4D'],\n },\n },\n labels: [\n {\n position: 'inside',\n text: (d) => {\n if (d.sets.length > 1) {\n return d.label ? `${d.label}\\n${d.size}人` : `${d.size}人`;\n }\n return '';\n },\n style: {\n fill: '#fff',\n fontSize: 12,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n },\n ],\n style: {\n opacity: (d) => (d.sets.length > 1 ? 0.4 : 0.6),\n stroke: '#fff',\n lineWidth: 2,\n },\n state: {\n active: {\n opacity: 0.9,\n stroke: '#333',\n lineWidth: 3,\n },\n inactive: {\n opacity: 0.2,\n },\n },\n interaction: {\n elementHighlight: true,\n },\n});\n\nchart.render();", + "duration": 17068, + "retrievedSkillIds": [ + "g2-mark-venn", + "g2-interaction-brushy-highlight", + "g2-interaction-legend-highlight", + "g2-interaction-brushx-highlight", + "g2-interaction-tooltip" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1370, + "expectedLength": 1019, + "similarity": 0.9184628237259815, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['会员'], size: 2400 },\n { sets: ['高消费'], size: 1800 },\n { sets: ['高活跃'], size: 1600 },\n { sets: ['会员', '高消费'], size: 900 },\n { sets: ['会员', '高活跃'], size: 1100 },\n { sets: ['高消费', '高活跃'], size: 500 },\n { sets: ['会员', '高消费', '高活跃'], size: 300, label: '核心用户' }\n ],\n transform: [{ type: 'venn' }],\n },\n encode: {\n d: 'path',\n color: 'key',\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A', '#6DC8EC', '#9270CA', '#FF9D4D'],\n },\n },\n labels: [\n {\n position: 'inside',\n text: (d) => {\n if (d.sets.length > 1) {\n return d.label ? `${d.label}\\n${d.size}人` : `${d.size}人`;\n }\n return '';\n },\n style: {\n fill: '#fff',\n fontSize: 12,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n },\n ],\n style: {\n opacity: (d) => (d.sets.length > 1 ? 0.4 : 0.6),\n stroke: '#fff',\n lineWidth: 2,\n },\n state: {\n active: {\n opacity: 0.9,\n stroke: '#333',\n lineWidth: 3,\n },\n inactive: {\n opacity: 0.2,\n },\n },\n interaction: {\n elementHighlight: true,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "type", + "value", + "sets", + "size", + "sets", + "size", + "sets", + "size", + "sets", + "size", + "sets", + "size", + "sets", + "size", + "sets", + "size", + "label", + "transform", + "type", + "encode", + "d", + "color", + "scale", + "color", + "range", + "labels", + "position", + "text", + "style", + "fill", + "fontSize", + "fontWeight", + "textAlign", + "style", + "opacity", + "4", + "stroke", + "lineWidth", + "state", + "active", + "opacity", + "stroke", + "lineWidth", + "inactive", + "opacity", + "interaction", + "elementHighlight" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "interaction", + "x6.labels", + "x6.label" + ] + } + } + }, + { + "id": "case-41", + "query": "根据描述绘制图表,通过堆叠条形图展示不同营销活动的效率分级数据,同时用不同图形元素标记实际点击率和目标点击率,用于直观对比各活动表现与目标之间的差距。参考数据:[{\"campaign\":\"618大促\",\"ctr\":5.2,\"targetCtr\":6,\"maxCtr\":10,\"bands\":[4,3,3]},{\"campaign\":\"双11\",\"ctr\":7.8,\"targetCtr\":7,\"maxCtr\":10,\"bands\":[4,3,3]},{\"campaign\":\"春节场\",\"ctr\":3.9,\"targetCtr\":5.5,\"maxCtr\":10,\"bands\":[4,3,3]}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nconst data = [\n { campaign: '618大促', ctr: 5.2, targetCtr: 6.0, maxCtr: 10, bands: [4, 3, 3] },\n { campaign: '双11', ctr: 7.8, targetCtr: 7.0, maxCtr: 10, bands: [4, 3, 3] },\n { campaign: '春节场', ctr: 3.9, targetCtr: 5.5, maxCtr: 10, bands: [4, 3, 3] }\n];\n\nconst bandSeries = data.flatMap(d =>\n ['低效', '中性', '高效'].map((level, i) => ({ campaign: d.campaign, value: d.bands[i], level }))\n);\n\nchart.options({\n type: 'view',\n coordinate: { transform: [{ type: 'transpose' }] },\n children: [\n {\n type: 'interval',\n data: bandSeries,\n encode: { x: 'campaign', y: 'value', color: 'level' },\n transform: [{ type: 'stackY' }],\n scale: { color: { range: ['#f9f0ff', '#fff7e6', '#e6fffb'] } },\n style: { maxWidth: 25 }\n },\n {\n type: 'interval',\n data: data.map(d => ({ campaign: d.campaign, value: d.ctr, type: '实际CTR' })),\n encode: { x: 'campaign', y: 'value', color: '#1677ff' },\n style: { maxWidth: 16, radius: 2 },\n labels: [{ text: 'value', formatter: d => `${d}%`, position: 'inside', dx: 5 }]\n },\n {\n type: 'point',\n data: data.map(d => ({ campaign: d.campaign, value: d.targetCtr })),\n encode: { x: 'campaign', y: 'value', shape: 'cross', color: '#ff4d4f', size: 9 }\n }\n ],\n axis: {\n y: { title: '点击率 (%)', gridLineWidth: 1.2 },\n x: { title: '营销活动' }\n },\n interaction: [{ type: 'elementHighlight' }]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst rawData = [\n {\"campaign\":\"618大促\",\"ctr\":5.2,\"targetCtr\":6,\"maxCtr\":10,\"bands\":[4,3,3]},\n {\"campaign\":\"双11\",\"ctr\":7.8,\"targetCtr\":7,\"maxCtr\":10,\"bands\":[4,3,3]},\n {\"campaign\":\"春节场\",\"ctr\":3.9,\"targetCtr\":5.5,\"maxCtr\":10,\"bands\":[4,3,3]}\n];\n\n// 转换 bands 数据为堆叠格式\nconst bandData = [];\nconst bandLabels = ['低效', '中效', '高效'];\nconst bandColors = ['#ffcccc', '#ffe6b3', '#ccffcc'];\n\nrawData.forEach(item => {\n let current = 0;\n item.bands.forEach((band, index) => {\n bandData.push({\n campaign: item.campaign,\n level: bandLabels[index],\n value: band,\n start: current,\n end: current + band\n });\n current += band;\n });\n});\n\nchart.options({\n type: 'view',\n coordinate: { transform: [{ type: 'transpose' }] },\n children: [\n // 背景:效率分级堆叠条形\n {\n type: 'interval',\n data: bandData,\n encode: {\n x: 'campaign',\n y: 'value',\n color: 'level',\n },\n transform: [{ type: 'stackY' }],\n scale: {\n color: {\n domain: bandLabels,\n range: bandColors,\n },\n },\n style: {\n maxWidth: 40,\n },\n },\n // 实际点击率\n {\n type: 'interval',\n data: rawData,\n encode: {\n x: 'campaign',\n y: 'ctr',\n color: () => '#5B8FF9',\n },\n style: {\n maxWidth: 22,\n },\n labels: [{\n text: (d) => `${d.ctr}%`,\n position: 'outside',\n style: { fontWeight: 'bold' },\n }],\n },\n // 目标点击率标记\n {\n type: 'point',\n data: rawData,\n encode: {\n x: 'campaign',\n y: 'targetCtr',\n shape: 'line',\n color: () => '#d62728',\n size: 10,\n },\n style: {\n lineWidth: 3,\n },\n labels: [{\n text: (d) => `目标${d.targetCtr}%`,\n position: 'top',\n style: { fontSize: 11, fill: '#d62728' },\n }],\n },\n ],\n axis: {\n y: { \n title: '点击率 (%)',\n max: 10,\n },\n x: { \n title: '营销活动',\n },\n },\n legend: {\n color: { \n title: '效率分级',\n position: 'top',\n },\n },\n});\n\nchart.render();", + "duration": 30331, + "retrievedSkillIds": [ + "g2-concept-chart-selection", + "g2-mark-bullet", + "g2-mark-treemap", + "g2-mark-arc-donut", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2212, + "expectedLength": 1531, + "similarity": 0.6473743277998597, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst rawData = [\n {\"campaign\":\"618大促\",\"ctr\":5.2,\"targetCtr\":6,\"maxCtr\":10,\"bands\":[4,3,3]},\n {\"campaign\":\"双11\",\"ctr\":7.8,\"targetCtr\":7,\"maxCtr\":10,\"bands\":[4,3,3]},\n {\"campaign\":\"春节场\",\"ctr\":3.9,\"targetCtr\":5.5,\"maxCtr\":10,\"bands\":[4,3,3]}\n];\n\n// 转换 bands 数据为堆叠格式\nconst bandData = [];\nconst bandLabels = ['低效', '中效', '高效'];\nconst bandColors = ['#ffcccc', '#ffe6b3', '#ccffcc'];\n\nrawData.forEach(item => {\n let current = 0;\n item.bands.forEach((band, index) => {\n bandData.push({\n campaign: item.campaign,\n level: bandLabels[index],\n value: band,\n start: current,\n end: current + band\n });\n current += band;\n });\n});\n\nchart.options({\n type: 'view',\n coordinate: { transform: [{ type: 'transpose' }] },\n children: [\n // 背景:效率分级堆叠条形\n {\n type: 'interval',\n data: bandData,\n encode: {\n x: 'campaign',\n y: 'value',\n color: 'level',\n },\n transform: [{ type: 'stackY' }],\n scale: {\n color: {\n domain: bandLabels,\n range: bandColors,\n },\n },\n style: {\n maxWidth: 40,\n },\n },\n // 实际点击率\n {\n type: 'interval',\n data: rawData,\n encode: {\n x: 'campaign',\n y: 'ctr',\n color: () => '#5B8FF9',\n },\n style: {\n maxWidth: 22,\n },\n labels: [{\n text: (d) => `${d.ctr}%`,\n position: 'outside',\n style: { fontWeight: 'bold' },\n }],\n },\n // 目标点击率标记\n {\n type: 'point',\n data: rawData,\n encode: {\n x: 'campaign',\n y: 'targetCtr',\n shape: 'line',\n color: () => '#d62728',\n size: 10,\n },\n style: {\n lineWidth: 3,\n },\n labels: [{\n text: (d) => `目标${d.targetCtr}%`,\n position: 'top',\n style: { fontSize: 11, fill: '#d62728' },\n }],\n },\n ],\n axis: {\n y: { \n title: '点击率 (%)',\n max: 10,\n },\n x: { \n title: '营销活动',\n },\n },\n legend: {\n color: { \n title: '效率分级',\n position: 'top',\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "forEach", + "forEach", + "push", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "campaign", + "level", + "value", + "start", + "end", + "type", + "coordinate", + "transform", + "type", + "children", + "type", + "data", + "encode", + "x", + "y", + "color", + "transform", + "type", + "scale", + "color", + "domain", + "range", + "style", + "maxWidth", + "type", + "data", + "encode", + "x", + "y", + "color", + "style", + "maxWidth", + "labels", + "text", + "position", + "style", + "fontWeight", + "type", + "data", + "encode", + "x", + "y", + "shape", + "color", + "size", + "style", + "lineWidth", + "labels", + "text", + "position", + "style", + "fontSize", + "fill", + "axis", + "y", + "title", + "max", + "x", + "title", + "legend", + "color", + "title", + "position" + ], + "stringLiterals": [ + "campaign", + "ctr", + "targetCtr", + "maxCtr", + "bands", + "campaign", + "ctr", + "targetCtr", + "maxCtr", + "bands", + "campaign", + "ctr", + "targetCtr", + "maxCtr", + "bands" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "view.children", + "type.view", + "type.interval", + "type.point", + "x6.labels" + ] + } + } + }, + { + "id": "case-42", + "query": "根据描述绘制图表,使用韦恩图展示不同创作者类型之间的交集关系,包括独立创作者和多种类型组合的创作者,通过颜色区分不同组合,同时支持交互高亮和提示信息显示。参考数据:[{\"sets\":[\"视频创作者\"],\"size\":3200,\"label\":\"视频\"},{\"sets\":[\"图文创作者\"],\"size\":2800,\"label\":\"图文\"},{\"sets\":[\"直播创作者\"],\"size\":1500,\"label\":\"直播\"},{\"sets\":[\"视频创作者\",\"图文创作者\"],\"size\":900,\"label\":\"图文+视频\"},{\"sets\":[\"视频创作者\",\"直播创作者\"],\"size\":600,\"label\":\"视频+直播\"},{\"sets\":[\"图文创作者\",\"直播创作者\"],\"size\":400,\"label\":\"图文+直播\"},{\"sets\":[\"视频创作者\",\"图文创作者\",\"直播创作者\"],\"size\":200,\"label\":\"全栖创作者\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['视频创作者'], size: 3200, label: '视频' },\n { sets: ['图文创作者'], size: 2800, label: '图文' },\n { sets: ['直播创作者'], size: 1500, label: '直播' },\n { sets: ['视频创作者', '图文创作者'], size: 900, label: '图文+视频' },\n { sets: ['视频创作者', '直播创作者'], size: 600, label: '视频+直播' },\n { sets: ['图文创作者', '直播创作者'], size: 400, label: '图文+直播' },\n { sets: ['视频创作者', '图文创作者', '直播创作者'], size: 200, label: '全栖创作者' },\n ],\n transform: [\n { type: 'venn', padding: 16 },\n ],\n },\n encode: {\n d: 'path',\n color: (d) => {\n if (d.sets.length === 3) return '#faad14';\n if (d.sets.includes('直播创作者')) return '#ff4d4f';\n if (d.sets.includes('视频创作者')) return '#1890ff';\n return '#52c41a';\n },\n },\n labels: [{\n position: 'inside',\n text: (d) => d.label ? `${d.label}\\n${d.size}人` : '',\n style: { fontSize: 11, fontWeight: 600 },\n transform: [{ type: 'overlapDodgeY' }],\n }],\n style: {\n fillOpacity: 0.6,\n stroke: '#fff',\n lineWidth: 1.5,\n cursor: 'pointer',\n },\n axis: false,\n legend: {\n color: {\n position: 'right',\n layout: { justifyContent: 'start' },\n itemName: { formatter: (name) => name.replace('创作者', '') },\n },\n },\n tooltip: {\n items: [\n { name: '创作者类型', field: 'label', formatter: (val) => val || '混合组' },\n { name: '人数', field: 'size' },\n { name: '组合', field: 'sets', formatter: (sets) => sets.join(' + ') },\n ],\n },\n interaction: { elementHighlight: true },\n state: { inactive: { opacity: 0.2 }, active: { opacity: 0.8 } },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['视频创作者'], size: 3200, label: '视频' },\n { sets: ['图文创作者'], size: 2800, label: '图文' },\n { sets: ['直播创作者'], size: 1500, label: '直播' },\n { sets: ['视频创作者', '图文创作者'], size: 900, label: '图文+视频' },\n { sets: ['视频创作者', '直播创作者'], size: 600, label: '视频+直播' },\n { sets: ['图文创作者', '直播创作者'], size: 400, label: '图文+直播' },\n { sets: ['视频创作者', '图文创作者', '直播创作者'], size: 200, label: '全栖创作者' }\n ],\n transform: [{ type: 'venn' }]\n },\n encode: {\n d: 'path',\n color: 'key'\n },\n labels: [\n { \n position: 'inside', \n text: (d) => d.label || '',\n transform: [{ type: 'contrastReverse' }]\n }\n ],\n style: {\n opacity: (d) => (d.sets.length > 1 ? 0.4 : 0.7),\n lineWidth: 2,\n stroke: '#fff'\n },\n state: {\n active: { opacity: 0.9, lineWidth: 3 },\n inactive: { opacity: 0.2 }\n },\n interactions: [\n { type: 'elementHighlight' }\n ],\n tooltip: {\n items: [\n { field: 'size', name: '创作者数量' },\n { field: 'label', name: '类型组合' }\n ]\n }\n});\n\nchart.render();", + "duration": 15376, + "retrievedSkillIds": [ + "g2-mark-venn", + "g2-interaction-legend-highlight", + "g2-interaction-legend-filter", + "g2-comp-legend-category", + "g2-transform-groupx" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1221, + "expectedLength": 1748, + "similarity": 0.8953611632270169, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['视频创作者'], size: 3200, label: '视频' },\n { sets: ['图文创作者'], size: 2800, label: '图文' },\n { sets: ['直播创作者'], size: 1500, label: '直播' },\n { sets: ['视频创作者', '图文创作者'], size: 900, label: '图文+视频' },\n { sets: ['视频创作者', '直播创作者'], size: 600, label: '视频+直播' },\n { sets: ['图文创作者', '直播创作者'], size: 400, label: '图文+直播' },\n { sets: ['视频创作者', '图文创作者', '直播创作者'], size: 200, label: '全栖创作者' }\n ],\n transform: [{ type: 'venn' }]\n },\n encode: {\n d: 'path',\n color: 'key'\n },\n labels: [\n { \n position: 'inside', \n text: (d) => d.label || '',\n transform: [{ type: 'contrastReverse' }]\n }\n ],\n style: {\n opacity: (d) => (d.sets.length > 1 ? 0.4 : 0.7),\n lineWidth: 2,\n stroke: '#fff'\n },\n state: {\n active: { opacity: 0.9, lineWidth: 3 },\n inactive: { opacity: 0.2 }\n },\n interactions: [\n { type: 'elementHighlight' }\n ],\n tooltip: {\n items: [\n { field: 'size', name: '创作者数量' },\n { field: 'label', name: '类型组合' }\n ]\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "type", + "value", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "transform", + "type", + "encode", + "d", + "color", + "labels", + "position", + "text", + "transform", + "type", + "style", + "opacity", + "4", + "lineWidth", + "stroke", + "state", + "active", + "opacity", + "lineWidth", + "inactive", + "opacity", + "interactions", + "type", + "tooltip", + "items", + "field", + "name", + "field", + "name" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "x6.labels", + "x6.label" + ] + } + } + }, + { + "id": "case-43", + "query": "根据描述绘制图表,渲染一个仪表盘图表,显示指标值与目标值,支持点击交互以随机更新目标值并重新渲染图表。参考数据:\n{\"value\":{\"target\":120,\"total\":400,\"name\":\"metric\"}}", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nlet targetValue = 120;\n\nchart.options({\n type: 'gauge',\n data: {\n value: {\n target: targetValue,\n total: 400,\n name: 'metric',\n },\n },\n style: {\n textContent: (target, total) => `指标值: ${target}\\n点击更新`,\n },\n legend: false});\n\nchart.on('element:click', () => {\n targetValue = Math.floor(Math.random() * 400);\n chart.changeData({\n value: {\n target: targetValue,\n total: 400,\n name: 'metric',\n },\n });\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nlet gaugeData = {\n target: 120,\n total: 400,\n name: 'metric'\n};\n\nchart.options({\n type: 'gauge',\n data: {\n value: gaugeData\n },\n legend: false,\n style: {\n textContent: (target, total) => `${target}\\n${gaugeData.name}`,\n textFontSize: 20,\n textFill: '#262626',\n }\n});\n\nchart.render();\n\nchart.on('click', () => {\n const newTarget = Math.floor(Math.random() * (gaugeData.total + 1));\n gaugeData = { ...gaugeData, target: newTarget };\n chart.changeData({ value: gaugeData });\n});", + "duration": 17237, + "retrievedSkillIds": [ + "g2-mark-bullet", + "g2-interaction-element-point-move", + "g2-mark-gauge", + "g2-mark-linex-liney", + "g2-interaction-brushx-filter" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 623, + "expectedLength": 581, + "similarity": 0.8588299319727892, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nlet gaugeData = {\n target: 120,\n total: 400,\n name: 'metric'\n};\n\nchart.options({\n type: 'gauge',\n data: {\n value: gaugeData\n },\n legend: false,\n style: {\n textContent: (target, total) => `${target}\\n${gaugeData.name}`,\n textFontSize: 20,\n textFill: '#262626',\n }\n});\n\nchart.render();\n\nchart.on('click', () => {\n const newTarget = Math.floor(Math.random() * (gaugeData.total + 1));\n gaugeData = { ...gaugeData, target: newTarget };\n chart.changeData({ value: gaugeData });\n});", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render", + "on", + "floor", + "random", + "changeData" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "target", + "total", + "name", + "type", + "data", + "value", + "legend", + "style", + "textContent", + "textFontSize", + "textFill", + "target", + "value" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "x6.target" + ] + } + } + }, + { + "id": "case-44", + "query": "根据描述绘制图表,使用 G2 创建一个折线图与面积图组合的可视化图表,展示 1991 至 1999 年每年的数值变化趋势,其中面积图半透明叠加,折线图覆盖其上,并配置了 y 轴标签格式化和数据标签对齐逻辑。参考数据:\n[{\"year\":\"1991\",\"value\":15468},{\"year\":\"1992\",\"value\":16100},{\"year\":\"1993\",\"value\":15900},{\"year\":\"1994\",\"value\":17409},{\"year\":\"1995\",\"value\":17000},{\"year\":\"1996\",\"value\":31056},{\"year\":\"1997\",\"value\":31982},{\"year\":\"1998\",\"value\":32040},{\"year\":\"1999\",\"value\":33233}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"data\": [\n {\n \"year\": \"1991\",\n \"value\": 15468\n },\n {\n \"year\": \"1992\",\n \"value\": 16100\n },\n {\n \"year\": \"1993\",\n \"value\": 15900\n },\n {\n \"year\": \"1994\",\n \"value\": 17409\n },\n {\n \"year\": \"1995\",\n \"value\": 17000\n },\n {\n \"year\": \"1996\",\n \"value\": 31056\n },\n {\n \"year\": \"1997\",\n \"value\": 31982\n },\n {\n \"year\": \"1998\",\n \"value\": 32040\n },\n {\n \"year\": \"1999\",\n \"value\": 33233\n }\n ],\n \"type\": \"view\",\n \"children\": [\n {\n \"encode\": {\n \"x\": \"year\",\n \"y\": \"value\",\n \"shape\": \"hvh\"\n },\n \"labels\": [\n {\n \"text\": \"value\",\n \"fontSize\": 10,\n \"textAlign\": (_, idx, arr) => {\n if (idx === 0) return 'left';\n if (idx === arr.length - 1) return 'right';\n return 'center';\n }\n }\n ],\n \"style\": {\n \"opacity\": 0.4\n },\n \"axis\": {\n \"y\": {\n \"labelFormatter\": \"~s\"\n }\n },\n \"type\": \"area\"\n },\n {\n \"encode\": {\n \"x\": \"year\",\n \"y\": \"value\",\n \"shape\": \"hvh\"\n },\n \"type\": \"line\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"year\":\"1991\",\"value\":15468},\n {\"year\":\"1992\",\"value\":16100},\n {\"year\":\"1993\",\"value\":15900},\n {\"year\":\"1994\",\"value\":17409},\n {\"year\":\"1995\",\"value\":17000},\n {\"year\":\"1996\",\"value\":31056},\n {\"year\":\"1997\",\"value\":31982},\n {\"year\":\"1998\",\"value\":32040},\n {\"year\":\"1999\",\"value\":33233}\n];\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'area',\n encode: { x: 'year', y: 'value' },\n style: { fillOpacity: 0.3, fill: '#5B8FF9' },\n },\n {\n type: 'line',\n encode: { x: 'year', y: 'value' },\n style: { stroke: '#5B8FF9', lineWidth: 2 },\n labels: [\n {\n text: 'value',\n style: { fontSize: 12, fill: '#333' },\n transform: [{ type: 'overlapDodgeY' }],\n },\n ],\n },\n ],\n axis: {\n y: {\n labelFormatter: (v) => v.toLocaleString(),\n },\n },\n});\n\nchart.render();", + "duration": 10216, + "retrievedSkillIds": [ + "g2-mark-line-basic", + "g2-mark-area-basic", + "g2-comp-space-layer", + "g2-mark-area-stacked", + "g2-mark-line-multi" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1015, + "expectedLength": 1344, + "similarity": 0.56502765064836, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"year\":\"1991\",\"value\":15468},\n {\"year\":\"1992\",\"value\":16100},\n {\"year\":\"1993\",\"value\":15900},\n {\"year\":\"1994\",\"value\":17409},\n {\"year\":\"1995\",\"value\":17000},\n {\"year\":\"1996\",\"value\":31056},\n {\"year\":\"1997\",\"value\":31982},\n {\"year\":\"1998\",\"value\":32040},\n {\"year\":\"1999\",\"value\":33233}\n];\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'area',\n encode: { x: 'year', y: 'value' },\n style: { fillOpacity: 0.3, fill: '#5B8FF9' },\n },\n {\n type: 'line',\n encode: { x: 'year', y: 'value' },\n style: { stroke: '#5B8FF9', lineWidth: 2 },\n labels: [\n {\n text: 'value',\n style: { fontSize: 12, fill: '#333' },\n transform: [{ type: 'overlapDodgeY' }],\n },\n ],\n },\n ],\n axis: {\n y: {\n labelFormatter: (v) => v.toLocaleString(),\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toLocaleString", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "children", + "type", + "encode", + "x", + "y", + "style", + "fillOpacity", + "fill", + "type", + "encode", + "x", + "y", + "style", + "stroke", + "lineWidth", + "labels", + "text", + "style", + "fontSize", + "fill", + "transform", + "type", + "axis", + "y", + "labelFormatter" + ], + "stringLiterals": [ + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "view.children", + "type.view", + "type.line", + "x6.labels" + ] + } + } + }, + { + "id": "case-45", + "query": "根据描述绘制图表,使用随机生成的数据绘制一个极坐标系下的柱状图,通过对数据进行分箱统计来展示数值分布情况,并设置了特定的样式与坐标轴位置。参考数据:[{\"value\":22.457308477710008},{\"value\":64.78175833871008},{\"value\":18.505077813759744},{\"value\":51.08172740315273},{\"value\":76.69254924170673},{\"value\":1.923108147457242},{\"value\":43.72816565912217},{\"value\":37.989355279132724},{\"value\":12.370073441881686},{\"value\":70.62726963311434}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst data = Array.from({ length: 100 }, (_, i) => ({\n value: Math.random() * 80 + (i % 3) * 10\n}));\n\nconst chart = new Chart({ container: 'container', autoFit: true });\nchart.options({\n type: 'rect',\n data: data,\n encode: { x: 'value' },\n transform: [{ type: 'binX', y: 'count', thresholds: 12 }],\n coordinate: { type: 'polar' },\n axis: {\n y: { position: 'right',zIndex:1, labelStroke:'#fff', title:false }\n },\n style: { fill: '#FF9C3A', fillOpacity: 0.8, radius: 4,inset:1 },\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 480,\n});\n\nconst data = [\n { value: 22.457308477710008 },\n { value: 64.78175833871008 },\n { value: 18.505077813759744 },\n { value: 51.08172740315273 },\n { value: 76.69254924170673 },\n { value: 1.923108147457242 },\n { value: 43.72816565912217 },\n { value: 37.989355279132724 },\n { value: 12.370073441881686 },\n { value: 70.62726963311434 }\n];\n\nchart.options({\n type: 'interval',\n data: data,\n coordinate: { type: 'polar', innerRadius: 0.1 },\n encode: {\n x: 'value',\n y: 'count',\n color: 'count',\n },\n transform: [\n { type: 'binX', y: 'count', thresholds: 5 },\n ],\n scale: {\n color: { palette: 'blues' },\n },\n style: {\n fillOpacity: 0.85,\n stroke: '#fff',\n lineWidth: 1,\n },\n axis: {\n x: { position: 'bottom', title: '数值区间' },\n y: { position: 'left', title: '频数' },\n },\n legend: {\n color: { position: 'right', title: '频数' },\n },\n});\n\nchart.render();", + "duration": 15171, + "retrievedSkillIds": [ + "g2-mark-histogram", + "g2-mark-interval-basic", + "g2-transform-binx", + "g2-mark-rose", + "g2-mark-distribution-curve" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1018, + "expectedLength": 545, + "similarity": 0.6505413722361523, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 480,\n});\n\nconst data = [\n { value: 22.457308477710008 },\n { value: 64.78175833871008 },\n { value: 18.505077813759744 },\n { value: 51.08172740315273 },\n { value: 76.69254924170673 },\n { value: 1.923108147457242 },\n { value: 43.72816565912217 },\n { value: 37.989355279132724 },\n { value: 12.370073441881686 },\n { value: 70.62726963311434 }\n];\n\nchart.options({\n type: 'interval',\n data: data,\n coordinate: { type: 'polar', innerRadius: 0.1 },\n encode: {\n x: 'value',\n y: 'count',\n color: 'count',\n },\n transform: [\n { type: 'binX', y: 'count', thresholds: 5 },\n ],\n scale: {\n color: { palette: 'blues' },\n },\n style: {\n fillOpacity: 0.85,\n stroke: '#fff',\n lineWidth: 1,\n },\n axis: {\n x: { position: 'bottom', title: '数值区间' },\n y: { position: 'left', title: '频数' },\n },\n legend: {\n color: { position: 'right', title: '频数' },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "type", + "data", + "coordinate", + "type", + "innerRadius", + "encode", + "x", + "y", + "color", + "transform", + "type", + "y", + "thresholds", + "scale", + "color", + "palette", + "style", + "fillOpacity", + "stroke", + "lineWidth", + "axis", + "x", + "position", + "title", + "y", + "position", + "title", + "legend", + "color", + "position", + "title" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.interval" + ] + } + } + }, + { + "id": "case-46", + "query": "根据描述绘制图表,使用 G2 绘制一个包含三条数据系列的组合图表,展示每月的蒸发量、降水量和温度变化情况。其中温度使用平滑折线图表示,蒸发量用柱状图表示,降水量用虚线折线图表示,并为不同指标设置了独立的 Y 轴。参考数据:[{\"Month\":\"Jan\",\"Evaporation\":2,\"Precipitation\":2.6,\"Temperature\":2},{\"Month\":\"Feb\",\"Evaporation\":4.9,\"Precipitation\":5.9,\"Temperature\":2.2},{\"Month\":\"Mar\",\"Evaporation\":7,\"Precipitation\":9,\"Temperature\":3.3},{\"Month\":\"Apr\",\"Evaporation\":23.2,\"Precipitation\":26.4,\"Temperature\":4.5},{\"Month\":\"May\",\"Evaporation\":25.6,\"Precipitation\":28.7,\"Temperature\":6.3},{\"Month\":\"Jun\",\"Evaporation\":76.7,\"Precipitation\":70.7,\"Temperature\":10.2},{\"Month\":\"Jul\",\"Evaporation\":135.6,\"Precipitation\":175.6,\"Temperature\":20.3},{\"Month\":\"Aug\",\"Evaporation\":162.2,\"Precipitation\":182.2,\"Temperature\":23.4},{\"Month\":\"Sep\",\"Evaporation\":32.6,\"Precipitation\":48.7,\"Temperature\":23},{\"Month\":\"Oct\",\"Evaporation\":20,\"Precipitation\":18.8,\"Temperature\":16.5}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"data\": [\n {\n \"Month\": \"Jan\",\n \"Evaporation\": 2,\n \"Precipitation\": 2.6,\n \"Temperature\": 2\n },\n {\n \"Month\": \"Feb\",\n \"Evaporation\": 4.9,\n \"Precipitation\": 5.9,\n \"Temperature\": 2.2\n },\n {\n \"Month\": \"Mar\",\n \"Evaporation\": 7,\n \"Precipitation\": 9,\n \"Temperature\": 3.3\n },\n {\n \"Month\": \"Apr\",\n \"Evaporation\": 23.2,\n \"Precipitation\": 26.4,\n \"Temperature\": 4.5\n },\n {\n \"Month\": \"May\",\n \"Evaporation\": 25.6,\n \"Precipitation\": 28.7,\n \"Temperature\": 6.3\n },\n {\n \"Month\": \"Jun\",\n \"Evaporation\": 76.7,\n \"Precipitation\": 70.7,\n \"Temperature\": 10.2\n },\n {\n \"Month\": \"Jul\",\n \"Evaporation\": 135.6,\n \"Precipitation\": 175.6,\n \"Temperature\": 20.3\n },\n {\n \"Month\": \"Aug\",\n \"Evaporation\": 162.2,\n \"Precipitation\": 182.2,\n \"Temperature\": 23.4\n },\n {\n \"Month\": \"Sep\",\n \"Evaporation\": 32.6,\n \"Precipitation\": 48.7,\n \"Temperature\": 23\n },\n {\n \"Month\": \"Oct\",\n \"Evaporation\": 20,\n \"Precipitation\": 18.8,\n \"Temperature\": 16.5\n },\n {\n \"Month\": \"Nov\",\n \"Evaporation\": 6.4,\n \"Precipitation\": 6,\n \"Temperature\": 12\n },\n {\n \"Month\": \"Dec\",\n \"Evaporation\": 3.3,\n \"Precipitation\": 2.3,\n \"Temperature\": 6.2\n }\n ],\n \"type\": \"view\",\n \"children\": [\n {\n \"encode\": {\n \"x\": \"Month\",\n \"y\": \"Temperature\",\n \"color\": \"#EE6666\",\n \"shape\": \"smooth\"\n },\n \"scale\": {\n \"y\": {\n \"independent\": true,\n \"groupTransform\": function syncTicksOfDomainsFromZero(scales) {\n scales.forEach((scale) => scale.update({ nice: true }));\n const normalize = (d) => d / Math.pow(10, Math.ceil(Math.log(d) / Math.LN10));\n const maxes = scales.map((scale) => scale.getOptions().domain[1]);\n const normalized = maxes.map(normalize);\n const normalizedMax = Math.max(...normalized);\n for (let i = 0; i < scales.length; i++) {\n const scale = scales[i];\n const domain = scale.getOptions().domain;\n const t = maxes[i] / normalized[i];\n const newDomainMax = normalizedMax * t;\n scale.update({ domain: [domain[0], newDomainMax] });\n }\n}\n }\n },\n \"axis\": {\n \"y\": {\n \"title\": \"Temperature (°C)\",\n \"grid\": null,\n \"titleFill\": \"#EE6666\"\n }\n },\n \"type\": \"line\"\n },\n {\n \"encode\": {\n \"x\": \"Month\",\n \"y\": \"Evaporation\",\n \"color\": \"#5470C6\"\n },\n \"scale\": {\n \"y\": {\n \"independent\": true\n }\n },\n \"style\": {\n \"fillOpacity\": 0.8\n },\n \"axis\": {\n \"y\": {\n \"position\": \"right\",\n \"title\": \"Evaporation (ml)\",\n \"titleFill\": \"#5470C6\"\n }\n },\n \"type\": \"interval\"\n },\n {\n \"encode\": {\n \"x\": \"Month\",\n \"y\": \"Precipitation\",\n \"color\": \"#91CC75\"\n },\n \"scale\": {\n \"y\": {\n \"independent\": true\n }\n },\n \"style\": {\n \"lineWidth\": 2,\n \"lineDash\": [\n 2,\n 2\n ]\n },\n \"axis\": {\n \"y\": {\n \"position\": \"right\",\n \"title\": \"Precipitation (ml)\",\n \"grid\": null,\n \"titleFill\": \"#91CC75\"\n }\n },\n \"type\": \"line\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "", + "duration": 41575, + "retrievedSkillIds": [ + "g2-mark-line-basic", + "g2-mark-line-multi", + "g2-mark-area-basic", + "g2-scale-linear", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": true, + "issues": [ + "缺少 import/require 语句", + "缺少 Chart/Graph 实例化", + "缺少 render() 调用" + ], + "warnings": [], + "codeLength": 0, + "expectedLength": 3543, + "similarity": 0, + "extractedCode": "", + "structuralFeatures": { + "imports": [], + "functionCalls": [], + "objectKeys": [], + "stringLiterals": [], + "apiPatterns": [] + } + } + }, + { + "id": "case-47", + "query": "根据描述绘制图表,使用 G2 创建一个柱状图,展示不同商品类别的销售额数据,x轴为类别,y轴为销售额并应用SI单位格式化,颜色按类别区分。参考数据:\n[{\"category\":\"电子产品\",\"sales\":8500000},{\"category\":\"服装鞋帽\",\"sales\":12300000},{\"category\":\"家居用品\",\"sales\":6800000},{\"category\":\"美妆护肤\",\"sales\":15600000},{\"category\":\"食品饮料\",\"sales\":9200000}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'interval',\n width: 600,\n height: 400,\n data: [\n { category: '电子产品', sales: 8500000 },\n { category: '服装鞋帽', sales: 12300000 },\n { category: '家居用品', sales: 6800000 },\n { category: '美妆护肤', sales: 15600000 },\n { category: '食品饮料', sales: 9200000 },\n ],\n encode: { x: 'category', y: 'sales', color: 'category' },\n axis: {\n x: {\n title: '商品类别',\n labelFontSize: 12,\n },\n y: {\n title: '销售额',\n // 使用 d3-format:SI前缀格式,自动K/M单位\n labelFormatter: '~s', // 8.5M, 12.3M, 6.8M, 15.6M, 9.2M\n grid: true,\n gridStroke: '#e8e8e8',\n tickCount: 5,\n },\n },\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { category: '电子产品', sales: 8500000 },\n { category: '服装鞋帽', sales: 12300000 },\n { category: '家居用品', sales: 6800000 },\n { category: '美妆护肤', sales: 15600000 },\n { category: '食品饮料', sales: 9200000 },\n ],\n encode: {\n x: 'category',\n y: 'sales',\n color: 'category',\n },\n transform: [\n { type: 'sortX', by: 'y', reverse: true }\n ],\n scale: {\n y: {\n formatter: (v) => {\n if (v >= 1000000) {\n return (v / 1000000).toFixed(1) + 'M';\n } else if (v >= 1000) {\n return (v / 1000).toFixed(1) + 'K';\n }\n return v;\n },\n },\n },\n axis: {\n y: {\n title: '销售额',\n },\n x: {\n title: '商品类别',\n },\n },\n labels: [\n {\n text: (d) => {\n const v = d.sales;\n if (v >= 1000000) {\n return (v / 1000000).toFixed(1) + 'M';\n } else if (v >= 1000) {\n return (v / 1000).toFixed(1) + 'K';\n }\n return v;\n },\n position: 'outside',\n },\n ],\n});\n\nchart.render();", + "duration": 12114, + "retrievedSkillIds": [ + "g2-mark-interval-basic", + "g2-mark-interval-grouped", + "g2-mark-arc-pie", + "g2-concept-chart-selection", + "g2-mark-partition" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1183, + "expectedLength": 742, + "similarity": 0.7674766985528576, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { category: '电子产品', sales: 8500000 },\n { category: '服装鞋帽', sales: 12300000 },\n { category: '家居用品', sales: 6800000 },\n { category: '美妆护肤', sales: 15600000 },\n { category: '食品饮料', sales: 9200000 },\n ],\n encode: {\n x: 'category',\n y: 'sales',\n color: 'category',\n },\n transform: [\n { type: 'sortX', by: 'y', reverse: true }\n ],\n scale: {\n y: {\n formatter: (v) => {\n if (v >= 1000000) {\n return (v / 1000000).toFixed(1) + 'M';\n } else if (v >= 1000) {\n return (v / 1000).toFixed(1) + 'K';\n }\n return v;\n },\n },\n },\n axis: {\n y: {\n title: '销售额',\n },\n x: {\n title: '商品类别',\n },\n },\n labels: [\n {\n text: (d) => {\n const v = d.sales;\n if (v >= 1000000) {\n return (v / 1000000).toFixed(1) + 'M';\n } else if (v >= 1000) {\n return (v / 1000).toFixed(1) + 'K';\n }\n return v;\n },\n position: 'outside',\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "toFixed", + "toFixed", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "category", + "sales", + "category", + "sales", + "category", + "sales", + "category", + "sales", + "category", + "sales", + "encode", + "x", + "y", + "color", + "transform", + "type", + "by", + "reverse", + "scale", + "y", + "formatter", + "axis", + "y", + "title", + "x", + "title", + "labels", + "text", + "position" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-48", + "query": "根据描述绘制图表,通过生成 200 条模拟数据,使用螺旋坐标系渲染一个螺旋柱状图,展示随时间变化的数值波动情况,并根据数值大小映射颜色深浅,体现数据的趋势和分布。参考数据:[{\"time\":0,\"value\":44.19354034086682},{\"time\":1,\"value\":46.51574701427296},{\"time\":2,\"value\":48.27325581498602},{\"time\":3,\"value\":49.37851063220634},{\"time\":4,\"value\":49.78167019835232},{\"time\":5,\"value\":49.45904254321634},{\"time\":6,\"value\":48.41706473802131},{\"time\":7,\"value\":46.69270708438641},{\"time\":8,\"value\":44.35296376282869},{\"time\":9,\"value\":41.49345687875577}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from \"@antv/g2\";\n\nconst chart = new Chart({ container: \"container\", autoFit: true, height: 500 });\n\nconst data = [];\nfor (let i = 0; i < 200; i++) {\n const value = 40 + 20 * Math.cos(i / 12) + Math.random() * 10;\n data.push({ time: i, value });\n}\n\nchart.options({\n type: \"interval\",\n data: data,\n coordinate: {\n type: \"helix\",\n startAngle: 0,\n endAngle: 6 * Math.PI,\n },\n encode: { x: \"time\", y: \"value\", color: \"value\" },\n scale: {\n color: { type: \"linear\", range: [\"yellow\",\"#a29bfe\", \"#6c5ce7\"] }\n },\n style: {\n fillOpacity: 0.85,\n borderRadius: 2\n },\n tooltip: { title: \"time\" },\n title: \"空气质量指数螺旋柱状图\"\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 600,\n});\n\n// 生成200条模拟数据,模拟随时间波动的数值\nconst data = Array.from({ length: 200 }, (_, i) => ({\n time: i,\n value: 45 + 5 * Math.sin(i / 20) + (Math.random() - 0.5) * 4\n}));\n\nchart.options({\n type: 'interval',\n data: {\n value: data,\n },\n encode: {\n x: 'time',\n y: 'value',\n color: 'value',\n },\n scale: {\n color: {\n type: 'linear',\n range: ['#e6f7ff', '#1890ff', '#0050b3'],\n },\n },\n coordinate: {\n type: 'helix',\n startAngle: Math.PI / 2,\n endAngle: Math.PI / 2 + 6 * Math.PI,\n innerRadius: 0.1,\n },\n style: {\n lineWidth: 0,\n },\n tooltip: {\n title: 'time',\n items: [{ field: 'value', name: '数值' }],\n },\n});\n\nchart.render();", + "duration": 10556, + "retrievedSkillIds": [ + "g2-mark-helix", + "g2-mark-interval-basic", + "g2-coord-helix", + "g2-mark-bullet", + "g2-scale-time" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 793, + "expectedLength": 674, + "similarity": 0.7014154802814596, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 600,\n});\n\n// 生成200条模拟数据,模拟随时间波动的数值\nconst data = Array.from({ length: 200 }, (_, i) => ({\n time: i,\n value: 45 + 5 * Math.sin(i / 20) + (Math.random() - 0.5) * 4\n}));\n\nchart.options({\n type: 'interval',\n data: {\n value: data,\n },\n encode: {\n x: 'time',\n y: 'value',\n color: 'value',\n },\n scale: {\n color: {\n type: 'linear',\n range: ['#e6f7ff', '#1890ff', '#0050b3'],\n },\n },\n coordinate: {\n type: 'helix',\n startAngle: Math.PI / 2,\n endAngle: Math.PI / 2 + 6 * Math.PI,\n innerRadius: 0.1,\n },\n style: {\n lineWidth: 0,\n },\n tooltip: {\n title: 'time',\n items: [{ field: 'value', name: '数值' }],\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "sin", + "random", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "length", + "time", + "value", + "type", + "data", + "value", + "encode", + "x", + "y", + "color", + "scale", + "color", + "type", + "range", + "coordinate", + "type", + "startAngle", + "endAngle", + "innerRadius", + "style", + "lineWidth", + "tooltip", + "title", + "items", + "field", + "name" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale", + "type.interval" + ] + } + } + }, + { + "id": "case-49", + "query": "根据描述绘制图表,使用 G2 创建一个环形图,展示资产类别的占比分布,通过百分比堆叠和颜色区分资产类型,用于可视化投资组合或资产配置的比例。\n参考数据:\n[{\"asset\":\"股票\",\"value\":40},{\"asset\":\"债券\",\"value\":30},{\"asset\":\"现金\",\"value\":15},{\"asset\":\"房产\",\"value\":10},{\"asset\":\"另类\",\"value\":5}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({ container: 'container', theme: 'classic' });\nchart.options({\n type: 'interval',\n autoFit: true,\n data: [\n { asset: '股票', value: 40 },\n { asset: '债券', value: 30 },\n { asset: '现金', value: 15 },\n { asset: '房产', value: 10 },\n { asset: '另类', value: 5 }\n ],\n encode: { y: 'value', color: 'asset' },\n transform: [ { type: 'stackY' } ],\n coordinate: { type: 'theta' },\nstyle: { radius: 4 }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 480,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { asset: '股票', value: 40 },\n { asset: '债券', value: 30 },\n { asset: '现金', value: 15 },\n { asset: '房产', value: 10 },\n { asset: '另类', value: 5 },\n ],\n encode: {\n y: 'value',\n color: 'asset',\n },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n outerRadius: 0.8,\n innerRadius: 0.6,\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#FF9845', '#945FB9'],\n },\n },\n labels: [\n {\n text: (d) => `${d.asset}\\n${d.value}%`,\n position: 'outside',\n connector: true,\n style: {\n fontSize: 12,\n fill: '#333',\n },\n },\n ],\n legend: {\n color: {\n position: 'bottom',\n layout: { justifyContent: 'center' },\n },\n },\n tooltip: {\n items: [\n { field: 'asset', name: '资产类别' },\n { field: 'value', name: '占比(%)' },\n ],\n },\n});\n\nchart.render();", + "duration": 22826, + "retrievedSkillIds": [ + "g2-mark-arc-donut", + "g2-palette-category10", + "g2-comp-view", + "g2-concept-chart-selection", + "g2-mark-arc-pie" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1049, + "expectedLength": 449, + "similarity": 0.6624049104940825, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 480,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { asset: '股票', value: 40 },\n { asset: '债券', value: 30 },\n { asset: '现金', value: 15 },\n { asset: '房产', value: 10 },\n { asset: '另类', value: 5 },\n ],\n encode: {\n y: 'value',\n color: 'asset',\n },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n outerRadius: 0.8,\n innerRadius: 0.6,\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#FF9845', '#945FB9'],\n },\n },\n labels: [\n {\n text: (d) => `${d.asset}\\n${d.value}%`,\n position: 'outside',\n connector: true,\n style: {\n fontSize: 12,\n fill: '#333',\n },\n },\n ],\n legend: {\n color: {\n position: 'bottom',\n layout: { justifyContent: 'center' },\n },\n },\n tooltip: {\n items: [\n { field: 'asset', name: '资产类别' },\n { field: 'value', name: '占比(%)' },\n ],\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "asset", + "value", + "asset", + "value", + "asset", + "value", + "asset", + "value", + "asset", + "value", + "encode", + "y", + "color", + "transform", + "type", + "coordinate", + "type", + "outerRadius", + "innerRadius", + "scale", + "color", + "range", + "labels", + "text", + "position", + "connector", + "style", + "fontSize", + "fill", + "legend", + "color", + "position", + "layout", + "justifyContent", + "tooltip", + "items", + "field", + "name", + "field", + "name" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-50", + "query": "根据描述绘制图表,使用 G2 创建一个仪表盘(gauge)图表,用于展示月销售额目标达成进度,渲染一个环形仪表盘显示当前目标值相对于总量的百分比,并配置阈值分段和颜色映射,包含自定义文本显示销售名称和进度百分比。\n参考数据:\n[{\"value\":{\"target\":320,\"total\":1000,\"name\":\"销售额\",\"thresholds\":[300,600,900]}}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'gauge',\n data: {\n value: {\n target: 320,\n total: 1000,\n name: '销售额',\n thresholds: [300, 600, 900, 1000],\n }\n },\n scale: {\n color: {\n range: ['#d9d9d9', '#ffec3d', '#73d13d', '#1890ff'],\n },\n },\n style: {\n arcShape: 'round',\n arcLineWidth: 24,\n startAngle: Math.PI,\n endAngle: 2 * Math.PI,\n textContent: (t, total) => `月销售额: ${t}\n进度: ${((t/total)*100).toFixed(1)}%`,\n titleColor: '#1890ff',\n },\n legend: false,\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 400,\n height: 400,\n});\n\nconst gaugeData = {\n target: 320,\n total: 1000,\n name: '销售额',\n thresholds: [300, 600, 900],\n};\n\nchart.options({\n type: 'gauge',\n data: {\n value: gaugeData,\n },\n scale: {\n color: {\n range: ['#F4664A', '#FAAD14', '#30BF78'],\n },\n },\n style: {\n textContent: (target, total) => {\n const percent = ((target / total) * 100).toFixed(0);\n return `${gaugeData.name}\\n${percent}%`;\n },\n textFontSize: 24,\n textFill: '#262626',\n textFontWeight: 'bold',\n },\n legend: false,\n});\n\nchart.render();", + "duration": 9004, + "retrievedSkillIds": [ + "g2-mark-gauge", + "g2-mark-bullet", + "g2-mark-arc-donut", + "g2-mark-interval-basic", + "g2-mark-liquid" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 654, + "expectedLength": 626, + "similarity": 0.7646678545225867, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 400,\n height: 400,\n});\n\nconst gaugeData = {\n target: 320,\n total: 1000,\n name: '销售额',\n thresholds: [300, 600, 900],\n};\n\nchart.options({\n type: 'gauge',\n data: {\n value: gaugeData,\n },\n scale: {\n color: {\n range: ['#F4664A', '#FAAD14', '#30BF78'],\n },\n },\n style: {\n textContent: (target, total) => {\n const percent = ((target / total) * 100).toFixed(0);\n return `${gaugeData.name}\\n${percent}%`;\n },\n textFontSize: 24,\n textFill: '#262626',\n textFontWeight: 'bold',\n },\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "target", + "total", + "name", + "thresholds", + "type", + "data", + "value", + "scale", + "color", + "range", + "style", + "textContent", + "textFontSize", + "textFill", + "textFontWeight", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "scale", + "x6.target" + ] + } + } + }, + { + "id": "case-51", + "query": "根据描述绘制图表,使用树形数据结构展示图书馆各类别书籍的数量分布,通过圆形 packing 布局进行可视化,颜色深浅表示节点的层级深度,仅对足够大的圆形添加文字标注。参考数据:[{\"name\":\"图书馆\",\"children\":[{\"name\":\"文学\",\"value\":50000,\"children\":[{\"name\":\"小说\",\"value\":30000},{\"name\":\"诗歌\",\"value\":8000},{\"name\":\"散文\",\"value\":12000}]},{\"name\":\"科技\",\"value\":40000,\"children\":[{\"name\":\"计算机\",\"value\":25000},{\"name\":\"工程\",\"value\":15000}]},{\"name\":\"艺术\",\"value\":20000},{\"name\":\"历史\",\"value\":30000}]}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({ container: 'container', autoFit: true });\nconst bookData = {\n name: '图书馆',\n children: [\n { name: '文学', value: 50000, children: [{ name: '小说', value: 30000 }, { name: '诗歌', value: 8000 }, { name: '散文', value: 12000 }] },\n { name: '科技', value: 40000, children: [{ name: '计算机', value: 25000 }, { name: '工程', value: 15000 }] },\n { name: '艺术', value: 20000 },\n { name: '历史', value: 30000 }\n ]\n};\nchart.options({\n type: 'pack',\n data: { value: bookData },\n encode: { value: 'value', color: 'depth' },\n scale: { color: { range: ['#f7f7f7', '#cccccc', '#666666', '#222222'] } },\n style: {\n labelText: d => d.r > 18 ? d.data.name : '',\n labelFontSize: 12,\n fillOpacity: 1,\n stroke: 'white',\n lineWidth: 1\n },\nlegend: false\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '图书馆',\n children: [\n {\n name: '文学',\n value: 50000,\n children: [\n { name: '小说', value: 30000 },\n { name: '诗歌', value: 8000 },\n { name: '散文', value: 12000 }\n ]\n },\n {\n name: '科技',\n value: 40000,\n children: [\n { name: '计算机', value: 25000 },\n { name: '工程', value: 15000 }\n ]\n },\n { name: '艺术', value: 20000 },\n { name: '历史', value: 30000 }\n ]\n};\n\nconst chart = new Chart({ container: 'container', width: 600, height: 600 });\n\nchart.options({\n type: 'pack',\n data: { value: data },\n encode: {\n value: 'value',\n color: (d) => d.depth,\n },\n scale: {\n color: {\n type: 'ordinal',\n range: ['#1f4e79', '#2e75b6', '#5b9bd5', '#9dc3e6']\n }\n },\n style: {\n stroke: '#fff',\n lineWidth: 2,\n fillOpacity: 0.85,\n },\n labels: [\n {\n text: (d) => {\n if (d.r < 20) return '';\n return d.data?.name;\n },\n position: 'inside',\n fontSize: 12,\n fill: '#fff',\n fontWeight: 'bold',\n transform: [{ type: 'overflowHide' }],\n }\n ],\n legend: false,\n});\n\nchart.render();", + "duration": 12549, + "retrievedSkillIds": [ + "g2-mark-pack", + "g2-mark-arc-donut", + "g2-mark-tree", + "g2-mark-partition", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1184, + "expectedLength": 795, + "similarity": 0.7367889572698505, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '图书馆',\n children: [\n {\n name: '文学',\n value: 50000,\n children: [\n { name: '小说', value: 30000 },\n { name: '诗歌', value: 8000 },\n { name: '散文', value: 12000 }\n ]\n },\n {\n name: '科技',\n value: 40000,\n children: [\n { name: '计算机', value: 25000 },\n { name: '工程', value: 15000 }\n ]\n },\n { name: '艺术', value: 20000 },\n { name: '历史', value: 30000 }\n ]\n};\n\nconst chart = new Chart({ container: 'container', width: 600, height: 600 });\n\nchart.options({\n type: 'pack',\n data: { value: data },\n encode: {\n value: 'value',\n color: (d) => d.depth,\n },\n scale: {\n color: {\n type: 'ordinal',\n range: ['#1f4e79', '#2e75b6', '#5b9bd5', '#9dc3e6']\n }\n },\n style: {\n stroke: '#fff',\n lineWidth: 2,\n fillOpacity: 0.85,\n },\n labels: [\n {\n text: (d) => {\n if (d.r < 20) return '';\n return d.data?.name;\n },\n position: 'inside',\n fontSize: 12,\n fill: '#fff',\n fontWeight: 'bold',\n transform: [{ type: 'overflowHide' }],\n }\n ],\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "name", + "children", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "container", + "width", + "height", + "type", + "data", + "value", + "encode", + "value", + "color", + "scale", + "color", + "type", + "range", + "style", + "stroke", + "lineWidth", + "fillOpacity", + "labels", + "text", + "position", + "fontSize", + "fill", + "fontWeight", + "transform", + "type", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "view.children", + "x6.labels" + ] + } + } + }, + { + "id": "case-52", + "query": "根据描述绘制图表,使用 G2 绘制一个横向的甘特图,展示不同项目阶段中各项任务的时间跨度和负责团队。每个任务以条形显示其起止周数,颜色区分不同的资源团队,图例说明阶段与团队分类,坐标轴做了转置以呈现水平条形效果。参考数据:[{\"phase\":\"需求\",\"task\":\"竞品分析\",\"startWeek\":1,\"endWeek\":2,\"resource\":\"产品组\"},{\"phase\":\"需求\",\"task\":\"用户访谈\",\"startWeek\":2,\"endWeek\":4,\"resource\":\"用研组\"},{\"phase\":\"设计\",\"task\":\"原型输出\",\"startWeek\":3,\"endWeek\":6,\"resource\":\"UX\"},{\"phase\":\"开发\",\"task\":\"模块A\",\"startWeek\":5,\"endWeek\":10,\"resource\":\"前端\"},{\"phase\":\"开发\",\"task\":\"模块B\",\"startWeek\":6,\"endWeek\":12,\"resource\":\"后端\"},{\"phase\":\"测试\",\"task\":\"集成测试\",\"startWeek\":10,\"endWeek\":14,\"resource\":\"QA\"},{\"phase\":\"发布\",\"task\":\"灰度上线\",\"startWeek\":13,\"endWeek\":15,\"resource\":\"运维\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container', theme: 'classic' });\n\nchart.options({\n type: 'interval',\n autoFit: true,\n data: [\n { phase: '需求', task: '竞品分析', startWeek: 1, endWeek: 2, resource: '产品组' },\n { phase: '需求', task: '用户访谈', startWeek: 2, endWeek: 4, resource: '用研组' },\n { phase: '设计', task: '原型输出', startWeek: 3, endWeek: 6, resource: 'UX' },\n { phase: '开发', task: '模块A', startWeek: 5, endWeek: 10, resource: '前端' },\n { phase: '开发', task: '模块B', startWeek: 6, endWeek: 12, resource: '后端' },\n { phase: '测试', task: '集成测试', startWeek: 10, endWeek: 14, resource: 'QA' },\n { phase: '发布', task: '灰度上线', startWeek: 13, endWeek: 15, resource: '运维' },\n ],\n encode: {\n x: 'task',\n y: 'startWeek',\n y1: 'endWeek',\n color: 'resource',\n series: 'phase',\n },\n coordinate: { transform: [{ type: 'transpose' }] },\n axis: {\n y: { title: '周数', grid: true },\n x: { title: '任务', labelTransform: 'rotate(30)' }\n },\n legend: {\n color: { title: '负责团队' },\n series: { position: 'top', title: '项目阶段' }\n },\n style: {\n stroke: '#333',\n lineWidth: 1,\n fillOpacity: 0.8,\n }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"phase\":\"需求\",\"task\":\"竞品分析\",\"startWeek\":1,\"endWeek\":2,\"resource\":\"产品组\"},\n {\"phase\":\"需求\",\"task\":\"用户访谈\",\"startWeek\":2,\"endWeek\":4,\"resource\":\"用研组\"},\n {\"phase\":\"设计\",\"task\":\"原型输出\",\"startWeek\":3,\"endWeek\":6,\"resource\":\"UX\"},\n {\"phase\":\"开发\",\"task\":\"模块A\",\"startWeek\":5,\"endWeek\":10,\"resource\":\"前端\"},\n {\"phase\":\"开发\",\"task\":\"模块B\",\"startWeek\":6,\"endWeek\":12,\"resource\":\"后端\"},\n {\"phase\":\"测试\",\"task\":\"集成测试\",\"startWeek\":10,\"endWeek\":14,\"resource\":\"QA\"},\n {\"phase\":\"发布\",\"task\":\"灰度上线\",\"startWeek\":13,\"endWeek\":15,\"resource\":\"运维\"}\n];\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: (d) => `${d.phase} - ${d.task}`,\n y: 'startWeek',\n y1: 'endWeek',\n color: 'resource',\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n scale: {\n y: {\n domain: [0, 16],\n nice: true,\n },\n },\n axis: {\n x: {\n title: '项目阶段与任务',\n labelAutoWrap: true,\n },\n y: {\n title: '周数',\n },\n },\n legend: {\n color: {\n title: '负责团队',\n position: 'right',\n },\n },\n tooltip: {\n title: (d) => `${d.phase} - ${d.task}`,\n items: [\n { field: 'startWeek', name: '开始周' },\n { field: 'endWeek', name: '结束周' },\n { field: 'resource', name: '负责团队' },\n ],\n },\n style: {\n radius: 4,\n },\n});\n\nchart.render();", + "duration": 39657, + "retrievedSkillIds": [ + "g2-mark-gantt", + "g2-mark-interval-basic", + "g2-coord-transpose", + "g2-mark-interval-grouped", + "g2-mark-arc-pie" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1423, + "expectedLength": 1182, + "similarity": 0.6718458131238225, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"phase\":\"需求\",\"task\":\"竞品分析\",\"startWeek\":1,\"endWeek\":2,\"resource\":\"产品组\"},\n {\"phase\":\"需求\",\"task\":\"用户访谈\",\"startWeek\":2,\"endWeek\":4,\"resource\":\"用研组\"},\n {\"phase\":\"设计\",\"task\":\"原型输出\",\"startWeek\":3,\"endWeek\":6,\"resource\":\"UX\"},\n {\"phase\":\"开发\",\"task\":\"模块A\",\"startWeek\":5,\"endWeek\":10,\"resource\":\"前端\"},\n {\"phase\":\"开发\",\"task\":\"模块B\",\"startWeek\":6,\"endWeek\":12,\"resource\":\"后端\"},\n {\"phase\":\"测试\",\"task\":\"集成测试\",\"startWeek\":10,\"endWeek\":14,\"resource\":\"QA\"},\n {\"phase\":\"发布\",\"task\":\"灰度上线\",\"startWeek\":13,\"endWeek\":15,\"resource\":\"运维\"}\n];\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: (d) => `${d.phase} - ${d.task}`,\n y: 'startWeek',\n y1: 'endWeek',\n color: 'resource',\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n scale: {\n y: {\n domain: [0, 16],\n nice: true,\n },\n },\n axis: {\n x: {\n title: '项目阶段与任务',\n labelAutoWrap: true,\n },\n y: {\n title: '周数',\n },\n },\n legend: {\n color: {\n title: '负责团队',\n position: 'right',\n },\n },\n tooltip: {\n title: (d) => `${d.phase} - ${d.task}`,\n items: [\n { field: 'startWeek', name: '开始周' },\n { field: 'endWeek', name: '结束周' },\n { field: 'resource', name: '负责团队' },\n ],\n },\n style: {\n radius: 4,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "y1", + "color", + "coordinate", + "transform", + "type", + "scale", + "y", + "domain", + "nice", + "axis", + "x", + "title", + "labelAutoWrap", + "y", + "title", + "legend", + "color", + "title", + "position", + "tooltip", + "title", + "items", + "field", + "name", + "field", + "name", + "field", + "name", + "style", + "radius" + ], + "stringLiterals": [ + "phase", + "task", + "startWeek", + "endWeek", + "resource", + "phase", + "task", + "startWeek", + "endWeek", + "resource", + "phase", + "task", + "startWeek", + "endWeek", + "resource", + "phase", + "task", + "startWeek", + "endWeek", + "resource", + "phase", + "task", + "startWeek", + "endWeek", + "resource", + "phase", + "task", + "startWeek", + "endWeek", + "resource", + "phase", + "task", + "startWeek", + "endWeek", + "resource" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.interval" + ] + } + } + }, + { + "id": "case-53", + "query": "根据描述绘制图表,使用 G2 创建一个堆叠式极坐标玫瑰图,对比两个品牌(品牌A、品牌B)在一周内每天的咖啡馆营业量数据。通过极坐标、堆叠柱形图形式可视化双品牌的每日营业量分布,并添加共享 tooltip、图例和标题。参考数据:\n[{\"day\":\"Mon\",\"cafe\":34,\"type\":\"品牌A\"},{\"day\":\"Tue\",\"cafe\":38,\"type\":\"品牌A\"},{\"day\":\"Wed\",\"cafe\":42,\"type\":\"品牌A\"},{\"day\":\"Thu\",\"cafe\":40,\"type\":\"品牌A\"},{\"day\":\"Fri\",\"cafe\":48,\"type\":\"品牌A\"},{\"day\":\"Sat\",\"cafe\":62,\"type\":\"品牌A\"},{\"day\":\"Sun\",\"cafe\":55,\"type\":\"品牌A\"},{\"day\":\"Mon\",\"cafe\":22,\"type\":\"品牌B\"},{\"day\":\"Tue\",\"cafe\":25,\"type\":\"品牌B\"},{\"day\":\"Wed\",\"cafe\":30,\"type\":\"品牌B\"},{\"day\":\"Thu\",\"cafe\":33,\"type\":\"品牌B\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'interval',\n autoFit: true,\n coordinate: { type: 'polar', innerRadius: 0.3 },\n data: [\n { day: 'Mon', cafe: 34, type: '品牌A' },\n { day: 'Tue', cafe: 38, type: '品牌A' },\n { day: 'Wed', cafe: 42, type: '品牌A' },\n { day: 'Thu', cafe: 40, type: '品牌A' },\n { day: 'Fri', cafe: 48, type: '品牌A' },\n { day: 'Sat', cafe: 62, type: '品牌A' },\n { day: 'Sun', cafe: 55, type: '品牌A' },\n { day: 'Mon', cafe: 22, type: '品牌B' },\n { day: 'Tue', cafe: 25, type: '品牌B' },\n { day: 'Wed', cafe: 30, type: '品牌B' },\n { day: 'Thu', cafe: 33, type: '品牌B' },\n { day: 'Fri', cafe: 45, type: '品牌B' },\n { day: 'Sat', cafe: 68, type: '品牌B' },\n { day: 'Sun', cafe: 52, type: '品牌B' },\n ],\n encode: { x: 'day', y: 'cafe', series: 'type', color: 'type'},\n scale: { color: { range: ['#ffd66b', '#7793f8'] } },\n style: { stroke: 'white', lineWidth: 1 },\n legend: { position: 'right' },\n interaction: {\n tooltip: {\n shared: true\n }\n },\n title: '餐饮周营业量 - 堆叠式玫瑰图(双业态对照)',\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { day: 'Mon', cafe: 34, type: '品牌A' },\n { day: 'Tue', cafe: 38, type: '品牌A' },\n { day: 'Wed', cafe: 42, type: '品牌A' },\n { day: 'Thu', cafe: 40, type: '品牌A' },\n { day: 'Fri', cafe: 48, type: '品牌A' },\n { day: 'Sat', cafe: 62, type: '品牌A' },\n { day: 'Sun', cafe: 55, type: '品牌A' },\n { day: 'Mon', cafe: 22, type: '品牌B' },\n { day: 'Tue', cafe: 25, type: '品牌B' },\n { day: 'Wed', cafe: 30, type: '品牌B' },\n { day: 'Thu', cafe: 33, type: '品牌B' },\n ],\n encode: {\n x: 'day',\n y: 'cafe',\n color: 'type',\n },\n transform: [{ type: 'stackY' }],\n coordinate: { type: 'polar' },\n title: '双品牌一周咖啡馆营业量对比(堆叠玫瑰图)',\n tooltip: { shared: true },\n legend: {\n color: {\n position: 'bottom',\n layout: { justifyContent: 'center' },\n },\n },\n axis: {\n x: {\n grid: true,\n gridLineWidth: 1,\n gridStroke: '#e0e0e0',\n },\n y: {\n grid: true,\n gridLineWidth: 1,\n gridStroke: '#e0e0e0',\n labelFormatter: (v) => `${v}杯`,\n },\n },\n style: {\n stroke: '#fff',\n lineWidth: 1,\n },\n});\n\nchart.render();", + "duration": 16158, + "retrievedSkillIds": [ + "g2-coord-polar", + "g2-mark-area-stacked", + "g2-mark-rose", + "g2-mark-arc-pie", + "g2-mark-area-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1251, + "expectedLength": 1147, + "similarity": 0.8593663318986131, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { day: 'Mon', cafe: 34, type: '品牌A' },\n { day: 'Tue', cafe: 38, type: '品牌A' },\n { day: 'Wed', cafe: 42, type: '品牌A' },\n { day: 'Thu', cafe: 40, type: '品牌A' },\n { day: 'Fri', cafe: 48, type: '品牌A' },\n { day: 'Sat', cafe: 62, type: '品牌A' },\n { day: 'Sun', cafe: 55, type: '品牌A' },\n { day: 'Mon', cafe: 22, type: '品牌B' },\n { day: 'Tue', cafe: 25, type: '品牌B' },\n { day: 'Wed', cafe: 30, type: '品牌B' },\n { day: 'Thu', cafe: 33, type: '品牌B' },\n ],\n encode: {\n x: 'day',\n y: 'cafe',\n color: 'type',\n },\n transform: [{ type: 'stackY' }],\n coordinate: { type: 'polar' },\n title: '双品牌一周咖啡馆营业量对比(堆叠玫瑰图)',\n tooltip: { shared: true },\n legend: {\n color: {\n position: 'bottom',\n layout: { justifyContent: 'center' },\n },\n },\n axis: {\n x: {\n grid: true,\n gridLineWidth: 1,\n gridStroke: '#e0e0e0',\n },\n y: {\n grid: true,\n gridLineWidth: 1,\n gridStroke: '#e0e0e0',\n labelFormatter: (v) => `${v}杯`,\n },\n },\n style: {\n stroke: '#fff',\n lineWidth: 1,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "day", + "cafe", + "type", + "day", + "cafe", + "type", + "day", + "cafe", + "type", + "day", + "cafe", + "type", + "day", + "cafe", + "type", + "day", + "cafe", + "type", + "day", + "cafe", + "type", + "day", + "cafe", + "type", + "day", + "cafe", + "type", + "day", + "cafe", + "type", + "day", + "cafe", + "type", + "encode", + "x", + "y", + "color", + "transform", + "type", + "coordinate", + "type", + "title", + "tooltip", + "shared", + "legend", + "color", + "position", + "layout", + "justifyContent", + "axis", + "x", + "grid", + "gridLineWidth", + "gridStroke", + "y", + "grid", + "gridLineWidth", + "gridStroke", + "labelFormatter", + "style", + "stroke", + "lineWidth" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval" + ] + } + } + }, + { + "id": "case-54", + "query": "根据描述绘制图表,使用 G2 创建一个仪表盘图表,展示 CPU 负载的当前值、目标值和分级阈值,通过不同颜色区间表示负载状态。\n参考数据:[{\"value\":{\"target\":45,\"total\":120,\"name\":\"CPU负载\",\"thresholds\":[30,60,90,120]}}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true\n});\n\nchart.options({\n type: 'gauge',\n data: {\n value: {\n target: 45,\n total: 120,\n name: 'CPU负载',\n thresholds: [30, 60, 90, 120]\n }\n },\n scale: {\n color: {\n range: ['#13C2C2', '#1890FF', '#722ED1', '#F5222D']\n }\n },\n legend: false,\n style: {\n arcLineWidth: 2,\n textContent: (t) => `负载: ${t}°C`\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 400,\n height: 400,\n});\n\nchart.options({\n type: 'gauge',\n data: {\n value: {\n target: 45,\n total: 120,\n name: 'CPU负载',\n thresholds: [30, 60, 90, 120],\n },\n },\n scale: {\n color: {\n range: ['#30BF78', '#FAAD14', '#F4664A', '#CF1322'],\n },\n },\n style: {\n textContent: (target, total) => {\n const percent = ((target / total) * 100).toFixed(1);\n return `${target}\\n${percent}%`;\n },\n textFontSize: 24,\n textFill: '#262626',\n textFontWeight: 'bold',\n textX: '50%',\n textY: '65%',\n },\n legend: false,\n});\n\nchart.render();", + "duration": 8525, + "retrievedSkillIds": [ + "g2-mark-gauge", + "g2-mark-bullet", + "g2-mark-linex-liney", + "g2-mark-interval-basic", + "g2-mark-arc-donut" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 685, + "expectedLength": 472, + "similarity": 0.7663704287752496, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 400,\n height: 400,\n});\n\nchart.options({\n type: 'gauge',\n data: {\n value: {\n target: 45,\n total: 120,\n name: 'CPU负载',\n thresholds: [30, 60, 90, 120],\n },\n },\n scale: {\n color: {\n range: ['#30BF78', '#FAAD14', '#F4664A', '#CF1322'],\n },\n },\n style: {\n textContent: (target, total) => {\n const percent = ((target / total) * 100).toFixed(1);\n return `${target}\\n${percent}%`;\n },\n textFontSize: 24,\n textFill: '#262626',\n textFontWeight: 'bold',\n textX: '50%',\n textY: '65%',\n },\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "value", + "target", + "total", + "name", + "thresholds", + "scale", + "color", + "range", + "style", + "textContent", + "textFontSize", + "textFill", + "textFontWeight", + "textX", + "textY", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "scale", + "x6.target" + ] + } + } + }, + { + "id": "case-55", + "query": "根据描述绘制图表,使用 G2 绘制一个包含面积图和两条虚线的组合图表,展示随时间变化的高低值范围,面积表示区间覆盖,虚线标注上下限。\n参考数据:[{\"t\":0,\"low\":10,\"high\":20},{\"t\":1,\"low\":12,\"high\":25},{\"t\":2,\"low\":15,\"high\":18},{\"t\":3,\"low\":8,\"high\":22}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const data = [\n { t: 0, low: 10, high: 20 },\n { t: 1, low: 12, high: 25 },\n { t: 2, low: 15, high: 18 },\n { t: 3, low: 8, high: 22 }\n];\n\nconst chart = new Chart({ container: 'container', theme: 'classic' });\nchart.options({\n type: 'view',\n autoFit: true,\n data: data,\n encode: { x: 't', y: ['low','high'] },\n children: [\n {\n type: 'area',\n encode: { y: ['low','high'] },\n style: { fill: '#d6e3fd', fillOpacity: 0.8, stroke: '#8caff1' }\n },\n {\n type: 'line',\n encode: { y: 'low' },\n style: { stroke: '#1677ff', lineDash: [2,2], lineWidth: 1.5 }\n },\n {\n type: 'line',\n encode: { y: 'high' },\n style: { stroke: '#ff4d4f', lineDash: [2,2], lineWidth: 1.5 }\n }\n ],\n\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n {\"t\":0,\"low\":10,\"high\":20},\n {\"t\":1,\"low\":12,\"high\":25},\n {\"t\":2,\"low\":15,\"high\":18},\n {\"t\":3,\"low\":8,\"high\":22}\n];\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'area',\n encode: { x: 't', y: 'low', y1: 'high' },\n style: { fill: '#5B8FF9', fillOpacity: 0.3 }\n },\n {\n type: 'line',\n encode: { x: 't', y: 'high' },\n style: { stroke: '#F4664A', lineWidth: 2, lineDash: [4, 4] }\n },\n {\n type: 'line',\n encode: { x: 't', y: 'low' },\n style: { stroke: '#52C41A', lineWidth: 2, lineDash: [4, 4] }\n }\n ]\n});\n\nchart.render();", + "duration": 8509, + "retrievedSkillIds": [ + "g2-mark-area-basic", + "g2-mark-area-stacked", + "g2-scale-linear", + "g2-mark-contourline", + "g2-comp-space-layer" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 743, + "expectedLength": 753, + "similarity": 0.8067230576441103, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n {\"t\":0,\"low\":10,\"high\":20},\n {\"t\":1,\"low\":12,\"high\":25},\n {\"t\":2,\"low\":15,\"high\":18},\n {\"t\":3,\"low\":8,\"high\":22}\n];\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'area',\n encode: { x: 't', y: 'low', y1: 'high' },\n style: { fill: '#5B8FF9', fillOpacity: 0.3 }\n },\n {\n type: 'line',\n encode: { x: 't', y: 'high' },\n style: { stroke: '#F4664A', lineWidth: 2, lineDash: [4, 4] }\n },\n {\n type: 'line',\n encode: { x: 't', y: 'low' },\n style: { stroke: '#52C41A', lineWidth: 2, lineDash: [4, 4] }\n }\n ]\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "children", + "type", + "encode", + "x", + "y", + "y1", + "style", + "fill", + "fillOpacity", + "type", + "encode", + "x", + "y", + "style", + "stroke", + "lineWidth", + "lineDash", + "type", + "encode", + "x", + "y", + "style", + "stroke", + "lineWidth", + "lineDash" + ], + "stringLiterals": [ + "t", + "low", + "high", + "t", + "low", + "high", + "t", + "low", + "high", + "t", + "low", + "high" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "view.children", + "type.view", + "type.line" + ] + } + } + }, + { + "id": "case-56", + "query": "根据描述绘制图表,创建一个基于 G2 的饼图,用于展示不同分类的数值占比情况,并通过标签显示各部分的百分比,同时根据数值大小调整标签字体颜色与尺寸,具备鼠标悬停放大交互效果。参考数据:[{\"item\":\"分类一\",\"count\":40},{\"item\":\"分类二\",\"count\":21},{\"item\":\"分类三\",\"count\":17},{\"item\":\"分类四\",\"count\":13},{\"item\":\"分类五\",\"count\":9}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'interval',\n data: [\n { item: '分类一', count: 40 },\n { item: '分类二', count: 21 },\n { item: '分类三', count: 17 },\n { item: '分类四', count: 13 },\n { item: '分类五', count: 9 },\n ],\n encode: { y: 'count', color: 'item' },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n outerRadius: 0.8,\n },\n style: {\n stroke: '#fff',\n },\n labels: [{\n text: (d, i, data) => {\n const total = data.reduce((acc, curr) => acc + curr.count, 0);\n const percent = ((d.count / total) * 100).toFixed(2);\n return `${percent}%`;\n },\n style: {\n fill: (d) => {\n if (d.count > 30) return 'green'\n else if (d.count < 10) return 'red'\n return '#000'\n },\n lineWidth: 3,\n fontSize: (d) => {\n if (d.count > 30) return 24\n else if (d.count < 10) return 12\n return 16\n },\n stroke: '#fff'\n }\n }],\n legend: {\n color: {\n itemLabelFill: (d) => d.color,\n }\n },\n interaction: {\n elementHoverScale: true,\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { item: '分类一', count: 40 },\n { item: '分类二', count: 21 },\n { item: '分类三', count: 17 },\n { item: '分类四', count: 13 },\n { item: '分类五', count: 9 }\n];\n\nconst total = data.reduce((sum, d) => sum + d.count, 0);\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n y: 'count',\n color: 'item',\n },\n transform: [{ type: 'stackY' }],\n coordinate: { type: 'theta', outerRadius: 0.8 },\n labels: [\n {\n text: (d) => `${((d.count / total) * 100).toFixed(0)}%`,\n position: 'outside',\n connector: true,\n style: {\n fontSize: (d) => {\n const baseSize = 12;\n const maxSize = 20;\n const scale = d.count / 40;\n return baseSize + (maxSize - baseSize) * scale;\n },\n fill: (d) => d.count > 20 ? '#1f1f1f' : '#8c8c8c',\n fontWeight: (d) => d.count > 20 ? 'bold' : 'normal',\n },\n },\n ],\n interaction: {\n elementHighlight: true,\n },\n legend: {\n color: { position: 'bottom', layout: { justifyContent: 'center' } },\n },\n});\n\nchart.render();", + "duration": 74724, + "retrievedSkillIds": [ + "g2-mark-arc-pie", + "g2-mark-arc-donut", + "g2-mark-rose", + "g2-concept-chart-selection", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1170, + "expectedLength": 1157, + "similarity": 0.7053365862474023, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { item: '分类一', count: 40 },\n { item: '分类二', count: 21 },\n { item: '分类三', count: 17 },\n { item: '分类四', count: 13 },\n { item: '分类五', count: 9 }\n];\n\nconst total = data.reduce((sum, d) => sum + d.count, 0);\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n y: 'count',\n color: 'item',\n },\n transform: [{ type: 'stackY' }],\n coordinate: { type: 'theta', outerRadius: 0.8 },\n labels: [\n {\n text: (d) => `${((d.count / total) * 100).toFixed(0)}%`,\n position: 'outside',\n connector: true,\n style: {\n fontSize: (d) => {\n const baseSize = 12;\n const maxSize = 20;\n const scale = d.count / 40;\n return baseSize + (maxSize - baseSize) * scale;\n },\n fill: (d) => d.count > 20 ? '#1f1f1f' : '#8c8c8c',\n fontWeight: (d) => d.count > 20 ? 'bold' : 'normal',\n },\n },\n ],\n interaction: {\n elementHighlight: true,\n },\n legend: {\n color: { position: 'bottom', layout: { justifyContent: 'center' } },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "reduce", + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "item", + "count", + "item", + "count", + "item", + "count", + "item", + "count", + "item", + "count", + "container", + "width", + "height", + "type", + "encode", + "y", + "color", + "transform", + "type", + "coordinate", + "type", + "outerRadius", + "labels", + "text", + "position", + "connector", + "style", + "fontSize", + "fill", + "fontWeight", + "interaction", + "elementHighlight", + "legend", + "color", + "position", + "layout", + "justifyContent" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval", + "interaction", + "x6.labels" + ] + } + } + }, + { + "id": "case-57", + "query": "根据描述绘制图表,使用 G2 绘制一个横向对称的漏斗图,分别展示美国和欧盟在不同用户阶段的价值数据。左侧为美国数据,右侧为欧盟数据,通过转置坐标系实现横向布局,并添加数据标签和工具提示信息。\n参考数据:[{\"country\":\"US\",\"stage\":\"Awareness\",\"value\":100000},{\"country\":\"EU\",\"stage\":\"Awareness\",\"value\":80000},{\"country\":\"US\",\"stage\":\"Consideration\",\"value\":65000},{\"country\":\"EU\",\"stage\":\"Consideration\",\"value\":55000},{\"country\":\"US\",\"stage\":\"Preference\",\"value\":40000},{\"country\":\"EU\",\"stage\":\"Preference\",\"value\":38000},{\"country\":\"US\",\"stage\":\"Purchase\",\"value\":18000},{\"country\":\"EU\",\"stage\":\"Purchase\",\"value\":21000}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n theme: 'classic',\n});\n\nconst data = [\n { country: 'US', stage: 'Awareness', value: 100000 },\n { country: 'EU', stage: 'Awareness', value: 80000 },\n { country: 'US', stage: 'Consideration', value: 65000 },\n { country: 'EU', stage: 'Consideration', value: 55000 },\n { country: 'US', stage: 'Preference', value: 40000 },\n { country: 'EU', stage: 'Preference', value: 38000 },\n { country: 'US', stage: 'Purchase', value: 18000 },\n { country: 'EU', stage: 'Purchase', value: 21000 },\n];\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'interval',\n data: {\n transform: [{ type: 'filter', callback: (d) => d.country === 'US' }],\n },\n encode: { x: 'stage', y: 'value', color: 'stage', shape: 'funnel' },\n coordinate: { transform: [{ type: 'transpose' }] },\n labels: [\n {\n text: (d) => `${d.stage}\\n${(d.value / 1000).toFixed(0)}K`,\n position: 'inside',\n transform: [{ type: 'contrastReverse' }],\n },\n ],\n scale: { x: { padding: 0.1 }, color: { palette: 'blues', key: 'us' } },\n },\n {\n type: 'interval',\n data: {\n transform: [{ type: 'filter', callback: (d) => d.country === 'EU' }],\n },\n encode: {\n x: 'stage',\n y: (d) => -d.value,\n color: 'stage',\n shape: 'funnel',\n },\n coordinate: { transform: [{ type: 'transpose' }] },\n labels: [\n {\n text: (d) => `${(d.value / 1000).toFixed(0)}K`,\n position: 'inside',\n transform: [{ type: 'contrastReverse' }],\n },\n ],\n scale: { x: { padding: 0.1 }, color: { palette: 'dark2', key: 'eu' } },\n tooltip: {\n items: [\n (d) => ({\n name: d.stage,\n value: d.value.toLocaleString(),\n marker: true,\n }),\n (d) => ({\n name: '转化率',\n value: `${(\n (d.value /\n data.find((a) => a.stage === d.stage && a.country === 'US')\n .value) *\n 100\n ).toFixed(1)}% vs US`,\n marker: 'circle',\n }),\n ],\n },\n },\n ],\n\n axis: false,\n legend: { color: { position: 'bottom' } },\n});\n\nchart.render();\n", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n {\"country\":\"US\",\"stage\":\"Awareness\",\"value\":100000},\n {\"country\":\"EU\",\"stage\":\"Awareness\",\"value\":80000},\n {\"country\":\"US\",\"stage\":\"Consideration\",\"value\":65000},\n {\"country\":\"EU\",\"stage\":\"Consideration\",\"value\":55000},\n {\"country\":\"US\",\"stage\":\"Preference\",\"value\":40000},\n {\"country\":\"EU\",\"stage\":\"Preference\",\"value\":38000},\n {\"country\":\"US\",\"stage\":\"Purchase\",\"value\":18000},\n {\"country\":\"EU\",\"stage\":\"Purchase\",\"value\":21000}\n];\n\nchart.options({\n type: 'interval',\n data,\n coordinate: { transform: [{ type: 'transpose' }] },\n encode: {\n x: 'stage',\n y: (d) => d.country === 'US' ? -d.value : d.value,\n color: 'country',\n },\n axis: {\n x: { title: '用户阶段', grid: false },\n y: { \n labelFormatter: (d) => Math.abs(d).toLocaleString(),\n title: '价值',\n },\n },\n labels: [\n {\n text: (d) => Math.abs(d.value).toLocaleString(),\n position: (d) => d.country === 'US' ? 'left' : 'right',\n style: { fontSize: 11 },\n },\n ],\n tooltip: {\n items: [\n { field: 'country', name: '地区' },\n { field: 'stage', name: '阶段' },\n { field: 'value', name: '数值', valueFormatter: (v) => v.toLocaleString() },\n ],\n },\n legend: {\n color: { title: '国家/地区' },\n },\n});\n\nchart.render();", + "duration": 41337, + "retrievedSkillIds": [ + "g2-mark-chord", + "g2-mark-histogram", + "g2-mark-line-basic", + "g2-mark-arc-pie", + "g2-data-fold" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1383, + "expectedLength": 2348, + "similarity": 0.7072358168147642, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n {\"country\":\"US\",\"stage\":\"Awareness\",\"value\":100000},\n {\"country\":\"EU\",\"stage\":\"Awareness\",\"value\":80000},\n {\"country\":\"US\",\"stage\":\"Consideration\",\"value\":65000},\n {\"country\":\"EU\",\"stage\":\"Consideration\",\"value\":55000},\n {\"country\":\"US\",\"stage\":\"Preference\",\"value\":40000},\n {\"country\":\"EU\",\"stage\":\"Preference\",\"value\":38000},\n {\"country\":\"US\",\"stage\":\"Purchase\",\"value\":18000},\n {\"country\":\"EU\",\"stage\":\"Purchase\",\"value\":21000}\n];\n\nchart.options({\n type: 'interval',\n data,\n coordinate: { transform: [{ type: 'transpose' }] },\n encode: {\n x: 'stage',\n y: (d) => d.country === 'US' ? -d.value : d.value,\n color: 'country',\n },\n axis: {\n x: { title: '用户阶段', grid: false },\n y: { \n labelFormatter: (d) => Math.abs(d).toLocaleString(),\n title: '价值',\n },\n },\n labels: [\n {\n text: (d) => Math.abs(d.value).toLocaleString(),\n position: (d) => d.country === 'US' ? 'left' : 'right',\n style: { fontSize: 11 },\n },\n ],\n tooltip: {\n items: [\n { field: 'country', name: '地区' },\n { field: 'stage', name: '阶段' },\n { field: 'value', name: '数值', valueFormatter: (v) => v.toLocaleString() },\n ],\n },\n legend: {\n color: { title: '国家/地区' },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "abs", + "toLocaleString", + "abs", + "toLocaleString", + "toLocaleString", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "coordinate", + "transform", + "type", + "encode", + "x", + "y", + "value", + "color", + "axis", + "x", + "title", + "grid", + "y", + "labelFormatter", + "title", + "labels", + "text", + "position", + "style", + "fontSize", + "tooltip", + "items", + "field", + "name", + "field", + "name", + "field", + "name", + "valueFormatter", + "legend", + "color", + "title" + ], + "stringLiterals": [ + "country", + "stage", + "value", + "country", + "stage", + "value", + "country", + "stage", + "value", + "country", + "stage", + "value", + "country", + "stage", + "value", + "country", + "stage", + "value", + "country", + "stage", + "value", + "country", + "stage", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-58", + "query": "根据描述绘制图表,使用G2创建一个散点图,展示不同性别群体的身高与体重数据分布情况,并通过颜色区分性别。参考数据:[{\"gender\":\"female\",\"height\":161.2,\"weight\":51.6},{\"gender\":\"female\",\"height\":167.5,\"weight\":59},{\"gender\":\"female\",\"height\":159.5,\"weight\":49.2},{\"gender\":\"female\",\"height\":157,\"weight\":63},{\"gender\":\"female\",\"height\":155.8,\"weight\":53.6},{\"gender\":\"female\",\"height\":170,\"weight\":59},{\"gender\":\"female\",\"height\":159.1,\"weight\":47.6},{\"gender\":\"female\",\"height\":166,\"weight\":69.8},{\"gender\":\"female\",\"height\":176.2,\"weight\":66.8},{\"gender\":\"female\",\"height\":160.2,\"weight\":75.2}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'point',\n autoFit: true,\n data: {\n type: 'inline',\n value: [\n {\n \"gender\": \"female\",\n \"height\": 161.2,\n \"weight\": 51.6\n },\n {\n \"gender\": \"female\",\n \"height\": 167.5,\n \"weight\": 59\n },\n {\n \"gender\": \"female\",\n \"height\": 159.5,\n \"weight\": 49.2\n },\n {\n \"gender\": \"female\",\n \"height\": 157,\n \"weight\": 63\n },\n {\n \"gender\": \"female\",\n \"height\": 155.8,\n \"weight\": 53.6\n },\n {\n \"gender\": \"female\",\n \"height\": 170,\n \"weight\": 59\n },\n {\n \"gender\": \"female\",\n \"height\": 159.1,\n \"weight\": 47.6\n },\n {\n \"gender\": \"female\",\n \"height\": 166,\n \"weight\": 69.8\n },\n {\n \"gender\": \"female\",\n \"height\": 176.2,\n \"weight\": 66.8\n },\n {\n \"gender\": \"female\",\n \"height\": 160.2,\n \"weight\": 75.2\n },\n {\n \"gender\": \"female\",\n \"height\": 172.5,\n \"weight\": 55.2\n },\n {\n \"gender\": \"female\",\n \"height\": 170.9,\n \"weight\": 54.2\n },\n {\n \"gender\": \"female\",\n \"height\": 172.9,\n \"weight\": 62.5\n },\n {\n \"gender\": \"female\",\n \"height\": 153.4,\n \"weight\": 42\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 50\n },\n {\n \"gender\": \"female\",\n \"height\": 147.2,\n \"weight\": 49.8\n },\n {\n \"gender\": \"female\",\n \"height\": 168.2,\n \"weight\": 49.2\n },\n {\n \"gender\": \"female\",\n \"height\": 175,\n \"weight\": 73.2\n },\n {\n \"gender\": \"female\",\n \"height\": 157,\n \"weight\": 47.8\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 68.8\n },\n {\n \"gender\": \"female\",\n \"height\": 159.5,\n \"weight\": 50.6\n },\n {\n \"gender\": \"female\",\n \"height\": 175,\n \"weight\": 82.5\n },\n {\n \"gender\": \"female\",\n \"height\": 166.8,\n \"weight\": 57.2\n },\n {\n \"gender\": \"female\",\n \"height\": 176.5,\n \"weight\": 87.8\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 72.8\n },\n {\n \"gender\": \"female\",\n \"height\": 174,\n \"weight\": 54.5\n },\n {\n \"gender\": \"female\",\n \"height\": 173,\n \"weight\": 59.8\n },\n {\n \"gender\": \"female\",\n \"height\": 179.9,\n \"weight\": 67.3\n },\n {\n \"gender\": \"female\",\n \"height\": 170.5,\n \"weight\": 67.8\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 47\n },\n {\n \"gender\": \"female\",\n \"height\": 154.4,\n \"weight\": 46.2\n },\n {\n \"gender\": \"female\",\n \"height\": 162,\n \"weight\": 55\n },\n {\n \"gender\": \"female\",\n \"height\": 176.5,\n \"weight\": 83\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 54.4\n },\n {\n \"gender\": \"female\",\n \"height\": 152,\n \"weight\": 45.8\n },\n {\n \"gender\": \"female\",\n \"height\": 162.1,\n \"weight\": 53.6\n },\n {\n \"gender\": \"female\",\n \"height\": 170,\n \"weight\": 73.2\n },\n {\n \"gender\": \"female\",\n \"height\": 160.2,\n \"weight\": 52.1\n },\n {\n \"gender\": \"female\",\n \"height\": 161.3,\n \"weight\": 67.9\n },\n {\n \"gender\": \"female\",\n \"height\": 166.4,\n \"weight\": 56.6\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 62.3\n },\n {\n \"gender\": \"female\",\n \"height\": 163.8,\n \"weight\": 58.5\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 54.5\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 50.2\n },\n {\n \"gender\": \"female\",\n \"height\": 161.3,\n \"weight\": 60.3\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 58.3\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 56.2\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 50.2\n },\n {\n \"gender\": \"female\",\n \"height\": 170,\n \"weight\": 72.9\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 59.8\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 61\n },\n {\n \"gender\": \"female\",\n \"height\": 160.7,\n \"weight\": 69.1\n },\n {\n \"gender\": \"female\",\n \"height\": 163.2,\n \"weight\": 55.9\n },\n {\n \"gender\": \"female\",\n \"height\": 152.4,\n \"weight\": 46.5\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 54.3\n },\n {\n \"gender\": \"female\",\n \"height\": 168.3,\n \"weight\": 54.8\n },\n {\n \"gender\": \"female\",\n \"height\": 180.3,\n \"weight\": 60.7\n },\n {\n \"gender\": \"female\",\n \"height\": 165.5,\n \"weight\": 60\n },\n {\n \"gender\": \"female\",\n \"height\": 165,\n \"weight\": 62\n },\n {\n \"gender\": \"female\",\n \"height\": 164.5,\n \"weight\": 60.3\n },\n {\n \"gender\": \"female\",\n \"height\": 156,\n \"weight\": 52.7\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 74.3\n },\n {\n \"gender\": \"female\",\n \"height\": 163,\n \"weight\": 62\n },\n {\n \"gender\": \"female\",\n \"height\": 165.7,\n \"weight\": 73.1\n },\n {\n \"gender\": \"female\",\n \"height\": 161,\n \"weight\": 80\n },\n {\n \"gender\": \"female\",\n \"height\": 162,\n \"weight\": 54.7\n },\n {\n \"gender\": \"female\",\n \"height\": 166,\n \"weight\": 53.2\n },\n {\n \"gender\": \"female\",\n \"height\": 174,\n \"weight\": 75.7\n },\n {\n \"gender\": \"female\",\n \"height\": 172.7,\n \"weight\": 61.1\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 55.7\n },\n {\n \"gender\": \"female\",\n \"height\": 151.1,\n \"weight\": 48.7\n },\n {\n \"gender\": \"female\",\n \"height\": 164.5,\n \"weight\": 52.3\n },\n {\n \"gender\": \"female\",\n \"height\": 163.5,\n \"weight\": 50\n },\n {\n \"gender\": \"female\",\n \"height\": 152,\n \"weight\": 59.3\n },\n {\n \"gender\": \"female\",\n \"height\": 169,\n \"weight\": 62.5\n },\n {\n \"gender\": \"female\",\n \"height\": 164,\n \"weight\": 55.7\n },\n {\n \"gender\": \"female\",\n \"height\": 161.2,\n \"weight\": 54.8\n },\n {\n \"gender\": \"female\",\n \"height\": 155,\n \"weight\": 45.9\n },\n {\n \"gender\": \"female\",\n \"height\": 170,\n \"weight\": 70.6\n },\n {\n \"gender\": \"female\",\n \"height\": 176.2,\n \"weight\": 67.2\n },\n {\n \"gender\": \"female\",\n \"height\": 170,\n \"weight\": 69.4\n },\n {\n \"gender\": \"female\",\n \"height\": 162.5,\n \"weight\": 58.2\n },\n {\n \"gender\": \"female\",\n \"height\": 170.3,\n \"weight\": 64.8\n },\n {\n \"gender\": \"female\",\n \"height\": 164.1,\n \"weight\": 71.6\n },\n {\n \"gender\": \"female\",\n \"height\": 169.5,\n \"weight\": 52.8\n },\n {\n \"gender\": \"female\",\n \"height\": 163.2,\n \"weight\": 59.8\n },\n {\n \"gender\": \"female\",\n \"height\": 154.5,\n \"weight\": 49\n },\n {\n \"gender\": \"female\",\n \"height\": 159.8,\n \"weight\": 50\n },\n {\n \"gender\": \"female\",\n \"height\": 173.2,\n \"weight\": 69.2\n },\n {\n \"gender\": \"female\",\n \"height\": 170,\n \"weight\": 55.9\n },\n {\n \"gender\": \"female\",\n \"height\": 161.4,\n \"weight\": 63.4\n },\n {\n \"gender\": \"female\",\n \"height\": 169,\n \"weight\": 58.2\n },\n {\n \"gender\": \"female\",\n \"height\": 166.2,\n \"weight\": 58.6\n },\n {\n \"gender\": \"female\",\n \"height\": 159.4,\n \"weight\": 45.7\n },\n {\n \"gender\": \"female\",\n \"height\": 162.5,\n \"weight\": 52.2\n },\n {\n \"gender\": \"female\",\n \"height\": 159,\n \"weight\": 48.6\n },\n {\n \"gender\": \"female\",\n \"height\": 162.8,\n \"weight\": 57.8\n },\n {\n \"gender\": \"female\",\n \"height\": 159,\n \"weight\": 55.6\n },\n {\n \"gender\": \"female\",\n \"height\": 179.8,\n \"weight\": 66.8\n },\n {\n \"gender\": \"female\",\n \"height\": 162.9,\n \"weight\": 59.4\n },\n {\n \"gender\": \"female\",\n \"height\": 161,\n \"weight\": 53.6\n },\n {\n \"gender\": \"female\",\n \"height\": 151.1,\n \"weight\": 73.2\n },\n {\n \"gender\": \"female\",\n \"height\": 168.2,\n \"weight\": 53.4\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 69\n },\n {\n \"gender\": \"female\",\n \"height\": 173.2,\n \"weight\": 58.4\n },\n {\n \"gender\": \"female\",\n \"height\": 171.8,\n \"weight\": 56.2\n },\n {\n \"gender\": \"female\",\n \"height\": 178,\n \"weight\": 70.6\n },\n {\n \"gender\": \"female\",\n \"height\": 164.3,\n \"weight\": 59.8\n },\n {\n \"gender\": \"female\",\n \"height\": 163,\n \"weight\": 72\n },\n {\n \"gender\": \"female\",\n \"height\": 168.5,\n \"weight\": 65.2\n },\n {\n \"gender\": \"female\",\n \"height\": 166.8,\n \"weight\": 56.6\n },\n {\n \"gender\": \"female\",\n \"height\": 172.7,\n \"weight\": 105.2\n },\n {\n \"gender\": \"female\",\n \"height\": 163.5,\n \"weight\": 51.8\n },\n {\n \"gender\": \"female\",\n \"height\": 169.4,\n \"weight\": 63.4\n },\n {\n \"gender\": \"female\",\n \"height\": 167.8,\n \"weight\": 59\n },\n {\n \"gender\": \"female\",\n \"height\": 159.5,\n \"weight\": 47.6\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 63\n },\n {\n \"gender\": \"female\",\n \"height\": 161.2,\n \"weight\": 55.2\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 45\n },\n {\n \"gender\": \"female\",\n \"height\": 163.2,\n \"weight\": 54\n },\n {\n \"gender\": \"female\",\n \"height\": 162.2,\n \"weight\": 50.2\n },\n {\n \"gender\": \"female\",\n \"height\": 161.3,\n \"weight\": 60.2\n },\n {\n \"gender\": \"female\",\n \"height\": 149.5,\n \"weight\": 44.8\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 58.8\n },\n {\n \"gender\": \"female\",\n \"height\": 163.2,\n \"weight\": 56.4\n },\n {\n \"gender\": \"female\",\n \"height\": 172.7,\n \"weight\": 62\n },\n {\n \"gender\": \"female\",\n \"height\": 155,\n \"weight\": 49.2\n },\n {\n \"gender\": \"female\",\n \"height\": 156.5,\n \"weight\": 67.2\n },\n {\n \"gender\": \"female\",\n \"height\": 164,\n \"weight\": 53.8\n },\n {\n \"gender\": \"female\",\n \"height\": 160.9,\n \"weight\": 54.4\n },\n {\n \"gender\": \"female\",\n \"height\": 162.8,\n \"weight\": 58\n },\n {\n \"gender\": \"female\",\n \"height\": 167,\n \"weight\": 59.8\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 54.8\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 43.2\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 60.5\n },\n {\n \"gender\": \"female\",\n \"height\": 158.2,\n \"weight\": 46.4\n },\n {\n \"gender\": \"female\",\n \"height\": 156,\n \"weight\": 64.4\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 48.8\n },\n {\n \"gender\": \"female\",\n \"height\": 167.1,\n \"weight\": 62.2\n },\n {\n \"gender\": \"female\",\n \"height\": 158,\n \"weight\": 55.5\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 57.8\n },\n {\n \"gender\": \"female\",\n \"height\": 156,\n \"weight\": 54.6\n },\n {\n \"gender\": \"female\",\n \"height\": 162.1,\n \"weight\": 59.2\n },\n {\n \"gender\": \"female\",\n \"height\": 173.4,\n \"weight\": 52.7\n },\n {\n \"gender\": \"female\",\n \"height\": 159.8,\n \"weight\": 53.2\n },\n {\n \"gender\": \"female\",\n \"height\": 170.5,\n \"weight\": 64.5\n },\n {\n \"gender\": \"female\",\n \"height\": 159.2,\n \"weight\": 51.8\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 56\n },\n {\n \"gender\": \"female\",\n \"height\": 161.3,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 63.2\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 59.5\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 56.8\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 64.1\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 50\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 72.3\n },\n {\n \"gender\": \"female\",\n \"height\": 166.4,\n \"weight\": 55\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 55.9\n },\n {\n \"gender\": \"female\",\n \"height\": 152.4,\n \"weight\": 60.4\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 69.1\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 84.5\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 55.9\n },\n {\n \"gender\": \"female\",\n \"height\": 158.8,\n \"weight\": 55.5\n },\n {\n \"gender\": \"female\",\n \"height\": 172.7,\n \"weight\": 69.5\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 76.4\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 61.4\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 65.9\n },\n {\n \"gender\": \"female\",\n \"height\": 156.2,\n \"weight\": 58.6\n },\n {\n \"gender\": \"female\",\n \"height\": 175.2,\n \"weight\": 66.8\n },\n {\n \"gender\": \"female\",\n \"height\": 172.1,\n \"weight\": 56.6\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 58.6\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 55.9\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 59.1\n },\n {\n \"gender\": \"female\",\n \"height\": 182.9,\n \"weight\": 81.8\n },\n {\n \"gender\": \"female\",\n \"height\": 166.4,\n \"weight\": 70.7\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 56.8\n },\n {\n \"gender\": \"female\",\n \"height\": 177.8,\n \"weight\": 60\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 58.2\n },\n {\n \"gender\": \"female\",\n \"height\": 175.3,\n \"weight\": 72.7\n },\n {\n \"gender\": \"female\",\n \"height\": 154.9,\n \"weight\": 54.1\n },\n {\n \"gender\": \"female\",\n \"height\": 158.8,\n \"weight\": 49.1\n },\n {\n \"gender\": \"female\",\n \"height\": 172.7,\n \"weight\": 75.9\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 55\n },\n {\n \"gender\": \"female\",\n \"height\": 161.3,\n \"weight\": 57.3\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 55\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 65.5\n },\n {\n \"gender\": \"female\",\n \"height\": 175.3,\n \"weight\": 65.5\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 48.6\n },\n {\n \"gender\": \"female\",\n \"height\": 163.8,\n \"weight\": 58.6\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 55.2\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 62.7\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 56.6\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 53.9\n },\n {\n \"gender\": \"female\",\n \"height\": 164.5,\n \"weight\": 63.2\n },\n {\n \"gender\": \"female\",\n \"height\": 176.5,\n \"weight\": 73.6\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 62\n },\n {\n \"gender\": \"female\",\n \"height\": 175.3,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 159.4,\n \"weight\": 53.2\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 53.4\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 55\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 70.5\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 54.5\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 54.5\n },\n {\n \"gender\": \"female\",\n \"height\": 160.7,\n \"weight\": 55.9\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 59\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 54.5\n },\n {\n \"gender\": \"female\",\n \"height\": 152.4,\n \"weight\": 47.3\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 67.7\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 80.9\n },\n {\n \"gender\": \"female\",\n \"height\": 172.7,\n \"weight\": 70.5\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 60.9\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 54.5\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 59.1\n },\n {\n \"gender\": \"female\",\n \"height\": 161.3,\n \"weight\": 70.5\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 52.7\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 62.7\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 86.3\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 66.4\n },\n {\n \"gender\": \"female\",\n \"height\": 152.4,\n \"weight\": 67.3\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 63\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 73.6\n },\n {\n \"gender\": \"female\",\n \"height\": 175.2,\n \"weight\": 62.3\n },\n {\n \"gender\": \"female\",\n \"height\": 175.2,\n \"weight\": 57.7\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 55.4\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 104.1\n },\n {\n \"gender\": \"female\",\n \"height\": 174,\n \"weight\": 55.5\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 77.3\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 80.5\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 64.5\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 72.3\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 61.4\n },\n {\n \"gender\": \"female\",\n \"height\": 154.9,\n \"weight\": 58.2\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 81.8\n },\n {\n \"gender\": \"female\",\n \"height\": 175.3,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 171.4,\n \"weight\": 53.4\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 54.5\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 53.6\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 60\n },\n {\n \"gender\": \"female\",\n \"height\": 174,\n \"weight\": 73.6\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 61.4\n },\n {\n \"gender\": \"female\",\n \"height\": 174,\n \"weight\": 55.5\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 161.3,\n \"weight\": 60.9\n },\n {\n \"gender\": \"female\",\n \"height\": 156.2,\n \"weight\": 60\n },\n {\n \"gender\": \"female\",\n \"height\": 149.9,\n \"weight\": 46.8\n },\n {\n \"gender\": \"female\",\n \"height\": 169.5,\n \"weight\": 57.3\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 64.1\n },\n {\n \"gender\": \"female\",\n \"height\": 175.3,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 169.5,\n \"weight\": 67.3\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 75.5\n },\n {\n \"gender\": \"female\",\n \"height\": 172.7,\n \"weight\": 68.2\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 61.4\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 76.8\n },\n {\n \"gender\": \"female\",\n \"height\": 176.5,\n \"weight\": 71.8\n },\n {\n \"gender\": \"female\",\n \"height\": 164.4,\n \"weight\": 55.5\n },\n {\n \"gender\": \"female\",\n \"height\": 160.7,\n \"weight\": 48.6\n },\n {\n \"gender\": \"female\",\n \"height\": 174,\n \"weight\": 66.4\n },\n {\n \"gender\": \"female\",\n \"height\": 163.8,\n \"weight\": 67.3\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 65.6\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 71.8\n },\n {\n \"gender\": \"male\",\n \"height\": 193.5,\n \"weight\": 80.7\n },\n {\n \"gender\": \"male\",\n \"height\": 186.5,\n \"weight\": 72.6\n },\n {\n \"gender\": \"male\",\n \"height\": 187.2,\n \"weight\": 78.8\n },\n {\n \"gender\": \"male\",\n \"height\": 181.5,\n \"weight\": 74.8\n },\n {\n \"gender\": \"male\",\n \"height\": 184,\n \"weight\": 86.4\n },\n {\n \"gender\": \"male\",\n \"height\": 184.5,\n \"weight\": 78.4\n },\n {\n \"gender\": \"male\",\n \"height\": 175,\n \"weight\": 62\n },\n {\n \"gender\": \"male\",\n \"height\": 184,\n \"weight\": 81.6\n },\n {\n \"gender\": \"male\",\n \"height\": 180,\n \"weight\": 76.6\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 83.6\n },\n {\n \"gender\": \"male\",\n \"height\": 192,\n \"weight\": 90\n },\n {\n \"gender\": \"male\",\n \"height\": 176,\n \"weight\": 74.6\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 71\n },\n {\n \"gender\": \"male\",\n \"height\": 184,\n \"weight\": 79.6\n },\n {\n \"gender\": \"male\",\n \"height\": 192.7,\n \"weight\": 93.8\n },\n {\n \"gender\": \"male\",\n \"height\": 171.5,\n \"weight\": 70\n },\n {\n \"gender\": \"male\",\n \"height\": 173,\n \"weight\": 72.4\n },\n {\n \"gender\": \"male\",\n \"height\": 176,\n \"weight\": 85.9\n },\n {\n \"gender\": \"male\",\n \"height\": 176,\n \"weight\": 78.8\n },\n {\n \"gender\": \"male\",\n \"height\": 180.5,\n \"weight\": 77.8\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 66.2\n },\n {\n \"gender\": \"male\",\n \"height\": 176,\n \"weight\": 86.4\n },\n {\n \"gender\": \"male\",\n \"height\": 173.5,\n \"weight\": 81.8\n },\n {\n \"gender\": \"male\",\n \"height\": 178,\n \"weight\": 89.6\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 82.8\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 76.4\n },\n {\n \"gender\": \"male\",\n \"height\": 164.5,\n \"weight\": 63.2\n },\n {\n \"gender\": \"male\",\n \"height\": 173,\n \"weight\": 60.9\n },\n {\n \"gender\": \"male\",\n \"height\": 183.5,\n \"weight\": 74.8\n },\n {\n \"gender\": \"male\",\n \"height\": 175.5,\n \"weight\": 70\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 72.4\n },\n {\n \"gender\": \"male\",\n \"height\": 189.2,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 172.8,\n \"weight\": 69.1\n },\n {\n \"gender\": \"male\",\n \"height\": 170,\n \"weight\": 59.5\n },\n {\n \"gender\": \"male\",\n \"height\": 182,\n \"weight\": 67.2\n },\n {\n \"gender\": \"male\",\n \"height\": 170,\n \"weight\": 61.3\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 68.6\n },\n {\n \"gender\": \"male\",\n \"height\": 184.2,\n \"weight\": 80.1\n },\n {\n \"gender\": \"male\",\n \"height\": 186.7,\n \"weight\": 87.8\n },\n {\n \"gender\": \"male\",\n \"height\": 171.4,\n \"weight\": 84.7\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 73.4\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 72.1\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 82.6\n },\n {\n \"gender\": \"male\",\n \"height\": 182.9,\n \"weight\": 88.7\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 177.2,\n \"weight\": 94.1\n },\n {\n \"gender\": \"male\",\n \"height\": 172.1,\n \"weight\": 74.9\n },\n {\n \"gender\": \"male\",\n \"height\": 167,\n \"weight\": 59.1\n },\n {\n \"gender\": \"male\",\n \"height\": 169.5,\n \"weight\": 75.6\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 86.2\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 75.3\n },\n {\n \"gender\": \"male\",\n \"height\": 182.2,\n \"weight\": 87.1\n },\n {\n \"gender\": \"male\",\n \"height\": 164.1,\n \"weight\": 55.2\n },\n {\n \"gender\": \"male\",\n \"height\": 163,\n \"weight\": 57\n },\n {\n \"gender\": \"male\",\n \"height\": 171.5,\n \"weight\": 61.4\n },\n {\n \"gender\": \"male\",\n \"height\": 184.2,\n \"weight\": 76.8\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 86.8\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 72.2\n },\n {\n \"gender\": \"male\",\n \"height\": 177,\n \"weight\": 71.6\n },\n {\n \"gender\": \"male\",\n \"height\": 186,\n \"weight\": 84.8\n },\n {\n \"gender\": \"male\",\n \"height\": 167,\n \"weight\": 68.2\n },\n {\n \"gender\": \"male\",\n \"height\": 171.8,\n \"weight\": 66.1\n },\n {\n \"gender\": \"male\",\n \"height\": 182,\n \"weight\": 72\n },\n {\n \"gender\": \"male\",\n \"height\": 167,\n \"weight\": 64.6\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 74.8\n },\n {\n \"gender\": \"male\",\n \"height\": 164.5,\n \"weight\": 70\n },\n {\n \"gender\": \"male\",\n \"height\": 192,\n \"weight\": 101.6\n },\n {\n \"gender\": \"male\",\n \"height\": 175.5,\n \"weight\": 63.2\n },\n {\n \"gender\": \"male\",\n \"height\": 171.2,\n \"weight\": 79.1\n },\n {\n \"gender\": \"male\",\n \"height\": 181.6,\n \"weight\": 78.9\n },\n {\n \"gender\": \"male\",\n \"height\": 167.4,\n \"weight\": 67.7\n },\n {\n \"gender\": \"male\",\n \"height\": 181.1,\n \"weight\": 66\n },\n {\n \"gender\": \"male\",\n \"height\": 177,\n \"weight\": 68.2\n },\n {\n \"gender\": \"male\",\n \"height\": 174.5,\n \"weight\": 63.9\n },\n {\n \"gender\": \"male\",\n \"height\": 177.5,\n \"weight\": 72\n },\n {\n \"gender\": \"male\",\n \"height\": 170.5,\n \"weight\": 56.8\n },\n {\n \"gender\": \"male\",\n \"height\": 182.4,\n \"weight\": 74.5\n },\n {\n \"gender\": \"male\",\n \"height\": 197.1,\n \"weight\": 90.9\n },\n {\n \"gender\": \"male\",\n \"height\": 180.1,\n \"weight\": 93\n },\n {\n \"gender\": \"male\",\n \"height\": 175.5,\n \"weight\": 80.9\n },\n {\n \"gender\": \"male\",\n \"height\": 180.6,\n \"weight\": 72.7\n },\n {\n \"gender\": \"male\",\n \"height\": 184.4,\n \"weight\": 68\n },\n {\n \"gender\": \"male\",\n \"height\": 175.5,\n \"weight\": 70.9\n },\n {\n \"gender\": \"male\",\n \"height\": 180.6,\n \"weight\": 72.5\n },\n {\n \"gender\": \"male\",\n \"height\": 177,\n \"weight\": 72.5\n },\n {\n \"gender\": \"male\",\n \"height\": 177.1,\n \"weight\": 83.4\n },\n {\n \"gender\": \"male\",\n \"height\": 181.6,\n \"weight\": 75.5\n },\n {\n \"gender\": \"male\",\n \"height\": 176.5,\n \"weight\": 73\n },\n {\n \"gender\": \"male\",\n \"height\": 175,\n \"weight\": 70.2\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 73.4\n },\n {\n \"gender\": \"male\",\n \"height\": 165.1,\n \"weight\": 70.5\n },\n {\n \"gender\": \"male\",\n \"height\": 177,\n \"weight\": 68.9\n },\n {\n \"gender\": \"male\",\n \"height\": 192,\n \"weight\": 102.3\n },\n {\n \"gender\": \"male\",\n \"height\": 176.5,\n \"weight\": 68.4\n },\n {\n \"gender\": \"male\",\n \"height\": 169.4,\n \"weight\": 65.9\n },\n {\n \"gender\": \"male\",\n \"height\": 182.1,\n \"weight\": 75.7\n },\n {\n \"gender\": \"male\",\n \"height\": 179.8,\n \"weight\": 84.5\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 87.7\n },\n {\n \"gender\": \"male\",\n \"height\": 184.9,\n \"weight\": 86.4\n },\n {\n \"gender\": \"male\",\n \"height\": 177.3,\n \"weight\": 73.2\n },\n {\n \"gender\": \"male\",\n \"height\": 167.4,\n \"weight\": 53.9\n },\n {\n \"gender\": \"male\",\n \"height\": 178.1,\n \"weight\": 72\n },\n {\n \"gender\": \"male\",\n \"height\": 168.9,\n \"weight\": 55.5\n },\n {\n \"gender\": \"male\",\n \"height\": 157.2,\n \"weight\": 58.4\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 83.2\n },\n {\n \"gender\": \"male\",\n \"height\": 170.2,\n \"weight\": 72.7\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 64.1\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 72.3\n },\n {\n \"gender\": \"male\",\n \"height\": 165.1,\n \"weight\": 65\n },\n {\n \"gender\": \"male\",\n \"height\": 186.7,\n \"weight\": 86.4\n },\n {\n \"gender\": \"male\",\n \"height\": 165.1,\n \"weight\": 65\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 88.6\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 185.4,\n \"weight\": 66.8\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 75.5\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 93.2\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 82.7\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 58\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 79.5\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 78.6\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 71.8\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 116.4\n },\n {\n \"gender\": \"male\",\n \"height\": 163.8,\n \"weight\": 72.2\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 83.6\n },\n {\n \"gender\": \"male\",\n \"height\": 198.1,\n \"weight\": 85.5\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 90.9\n },\n {\n \"gender\": \"male\",\n \"height\": 166.4,\n \"weight\": 85.9\n },\n {\n \"gender\": \"male\",\n \"height\": 190.5,\n \"weight\": 89.1\n },\n {\n \"gender\": \"male\",\n \"height\": 166.4,\n \"weight\": 75\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 77.7\n },\n {\n \"gender\": \"male\",\n \"height\": 179.7,\n \"weight\": 86.4\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 90.9\n },\n {\n \"gender\": \"male\",\n \"height\": 190.5,\n \"weight\": 73.6\n },\n {\n \"gender\": \"male\",\n \"height\": 185.4,\n \"weight\": 76.4\n },\n {\n \"gender\": \"male\",\n \"height\": 168.9,\n \"weight\": 69.1\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 84.5\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 64.5\n },\n {\n \"gender\": \"male\",\n \"height\": 170.2,\n \"weight\": 69.1\n },\n {\n \"gender\": \"male\",\n \"height\": 190.5,\n \"weight\": 108.6\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 86.4\n },\n {\n \"gender\": \"male\",\n \"height\": 190.5,\n \"weight\": 80.9\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 87.7\n },\n {\n \"gender\": \"male\",\n \"height\": 184.2,\n \"weight\": 94.5\n },\n {\n \"gender\": \"male\",\n \"height\": 176.5,\n \"weight\": 80.2\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 72\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 71.4\n },\n {\n \"gender\": \"male\",\n \"height\": 171.4,\n \"weight\": 72.7\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 76.8\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 63.6\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 80.9\n },\n {\n \"gender\": \"male\",\n \"height\": 182.9,\n \"weight\": 80.9\n },\n {\n \"gender\": \"male\",\n \"height\": 170.2,\n \"weight\": 85.5\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 68.6\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 67.7\n },\n {\n \"gender\": \"male\",\n \"height\": 165.1,\n \"weight\": 66.4\n },\n {\n \"gender\": \"male\",\n \"height\": 185.4,\n \"weight\": 102.3\n },\n {\n \"gender\": \"male\",\n \"height\": 181.6,\n \"weight\": 70.5\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 95.9\n },\n {\n \"gender\": \"male\",\n \"height\": 190.5,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 179.1,\n \"weight\": 87.3\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 71.8\n },\n {\n \"gender\": \"male\",\n \"height\": 170.2,\n \"weight\": 65.9\n },\n {\n \"gender\": \"male\",\n \"height\": 193,\n \"weight\": 95.9\n },\n {\n \"gender\": \"male\",\n \"height\": 171.4,\n \"weight\": 91.4\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 81.8\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 96.8\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 69.1\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 82.7\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 75.5\n },\n {\n \"gender\": \"male\",\n \"height\": 182.9,\n \"weight\": 79.5\n },\n {\n \"gender\": \"male\",\n \"height\": 176.5,\n \"weight\": 73.6\n },\n {\n \"gender\": \"male\",\n \"height\": 186.7,\n \"weight\": 91.8\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 85.9\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 81.8\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 82.5\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 80.5\n },\n {\n \"gender\": \"male\",\n \"height\": 171.4,\n \"weight\": 70\n },\n {\n \"gender\": \"male\",\n \"height\": 185.4,\n \"weight\": 81.8\n },\n {\n \"gender\": \"male\",\n \"height\": 185.4,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 90.5\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 91.4\n },\n {\n \"gender\": \"male\",\n \"height\": 182.9,\n \"weight\": 89.1\n },\n {\n \"gender\": \"male\",\n \"height\": 176.5,\n \"weight\": 85\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 69.1\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 73.6\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 80.5\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 82.7\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 86.4\n },\n {\n \"gender\": \"male\",\n \"height\": 170.5,\n \"weight\": 67.7\n },\n {\n \"gender\": \"male\",\n \"height\": 179.1,\n \"weight\": 92.7\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 93.6\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 70.9\n },\n {\n \"gender\": \"male\",\n \"height\": 182.9,\n \"weight\": 75\n },\n {\n \"gender\": \"male\",\n \"height\": 170.8,\n \"weight\": 93.2\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 93.2\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 77.7\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 61.4\n },\n {\n \"gender\": \"male\",\n \"height\": 185.4,\n \"weight\": 94.1\n },\n {\n \"gender\": \"male\",\n \"height\": 168.9,\n \"weight\": 75\n },\n {\n \"gender\": \"male\",\n \"height\": 185.4,\n \"weight\": 83.6\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 85.5\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 73.9\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 66.8\n },\n {\n \"gender\": \"male\",\n \"height\": 182.9,\n \"weight\": 87.3\n },\n {\n \"gender\": \"male\",\n \"height\": 160,\n \"weight\": 72.3\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 88.6\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 75.5\n },\n {\n \"gender\": \"male\",\n \"height\": 186.7,\n \"weight\": 101.4\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 91.1\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 67.3\n },\n {\n \"gender\": \"male\",\n \"height\": 175.9,\n \"weight\": 77.7\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 81.8\n },\n {\n \"gender\": \"male\",\n \"height\": 179.1,\n \"weight\": 75.5\n },\n {\n \"gender\": \"male\",\n \"height\": 181.6,\n \"weight\": 84.5\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 76.6\n },\n {\n \"gender\": \"male\",\n \"height\": 182.9,\n \"weight\": 85\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 102.5\n },\n {\n \"gender\": \"male\",\n \"height\": 184.2,\n \"weight\": 77.3\n },\n {\n \"gender\": \"male\",\n \"height\": 179.1,\n \"weight\": 71.8\n },\n {\n \"gender\": \"male\",\n \"height\": 176.5,\n \"weight\": 87.9\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 94.3\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 70.9\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 64.5\n },\n {\n \"gender\": \"male\",\n \"height\": 170.2,\n \"weight\": 77.3\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 72.3\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 87.3\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 80\n },\n {\n \"gender\": \"male\",\n \"height\": 176.5,\n \"weight\": 82.3\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 73.6\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 74.1\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 85.9\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 73.2\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 76.3\n },\n {\n \"gender\": \"male\",\n \"height\": 183,\n \"weight\": 65.9\n },\n {\n \"gender\": \"male\",\n \"height\": 183,\n \"weight\": 90.9\n },\n {\n \"gender\": \"male\",\n \"height\": 179.1,\n \"weight\": 89.1\n },\n {\n \"gender\": \"male\",\n \"height\": 170.2,\n \"weight\": 62.3\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 82.7\n },\n {\n \"gender\": \"male\",\n \"height\": 179.1,\n \"weight\": 79.1\n },\n {\n \"gender\": \"male\",\n \"height\": 190.5,\n \"weight\": 98.2\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 83.2\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 83.2\n }\n ],\n },\n encode: {\n x: 'height',\n y: 'weight',\n color: 'gender', // color通道映射gender字段,对不同的性别进行分组\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"gender\":\"female\",\"height\":161.2,\"weight\":51.6},\n {\"gender\":\"female\",\"height\":167.5,\"weight\":59},\n {\"gender\":\"female\",\"height\":159.5,\"weight\":49.2},\n {\"gender\":\"female\",\"height\":157,\"weight\":63},\n {\"gender\":\"female\",\"height\":155.8,\"weight\":53.6},\n {\"gender\":\"female\",\"height\":170,\"weight\":59},\n {\"gender\":\"female\",\"height\":159.1,\"weight\":47.6},\n {\"gender\":\"female\",\"height\":166,\"weight\":69.8},\n {\"gender\":\"female\",\"height\":176.2,\"weight\":66.8},\n {\"gender\":\"female\",\"height\":160.2,\"weight\":75.2},\n {\"gender\":\"male\",\"height\":174,\"weight\":65.6},\n {\"gender\":\"male\",\"height\":175.3,\"weight\":71.8},\n {\"gender\":\"male\",\"height\":193.5,\"weight\":80.7},\n {\"gender\":\"male\",\"height\":186.5,\"weight\":72.6},\n {\"gender\":\"male\",\"height\":187.2,\"weight\":78.8},\n {\"gender\":\"male\",\"height\":181.5,\"weight\":74.8},\n {\"gender\":\"male\",\"height\":184,\"weight\":86.4},\n {\"gender\":\"male\",\"height\":184.5,\"weight\":78.4},\n {\"gender\":\"male\",\"height\":175,\"weight\":62},\n {\"gender\":\"male\",\"height\":184,\"weight\":81.6}\n];\n\nchart.options({\n type: 'point',\n data: data,\n encode: {\n x: 'height',\n y: 'weight',\n color: 'gender',\n },\n scale: {\n color: { range: ['#5B8FF9', '#5AD8A6'] },\n },\n axis: {\n x: { title: '身高 (cm)' },\n y: { title: '体重 (kg)' },\n },\n});\n\nchart.render();", + "duration": 14299, + "retrievedSkillIds": [ + "g2-mark-point-scatter", + "g2-concept-chart-selection", + "g2-scale-point", + "g2-comp-space-flex", + "g2-mark-arc-donut" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1411, + "expectedLength": 39018, + "similarity": 0.6198724104815476, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"gender\":\"female\",\"height\":161.2,\"weight\":51.6},\n {\"gender\":\"female\",\"height\":167.5,\"weight\":59},\n {\"gender\":\"female\",\"height\":159.5,\"weight\":49.2},\n {\"gender\":\"female\",\"height\":157,\"weight\":63},\n {\"gender\":\"female\",\"height\":155.8,\"weight\":53.6},\n {\"gender\":\"female\",\"height\":170,\"weight\":59},\n {\"gender\":\"female\",\"height\":159.1,\"weight\":47.6},\n {\"gender\":\"female\",\"height\":166,\"weight\":69.8},\n {\"gender\":\"female\",\"height\":176.2,\"weight\":66.8},\n {\"gender\":\"female\",\"height\":160.2,\"weight\":75.2},\n {\"gender\":\"male\",\"height\":174,\"weight\":65.6},\n {\"gender\":\"male\",\"height\":175.3,\"weight\":71.8},\n {\"gender\":\"male\",\"height\":193.5,\"weight\":80.7},\n {\"gender\":\"male\",\"height\":186.5,\"weight\":72.6},\n {\"gender\":\"male\",\"height\":187.2,\"weight\":78.8},\n {\"gender\":\"male\",\"height\":181.5,\"weight\":74.8},\n {\"gender\":\"male\",\"height\":184,\"weight\":86.4},\n {\"gender\":\"male\",\"height\":184.5,\"weight\":78.4},\n {\"gender\":\"male\",\"height\":175,\"weight\":62},\n {\"gender\":\"male\",\"height\":184,\"weight\":81.6}\n];\n\nchart.options({\n type: 'point',\n data: data,\n encode: {\n x: 'height',\n y: 'weight',\n color: 'gender',\n },\n scale: {\n color: { range: ['#5B8FF9', '#5AD8A6'] },\n },\n axis: {\n x: { title: '身高 (cm)' },\n y: { title: '体重 (kg)' },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "encode", + "x", + "y", + "color", + "scale", + "color", + "range", + "axis", + "x", + "title", + "y", + "title" + ], + "stringLiterals": [ + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "type.point" + ] + } + } + }, + { + "id": "case-59", + "query": "根据描述绘制图表,使用 G2 创建一个密度分布与箱线图组合图表,展示实验组与光速测量值之间的分布情况,数据按实验组分组,通过核密度估计生成密度曲线并叠加小提琴图样式的箱线图。\n参考数据:\n[{\"Expt\":1,\"Run\":1,\"Speed\":850},{\"Expt\":1,\"Run\":2,\"Speed\":740},{\"Expt\":1,\"Run\":3,\"Speed\":900},{\"Expt\":1,\"Run\":4,\"Speed\":1070},{\"Expt\":1,\"Run\":5,\"Speed\":930},{\"Expt\":1,\"Run\":6,\"Speed\":850},{\"Expt\":1,\"Run\":7,\"Speed\":950},{\"Expt\":1,\"Run\":8,\"Speed\":980},{\"Expt\":1,\"Run\":9,\"Speed\":980},{\"Expt\":1,\"Run\":10,\"Speed\":880}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'view',\n data: {\n type: 'inline',\n value: [\n {\n \"Expt\": 1,\n \"Run\": 1,\n \"Speed\": 850\n },\n {\n \"Expt\": 1,\n \"Run\": 2,\n \"Speed\": 740\n },\n {\n \"Expt\": 1,\n \"Run\": 3,\n \"Speed\": 900\n },\n {\n \"Expt\": 1,\n \"Run\": 4,\n \"Speed\": 1070\n },\n {\n \"Expt\": 1,\n \"Run\": 5,\n \"Speed\": 930\n },\n {\n \"Expt\": 1,\n \"Run\": 6,\n \"Speed\": 850\n },\n {\n \"Expt\": 1,\n \"Run\": 7,\n \"Speed\": 950\n },\n {\n \"Expt\": 1,\n \"Run\": 8,\n \"Speed\": 980\n },\n {\n \"Expt\": 1,\n \"Run\": 9,\n \"Speed\": 980\n },\n {\n \"Expt\": 1,\n \"Run\": 10,\n \"Speed\": 880\n },\n {\n \"Expt\": 1,\n \"Run\": 11,\n \"Speed\": 1000\n },\n {\n \"Expt\": 1,\n \"Run\": 12,\n \"Speed\": 980\n },\n {\n \"Expt\": 1,\n \"Run\": 13,\n \"Speed\": 930\n },\n {\n \"Expt\": 1,\n \"Run\": 14,\n \"Speed\": 650\n },\n {\n \"Expt\": 1,\n \"Run\": 15,\n \"Speed\": 760\n },\n {\n \"Expt\": 1,\n \"Run\": 16,\n \"Speed\": 810\n },\n {\n \"Expt\": 1,\n \"Run\": 17,\n \"Speed\": 1000\n },\n {\n \"Expt\": 1,\n \"Run\": 18,\n \"Speed\": 1000\n },\n {\n \"Expt\": 1,\n \"Run\": 19,\n \"Speed\": 960\n },\n {\n \"Expt\": 1,\n \"Run\": 20,\n \"Speed\": 960\n },\n {\n \"Expt\": 2,\n \"Run\": 1,\n \"Speed\": 960\n },\n {\n \"Expt\": 2,\n \"Run\": 2,\n \"Speed\": 940\n },\n {\n \"Expt\": 2,\n \"Run\": 3,\n \"Speed\": 960\n },\n {\n \"Expt\": 2,\n \"Run\": 4,\n \"Speed\": 940\n },\n {\n \"Expt\": 2,\n \"Run\": 5,\n \"Speed\": 880\n },\n {\n \"Expt\": 2,\n \"Run\": 6,\n \"Speed\": 800\n },\n {\n \"Expt\": 2,\n \"Run\": 7,\n \"Speed\": 850\n },\n {\n \"Expt\": 2,\n \"Run\": 8,\n \"Speed\": 880\n },\n {\n \"Expt\": 2,\n \"Run\": 9,\n \"Speed\": 900\n },\n {\n \"Expt\": 2,\n \"Run\": 10,\n \"Speed\": 840\n },\n {\n \"Expt\": 2,\n \"Run\": 11,\n \"Speed\": 830\n },\n {\n \"Expt\": 2,\n \"Run\": 12,\n \"Speed\": 790\n },\n {\n \"Expt\": 2,\n \"Run\": 13,\n \"Speed\": 810\n },\n {\n \"Expt\": 2,\n \"Run\": 14,\n \"Speed\": 880\n },\n {\n \"Expt\": 2,\n \"Run\": 15,\n \"Speed\": 880\n },\n {\n \"Expt\": 2,\n \"Run\": 16,\n \"Speed\": 830\n },\n {\n \"Expt\": 2,\n \"Run\": 17,\n \"Speed\": 800\n },\n {\n \"Expt\": 2,\n \"Run\": 18,\n \"Speed\": 790\n },\n {\n \"Expt\": 2,\n \"Run\": 19,\n \"Speed\": 760\n },\n {\n \"Expt\": 2,\n \"Run\": 20,\n \"Speed\": 800\n },\n {\n \"Expt\": 3,\n \"Run\": 1,\n \"Speed\": 880\n },\n {\n \"Expt\": 3,\n \"Run\": 2,\n \"Speed\": 880\n },\n {\n \"Expt\": 3,\n \"Run\": 3,\n \"Speed\": 880\n },\n {\n \"Expt\": 3,\n \"Run\": 4,\n \"Speed\": 860\n },\n {\n \"Expt\": 3,\n \"Run\": 5,\n \"Speed\": 720\n },\n {\n \"Expt\": 3,\n \"Run\": 6,\n \"Speed\": 720\n },\n {\n \"Expt\": 3,\n \"Run\": 7,\n \"Speed\": 620\n },\n {\n \"Expt\": 3,\n \"Run\": 8,\n \"Speed\": 860\n },\n {\n \"Expt\": 3,\n \"Run\": 9,\n \"Speed\": 970\n },\n {\n \"Expt\": 3,\n \"Run\": 10,\n \"Speed\": 950\n },\n {\n \"Expt\": 3,\n \"Run\": 11,\n \"Speed\": 880\n },\n {\n \"Expt\": 3,\n \"Run\": 12,\n \"Speed\": 910\n },\n {\n \"Expt\": 3,\n \"Run\": 13,\n \"Speed\": 850\n },\n {\n \"Expt\": 3,\n \"Run\": 14,\n \"Speed\": 870\n },\n {\n \"Expt\": 3,\n \"Run\": 15,\n \"Speed\": 840\n },\n {\n \"Expt\": 3,\n \"Run\": 16,\n \"Speed\": 840\n },\n {\n \"Expt\": 3,\n \"Run\": 17,\n \"Speed\": 850\n },\n {\n \"Expt\": 3,\n \"Run\": 18,\n \"Speed\": 840\n },\n {\n \"Expt\": 3,\n \"Run\": 19,\n \"Speed\": 840\n },\n {\n \"Expt\": 3,\n \"Run\": 20,\n \"Speed\": 840\n },\n {\n \"Expt\": 4,\n \"Run\": 1,\n \"Speed\": 890\n },\n {\n \"Expt\": 4,\n \"Run\": 2,\n \"Speed\": 810\n },\n {\n \"Expt\": 4,\n \"Run\": 3,\n \"Speed\": 810\n },\n {\n \"Expt\": 4,\n \"Run\": 4,\n \"Speed\": 820\n },\n {\n \"Expt\": 4,\n \"Run\": 5,\n \"Speed\": 800\n },\n {\n \"Expt\": 4,\n \"Run\": 6,\n \"Speed\": 770\n },\n {\n \"Expt\": 4,\n \"Run\": 7,\n \"Speed\": 760\n },\n {\n \"Expt\": 4,\n \"Run\": 8,\n \"Speed\": 740\n },\n {\n \"Expt\": 4,\n \"Run\": 9,\n \"Speed\": 750\n },\n {\n \"Expt\": 4,\n \"Run\": 10,\n \"Speed\": 760\n },\n {\n \"Expt\": 4,\n \"Run\": 11,\n \"Speed\": 910\n },\n {\n \"Expt\": 4,\n \"Run\": 12,\n \"Speed\": 920\n },\n {\n \"Expt\": 4,\n \"Run\": 13,\n \"Speed\": 890\n },\n {\n \"Expt\": 4,\n \"Run\": 14,\n \"Speed\": 860\n },\n {\n \"Expt\": 4,\n \"Run\": 15,\n \"Speed\": 880\n },\n {\n \"Expt\": 4,\n \"Run\": 16,\n \"Speed\": 720\n },\n {\n \"Expt\": 4,\n \"Run\": 17,\n \"Speed\": 840\n },\n {\n \"Expt\": 4,\n \"Run\": 18,\n \"Speed\": 850\n },\n {\n \"Expt\": 4,\n \"Run\": 19,\n \"Speed\": 850\n },\n {\n \"Expt\": 4,\n \"Run\": 20,\n \"Speed\": 780\n },\n {\n \"Expt\": 5,\n \"Run\": 1,\n \"Speed\": 890\n },\n {\n \"Expt\": 5,\n \"Run\": 2,\n \"Speed\": 840\n },\n {\n \"Expt\": 5,\n \"Run\": 3,\n \"Speed\": 780\n },\n {\n \"Expt\": 5,\n \"Run\": 4,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 5,\n \"Speed\": 760\n },\n {\n \"Expt\": 5,\n \"Run\": 6,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 7,\n \"Speed\": 790\n },\n {\n \"Expt\": 5,\n \"Run\": 8,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 9,\n \"Speed\": 820\n },\n {\n \"Expt\": 5,\n \"Run\": 10,\n \"Speed\": 850\n },\n {\n \"Expt\": 5,\n \"Run\": 11,\n \"Speed\": 870\n },\n {\n \"Expt\": 5,\n \"Run\": 12,\n \"Speed\": 870\n },\n {\n \"Expt\": 5,\n \"Run\": 13,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 14,\n \"Speed\": 740\n },\n {\n \"Expt\": 5,\n \"Run\": 15,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 16,\n \"Speed\": 940\n },\n {\n \"Expt\": 5,\n \"Run\": 17,\n \"Speed\": 950\n },\n {\n \"Expt\": 5,\n \"Run\": 18,\n \"Speed\": 800\n },\n {\n \"Expt\": 5,\n \"Run\": 19,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 20,\n \"Speed\": 870\n }\n ],\n },\n children: [\n {\n type: 'density',\n data: {\n transform: [\n {\n type: 'kde',\n field: 'Speed',\n groupBy: ['Expt'],\n },\n ],\n },\n encode: {\n x: 'Expt',\n y: 'Speed',\n size: 'size',\n color: 'Expt',\n },\n style: {\n fillOpacity: 0.4,\n },\n tooltip: false,\n },\n {\n type: 'boxplot',\n encode: {\n x: 'Expt',\n y: 'Speed',\n color: 'Expt',\n shape: 'violin',\n },\n style: {\n opacity: 0.8,\n point: false,\n },\n },\n ],\n axis: {\n x: { title: '实验组' },\n y: { title: '光速测量值' },\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'view',\n data: {\n type: 'inline',\n value: [\n {\"Expt\":1,\"Run\":1,\"Speed\":850},\n {\"Expt\":1,\"Run\":2,\"Speed\":740},\n {\"Expt\":1,\"Run\":3,\"Speed\":900},\n {\"Expt\":1,\"Run\":4,\"Speed\":1070},\n {\"Expt\":1,\"Run\":5,\"Speed\":930},\n {\"Expt\":1,\"Run\":6,\"Speed\":850},\n {\"Expt\":1,\"Run\":7,\"Speed\":950},\n {\"Expt\":1,\"Run\":8,\"Speed\":980},\n {\"Expt\":1,\"Run\":9,\"Speed\":980},\n {\"Expt\":1,\"Run\":10,\"Speed\":880}\n ],\n },\n children: [\n {\n type: 'density',\n data: {\n transform: [\n {\n type: 'kde',\n field: 'Speed',\n groupBy: ['Expt'],\n },\n ],\n },\n encode: {\n x: 'Expt',\n y: 'y',\n color: 'Expt',\n size: 'size',\n series: 'Expt',\n },\n style: {\n fillOpacity: 0.4,\n },\n tooltip: false,\n },\n {\n type: 'boxplot',\n encode: {\n x: 'Expt',\n y: 'Speed',\n color: 'Expt',\n shape: 'violin',\n },\n style: {\n opacity: 0.8,\n strokeOpacity: 0.6,\n point: false,\n },\n },\n ],\n});\n\nchart.render();", + "duration": 10024, + "retrievedSkillIds": [ + "g2-mark-violin", + "g2-mark-distribution-curve", + "g2-mark-density", + "g2-transform-groupx", + "g2-mark-boxplot" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1261, + "expectedLength": 6957, + "similarity": 0.8216923076923077, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'view',\n data: {\n type: 'inline',\n value: [\n {\"Expt\":1,\"Run\":1,\"Speed\":850},\n {\"Expt\":1,\"Run\":2,\"Speed\":740},\n {\"Expt\":1,\"Run\":3,\"Speed\":900},\n {\"Expt\":1,\"Run\":4,\"Speed\":1070},\n {\"Expt\":1,\"Run\":5,\"Speed\":930},\n {\"Expt\":1,\"Run\":6,\"Speed\":850},\n {\"Expt\":1,\"Run\":7,\"Speed\":950},\n {\"Expt\":1,\"Run\":8,\"Speed\":980},\n {\"Expt\":1,\"Run\":9,\"Speed\":980},\n {\"Expt\":1,\"Run\":10,\"Speed\":880}\n ],\n },\n children: [\n {\n type: 'density',\n data: {\n transform: [\n {\n type: 'kde',\n field: 'Speed',\n groupBy: ['Expt'],\n },\n ],\n },\n encode: {\n x: 'Expt',\n y: 'y',\n color: 'Expt',\n size: 'size',\n series: 'Expt',\n },\n style: {\n fillOpacity: 0.4,\n },\n tooltip: false,\n },\n {\n type: 'boxplot',\n encode: {\n x: 'Expt',\n y: 'Speed',\n color: 'Expt',\n shape: 'violin',\n },\n style: {\n opacity: 0.8,\n strokeOpacity: 0.6,\n point: false,\n },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "type", + "value", + "children", + "type", + "data", + "transform", + "type", + "field", + "groupBy", + "encode", + "x", + "y", + "color", + "size", + "series", + "style", + "fillOpacity", + "tooltip", + "type", + "encode", + "x", + "y", + "color", + "shape", + "style", + "opacity", + "strokeOpacity", + "point" + ], + "stringLiterals": [ + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "view.children", + "type.view" + ] + } + } + }, + { + "id": "case-60", + "query": "根据描述绘制图表,使用 G2 渲染一个条形图,展示指定年份(默认过滤为 2000 年)不同年龄和性别人口数据的分布,通过转置坐标系使条形水平排列,男性数据取负值以实现左右对称可视化。参考数据:\n[{\"year\":1850,\"age\":0,\"sex\":1,\"people\":1483789},{\"year\":1850,\"age\":0,\"sex\":2,\"people\":1450376},{\"year\":1850,\"age\":5,\"sex\":1,\"people\":1411067},{\"year\":1850,\"age\":5,\"sex\":2,\"people\":1359668},{\"year\":1850,\"age\":10,\"sex\":1,\"people\":1260099},{\"year\":1850,\"age\":10,\"sex\":2,\"people\":1216114},{\"year\":1850,\"age\":15,\"sex\":1,\"people\":1077133},{\"year\":1850,\"age\":15,\"sex\":2,\"people\":1110619},{\"year\":1850,\"age\":20,\"sex\":1,\"people\":1017281},{\"year\":1850,\"age\":20,\"sex\":2,\"people\":1003841}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"coordinate\": {\n \"transform\": [\n {\n \"type\": \"transpose\"\n }\n ]\n },\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": {\n \"type\": \"inline\",\n \"value\": [\n {\n \"year\": 1850,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 1483789\n },\n {\n \"year\": 1850,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 1450376\n },\n {\n \"year\": 1850,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 1411067\n },\n {\n \"year\": 1850,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 1359668\n },\n {\n \"year\": 1850,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 1260099\n },\n {\n \"year\": 1850,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 1216114\n },\n {\n \"year\": 1850,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 1077133\n },\n {\n \"year\": 1850,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 1110619\n },\n {\n \"year\": 1850,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 1017281\n },\n {\n \"year\": 1850,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 1003841\n },\n {\n \"year\": 1850,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 862547\n },\n {\n \"year\": 1850,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 799482\n },\n {\n \"year\": 1850,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 730638\n },\n {\n \"year\": 1850,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 639636\n },\n {\n \"year\": 1850,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 588487\n },\n {\n \"year\": 1850,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 505012\n },\n {\n \"year\": 1850,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 475911\n },\n {\n \"year\": 1850,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 428185\n },\n {\n \"year\": 1850,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 384211\n },\n {\n \"year\": 1850,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 341254\n },\n {\n \"year\": 1850,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 321343\n },\n {\n \"year\": 1850,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 286580\n },\n {\n \"year\": 1850,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 194080\n },\n {\n \"year\": 1850,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 187208\n },\n {\n \"year\": 1850,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 174976\n },\n {\n \"year\": 1850,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 162236\n },\n {\n \"year\": 1850,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 106827\n },\n {\n \"year\": 1850,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 105534\n },\n {\n \"year\": 1850,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 73677\n },\n {\n \"year\": 1850,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 71762\n },\n {\n \"year\": 1850,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 40834\n },\n {\n \"year\": 1850,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 40229\n },\n {\n \"year\": 1850,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 23449\n },\n {\n \"year\": 1850,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 22949\n },\n {\n \"year\": 1850,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 8186\n },\n {\n \"year\": 1850,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 10511\n },\n {\n \"year\": 1850,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 5259\n },\n {\n \"year\": 1850,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 6569\n },\n {\n \"year\": 1860,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 2120846\n },\n {\n \"year\": 1860,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 2092162\n },\n {\n \"year\": 1860,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 1804467\n },\n {\n \"year\": 1860,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 1778772\n },\n {\n \"year\": 1860,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 1612640\n },\n {\n \"year\": 1860,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 1540350\n },\n {\n \"year\": 1860,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 1438094\n },\n {\n \"year\": 1860,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 1495999\n },\n {\n \"year\": 1860,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 1351121\n },\n {\n \"year\": 1860,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 1370462\n },\n {\n \"year\": 1860,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 1217615\n },\n {\n \"year\": 1860,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 1116373\n },\n {\n \"year\": 1860,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 1043174\n },\n {\n \"year\": 1860,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 936055\n },\n {\n \"year\": 1860,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 866910\n },\n {\n \"year\": 1860,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 737136\n },\n {\n \"year\": 1860,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 699434\n },\n {\n \"year\": 1860,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 616826\n },\n {\n \"year\": 1860,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 552404\n },\n {\n \"year\": 1860,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 461739\n },\n {\n \"year\": 1860,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 456176\n },\n {\n \"year\": 1860,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 407305\n },\n {\n \"year\": 1860,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 292417\n },\n {\n \"year\": 1860,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 267224\n },\n {\n \"year\": 1860,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 260887\n },\n {\n \"year\": 1860,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 249735\n },\n {\n \"year\": 1860,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 149331\n },\n {\n \"year\": 1860,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 141405\n },\n {\n \"year\": 1860,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 98465\n },\n {\n \"year\": 1860,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 101778\n },\n {\n \"year\": 1860,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 56699\n },\n {\n \"year\": 1860,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 57597\n },\n {\n \"year\": 1860,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 29007\n },\n {\n \"year\": 1860,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 29506\n },\n {\n \"year\": 1860,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 10434\n },\n {\n \"year\": 1860,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 14053\n },\n {\n \"year\": 1860,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 7232\n },\n {\n \"year\": 1860,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 6622\n },\n {\n \"year\": 1870,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 2800083\n },\n {\n \"year\": 1870,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 2717102\n },\n {\n \"year\": 1870,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 2428469\n },\n {\n \"year\": 1870,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 2393680\n },\n {\n \"year\": 1870,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 2427341\n },\n {\n \"year\": 1870,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 2342670\n },\n {\n \"year\": 1870,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 1958390\n },\n {\n \"year\": 1870,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 2077248\n },\n {\n \"year\": 1870,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 1805303\n },\n {\n \"year\": 1870,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 1909382\n },\n {\n \"year\": 1870,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 1509059\n },\n {\n \"year\": 1870,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 1574285\n },\n {\n \"year\": 1870,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 1251534\n },\n {\n \"year\": 1870,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 1275629\n },\n {\n \"year\": 1870,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 1185336\n },\n {\n \"year\": 1870,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 1137490\n },\n {\n \"year\": 1870,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 968861\n },\n {\n \"year\": 1870,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 944401\n },\n {\n \"year\": 1870,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 852672\n },\n {\n \"year\": 1870,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 747916\n },\n {\n \"year\": 1870,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 736387\n },\n {\n \"year\": 1870,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 637801\n },\n {\n \"year\": 1870,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 486036\n },\n {\n \"year\": 1870,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 407819\n },\n {\n \"year\": 1870,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 399264\n },\n {\n \"year\": 1870,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 374801\n },\n {\n \"year\": 1870,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 260829\n },\n {\n \"year\": 1870,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 239080\n },\n {\n \"year\": 1870,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 173364\n },\n {\n \"year\": 1870,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 165501\n },\n {\n \"year\": 1870,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 86929\n },\n {\n \"year\": 1870,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 89540\n },\n {\n \"year\": 1870,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 47427\n },\n {\n \"year\": 1870,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 54190\n },\n {\n \"year\": 1870,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 15891\n },\n {\n \"year\": 1870,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 19302\n },\n {\n \"year\": 1870,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 8649\n },\n {\n \"year\": 1870,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 13068\n },\n {\n \"year\": 1880,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 3533662\n },\n {\n \"year\": 1880,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 3421597\n },\n {\n \"year\": 1880,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 3297503\n },\n {\n \"year\": 1880,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 3179142\n },\n {\n \"year\": 1880,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 2911924\n },\n {\n \"year\": 1880,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 2813550\n },\n {\n \"year\": 1880,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 2457734\n },\n {\n \"year\": 1880,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 2527818\n },\n {\n \"year\": 1880,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 2547780\n },\n {\n \"year\": 1880,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 2512803\n },\n {\n \"year\": 1880,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 2119393\n },\n {\n \"year\": 1880,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 1974241\n },\n {\n \"year\": 1880,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 1749107\n },\n {\n \"year\": 1880,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 1596772\n },\n {\n \"year\": 1880,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 1540772\n },\n {\n \"year\": 1880,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 1483717\n },\n {\n \"year\": 1880,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 1237347\n },\n {\n \"year\": 1880,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 1239435\n },\n {\n \"year\": 1880,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 1065973\n },\n {\n \"year\": 1880,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 1003711\n },\n {\n \"year\": 1880,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 964484\n },\n {\n \"year\": 1880,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 863012\n },\n {\n \"year\": 1880,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 679147\n },\n {\n \"year\": 1880,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 594843\n },\n {\n \"year\": 1880,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 580298\n },\n {\n \"year\": 1880,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 526956\n },\n {\n \"year\": 1880,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 369398\n },\n {\n \"year\": 1880,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 346303\n },\n {\n \"year\": 1880,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 255422\n },\n {\n \"year\": 1880,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 251860\n },\n {\n \"year\": 1880,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 141628\n },\n {\n \"year\": 1880,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 143513\n },\n {\n \"year\": 1880,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 67526\n },\n {\n \"year\": 1880,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 77290\n },\n {\n \"year\": 1880,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 22437\n },\n {\n \"year\": 1880,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 31227\n },\n {\n \"year\": 1880,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 10272\n },\n {\n \"year\": 1880,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 15451\n },\n {\n \"year\": 1900,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 4619544\n },\n {\n \"year\": 1900,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 4589196\n },\n {\n \"year\": 1900,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 4465783\n },\n {\n \"year\": 1900,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 4390483\n },\n {\n \"year\": 1900,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 4057669\n },\n {\n \"year\": 1900,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 4001749\n },\n {\n \"year\": 1900,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 3774846\n },\n {\n \"year\": 1900,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 3801743\n },\n {\n \"year\": 1900,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 3694038\n },\n {\n \"year\": 1900,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 3751061\n },\n {\n \"year\": 1900,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 3389280\n },\n {\n \"year\": 1900,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 3236056\n },\n {\n \"year\": 1900,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 2918964\n },\n {\n \"year\": 1900,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 2665174\n },\n {\n \"year\": 1900,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 2633883\n },\n {\n \"year\": 1900,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 2347737\n },\n {\n \"year\": 1900,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 2261070\n },\n {\n \"year\": 1900,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 2004987\n },\n {\n \"year\": 1900,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 1868413\n },\n {\n \"year\": 1900,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 1648025\n },\n {\n \"year\": 1900,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 1571038\n },\n {\n \"year\": 1900,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 1411981\n },\n {\n \"year\": 1900,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 1161908\n },\n {\n \"year\": 1900,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 1064632\n },\n {\n \"year\": 1900,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 916571\n },\n {\n \"year\": 1900,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 887508\n },\n {\n \"year\": 1900,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 672663\n },\n {\n \"year\": 1900,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 640212\n },\n {\n \"year\": 1900,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 454747\n },\n {\n \"year\": 1900,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 440007\n },\n {\n \"year\": 1900,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 268211\n },\n {\n \"year\": 1900,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 265879\n },\n {\n \"year\": 1900,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 127435\n },\n {\n \"year\": 1900,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 132449\n },\n {\n \"year\": 1900,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 44008\n },\n {\n \"year\": 1900,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 48614\n },\n {\n \"year\": 1900,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 15164\n },\n {\n \"year\": 1900,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 20093\n },\n {\n \"year\": 1910,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 5296823\n },\n {\n \"year\": 1910,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 5287477\n },\n {\n \"year\": 1910,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 4991803\n },\n {\n \"year\": 1910,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 4866139\n },\n {\n \"year\": 1910,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 4650747\n },\n {\n \"year\": 1910,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 4471887\n },\n {\n \"year\": 1910,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 4566154\n },\n {\n \"year\": 1910,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 4592269\n },\n {\n \"year\": 1910,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 4637632\n },\n {\n \"year\": 1910,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 4447683\n },\n {\n \"year\": 1910,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 4257755\n },\n {\n \"year\": 1910,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 3946153\n },\n {\n \"year\": 1910,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 3658125\n },\n {\n \"year\": 1910,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 3295220\n },\n {\n \"year\": 1910,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 3427518\n },\n {\n \"year\": 1910,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 3088990\n },\n {\n \"year\": 1910,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 2860229\n },\n {\n \"year\": 1910,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 2471267\n },\n {\n \"year\": 1910,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 2363801\n },\n {\n \"year\": 1910,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 2114930\n },\n {\n \"year\": 1910,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 2126516\n },\n {\n \"year\": 1910,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 1773592\n },\n {\n \"year\": 1910,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 1508358\n },\n {\n \"year\": 1910,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 1317651\n },\n {\n \"year\": 1910,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 1189421\n },\n {\n \"year\": 1910,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 1090697\n },\n {\n \"year\": 1910,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 850159\n },\n {\n \"year\": 1910,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 813868\n },\n {\n \"year\": 1910,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 557936\n },\n {\n \"year\": 1910,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 547623\n },\n {\n \"year\": 1910,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 322679\n },\n {\n \"year\": 1910,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 350900\n },\n {\n \"year\": 1910,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 161715\n },\n {\n \"year\": 1910,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 174315\n },\n {\n \"year\": 1910,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 59699\n },\n {\n \"year\": 1910,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 62725\n },\n {\n \"year\": 1910,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 23929\n },\n {\n \"year\": 1910,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 28965\n },\n {\n \"year\": 1920,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 5934792\n },\n {\n \"year\": 1920,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 5694244\n },\n {\n \"year\": 1920,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 5789008\n },\n {\n \"year\": 1920,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 5693960\n },\n {\n \"year\": 1920,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 5401156\n },\n {\n \"year\": 1920,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 5293057\n },\n {\n \"year\": 1920,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 4724365\n },\n {\n \"year\": 1920,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 4779936\n },\n {\n \"year\": 1920,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 4549411\n },\n {\n \"year\": 1920,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 4742632\n },\n {\n \"year\": 1920,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 4565066\n },\n {\n \"year\": 1920,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 4529382\n },\n {\n \"year\": 1920,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 4110771\n },\n {\n \"year\": 1920,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 3982426\n },\n {\n \"year\": 1920,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 4081543\n },\n {\n \"year\": 1920,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 3713810\n },\n {\n \"year\": 1920,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 3321923\n },\n {\n \"year\": 1920,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 3059757\n },\n {\n \"year\": 1920,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 3143891\n },\n {\n \"year\": 1920,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 2669089\n },\n {\n \"year\": 1920,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 2546035\n },\n {\n \"year\": 1920,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 2200491\n },\n {\n \"year\": 1920,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 1880975\n },\n {\n \"year\": 1920,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 1674672\n },\n {\n \"year\": 1920,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 1587549\n },\n {\n \"year\": 1920,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 1382877\n },\n {\n \"year\": 1920,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 1095956\n },\n {\n \"year\": 1920,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 989901\n },\n {\n \"year\": 1920,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 714618\n },\n {\n \"year\": 1920,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 690097\n },\n {\n \"year\": 1920,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 417292\n },\n {\n \"year\": 1920,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 439465\n },\n {\n \"year\": 1920,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 187000\n },\n {\n \"year\": 1920,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 211110\n },\n {\n \"year\": 1920,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 75991\n },\n {\n \"year\": 1920,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 92829\n },\n {\n \"year\": 1920,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 22398\n },\n {\n \"year\": 1920,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 32085\n },\n {\n \"year\": 1930,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 5875250\n },\n {\n \"year\": 1930,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 5662530\n },\n {\n \"year\": 1930,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 6542592\n },\n {\n \"year\": 1930,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 6129561\n },\n {\n \"year\": 1930,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 6064820\n },\n {\n \"year\": 1930,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 5986529\n },\n {\n \"year\": 1930,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 5709452\n },\n {\n \"year\": 1930,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 5769587\n },\n {\n \"year\": 1930,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 5305992\n },\n {\n \"year\": 1930,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 5565382\n },\n {\n \"year\": 1930,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 4929853\n },\n {\n \"year\": 1930,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 5050229\n },\n {\n \"year\": 1930,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 4424408\n },\n {\n \"year\": 1930,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 4455213\n },\n {\n \"year\": 1930,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 4576531\n },\n {\n \"year\": 1930,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 4593776\n },\n {\n \"year\": 1930,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 4075139\n },\n {\n \"year\": 1930,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 3754022\n },\n {\n \"year\": 1930,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 3633152\n },\n {\n \"year\": 1930,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 3396558\n },\n {\n \"year\": 1930,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 3128108\n },\n {\n \"year\": 1930,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 2809191\n },\n {\n \"year\": 1930,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 2434077\n },\n {\n \"year\": 1930,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 2298614\n },\n {\n \"year\": 1930,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 1927564\n },\n {\n \"year\": 1930,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 1783515\n },\n {\n \"year\": 1930,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 1397275\n },\n {\n \"year\": 1930,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 1307312\n },\n {\n \"year\": 1930,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 919045\n },\n {\n \"year\": 1930,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 918509\n },\n {\n \"year\": 1930,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 536375\n },\n {\n \"year\": 1930,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 522716\n },\n {\n \"year\": 1930,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 246708\n },\n {\n \"year\": 1930,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 283579\n },\n {\n \"year\": 1930,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 88978\n },\n {\n \"year\": 1930,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 109210\n },\n {\n \"year\": 1930,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 30338\n },\n {\n \"year\": 1930,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 43483\n },\n {\n \"year\": 1940,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 5294628\n },\n {\n \"year\": 1940,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 5124653\n },\n {\n \"year\": 1940,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 5468378\n },\n {\n \"year\": 1940,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 5359099\n },\n {\n \"year\": 1940,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 5960416\n },\n {\n \"year\": 1940,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 5868532\n },\n {\n \"year\": 1940,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 6165109\n },\n {\n \"year\": 1940,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 6193701\n },\n {\n \"year\": 1940,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 5682414\n },\n {\n \"year\": 1940,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 5896002\n },\n {\n \"year\": 1940,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 5438166\n },\n {\n \"year\": 1940,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 5664244\n },\n {\n \"year\": 1940,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 5040048\n },\n {\n \"year\": 1940,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 5171522\n },\n {\n \"year\": 1940,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 4724804\n },\n {\n \"year\": 1940,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 4791809\n },\n {\n \"year\": 1940,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 4437392\n },\n {\n \"year\": 1940,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 4394061\n },\n {\n \"year\": 1940,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 4190187\n },\n {\n \"year\": 1940,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 4050290\n },\n {\n \"year\": 1940,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 3785735\n },\n {\n \"year\": 1940,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 3488396\n },\n {\n \"year\": 1940,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 2972069\n },\n {\n \"year\": 1940,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 2810000\n },\n {\n \"year\": 1940,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 2370232\n },\n {\n \"year\": 1940,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 2317790\n },\n {\n \"year\": 1940,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 1897678\n },\n {\n \"year\": 1940,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 1911117\n },\n {\n \"year\": 1940,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 1280023\n },\n {\n \"year\": 1940,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 1287711\n },\n {\n \"year\": 1940,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 713875\n },\n {\n \"year\": 1940,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 764915\n },\n {\n \"year\": 1940,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 359418\n },\n {\n \"year\": 1940,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 414761\n },\n {\n \"year\": 1940,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 127303\n },\n {\n \"year\": 1940,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 152131\n },\n {\n \"year\": 1940,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 42263\n },\n {\n \"year\": 1940,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 58119\n },\n {\n \"year\": 1950,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 8211806\n },\n {\n \"year\": 1950,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 7862267\n },\n {\n \"year\": 1950,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 6706601\n },\n {\n \"year\": 1950,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 6450863\n },\n {\n \"year\": 1950,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 5629744\n },\n {\n \"year\": 1950,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 5430835\n },\n {\n \"year\": 1950,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 5264129\n },\n {\n \"year\": 1950,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 5288742\n },\n {\n \"year\": 1950,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 5573308\n },\n {\n \"year\": 1950,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 5854227\n },\n {\n \"year\": 1950,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 6007254\n },\n {\n \"year\": 1950,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 6317332\n },\n {\n \"year\": 1950,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 5676022\n },\n {\n \"year\": 1950,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 5895178\n },\n {\n \"year\": 1950,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 5511364\n },\n {\n \"year\": 1950,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 5696261\n },\n {\n \"year\": 1950,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 5076985\n },\n {\n \"year\": 1950,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 5199224\n },\n {\n \"year\": 1950,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 4533177\n },\n {\n \"year\": 1950,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 4595842\n },\n {\n \"year\": 1950,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 4199164\n },\n {\n \"year\": 1950,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 4147295\n },\n {\n \"year\": 1950,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 3667351\n },\n {\n \"year\": 1950,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 3595158\n },\n {\n \"year\": 1950,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 3035038\n },\n {\n \"year\": 1950,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 3009768\n },\n {\n \"year\": 1950,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 2421234\n },\n {\n \"year\": 1950,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 2548250\n },\n {\n \"year\": 1950,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 1627920\n },\n {\n \"year\": 1950,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 1786831\n },\n {\n \"year\": 1950,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 1006530\n },\n {\n \"year\": 1950,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 1148469\n },\n {\n \"year\": 1950,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 511727\n },\n {\n \"year\": 1950,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 637717\n },\n {\n \"year\": 1950,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 182821\n },\n {\n \"year\": 1950,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 242798\n },\n {\n \"year\": 1950,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 54836\n },\n {\n \"year\": 1950,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 90766\n },\n {\n \"year\": 1960,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 10374975\n },\n {\n \"year\": 1960,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 10146999\n },\n {\n \"year\": 1960,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 9495503\n },\n {\n \"year\": 1960,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 9250741\n },\n {\n \"year\": 1960,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 8563700\n },\n {\n \"year\": 1960,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 8310764\n },\n {\n \"year\": 1960,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 6620902\n },\n {\n \"year\": 1960,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 6617493\n },\n {\n \"year\": 1960,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 5268384\n },\n {\n \"year\": 1960,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 5513495\n },\n {\n \"year\": 1960,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 5311805\n },\n {\n \"year\": 1960,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 5548259\n },\n {\n \"year\": 1960,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 5801342\n },\n {\n \"year\": 1960,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 6090862\n },\n {\n \"year\": 1960,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 6063063\n },\n {\n \"year\": 1960,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 6431337\n },\n {\n \"year\": 1960,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 5657943\n },\n {\n \"year\": 1960,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 5940520\n },\n {\n \"year\": 1960,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 5345658\n },\n {\n \"year\": 1960,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 5516028\n },\n {\n \"year\": 1960,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 4763364\n },\n {\n \"year\": 1960,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 4928844\n },\n {\n \"year\": 1960,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 4170581\n },\n {\n \"year\": 1960,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 4402878\n },\n {\n \"year\": 1960,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 3405293\n },\n {\n \"year\": 1960,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 3723839\n },\n {\n \"year\": 1960,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 2859371\n },\n {\n \"year\": 1960,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 3268699\n },\n {\n \"year\": 1960,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 2115763\n },\n {\n \"year\": 1960,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 2516479\n },\n {\n \"year\": 1960,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 1308913\n },\n {\n \"year\": 1960,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 1641371\n },\n {\n \"year\": 1960,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 619923\n },\n {\n \"year\": 1960,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 856952\n },\n {\n \"year\": 1960,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 253245\n },\n {\n \"year\": 1960,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 384572\n },\n {\n \"year\": 1960,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 75908\n },\n {\n \"year\": 1960,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 135774\n },\n {\n \"year\": 1970,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 8685121\n },\n {\n \"year\": 1970,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 8326887\n },\n {\n \"year\": 1970,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 10411131\n },\n {\n \"year\": 1970,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 10003293\n },\n {\n \"year\": 1970,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 10756403\n },\n {\n \"year\": 1970,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 10343538\n },\n {\n \"year\": 1970,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 9605399\n },\n {\n \"year\": 1970,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 9414284\n },\n {\n \"year\": 1970,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 7729202\n },\n {\n \"year\": 1970,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 8341830\n },\n {\n \"year\": 1970,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 6539301\n },\n {\n \"year\": 1970,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 6903041\n },\n {\n \"year\": 1970,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 5519879\n },\n {\n \"year\": 1970,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 5851441\n },\n {\n \"year\": 1970,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 5396732\n },\n {\n \"year\": 1970,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 5708021\n },\n {\n \"year\": 1970,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 5718538\n },\n {\n \"year\": 1970,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 6129319\n },\n {\n \"year\": 1970,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 5794120\n },\n {\n \"year\": 1970,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 6198742\n },\n {\n \"year\": 1970,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 5298312\n },\n {\n \"year\": 1970,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 5783817\n },\n {\n \"year\": 1970,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 4762911\n },\n {\n \"year\": 1970,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 5222164\n },\n {\n \"year\": 1970,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 4037643\n },\n {\n \"year\": 1970,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 4577251\n },\n {\n \"year\": 1970,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 3142606\n },\n {\n \"year\": 1970,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 3894827\n },\n {\n \"year\": 1970,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 2340826\n },\n {\n \"year\": 1970,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 3138009\n },\n {\n \"year\": 1970,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 1599269\n },\n {\n \"year\": 1970,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 2293376\n },\n {\n \"year\": 1970,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 886155\n },\n {\n \"year\": 1970,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 1417553\n },\n {\n \"year\": 1970,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 371123\n },\n {\n \"year\": 1970,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 658511\n },\n {\n \"year\": 1970,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 186502\n },\n {\n \"year\": 1970,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 314929\n },\n {\n \"year\": 1980,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 8439366\n },\n {\n \"year\": 1980,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 8081854\n },\n {\n \"year\": 1980,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 8680730\n },\n {\n \"year\": 1980,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 8275881\n },\n {\n \"year\": 1980,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 9452338\n },\n {\n \"year\": 1980,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 9048483\n },\n {\n \"year\": 1980,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 10698856\n },\n {\n \"year\": 1980,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 10410271\n },\n {\n \"year\": 1980,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 10486776\n },\n {\n \"year\": 1980,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 10614947\n },\n {\n \"year\": 1980,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 9624053\n },\n {\n \"year\": 1980,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 9827903\n },\n {\n \"year\": 1980,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 8705835\n },\n {\n \"year\": 1980,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 8955225\n },\n {\n \"year\": 1980,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 6852069\n },\n {\n \"year\": 1980,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 7134239\n },\n {\n \"year\": 1980,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 5692148\n },\n {\n \"year\": 1980,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 5953910\n },\n {\n \"year\": 1980,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 5342469\n },\n {\n \"year\": 1980,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 5697543\n },\n {\n \"year\": 1980,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 5603709\n },\n {\n \"year\": 1980,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 6110117\n },\n {\n \"year\": 1980,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 5485098\n },\n {\n \"year\": 1980,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 6160229\n },\n {\n \"year\": 1980,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 4696140\n },\n {\n \"year\": 1980,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 5456885\n },\n {\n \"year\": 1980,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 3893510\n },\n {\n \"year\": 1980,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 4896947\n },\n {\n \"year\": 1980,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 2857774\n },\n {\n \"year\": 1980,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 3963441\n },\n {\n \"year\": 1980,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 1840438\n },\n {\n \"year\": 1980,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 2951759\n },\n {\n \"year\": 1980,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 1012886\n },\n {\n \"year\": 1980,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 1919292\n },\n {\n \"year\": 1980,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 472338\n },\n {\n \"year\": 1980,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 1023115\n },\n {\n \"year\": 1980,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 204148\n },\n {\n \"year\": 1980,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 499046\n },\n {\n \"year\": 1990,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 9307465\n },\n {\n \"year\": 1990,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 8894007\n },\n {\n \"year\": 1990,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 9274732\n },\n {\n \"year\": 1990,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 8799955\n },\n {\n \"year\": 1990,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 8782542\n },\n {\n \"year\": 1990,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 8337284\n },\n {\n \"year\": 1990,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 9020572\n },\n {\n \"year\": 1990,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 8590991\n },\n {\n \"year\": 1990,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 9436188\n },\n {\n \"year\": 1990,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 9152644\n },\n {\n \"year\": 1990,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 10658027\n },\n {\n \"year\": 1990,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 10587292\n },\n {\n \"year\": 1990,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 11028712\n },\n {\n \"year\": 1990,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 11105750\n },\n {\n \"year\": 1990,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 9853933\n },\n {\n \"year\": 1990,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 10038644\n },\n {\n \"year\": 1990,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 8712632\n },\n {\n \"year\": 1990,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 8928252\n },\n {\n \"year\": 1990,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 6848082\n },\n {\n \"year\": 1990,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 7115129\n },\n {\n \"year\": 1990,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 5553992\n },\n {\n \"year\": 1990,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 5899925\n },\n {\n \"year\": 1990,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 4981670\n },\n {\n \"year\": 1990,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 5460506\n },\n {\n \"year\": 1990,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 4953822\n },\n {\n \"year\": 1990,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 5663205\n },\n {\n \"year\": 1990,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 4538398\n },\n {\n \"year\": 1990,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 5594108\n },\n {\n \"year\": 1990,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 3429420\n },\n {\n \"year\": 1990,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 4610222\n },\n {\n \"year\": 1990,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 2344932\n },\n {\n \"year\": 1990,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 3723980\n },\n {\n \"year\": 1990,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 1342996\n },\n {\n \"year\": 1990,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 2545730\n },\n {\n \"year\": 1990,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 588790\n },\n {\n \"year\": 1990,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 1419494\n },\n {\n \"year\": 1990,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 238459\n },\n {\n \"year\": 1990,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 745146\n },\n {\n \"year\": 2000,\n \"age\": 0,\n \"sex\": 1,\n \"people\": 9735380\n },\n {\n \"year\": 2000,\n \"age\": 0,\n \"sex\": 2,\n \"people\": 9310714\n },\n {\n \"year\": 2000,\n \"age\": 5,\n \"sex\": 1,\n \"people\": 10552146\n },\n {\n \"year\": 2000,\n \"age\": 5,\n \"sex\": 2,\n \"people\": 10069564\n },\n {\n \"year\": 2000,\n \"age\": 10,\n \"sex\": 1,\n \"people\": 10563233\n },\n {\n \"year\": 2000,\n \"age\": 10,\n \"sex\": 2,\n \"people\": 10022524\n },\n {\n \"year\": 2000,\n \"age\": 15,\n \"sex\": 1,\n \"people\": 10237419\n },\n {\n \"year\": 2000,\n \"age\": 15,\n \"sex\": 2,\n \"people\": 9692669\n },\n {\n \"year\": 2000,\n \"age\": 20,\n \"sex\": 1,\n \"people\": 9731315\n },\n {\n \"year\": 2000,\n \"age\": 20,\n \"sex\": 2,\n \"people\": 9324244\n },\n {\n \"year\": 2000,\n \"age\": 25,\n \"sex\": 1,\n \"people\": 9659493\n },\n {\n \"year\": 2000,\n \"age\": 25,\n \"sex\": 2,\n \"people\": 9518507\n },\n {\n \"year\": 2000,\n \"age\": 30,\n \"sex\": 1,\n \"people\": 10205879\n },\n {\n \"year\": 2000,\n \"age\": 30,\n \"sex\": 2,\n \"people\": 10119296\n },\n {\n \"year\": 2000,\n \"age\": 35,\n \"sex\": 1,\n \"people\": 11475182\n },\n {\n \"year\": 2000,\n \"age\": 35,\n \"sex\": 2,\n \"people\": 11635647\n },\n {\n \"year\": 2000,\n \"age\": 40,\n \"sex\": 1,\n \"people\": 11320252\n },\n {\n \"year\": 2000,\n \"age\": 40,\n \"sex\": 2,\n \"people\": 11488578\n },\n {\n \"year\": 2000,\n \"age\": 45,\n \"sex\": 1,\n \"people\": 9925006\n },\n {\n \"year\": 2000,\n \"age\": 45,\n \"sex\": 2,\n \"people\": 10261253\n },\n {\n \"year\": 2000,\n \"age\": 50,\n \"sex\": 1,\n \"people\": 8507934\n },\n {\n \"year\": 2000,\n \"age\": 50,\n \"sex\": 2,\n \"people\": 8911133\n },\n {\n \"year\": 2000,\n \"age\": 55,\n \"sex\": 1,\n \"people\": 6459082\n },\n {\n \"year\": 2000,\n \"age\": 55,\n \"sex\": 2,\n \"people\": 6921268\n },\n {\n \"year\": 2000,\n \"age\": 60,\n \"sex\": 1,\n \"people\": 5123399\n },\n {\n \"year\": 2000,\n \"age\": 60,\n \"sex\": 2,\n \"people\": 5668961\n },\n {\n \"year\": 2000,\n \"age\": 65,\n \"sex\": 1,\n \"people\": 4453623\n },\n {\n \"year\": 2000,\n \"age\": 65,\n \"sex\": 2,\n \"people\": 4804784\n },\n {\n \"year\": 2000,\n \"age\": 70,\n \"sex\": 1,\n \"people\": 3792145\n },\n {\n \"year\": 2000,\n \"age\": 70,\n \"sex\": 2,\n \"people\": 5184855\n },\n {\n \"year\": 2000,\n \"age\": 75,\n \"sex\": 1,\n \"people\": 2912655\n },\n {\n \"year\": 2000,\n \"age\": 75,\n \"sex\": 2,\n \"people\": 4355644\n },\n {\n \"year\": 2000,\n \"age\": 80,\n \"sex\": 1,\n \"people\": 1902638\n },\n {\n \"year\": 2000,\n \"age\": 80,\n \"sex\": 2,\n \"people\": 3221898\n },\n {\n \"year\": 2000,\n \"age\": 85,\n \"sex\": 1,\n \"people\": 970357\n },\n {\n \"year\": 2000,\n \"age\": 85,\n \"sex\": 2,\n \"people\": 1981156\n },\n {\n \"year\": 2000,\n \"age\": 90,\n \"sex\": 1,\n \"people\": 336303\n },\n {\n \"year\": 2000,\n \"age\": 90,\n \"sex\": 2,\n \"people\": 1064581\n }\n ],\n \"transform\": [\n {\n \"type\": \"filter\",\n \"callback\": (d) => d.year === 2000\n }\n ]\n },\n \"encode\": {\n \"x\": \"age\",\n \"y\": (d) => (d.sex === 1 ? -d.people : d.people),\n \"color\": \"sex\"\n },\n \"scale\": {\n \"color\": {\n \"type\": \"ordinal\"\n },\n \"x\": {\n \"range\": [\n 1,\n 0\n ]\n }\n },\n \"axis\": {\n \"y\": {\n \"labelFormatter\": \"~s\"\n }\n },\n \"legend\": {\n \"color\": {\n \"labelFormatter\": (d) => (d === 1 ? 'Male' : 'Female')\n }\n },\n \"tooltip\": {\n \"items\": [\n (d) => ({ value: d.people, name: d.sex === 1 ? 'Male' : 'Female' })\n ]\n },\n \"type\": \"interval\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"year\":1850,\"age\":0,\"sex\":1,\"people\":1483789},\n {\"year\":1850,\"age\":0,\"sex\":2,\"people\":1450376},\n {\"year\":1850,\"age\":5,\"sex\":1,\"people\":1411067},\n {\"year\":1850,\"age\":5,\"sex\":2,\"people\":1359668},\n {\"year\":1850,\"age\":10,\"sex\":1,\"people\":1260099},\n {\"year\":1850,\"age\":10,\"sex\":2,\"people\":1216114},\n {\"year\":1850,\"age\":15,\"sex\":1,\"people\":1077133},\n {\"year\":1850,\"age\":15,\"sex\":2,\"people\":1110619},\n {\"year\":1850,\"age\":20,\"sex\":1,\"people\":1017281},\n {\"year\":1850,\"age\":20,\"sex\":2,\"people\":1003841}\n];\n\nchart.options({\n type: 'interval',\n data: {\n type: 'inline',\n value: data,\n transform: [\n // 默认过滤为指定年份(示例数据为1850年,实际使用时应改为2000)\n { type: 'filter', callback: (d) => d.year === 1850 }\n ]\n },\n coordinate: {\n transform: [{ type: 'transpose' }] // 转置为水平条形\n },\n encode: {\n x: 'age',\n y: (d) => d.sex === 1 ? -d.people : d.people, // 男性取负值(左侧),女性取正值(右侧)\n color: 'sex',\n tooltip: 'people'\n },\n scale: {\n color: {\n domain: [1, 2],\n range: ['#5B8FF9', '#FF7875'] // 1:男性(蓝), 2:女性(红)\n }\n },\n axis: {\n x: { title: '年龄' },\n y: {\n title: '人口数量',\n labelFormatter: (d) => Math.abs(d).toLocaleString() // 显示绝对值,隐藏负号\n }\n },\n tooltip: {\n items: [\n { \n field: 'people', \n name: '人口',\n formatter: (d, item) => {\n const value = Math.abs(d);\n const gender = item.sex === 1 ? '男性' : '女性';\n return `${gender}: ${value.toLocaleString()}`;\n }\n }\n ]\n }\n});\n\nchart.render();", + "duration": 26751, + "retrievedSkillIds": [ + "g2-mark-bi-directional-bar", + "g2-transform-groupy", + "g2-data-fold", + "g2-mark-helix", + "g2-comp-facet-circle" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1649, + "expectedLength": 48771, + "similarity": 0.3872912076382331, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"year\":1850,\"age\":0,\"sex\":1,\"people\":1483789},\n {\"year\":1850,\"age\":0,\"sex\":2,\"people\":1450376},\n {\"year\":1850,\"age\":5,\"sex\":1,\"people\":1411067},\n {\"year\":1850,\"age\":5,\"sex\":2,\"people\":1359668},\n {\"year\":1850,\"age\":10,\"sex\":1,\"people\":1260099},\n {\"year\":1850,\"age\":10,\"sex\":2,\"people\":1216114},\n {\"year\":1850,\"age\":15,\"sex\":1,\"people\":1077133},\n {\"year\":1850,\"age\":15,\"sex\":2,\"people\":1110619},\n {\"year\":1850,\"age\":20,\"sex\":1,\"people\":1017281},\n {\"year\":1850,\"age\":20,\"sex\":2,\"people\":1003841}\n];\n\nchart.options({\n type: 'interval',\n data: {\n type: 'inline',\n value: data,\n transform: [\n // 默认过滤为指定年份(示例数据为1850年,实际使用时应改为2000)\n { type: 'filter', callback: (d) => d.year === 1850 }\n ]\n },\n coordinate: {\n transform: [{ type: 'transpose' }] // 转置为水平条形\n },\n encode: {\n x: 'age',\n y: (d) => d.sex === 1 ? -d.people : d.people, // 男性取负值(左侧),女性取正值(右侧)\n color: 'sex',\n tooltip: 'people'\n },\n scale: {\n color: {\n domain: [1, 2],\n range: ['#5B8FF9', '#FF7875'] // 1:男性(蓝), 2:女性(红)\n }\n },\n axis: {\n x: { title: '年龄' },\n y: {\n title: '人口数量',\n labelFormatter: (d) => Math.abs(d).toLocaleString() // 显示绝对值,隐藏负号\n }\n },\n tooltip: {\n items: [\n { \n field: 'people', \n name: '人口',\n formatter: (d, item) => {\n const value = Math.abs(d);\n const gender = item.sex === 1 ? '男性' : '女性';\n return `${gender}: ${value.toLocaleString()}`;\n }\n }\n ]\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "abs", + "toLocaleString", + "abs", + "toLocaleString", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "type", + "value", + "transform", + "type", + "callback", + "coordinate", + "transform", + "type", + "encode", + "x", + "y", + "people", + "color", + "tooltip", + "scale", + "color", + "domain", + "range", + "1", + "2", + "axis", + "x", + "title", + "y", + "title", + "labelFormatter", + "tooltip", + "items", + "field", + "name", + "formatter" + ], + "stringLiterals": [ + "year", + "age", + "sex", + "people", + "year", + "age", + "sex", + "people", + "year", + "age", + "sex", + "people", + "year", + "age", + "sex", + "people", + "year", + "age", + "sex", + "people", + "year", + "age", + "sex", + "people", + "year", + "age", + "sex", + "people", + "year", + "age", + "sex", + "people", + "year", + "age", + "sex", + "people", + "year", + "age", + "sex", + "people" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.interval" + ] + } + } + }, + { + "id": "case-61", + "query": "根据描述绘制图表,使用桑基图展示能源流动路径及各环节的能量值,数据来源于不同能源的生产、转换和消费过程,通过节点和连线表示能源去向和数量。参考数据:[{\"source\":\"Agricultural 'waste'\",\"target\":\"Bio-conversion\",\"value\":124.729},{\"source\":\"Bio-conversion\",\"target\":\"Liquid\",\"value\":0.597},{\"source\":\"Bio-conversion\",\"target\":\"Losses\",\"value\":26.862},{\"source\":\"Bio-conversion\",\"target\":\"Solid\",\"value\":280.322},{\"source\":\"Bio-conversion\",\"target\":\"Gas\",\"value\":81.144},{\"source\":\"Biofuel imports\",\"target\":\"Liquid\",\"value\":35},{\"source\":\"Biomass imports\",\"target\":\"Solid\",\"value\":35},{\"source\":\"Coal imports\",\"target\":\"Coal\",\"value\":11.606},{\"source\":\"Coal reserves\",\"target\":\"Coal\",\"value\":63.965},{\"source\":\"Coal\",\"target\":\"Solid\",\"value\":75.571}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'sankey',\n autoFit: true,\n data: {\n type: 'inline',\n value: [\n {\n \"source\": \"Agricultural 'waste'\",\n \"target\": \"Bio-conversion\",\n \"value\": 124.729\n },\n {\n \"source\": \"Bio-conversion\",\n \"target\": \"Liquid\",\n \"value\": 0.597\n },\n {\n \"source\": \"Bio-conversion\",\n \"target\": \"Losses\",\n \"value\": 26.862\n },\n {\n \"source\": \"Bio-conversion\",\n \"target\": \"Solid\",\n \"value\": 280.322\n },\n {\n \"source\": \"Bio-conversion\",\n \"target\": \"Gas\",\n \"value\": 81.144\n },\n {\n \"source\": \"Biofuel imports\",\n \"target\": \"Liquid\",\n \"value\": 35\n },\n {\n \"source\": \"Biomass imports\",\n \"target\": \"Solid\",\n \"value\": 35\n },\n {\n \"source\": \"Coal imports\",\n \"target\": \"Coal\",\n \"value\": 11.606\n },\n {\n \"source\": \"Coal reserves\",\n \"target\": \"Coal\",\n \"value\": 63.965\n },\n {\n \"source\": \"Coal\",\n \"target\": \"Solid\",\n \"value\": 75.571\n },\n {\n \"source\": \"District heating\",\n \"target\": \"Industry\",\n \"value\": 10.639\n },\n {\n \"source\": \"District heating\",\n \"target\": \"Heating and cooling - commercial\",\n \"value\": 22.505\n },\n {\n \"source\": \"District heating\",\n \"target\": \"Heating and cooling - homes\",\n \"value\": 46.184\n },\n {\n \"source\": \"Electricity grid\",\n \"target\": \"Over generation / exports\",\n \"value\": 104.453\n },\n {\n \"source\": \"Electricity grid\",\n \"target\": \"Heating and cooling - homes\",\n \"value\": 113.726\n },\n {\n \"source\": \"Electricity grid\",\n \"target\": \"H2 conversion\",\n \"value\": 27.14\n },\n {\n \"source\": \"Electricity grid\",\n \"target\": \"Industry\",\n \"value\": 342.165\n },\n {\n \"source\": \"Electricity grid\",\n \"target\": \"Road transport\",\n \"value\": 37.797\n },\n {\n \"source\": \"Electricity grid\",\n \"target\": \"Agriculture\",\n \"value\": 4.412\n },\n {\n \"source\": \"Electricity grid\",\n \"target\": \"Heating and cooling - commercial\",\n \"value\": 40.858\n },\n {\n \"source\": \"Electricity grid\",\n \"target\": \"Losses\",\n \"value\": 56.691\n },\n {\n \"source\": \"Electricity grid\",\n \"target\": \"Rail transport\",\n \"value\": 7.863\n },\n {\n \"source\": \"Electricity grid\",\n \"target\": \"Lighting & appliances - commercial\",\n \"value\": 90.008\n },\n {\n \"source\": \"Electricity grid\",\n \"target\": \"Lighting & appliances - homes\",\n \"value\": 93.494\n },\n {\n \"source\": \"Gas imports\",\n \"target\": \"Ngas\",\n \"value\": 40.719\n },\n {\n \"source\": \"Gas reserves\",\n \"target\": \"Ngas\",\n \"value\": 82.233\n },\n {\n \"source\": \"Gas\",\n \"target\": \"Heating and cooling - commercial\",\n \"value\": 0.129\n },\n {\n \"source\": \"Gas\",\n \"target\": \"Losses\",\n \"value\": 1.401\n },\n {\n \"source\": \"Gas\",\n \"target\": \"Thermal generation\",\n \"value\": 151.891\n },\n {\n \"source\": \"Gas\",\n \"target\": \"Agriculture\",\n \"value\": 2.096\n },\n {\n \"source\": \"Gas\",\n \"target\": \"Industry\",\n \"value\": 48.58\n },\n {\n \"source\": \"Geothermal\",\n \"target\": \"Electricity grid\",\n \"value\": 7.013\n },\n {\n \"source\": \"H2 conversion\",\n \"target\": \"H2\",\n \"value\": 20.897\n },\n {\n \"source\": \"H2 conversion\",\n \"target\": \"Losses\",\n \"value\": 6.242\n },\n {\n \"source\": \"H2\",\n \"target\": \"Road transport\",\n \"value\": 20.897\n },\n {\n \"source\": \"Hydro\",\n \"target\": \"Electricity grid\",\n \"value\": 6.995\n },\n {\n \"source\": \"Liquid\",\n \"target\": \"Industry\",\n \"value\": 121.066\n },\n {\n \"source\": \"Liquid\",\n \"target\": \"International shipping\",\n \"value\": 128.69\n },\n {\n \"source\": \"Liquid\",\n \"target\": \"Road transport\",\n \"value\": 135.835\n },\n {\n \"source\": \"Liquid\",\n \"target\": \"Domestic aviation\",\n \"value\": 14.458\n },\n {\n \"source\": \"Liquid\",\n \"target\": \"International aviation\",\n \"value\": 206.267\n },\n {\n \"source\": \"Liquid\",\n \"target\": \"Agriculture\",\n \"value\": 3.64\n },\n {\n \"source\": \"Liquid\",\n \"target\": \"National navigation\",\n \"value\": 33.218\n },\n {\n \"source\": \"Liquid\",\n \"target\": \"Rail transport\",\n \"value\": 4.413\n },\n {\n \"source\": \"Marine algae\",\n \"target\": \"Bio-conversion\",\n \"value\": 4.375\n },\n {\n \"source\": \"Ngas\",\n \"target\": \"Gas\",\n \"value\": 122.952\n },\n {\n \"source\": \"Nuclear\",\n \"target\": \"Thermal generation\",\n \"value\": 839.978\n },\n {\n \"source\": \"Oil imports\",\n \"target\": \"Oil\",\n \"value\": 504.287\n },\n {\n \"source\": \"Oil reserves\",\n \"target\": \"Oil\",\n \"value\": 107.703\n },\n {\n \"source\": \"Oil\",\n \"target\": \"Liquid\",\n \"value\": 611.99\n },\n {\n \"source\": \"Other waste\",\n \"target\": \"Solid\",\n \"value\": 56.587\n },\n {\n \"source\": \"Other waste\",\n \"target\": \"Bio-conversion\",\n \"value\": 77.81\n },\n {\n \"source\": \"Pumped heat\",\n \"target\": \"Heating and cooling - homes\",\n \"value\": 193.026\n },\n {\n \"source\": \"Pumped heat\",\n \"target\": \"Heating and cooling - commercial\",\n \"value\": 70.672\n },\n {\n \"source\": \"Solar PV\",\n \"target\": \"Electricity grid\",\n \"value\": 59.901\n },\n {\n \"source\": \"Solar Thermal\",\n \"target\": \"Heating and cooling - homes\",\n \"value\": 19.263\n },\n {\n \"source\": \"Solar\",\n \"target\": \"Solar Thermal\",\n \"value\": 19.263\n },\n {\n \"source\": \"Solar\",\n \"target\": \"Solar PV\",\n \"value\": 59.901\n },\n {\n \"source\": \"Solid\",\n \"target\": \"Agriculture\",\n \"value\": 0.882\n },\n {\n \"source\": \"Solid\",\n \"target\": \"Thermal generation\",\n \"value\": 400.12\n },\n {\n \"source\": \"Solid\",\n \"target\": \"Industry\",\n \"value\": 46.477\n },\n {\n \"source\": \"Thermal generation\",\n \"target\": \"Electricity grid\",\n \"value\": 525.531\n },\n {\n \"source\": \"Thermal generation\",\n \"target\": \"Losses\",\n \"value\": 787.129\n },\n {\n \"source\": \"Thermal generation\",\n \"target\": \"District heating\",\n \"value\": 79.329\n },\n {\n \"source\": \"Tidal\",\n \"target\": \"Electricity grid\",\n \"value\": 9.452\n },\n {\n \"source\": \"UK land based bioenergy\",\n \"target\": \"Bio-conversion\",\n \"value\": 182.01\n },\n {\n \"source\": \"Wave\",\n \"target\": \"Electricity grid\",\n \"value\": 19.013\n },\n {\n \"source\": \"Wind\",\n \"target\": \"Electricity grid\",\n \"value\": 289.366\n }\n ],\n transform: [\n {\n type: 'custom',\n callback: (data) => ({ links: data }),\n },\n ],\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.03,\n },\n encode: {\n color: (d) => {\n // 根据节点名称的首字母分配颜色\n const firstChar = d.key?.charAt(0).toLowerCase() || '';\n if (firstChar <= 'f') return '#1890ff';\n if (firstChar <= 'n') return '#52c41a';\n if (firstChar <= 's') return '#faad14';\n return '#f5222d';\n },\n },\n style: {\n labelSpacing: 3,\n labelFontWeight: 'bold',\n nodeStrokeWidth: 1,\n linkFillOpacity: 0.6,\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 900,\n height: 600,\n});\n\nconst data = [\n {\"source\":\"Agricultural 'waste'\",\"target\":\"Bio-conversion\",\"value\":124.729},\n {\"source\":\"Bio-conversion\",\"target\":\"Liquid\",\"value\":0.597},\n {\"source\":\"Bio-conversion\",\"target\":\"Losses\",\"value\":26.862},\n {\"source\":\"Bio-conversion\",\"target\":\"Solid\",\"value\":280.322},\n {\"source\":\"Bio-conversion\",\"target\":\"Gas\",\"value\":81.144},\n {\"source\":\"Biofuel imports\",\"target\":\"Liquid\",\"value\":35},\n {\"source\":\"Biomass imports\",\"target\":\"Solid\",\"value\":35},\n {\"source\":\"Coal imports\",\"target\":\"Coal\",\"value\":11.606},\n {\"source\":\"Coal reserves\",\"target\":\"Coal\",\"value\":63.965},\n {\"source\":\"Coal\",\"target\":\"Solid\",\"value\":75.571}\n];\n\nchart.options({\n type: 'sankey',\n data: {\n value: {\n links: data,\n },\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.03,\n nodeWidth: 0.02,\n },\n style: {\n labelSpacing: 4,\n labelFontSize: 11,\n linkFillOpacity: 0.35,\n nodeLineWidth: 1.2,\n },\n legend: false,\n});\n\nchart.render();", + "duration": 12585, + "retrievedSkillIds": [ + "g2-mark-sankey", + "g2-mark-chord", + "g2-concept-chart-selection", + "g2-mark-treemap", + "g2-mark-arc-diagram" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1088, + "expectedLength": 7216, + "similarity": 0.49392344497607654, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 900,\n height: 600,\n});\n\nconst data = [\n {\"source\":\"Agricultural 'waste'\",\"target\":\"Bio-conversion\",\"value\":124.729},\n {\"source\":\"Bio-conversion\",\"target\":\"Liquid\",\"value\":0.597},\n {\"source\":\"Bio-conversion\",\"target\":\"Losses\",\"value\":26.862},\n {\"source\":\"Bio-conversion\",\"target\":\"Solid\",\"value\":280.322},\n {\"source\":\"Bio-conversion\",\"target\":\"Gas\",\"value\":81.144},\n {\"source\":\"Biofuel imports\",\"target\":\"Liquid\",\"value\":35},\n {\"source\":\"Biomass imports\",\"target\":\"Solid\",\"value\":35},\n {\"source\":\"Coal imports\",\"target\":\"Coal\",\"value\":11.606},\n {\"source\":\"Coal reserves\",\"target\":\"Coal\",\"value\":63.965},\n {\"source\":\"Coal\",\"target\":\"Solid\",\"value\":75.571}\n];\n\nchart.options({\n type: 'sankey',\n data: {\n value: {\n links: data,\n },\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.03,\n nodeWidth: 0.02,\n },\n style: {\n labelSpacing: 4,\n labelFontSize: 11,\n linkFillOpacity: 0.35,\n nodeLineWidth: 1.2,\n },\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "value", + "links", + "layout", + "nodeAlign", + "nodePadding", + "nodeWidth", + "style", + "labelSpacing", + "labelFontSize", + "linkFillOpacity", + "nodeLineWidth", + "legend" + ], + "stringLiterals": [ + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render" + ] + } + } + }, + { + "id": "case-62", + "query": "根据描述绘制图表,使用极坐标堆叠柱状图展示美国各州按年龄组划分的种群分布数据,通过数据折叠和Y轴堆叠变换实现多维度年龄分组在州维度上的可视化,包含颜色映射、坐标轴配置、图例和入场动画效果。参考数据:\n[{\"State\":\"AL\",\"Under 5 Years\":310504,\"5 to 13 Years\":552339,\"14 to 17 Years\":259034,\"18 to 24 Years\":450818,\"25 to 44 Years\":1231572,\"45 to 64 Years\":1215966,\"65 Years and Over\":641667,\"total\":4661900},{\"State\":\"AK\",\"Under 5 Years\":52083,\"5 to 13 Years\":85640,\"14 to 17 Years\":42153,\"18 to 24 Years\":74257,\"25 to 44 Years\":198724,\"45 to 64 Years\":183159,\"65 Years and Over\":50277,\"total\":686293},{\"State\":\"AZ\",\"Under 5 Years\":515910,\"5 to 13 Years\":828669,\"14 to 17 Years\":362642,\"18 to 24 Years\":601943,\"25 to 44 Years\":1804762,\"45 to 64 Years\":1523681,\"65 Years and Over\":862573,\"total\":6500180},{\"State\":\"AR\",\"Under 5 Years\":202070,\"5 to 13 Years\":343207,\"14 to 17 Years\":157204,\"18 to 24 Years\":264160,\"25 to 44 Years\":754420,\"45 to 64 Years\":727124,\"65 Years and Over\":407205,\"total\":2855390},{\"State\":\"CA\",\"Under 5 Years\":2704659,\"5 to 13 Years\":4499890,\"14 to 17 Years\":2159981,\"18 to 24 Years\":3853788,\"25 to 44 Years\":10604510,\"45 to 64 Years\":8819342,\"65 Years and Over\":4114496,\"total\":36756666},{\"State\":\"CO\",\"Under 5 Years\":358280,\"5 to 13 Years\":587154,\"14 to 17 Years\":261701,\"18 to 24 Years\":466194,\"25 to 44 Years\":1464939,\"45 to 64 Years\":1290094,\"65 Years and Over\":511094,\"total\":4939456},{\"State\":\"CT\",\"Under 5 Years\":211637,\"5 to 13 Years\":403658,\"14 to 17 Years\":196918,\"18 to 24 Years\":325110,\"25 to 44 Years\":916955,\"45 to 64 Years\":968967,\"65 Years and Over\":478007,\"total\":3501252},{\"State\":\"DE\",\"Under 5 Years\":59319,\"5 to 13 Years\":99496,\"14 to 17 Years\":47414,\"18 to 24 Years\":84464,\"25 to 44 Years\":230183,\"45 to 64 Years\":230528,\"65 Years and Over\":121688,\"total\":873092},{\"State\":\"DC\",\"Under 5 Years\":36352,\"5 to 13 Years\":50439,\"14 to 17 Years\":25225,\"18 to 24 Years\":75569,\"25 to 44 Years\":193557,\"45 to 64 Years\":140043,\"65 Years and Over\":70648,\"total\":591833},{\"State\":\"FL\",\"Under 5 Years\":1140516,\"5 to 13 Years\":1938695,\"14 to 17 Years\":925060,\"18 to 24 Years\":1607297,\"25 to 44 Years\":4782119,\"45 to 64 Years\":4746856,\"65 Years and Over\":3187797,\"total\":18328340}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"coordinate\": {\n \"type\": \"polar\",\n \"innerRadius\": 0.4\n },\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": {\n \"type\": \"inline\",\n \"value\": [\n {\n \"State\": \"AL\",\n \"Under 5 Years\": 310504,\n \"5 to 13 Years\": 552339,\n \"14 to 17 Years\": 259034,\n \"18 to 24 Years\": 450818,\n \"25 to 44 Years\": 1231572,\n \"45 to 64 Years\": 1215966,\n \"65 Years and Over\": 641667,\n \"total\": 4661900\n },\n {\n \"State\": \"AK\",\n \"Under 5 Years\": 52083,\n \"5 to 13 Years\": 85640,\n \"14 to 17 Years\": 42153,\n \"18 to 24 Years\": 74257,\n \"25 to 44 Years\": 198724,\n \"45 to 64 Years\": 183159,\n \"65 Years and Over\": 50277,\n \"total\": 686293\n },\n {\n \"State\": \"AZ\",\n \"Under 5 Years\": 515910,\n \"5 to 13 Years\": 828669,\n \"14 to 17 Years\": 362642,\n \"18 to 24 Years\": 601943,\n \"25 to 44 Years\": 1804762,\n \"45 to 64 Years\": 1523681,\n \"65 Years and Over\": 862573,\n \"total\": 6500180\n },\n {\n \"State\": \"AR\",\n \"Under 5 Years\": 202070,\n \"5 to 13 Years\": 343207,\n \"14 to 17 Years\": 157204,\n \"18 to 24 Years\": 264160,\n \"25 to 44 Years\": 754420,\n \"45 to 64 Years\": 727124,\n \"65 Years and Over\": 407205,\n \"total\": 2855390\n },\n {\n \"State\": \"CA\",\n \"Under 5 Years\": 2704659,\n \"5 to 13 Years\": 4499890,\n \"14 to 17 Years\": 2159981,\n \"18 to 24 Years\": 3853788,\n \"25 to 44 Years\": 10604510,\n \"45 to 64 Years\": 8819342,\n \"65 Years and Over\": 4114496,\n \"total\": 36756666\n },\n {\n \"State\": \"CO\",\n \"Under 5 Years\": 358280,\n \"5 to 13 Years\": 587154,\n \"14 to 17 Years\": 261701,\n \"18 to 24 Years\": 466194,\n \"25 to 44 Years\": 1464939,\n \"45 to 64 Years\": 1290094,\n \"65 Years and Over\": 511094,\n \"total\": 4939456\n },\n {\n \"State\": \"CT\",\n \"Under 5 Years\": 211637,\n \"5 to 13 Years\": 403658,\n \"14 to 17 Years\": 196918,\n \"18 to 24 Years\": 325110,\n \"25 to 44 Years\": 916955,\n \"45 to 64 Years\": 968967,\n \"65 Years and Over\": 478007,\n \"total\": 3501252\n },\n {\n \"State\": \"DE\",\n \"Under 5 Years\": 59319,\n \"5 to 13 Years\": 99496,\n \"14 to 17 Years\": 47414,\n \"18 to 24 Years\": 84464,\n \"25 to 44 Years\": 230183,\n \"45 to 64 Years\": 230528,\n \"65 Years and Over\": 121688,\n \"total\": 873092\n },\n {\n \"State\": \"DC\",\n \"Under 5 Years\": 36352,\n \"5 to 13 Years\": 50439,\n \"14 to 17 Years\": 25225,\n \"18 to 24 Years\": 75569,\n \"25 to 44 Years\": 193557,\n \"45 to 64 Years\": 140043,\n \"65 Years and Over\": 70648,\n \"total\": 591833\n },\n {\n \"State\": \"FL\",\n \"Under 5 Years\": 1140516,\n \"5 to 13 Years\": 1938695,\n \"14 to 17 Years\": 925060,\n \"18 to 24 Years\": 1607297,\n \"25 to 44 Years\": 4782119,\n \"45 to 64 Years\": 4746856,\n \"65 Years and Over\": 3187797,\n \"total\": 18328340\n },\n {\n \"State\": \"GA\",\n \"Under 5 Years\": 740521,\n \"5 to 13 Years\": 1250460,\n \"14 to 17 Years\": 557860,\n \"18 to 24 Years\": 919876,\n \"25 to 44 Years\": 2846985,\n \"45 to 64 Years\": 2389018,\n \"65 Years and Over\": 981024,\n \"total\": 9685744\n },\n {\n \"State\": \"HI\",\n \"Under 5 Years\": 87207,\n \"5 to 13 Years\": 134025,\n \"14 to 17 Years\": 64011,\n \"18 to 24 Years\": 124834,\n \"25 to 44 Years\": 356237,\n \"45 to 64 Years\": 331817,\n \"65 Years and Over\": 190067,\n \"total\": 1288198\n },\n {\n \"State\": \"ID\",\n \"Under 5 Years\": 121746,\n \"5 to 13 Years\": 201192,\n \"14 to 17 Years\": 89702,\n \"18 to 24 Years\": 147606,\n \"25 to 44 Years\": 406247,\n \"45 to 64 Years\": 375173,\n \"65 Years and Over\": 182150,\n \"total\": 1523816\n },\n {\n \"State\": \"IL\",\n \"Under 5 Years\": 894368,\n \"5 to 13 Years\": 1558919,\n \"14 to 17 Years\": 725973,\n \"18 to 24 Years\": 1311479,\n \"25 to 44 Years\": 3596343,\n \"45 to 64 Years\": 3239173,\n \"65 Years and Over\": 1575308,\n \"total\": 12901563\n },\n {\n \"State\": \"IN\",\n \"Under 5 Years\": 443089,\n \"5 to 13 Years\": 780199,\n \"14 to 17 Years\": 361393,\n \"18 to 24 Years\": 605863,\n \"25 to 44 Years\": 1724528,\n \"45 to 64 Years\": 1647881,\n \"65 Years and Over\": 813839,\n \"total\": 6376792\n },\n {\n \"State\": \"IA\",\n \"Under 5 Years\": 201321,\n \"5 to 13 Years\": 345409,\n \"14 to 17 Years\": 165883,\n \"18 to 24 Years\": 306398,\n \"25 to 44 Years\": 750505,\n \"45 to 64 Years\": 788485,\n \"65 Years and Over\": 444554,\n \"total\": 3002555\n },\n {\n \"State\": \"KS\",\n \"Under 5 Years\": 202529,\n \"5 to 13 Years\": 342134,\n \"14 to 17 Years\": 155822,\n \"18 to 24 Years\": 293114,\n \"25 to 44 Years\": 728166,\n \"45 to 64 Years\": 713663,\n \"65 Years and Over\": 366706,\n \"total\": 2802134\n },\n {\n \"State\": \"KY\",\n \"Under 5 Years\": 284601,\n \"5 to 13 Years\": 493536,\n \"14 to 17 Years\": 229927,\n \"18 to 24 Years\": 381394,\n \"25 to 44 Years\": 1179637,\n \"45 to 64 Years\": 1134283,\n \"65 Years and Over\": 565867,\n \"total\": 4269245\n },\n {\n \"State\": \"LA\",\n \"Under 5 Years\": 310716,\n \"5 to 13 Years\": 542341,\n \"14 to 17 Years\": 254916,\n \"18 to 24 Years\": 471275,\n \"25 to 44 Years\": 1162463,\n \"45 to 64 Years\": 1128771,\n \"65 Years and Over\": 540314,\n \"total\": 4410796\n },\n {\n \"State\": \"ME\",\n \"Under 5 Years\": 71459,\n \"5 to 13 Years\": 133656,\n \"14 to 17 Years\": 69752,\n \"18 to 24 Years\": 112682,\n \"25 to 44 Years\": 331809,\n \"45 to 64 Years\": 397911,\n \"65 Years and Over\": 199187,\n \"total\": 1316456\n },\n {\n \"State\": \"MD\",\n \"Under 5 Years\": 371787,\n \"5 to 13 Years\": 651923,\n \"14 to 17 Years\": 316873,\n \"18 to 24 Years\": 543470,\n \"25 to 44 Years\": 1556225,\n \"45 to 64 Years\": 1513754,\n \"65 Years and Over\": 679565,\n \"total\": 5633597\n },\n {\n \"State\": \"MA\",\n \"Under 5 Years\": 383568,\n \"5 to 13 Years\": 701752,\n \"14 to 17 Years\": 341713,\n \"18 to 24 Years\": 665879,\n \"25 to 44 Years\": 1782449,\n \"45 to 64 Years\": 1751508,\n \"65 Years and Over\": 871098,\n \"total\": 6497967\n },\n {\n \"State\": \"MI\",\n \"Under 5 Years\": 625526,\n \"5 to 13 Years\": 1179503,\n \"14 to 17 Years\": 585169,\n \"18 to 24 Years\": 974480,\n \"25 to 44 Years\": 2628322,\n \"45 to 64 Years\": 2706100,\n \"65 Years and Over\": 1304322,\n \"total\": 10003422\n },\n {\n \"State\": \"MN\",\n \"Under 5 Years\": 358471,\n \"5 to 13 Years\": 606802,\n \"14 to 17 Years\": 289371,\n \"18 to 24 Years\": 507289,\n \"25 to 44 Years\": 1416063,\n \"45 to 64 Years\": 1391878,\n \"65 Years and Over\": 650519,\n \"total\": 5220393\n },\n {\n \"State\": \"MS\",\n \"Under 5 Years\": 220813,\n \"5 to 13 Years\": 371502,\n \"14 to 17 Years\": 174405,\n \"18 to 24 Years\": 305964,\n \"25 to 44 Years\": 764203,\n \"45 to 64 Years\": 730133,\n \"65 Years and Over\": 371598,\n \"total\": 2938618\n },\n {\n \"State\": \"MO\",\n \"Under 5 Years\": 399450,\n \"5 to 13 Years\": 690476,\n \"14 to 17 Years\": 331543,\n \"18 to 24 Years\": 560463,\n \"25 to 44 Years\": 1569626,\n \"45 to 64 Years\": 1554812,\n \"65 Years and Over\": 805235,\n \"total\": 5911605\n },\n {\n \"State\": \"MT\",\n \"Under 5 Years\": 61114,\n \"5 to 13 Years\": 106088,\n \"14 to 17 Years\": 53156,\n \"18 to 24 Years\": 95232,\n \"25 to 44 Years\": 236297,\n \"45 to 64 Years\": 278241,\n \"65 Years and Over\": 137312,\n \"total\": 967440\n },\n {\n \"State\": \"NE\",\n \"Under 5 Years\": 132092,\n \"5 to 13 Years\": 215265,\n \"14 to 17 Years\": 99638,\n \"18 to 24 Years\": 186657,\n \"25 to 44 Years\": 457177,\n \"45 to 64 Years\": 451756,\n \"65 Years and Over\": 240847,\n \"total\": 1783432\n },\n {\n \"State\": \"NV\",\n \"Under 5 Years\": 199175,\n \"5 to 13 Years\": 325650,\n \"14 to 17 Years\": 142976,\n \"18 to 24 Years\": 212379,\n \"25 to 44 Years\": 769913,\n \"45 to 64 Years\": 653357,\n \"65 Years and Over\": 296717,\n \"total\": 2600167\n },\n {\n \"State\": \"NH\",\n \"Under 5 Years\": 75297,\n \"5 to 13 Years\": 144235,\n \"14 to 17 Years\": 73826,\n \"18 to 24 Years\": 119114,\n \"25 to 44 Years\": 345109,\n \"45 to 64 Years\": 388250,\n \"65 Years and Over\": 169978,\n \"total\": 1315809\n },\n {\n \"State\": \"NJ\",\n \"Under 5 Years\": 557421,\n \"5 to 13 Years\": 1011656,\n \"14 to 17 Years\": 478505,\n \"18 to 24 Years\": 769321,\n \"25 to 44 Years\": 2379649,\n \"45 to 64 Years\": 2335168,\n \"65 Years and Over\": 1150941,\n \"total\": 8682661\n },\n {\n \"State\": \"NM\",\n \"Under 5 Years\": 148323,\n \"5 to 13 Years\": 241326,\n \"14 to 17 Years\": 112801,\n \"18 to 24 Years\": 203097,\n \"25 to 44 Years\": 517154,\n \"45 to 64 Years\": 501604,\n \"65 Years and Over\": 260051,\n \"total\": 1984356\n },\n {\n \"State\": \"NY\",\n \"Under 5 Years\": 1208495,\n \"5 to 13 Years\": 2141490,\n \"14 to 17 Years\": 1058031,\n \"18 to 24 Years\": 1999120,\n \"25 to 44 Years\": 5355235,\n \"45 to 64 Years\": 5120254,\n \"65 Years and Over\": 2607672,\n \"total\": 19490297\n },\n {\n \"State\": \"NC\",\n \"Under 5 Years\": 652823,\n \"5 to 13 Years\": 1097890,\n \"14 to 17 Years\": 492964,\n \"18 to 24 Years\": 883397,\n \"25 to 44 Years\": 2575603,\n \"45 to 64 Years\": 2380685,\n \"65 Years and Over\": 1139052,\n \"total\": 9222414\n },\n {\n \"State\": \"ND\",\n \"Under 5 Years\": 41896,\n \"5 to 13 Years\": 67358,\n \"14 to 17 Years\": 33794,\n \"18 to 24 Years\": 82629,\n \"25 to 44 Years\": 154913,\n \"45 to 64 Years\": 166615,\n \"65 Years and Over\": 94276,\n \"total\": 641481\n },\n {\n \"State\": \"OH\",\n \"Under 5 Years\": 743750,\n \"5 to 13 Years\": 1340492,\n \"14 to 17 Years\": 646135,\n \"18 to 24 Years\": 1081734,\n \"25 to 44 Years\": 3019147,\n \"45 to 64 Years\": 3083815,\n \"65 Years and Over\": 1570837,\n \"total\": 11485910\n },\n {\n \"State\": \"OK\",\n \"Under 5 Years\": 266547,\n \"5 to 13 Years\": 438926,\n \"14 to 17 Years\": 200562,\n \"18 to 24 Years\": 369916,\n \"25 to 44 Years\": 957085,\n \"45 to 64 Years\": 918688,\n \"65 Years and Over\": 490637,\n \"total\": 3642361\n },\n {\n \"State\": \"OR\",\n \"Under 5 Years\": 243483,\n \"5 to 13 Years\": 424167,\n \"14 to 17 Years\": 199925,\n \"18 to 24 Years\": 338162,\n \"25 to 44 Years\": 1044056,\n \"45 to 64 Years\": 1036269,\n \"65 Years and Over\": 503998,\n \"total\": 3790060\n },\n {\n \"State\": \"PA\",\n \"Under 5 Years\": 737462,\n \"5 to 13 Years\": 1345341,\n \"14 to 17 Years\": 679201,\n \"18 to 24 Years\": 1203944,\n \"25 to 44 Years\": 3157759,\n \"45 to 64 Years\": 3414001,\n \"65 Years and Over\": 1910571,\n \"total\": 12448279\n },\n {\n \"State\": \"RI\",\n \"Under 5 Years\": 60934,\n \"5 to 13 Years\": 111408,\n \"14 to 17 Years\": 56198,\n \"18 to 24 Years\": 114502,\n \"25 to 44 Years\": 277779,\n \"45 to 64 Years\": 282321,\n \"65 Years and Over\": 147646,\n \"total\": 1050788\n },\n {\n \"State\": \"SC\",\n \"Under 5 Years\": 303024,\n \"5 to 13 Years\": 517803,\n \"14 to 17 Years\": 245400,\n \"18 to 24 Years\": 438147,\n \"25 to 44 Years\": 1193112,\n \"45 to 64 Years\": 1186019,\n \"65 Years and Over\": 596295,\n \"total\": 4479800\n },\n {\n \"State\": \"SD\",\n \"Under 5 Years\": 58566,\n \"5 to 13 Years\": 94438,\n \"14 to 17 Years\": 45305,\n \"18 to 24 Years\": 82869,\n \"25 to 44 Years\": 196738,\n \"45 to 64 Years\": 210178,\n \"65 Years and Over\": 116100,\n \"total\": 804194\n },\n {\n \"State\": \"TN\",\n \"Under 5 Years\": 416334,\n \"5 to 13 Years\": 725948,\n \"14 to 17 Years\": 336312,\n \"18 to 24 Years\": 550612,\n \"25 to 44 Years\": 1719433,\n \"45 to 64 Years\": 1646623,\n \"65 Years and Over\": 819626,\n \"total\": 6214888\n },\n {\n \"State\": \"TX\",\n \"Under 5 Years\": 2027307,\n \"5 to 13 Years\": 3277946,\n \"14 to 17 Years\": 1420518,\n \"18 to 24 Years\": 2454721,\n \"25 to 44 Years\": 7017731,\n \"45 to 64 Years\": 5656528,\n \"65 Years and Over\": 2472223,\n \"total\": 24326974\n },\n {\n \"State\": \"UT\",\n \"Under 5 Years\": 268916,\n \"5 to 13 Years\": 413034,\n \"14 to 17 Years\": 167685,\n \"18 to 24 Years\": 329585,\n \"25 to 44 Years\": 772024,\n \"45 to 64 Years\": 538978,\n \"65 Years and Over\": 246202,\n \"total\": 2736424\n },\n {\n \"State\": \"VT\",\n \"Under 5 Years\": 32635,\n \"5 to 13 Years\": 62538,\n \"14 to 17 Years\": 33757,\n \"18 to 24 Years\": 61679,\n \"25 to 44 Years\": 155419,\n \"45 to 64 Years\": 188593,\n \"65 Years and Over\": 86649,\n \"total\": 621270\n },\n {\n \"State\": \"VA\",\n \"Under 5 Years\": 522672,\n \"5 to 13 Years\": 887525,\n \"14 to 17 Years\": 413004,\n \"18 to 24 Years\": 768475,\n \"25 to 44 Years\": 2203286,\n \"45 to 64 Years\": 2033550,\n \"65 Years and Over\": 940577,\n \"total\": 7769089\n },\n {\n \"State\": \"WA\",\n \"Under 5 Years\": 433119,\n \"5 to 13 Years\": 750274,\n \"14 to 17 Years\": 357782,\n \"18 to 24 Years\": 610378,\n \"25 to 44 Years\": 1850983,\n \"45 to 64 Years\": 1762811,\n \"65 Years and Over\": 783877,\n \"total\": 6549224\n },\n {\n \"State\": \"WV\",\n \"Under 5 Years\": 105435,\n \"5 to 13 Years\": 189649,\n \"14 to 17 Years\": 91074,\n \"18 to 24 Years\": 157989,\n \"25 to 44 Years\": 470749,\n \"45 to 64 Years\": 514505,\n \"65 Years and Over\": 285067,\n \"total\": 1814468\n },\n {\n \"State\": \"WI\",\n \"Under 5 Years\": 362277,\n \"5 to 13 Years\": 640286,\n \"14 to 17 Years\": 311849,\n \"18 to 24 Years\": 553914,\n \"25 to 44 Years\": 1487457,\n \"45 to 64 Years\": 1522038,\n \"65 Years and Over\": 750146,\n \"total\": 5627967\n },\n {\n \"State\": \"WY\",\n \"Under 5 Years\": 38253,\n \"5 to 13 Years\": 60890,\n \"14 to 17 Years\": 29314,\n \"18 to 24 Years\": 53980,\n \"25 to 44 Years\": 137338,\n \"45 to 64 Years\": 147279,\n \"65 Years and Over\": 65614,\n \"total\": 532668\n }\n ],\n \"transform\": [\n {\n \"type\": \"fold\",\n \"fields\": [\n \"Under 5 Years\",\n \"5 to 13 Years\",\n \"14 to 17 Years\",\n \"18 to 24 Years\",\n \"25 to 44 Years\",\n \"45 to 64 Years\",\n \"65 Years and Over\"\n ],\n \"key\": \"Age\",\n \"value\": \"Population\"\n }\n ]\n },\n \"transform\": [\n {\n \"type\": \"stackY\"\n }\n ],\n \"encode\": {\n \"x\": \"State\",\n \"y\": \"Population\",\n \"color\": \"Age\"\n },\n \"scale\": {\n \"color\": {\n \"range\": [\n \"#98abc5\",\n \"#8a89a6\",\n \"#7b6888\",\n \"#6b486b\",\n \"#a05d56\",\n \"#d0743c\",\n \"#ff8c00\"\n ]\n },\n \"y\": {\n \"type\": \"sqrt\"\n }\n },\n \"legend\": {\n \"color\": {\n \"position\": \"center\",\n \"display\": \"grid\",\n \"gridCol\": 1\n }\n },\n \"axis\": {\n \"y\": {\n \"labelFormatter\": \"~s\",\n \"tickFilter\": (_, i) => i !== 0,\n \"direction\": \"center\"\n },\n \"x\": {\n \"position\": \"inner\"\n }\n },\n \"animate\": {\n \"enter\": {\n \"type\": \"waveIn\"\n }\n },\n \"type\": \"interval\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"State\":\"AL\",\"Under 5 Years\":310504,\"5 to 13 Years\":552339,\"14 to 17 Years\":259034,\"18 to 24 Years\":450818,\"25 to 44 Years\":1231572,\"45 to 64 Years\":1215966,\"65 Years and Over\":641667,\"total\":4661900},\n {\"State\":\"AK\",\"Under 5 Years\":52083,\"5 to 13 Years\":85640,\"14 to 17 Years\":42153,\"18 to 24 Years\":74257,\"25 to 44 Years\":198724,\"45 to 64 Years\":183159,\"65 Years and Over\":50277,\"total\":686293},\n {\"State\":\"AZ\",\"Under 5 Years\":515910,\"5 to 13 Years\":828669,\"14 to 17 Years\":362642,\"18 to 24 Years\":601943,\"25 to 44 Years\":1804762,\"45 to 64 Years\":1523681,\"65 Years and Over\":862573,\"total\":6500180},\n {\"State\":\"AR\",\"Under 5 Years\":202070,\"5 to 13 Years\":343207,\"14 to 17 Years\":157204,\"18 to 24 Years\":264160,\"25 to 44 Years\":754420,\"45 to 64 Years\":727124,\"65 Years and Over\":407205,\"total\":2855390},\n {\"State\":\"CA\",\"Under 5 Years\":2704659,\"5 to 13 Years\":4499890,\"14 to 17 Years\":2159981,\"18 to 24 Years\":3853788,\"25 to 44 Years\":10604510,\"45 to 64 Years\":8819342,\"65 Years and Over\":4114496,\"total\":36756666},\n {\"State\":\"CO\",\"Under 5 Years\":358280,\"5 to 13 Years\":587154,\"14 to 17 Years\":261701,\"18 to 24 Years\":466194,\"25 to 44 Years\":1464939,\"45 to 64 Years\":1290094,\"65 Years and Over\":511094,\"total\":4939456},\n {\"State\":\"CT\",\"Under 5 Years\":211637,\"5 to 13 Years\":403658,\"14 to 17 Years\":196918,\"18 to 24 Years\":325110,\"25 to 44 Years\":916955,\"45 to 64 Years\":968967,\"65 Years and Over\":478007,\"total\":3501252},\n {\"State\":\"DE\",\"Under 5 Years\":59319,\"5 to 13 Years\":99496,\"14 to 17 Years\":47414,\"18 to 24 Years\":84464,\"25 to 44 Years\":230183,\"45 to 64 Years\":230528,\"65 Years and Over\":121688,\"total\":873092},\n {\"State\":\"DC\",\"Under 5 Years\":36352,\"5 to 13 Years\":50439,\"14 to 17 Years\":25225,\"18 to 24 Years\":75569,\"25 to 44 Years\":193557,\"45 to 64 Years\":140043,\"65 Years and Over\":70648,\"total\":591833},\n {\"State\":\"FL\",\"Under 5 Years\":1140516,\"5 to 13 Years\":1938695,\"14 to 17 Years\":925060,\"18 to 24 Years\":1607297,\"25 to 44 Years\":4782119,\"45 to 64 Years\":4746856,\"65 Years and Over\":3187797,\"total\":18328340}\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 600\n});\n\nchart.options({\n type: 'interval',\n data: {\n type: 'inline',\n value: data,\n transform: [\n {\n type: 'fold',\n fields: [\n 'Under 5 Years',\n '5 to 13 Years',\n '14 to 17 Years',\n '18 to 24 Years',\n '25 to 44 Years',\n '45 to 64 Years',\n '65 Years and Over'\n ],\n key: 'age',\n value: 'population'\n }\n ]\n },\n transform: [\n { type: 'stackY' }\n ],\n coordinate: {\n type: 'polar',\n innerRadius: 0.2\n },\n encode: {\n x: 'State',\n y: 'population',\n color: 'age'\n },\n scale: {\n color: {\n palette: 'spectral',\n offset: (t) => 0.1 + t * 0.8\n }\n },\n axis: {\n x: {\n grid: true,\n title: 'State'\n },\n y: {\n grid: true,\n labelFormatter: (v) => `${(v / 1000000).toFixed(1)}M`\n }\n },\n legend: {\n color: {\n position: 'right',\n title: 'Age Group',\n layout: { justifyContent: 'center' }\n }\n },\n animate: {\n enter: {\n type: 'growIn',\n duration: 1000\n }\n }\n});\n\nchart.render();", + "duration": 25191, + "retrievedSkillIds": [ + "g2-comp-space-layer", + "g2-mark-area-stacked", + "g2-comp-view", + "g2-transform-stack-enter", + "g2-mark-interval-stacked" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 3259, + "expectedLength": 15526, + "similarity": 0.40755800671093023, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"State\":\"AL\",\"Under 5 Years\":310504,\"5 to 13 Years\":552339,\"14 to 17 Years\":259034,\"18 to 24 Years\":450818,\"25 to 44 Years\":1231572,\"45 to 64 Years\":1215966,\"65 Years and Over\":641667,\"total\":4661900},\n {\"State\":\"AK\",\"Under 5 Years\":52083,\"5 to 13 Years\":85640,\"14 to 17 Years\":42153,\"18 to 24 Years\":74257,\"25 to 44 Years\":198724,\"45 to 64 Years\":183159,\"65 Years and Over\":50277,\"total\":686293},\n {\"State\":\"AZ\",\"Under 5 Years\":515910,\"5 to 13 Years\":828669,\"14 to 17 Years\":362642,\"18 to 24 Years\":601943,\"25 to 44 Years\":1804762,\"45 to 64 Years\":1523681,\"65 Years and Over\":862573,\"total\":6500180},\n {\"State\":\"AR\",\"Under 5 Years\":202070,\"5 to 13 Years\":343207,\"14 to 17 Years\":157204,\"18 to 24 Years\":264160,\"25 to 44 Years\":754420,\"45 to 64 Years\":727124,\"65 Years and Over\":407205,\"total\":2855390},\n {\"State\":\"CA\",\"Under 5 Years\":2704659,\"5 to 13 Years\":4499890,\"14 to 17 Years\":2159981,\"18 to 24 Years\":3853788,\"25 to 44 Years\":10604510,\"45 to 64 Years\":8819342,\"65 Years and Over\":4114496,\"total\":36756666},\n {\"State\":\"CO\",\"Under 5 Years\":358280,\"5 to 13 Years\":587154,\"14 to 17 Years\":261701,\"18 to 24 Years\":466194,\"25 to 44 Years\":1464939,\"45 to 64 Years\":1290094,\"65 Years and Over\":511094,\"total\":4939456},\n {\"State\":\"CT\",\"Under 5 Years\":211637,\"5 to 13 Years\":403658,\"14 to 17 Years\":196918,\"18 to 24 Years\":325110,\"25 to 44 Years\":916955,\"45 to 64 Years\":968967,\"65 Years and Over\":478007,\"total\":3501252},\n {\"State\":\"DE\",\"Under 5 Years\":59319,\"5 to 13 Years\":99496,\"14 to 17 Years\":47414,\"18 to 24 Years\":84464,\"25 to 44 Years\":230183,\"45 to 64 Years\":230528,\"65 Years and Over\":121688,\"total\":873092},\n {\"State\":\"DC\",\"Under 5 Years\":36352,\"5 to 13 Years\":50439,\"14 to 17 Years\":25225,\"18 to 24 Years\":75569,\"25 to 44 Years\":193557,\"45 to 64 Years\":140043,\"65 Years and Over\":70648,\"total\":591833},\n {\"State\":\"FL\",\"Under 5 Years\":1140516,\"5 to 13 Years\":1938695,\"14 to 17 Years\":925060,\"18 to 24 Years\":1607297,\"25 to 44 Years\":4782119,\"45 to 64 Years\":4746856,\"65 Years and Over\":3187797,\"total\":18328340}\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 600\n});\n\nchart.options({\n type: 'interval',\n data: {\n type: 'inline',\n value: data,\n transform: [\n {\n type: 'fold',\n fields: [\n 'Under 5 Years',\n '5 to 13 Years',\n '14 to 17 Years',\n '18 to 24 Years',\n '25 to 44 Years',\n '45 to 64 Years',\n '65 Years and Over'\n ],\n key: 'age',\n value: 'population'\n }\n ]\n },\n transform: [\n { type: 'stackY' }\n ],\n coordinate: {\n type: 'polar',\n innerRadius: 0.2\n },\n encode: {\n x: 'State',\n y: 'population',\n color: 'age'\n },\n scale: {\n color: {\n palette: 'spectral',\n offset: (t) => 0.1 + t * 0.8\n }\n },\n axis: {\n x: {\n grid: true,\n title: 'State'\n },\n y: {\n grid: true,\n labelFormatter: (v) => `${(v / 1000000).toFixed(1)}M`\n }\n },\n legend: {\n color: {\n position: 'right',\n title: 'Age Group',\n layout: { justifyContent: 'center' }\n }\n },\n animate: {\n enter: {\n type: 'growIn',\n duration: 1000\n }\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "type", + "value", + "transform", + "type", + "fields", + "key", + "value", + "transform", + "type", + "coordinate", + "type", + "innerRadius", + "encode", + "x", + "y", + "color", + "scale", + "color", + "palette", + "offset", + "axis", + "x", + "grid", + "title", + "y", + "grid", + "labelFormatter", + "legend", + "color", + "position", + "title", + "layout", + "justifyContent", + "animate", + "enter", + "type", + "duration" + ], + "stringLiterals": [ + "State", + "total", + "State", + "total", + "State", + "total", + "State", + "total", + "State", + "total", + "State", + "total", + "State", + "total", + "State", + "total", + "State", + "total", + "State", + "total" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.interval", + "animate" + ] + } + } + }, + { + "id": "case-63", + "query": "根据描述绘制图表,使用 G2 绘制一个横向的对称漏斗图,展示用户在不同阶段的转化情况,每个阶段显示阶段名称、用户数和转化率,颜色按阶段区分。\n参考数据:[{\"stage\":\"App启动\",\"users\":15000,\"rate\":100},{\"stage\":\"首页浏览\",\"users\":13500,\"rate\":90},{\"stage\":\"搜索功能\",\"users\":8100,\"rate\":60},{\"stage\":\"商品详情\",\"users\":4050,\"rate\":50},{\"stage\":\"加入购物车\",\"users\":1215,\"rate\":30},{\"stage\":\"提交订单\",\"users\":608,\"rate\":50},{\"stage\":\"成功支付\",\"users\":425,\"rate\":70}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { stage: 'App启动', users: 15000, rate: 100 },\n { stage: '首页浏览', users: 13500, rate: 90 },\n { stage: '搜索功能', users: 8100, rate: 60 },\n { stage: '商品详情', users: 4050, rate: 50 },\n { stage: '加入购物车', users: 1215, rate: 30 },\n { stage: '提交订单', users: 608, rate: 50 },\n { stage: '成功支付', users: 425, rate: 70 }\n];\n\nconst chart = new Chart({ container: 'container', theme: 'classic' });\nchart.options({\n type: 'interval',\n data,\n encode: { x: 'stage', y: 'users', color: 'stage', shape: 'funnel' },\n coordinate: { transform: [{ type: 'transpose' }] },\n transform: [{ type: 'symmetryY' }],\n scale: { color: { palette: 'plasma' } },\n labels: [{\n text: (d) => `${d.stage}\\n${((d.rate))}%`,\n position: \"inside\",\n transform: [{ type: \"contrastReverse\" }],\n }],\n axis: false\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { stage: 'App启动', users: 15000, rate: 100 },\n { stage: '首页浏览', users: 13500, rate: 90 },\n { stage: '搜索功能', users: 8100, rate: 60 },\n { stage: '商品详情', users: 4050, rate: 50 },\n { stage: '加入购物车', users: 1215, rate: 30 },\n { stage: '提交订单', users: 608, rate: 50 },\n { stage: '成功支付', users: 425, rate: 70 },\n ],\n encode: {\n x: 'stage',\n y: 'users',\n color: 'stage',\n shape: 'funnel',\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n transform: [{ type: 'symmetryY' }],\n scale: {\n color: { palette: 'spectral' },\n },\n axis: false,\n legend: false,\n labels: [\n {\n text: (d) => `${d.stage}\\n${d.users.toLocaleString()}人\\n转化率${d.rate}%`,\n position: 'inside',\n transform: [{ type: 'contrastReverse' }],\n style: { fontSize: 12, textAlign: 'center' },\n },\n ],\n});\n\nchart.render();", + "duration": 10088, + "retrievedSkillIds": [ + "g2-mark-funnel", + "g2-scale-sequential", + "g2-mark-line-basic", + "g2-mark-link", + "g2-scale-linear" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1012, + "expectedLength": 854, + "similarity": 0.8481006976438068, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { stage: 'App启动', users: 15000, rate: 100 },\n { stage: '首页浏览', users: 13500, rate: 90 },\n { stage: '搜索功能', users: 8100, rate: 60 },\n { stage: '商品详情', users: 4050, rate: 50 },\n { stage: '加入购物车', users: 1215, rate: 30 },\n { stage: '提交订单', users: 608, rate: 50 },\n { stage: '成功支付', users: 425, rate: 70 },\n ],\n encode: {\n x: 'stage',\n y: 'users',\n color: 'stage',\n shape: 'funnel',\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n transform: [{ type: 'symmetryY' }],\n scale: {\n color: { palette: 'spectral' },\n },\n axis: false,\n legend: false,\n labels: [\n {\n text: (d) => `${d.stage}\\n${d.users.toLocaleString()}人\\n转化率${d.rate}%`,\n position: 'inside',\n transform: [{ type: 'contrastReverse' }],\n style: { fontSize: 12, textAlign: 'center' },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toLocaleString", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "stage", + "users", + "rate", + "stage", + "users", + "rate", + "stage", + "users", + "rate", + "stage", + "users", + "rate", + "stage", + "users", + "rate", + "stage", + "users", + "rate", + "stage", + "users", + "rate", + "encode", + "x", + "y", + "color", + "shape", + "coordinate", + "transform", + "type", + "transform", + "type", + "scale", + "color", + "palette", + "axis", + "legend", + "labels", + "text", + "position", + "transform", + "type", + "style", + "fontSize", + "textAlign" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-64", + "query": "根据描述绘制图表,使用 KDE(核密度估计)方法对不同类别的数值数据进行概率密度计算,并通过密度图展示各类别数据的分布情况,同时支持鼠标悬停查看具体密度值和类别信息,暗色主题。参考数据:[{\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},{\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},{\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.5},{\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":5.1},{\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},{\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},{\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3},{\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":4.9},{\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},{\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.3}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'view',\n theme: {\n type: 'dark',\n view: {\n viewFill: '#141414',\n },\n },\n data: {\n type: 'inline',\n value: [\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.1,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.9,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.3,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.2,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.7,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.1,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.6,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.6,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.7,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.9,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.3,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.6,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 2.9,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.1,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.1,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.9,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.7,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.6,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.8,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.1,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.8,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.1,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.1,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.3,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.2,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 4,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.8,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 4.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.7,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.3,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.9,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.3,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.1,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.3,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.7,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.8,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.7,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.3,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.8,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.1,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.7,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.7,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.1,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.6,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.6,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.5,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.7,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.3,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.1,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.9,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.8,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.6,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.6,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.6,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.2,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.7,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.6,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.1,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.8,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.1,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 4.1,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 4.2,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.5,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.1,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.9,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.2,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.2,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.3,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.5,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.1,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.6,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.9,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.3,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.1,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.3,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.3,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.3,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.3,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 2.3,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.5,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.3,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.2,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.6,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.6,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.4,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.9,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.8,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.1,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.3,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.8,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.6,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.8,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.1,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.2,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 4.6,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.5,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.7,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5.3,\n },\n {\n species: 'I. setosa',\n x: 'PetalWidth',\n y: 0.2,\n },\n {\n species: 'I. setosa',\n x: 'PetalLength',\n y: 1.4,\n },\n {\n species: 'I. setosa',\n x: 'SepalWidth',\n y: 3.3,\n },\n {\n species: 'I. setosa',\n x: 'SepalLength',\n y: 5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.4,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.7,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3.2,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 7,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.5,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3.2,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.4,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.9,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3.1,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.9,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.6,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.8,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.5,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.8,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.7,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.6,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.7,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3.3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 3.3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.4,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 4.9,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.6,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.9,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.6,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.4,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 3.9,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.7,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.2,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 3.5,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.2,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.9,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.2,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.4,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.7,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.9,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 3.6,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.9,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.6,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.4,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.4,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3.1,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.7,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.5,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.6,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.1,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.7,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.8,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.5,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.2,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.2,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 3.9,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.5,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.6,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.8,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.8,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3.2,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.9,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.8,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.9,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.5,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.2,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.7,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.8,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.9,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.4,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.4,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.4,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.6,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.4,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.8,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.8,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.8,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.7,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 5,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.7,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.5,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.9,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 3.5,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.6,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.7,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 3.8,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.4,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 3.7,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.4,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.2,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 3.9,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.7,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.8,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.6,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 5.1,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.7,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.5,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.4,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.6,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.5,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3.4,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.7,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3.1,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.7,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.4,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.1,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.6,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.5,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.2,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.4,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.6,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.4,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.6,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.2,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.6,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.8,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 3.3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.2,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.7,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.6,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.2,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.2,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.7,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.2,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.9,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.7,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.9,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 6.2,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 3,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.5,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.1,\n },\n {\n species: 'I. versicolor',\n x: 'PetalWidth',\n y: 1.3,\n },\n {\n species: 'I. versicolor',\n x: 'PetalLength',\n y: 4.1,\n },\n {\n species: 'I. versicolor',\n x: 'SepalWidth',\n y: 2.8,\n },\n {\n species: 'I. versicolor',\n x: 'SepalLength',\n y: 5.7,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.5,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 6,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.9,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.1,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.7,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 5.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.1,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.9,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 7.1,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.6,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.9,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.2,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.5,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.1,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 6.6,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 7.6,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.7,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 4.5,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.5,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 4.9,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 6.3,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.9,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 7.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.5,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.7,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.5,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 6.1,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.6,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 7.2,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.1,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.2,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.5,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.9,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.3,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.7,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.4,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.1,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.5,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.5,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 5.7,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.4,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.1,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 5.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.3,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.2,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.4,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.5,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.5,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.2,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 6.7,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 7.7,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 6.9,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.6,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 7.7,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.5,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.2,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.7,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.2,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.9,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 4.9,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 5.6,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 6.7,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 7.7,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 4.9,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.7,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.1,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.7,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.7,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 6,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.2,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 7.2,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 4.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.2,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 4.9,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.1,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.1,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.6,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.4,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.6,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 7.2,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.9,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 6.1,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 7.4,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 6.4,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 7.9,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.2,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.6,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.4,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.5,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.1,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.4,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.6,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.6,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.1,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 6.1,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 7.7,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.4,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.6,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.4,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.5,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.1,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.4,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 4.8,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.1,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.4,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.1,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.9,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.4,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.6,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.1,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.7,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.1,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.1,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.9,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.9,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.1,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.7,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 5.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.9,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.2,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.5,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.7,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.7,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.2,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.7,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.9,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 2.5,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.2,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.5,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 2.3,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.4,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3.4,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 6.2,\n },\n {\n species: 'I. virginica',\n x: 'PetalWidth',\n y: 1.8,\n },\n {\n species: 'I. virginica',\n x: 'PetalLength',\n y: 5.1,\n },\n {\n species: 'I. virginica',\n x: 'SepalWidth',\n y: 3,\n },\n {\n species: 'I. virginica',\n x: 'SepalLength',\n y: 5.9,\n },\n ],\n },\n children: [\n {\n type: 'density',\n data: {\n transform: [\n {\n type: 'kde',\n field: 'y',\n groupBy: ['x'],\n size: 60,\n },\n ],\n },\n encode: {\n x: 'x',\n y: 'y',\n color: 'x',\n size: 'size',\n },\n style: {\n fillOpacity: 0.3,\n stroke: '#fff',\n lineWidth: 2,\n },\n tooltip: {\n items: [\n { field: 'y', name: '密度值' },\n { field: 'x', name: '类别' },\n ],\n },\n },\n ],\n axis: {\n x: { title: '数据类别' },\n y: { title: '概率密度' },\n },\n});\n\nchart.render();\n", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n theme: 'classicDark',\n});\n\nconst data = [\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.5},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":5.1},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":4.9},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.3}\n];\n\nchart.options({\n type: 'density',\n data: {\n type: 'inline',\n value: data,\n transform: [\n {\n type: 'kde',\n field: 'y',\n groupBy: ['x', 'species'],\n size: 20,\n },\n ],\n },\n encode: {\n x: 'x',\n y: 'y',\n size: 'size',\n series: 'species',\n color: 'species',\n },\n tooltip: {\n items: [\n { field: 'x', name: '测量维度' },\n { field: 'species', name: '物种' },\n { field: 'y', name: '密度值' },\n ],\n },\n legend: {\n color: {\n title: '物种',\n position: 'top',\n },\n },\n axis: {\n x: { title: '测量维度' },\n y: { title: '密度' },\n },\n});\n\nchart.render();", + "duration": 10420, + "retrievedSkillIds": [ + "g2-mark-density", + "g2-data-kde", + "g2-mark-violin", + "g2-mark-distribution-curve", + "g2-mark-cell-heatmap" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1313, + "expectedLength": 55285, + "similarity": 0.7197619047619047, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n theme: 'classicDark',\n});\n\nconst data = [\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.5},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":5.1},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":4.9},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.3}\n];\n\nchart.options({\n type: 'density',\n data: {\n type: 'inline',\n value: data,\n transform: [\n {\n type: 'kde',\n field: 'y',\n groupBy: ['x', 'species'],\n size: 20,\n },\n ],\n },\n encode: {\n x: 'x',\n y: 'y',\n size: 'size',\n series: 'species',\n color: 'species',\n },\n tooltip: {\n items: [\n { field: 'x', name: '测量维度' },\n { field: 'species', name: '物种' },\n { field: 'y', name: '密度值' },\n ],\n },\n legend: {\n color: {\n title: '物种',\n position: 'top',\n },\n },\n axis: {\n x: { title: '测量维度' },\n y: { title: '密度' },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "theme", + "type", + "data", + "type", + "value", + "transform", + "type", + "field", + "groupBy", + "size", + "encode", + "x", + "y", + "size", + "series", + "color", + "tooltip", + "items", + "field", + "name", + "field", + "name", + "field", + "name", + "legend", + "color", + "title", + "position", + "axis", + "x", + "title", + "y", + "title" + ], + "stringLiterals": [ + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform" + ] + } + } + }, + { + "id": "case-65", + "query": "根据描述绘制图表,使用 G2 创建一个桑基图,展示教育投入流向不同教育阶段及最终就业情况的资金或人数变化,通过节点和连接线表示流动关系及其数值大小。\n参考数据:[{\"source\":\"教育投入\",\"target\":\"小学\",\"value\":120},{\"source\":\"教育投入\",\"target\":\"初中\",\"value\":100},{\"source\":\"小学\",\"target\":\"初中\",\"value\":95},{\"source\":\"初中\",\"target\":\"高中\",\"value\":80},{\"source\":\"高中\",\"target\":\"本科\",\"value\":50},{\"source\":\"高中\",\"target\":\"职高\",\"value\":30},{\"source\":\"本科\",\"target\":\"就业\",\"value\":42},{\"source\":\"职高\",\"target\":\"就业\",\"value\":28}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({ container: 'container', theme: 'classic' });\nchart.options({\n type: 'sankey',\n autoFit: true,\n data: {\n value: {\n links: [\n { source: '教育投入', target: '小学', value: 120 },\n { source: '教育投入', target: '初中', value: 100 },\n { source: '小学', target: '初中', value: 95 },\n { source: '初中', target: '高中', value: 80 },\n { source: '高中', target: '本科', value: 50 },\n { source: '高中', target: '职高', value: 30 },\n { source: '本科', target: '就业', value: 42 },\n { source: '职高', target: '就业', value: 28 }\n ]\n }\n },\n layout: { nodeAlign: 'justify', nodePadding: 0.07 },\n scale: { color: { type: 'ordinal', range: ['#0066ff', '#33cc99', '#ff9900', '#cc3366'] } },\n style: { labelSpacing: 6, nodeStrokeWidth: 1.2, linkFillOpacity: 0.7 },\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 600,\n});\n\nconst links = [\n { source: '教育投入', target: '小学', value: 120 },\n { source: '教育投入', target: '初中', value: 100 },\n { source: '小学', target: '初中', value: 95 },\n { source: '初中', target: '高中', value: 80 },\n { source: '高中', target: '本科', value: 50 },\n { source: '高中', target: '职高', value: 30 },\n { source: '本科', target: '就业', value: 42 },\n { source: '职高', target: '就业', value: 28 },\n];\n\nchart.options({\n type: 'sankey',\n data: {\n value: {\n links,\n },\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.03,\n nodeWidth: 0.02,\n },\n style: {\n labelSpacing: 4,\n labelFontSize: 12,\n labelFontWeight: 'bold',\n linkFillOpacity: 0.4,\n nodeLineWidth: 1,\n },\n legend: false,\n});\n\nchart.render();", + "duration": 18297, + "retrievedSkillIds": [ + "g2-mark-sankey", + "g2-mark-chord", + "g2-mark-line-basic", + "g2-concept-chart-selection", + "g2-mark-linex-liney" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 850, + "expectedLength": 834, + "similarity": 0.732663329384641, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 600,\n});\n\nconst links = [\n { source: '教育投入', target: '小学', value: 120 },\n { source: '教育投入', target: '初中', value: 100 },\n { source: '小学', target: '初中', value: 95 },\n { source: '初中', target: '高中', value: 80 },\n { source: '高中', target: '本科', value: 50 },\n { source: '高中', target: '职高', value: 30 },\n { source: '本科', target: '就业', value: 42 },\n { source: '职高', target: '就业', value: 28 },\n];\n\nchart.options({\n type: 'sankey',\n data: {\n value: {\n links,\n },\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.03,\n nodeWidth: 0.02,\n },\n style: {\n labelSpacing: 4,\n labelFontSize: 12,\n labelFontWeight: 'bold',\n linkFillOpacity: 0.4,\n nodeLineWidth: 1,\n },\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "type", + "data", + "value", + "layout", + "nodeAlign", + "nodePadding", + "nodeWidth", + "style", + "labelSpacing", + "labelFontSize", + "labelFontWeight", + "linkFillOpacity", + "nodeLineWidth", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-66", + "query": "根据描述绘制图表,使用 G2 渲染一个树状打包图(Pack Layout),展示投资组合的资产层级结构与金额分布,包含根节点和多层子节点(股票、债券、基金、现金及其细分),通过颜色区分父类别,提供金额格式化提示信息,并启用标签防重叠和背景填充等样式配置。参考数据:{\"name\":\"投资组合\",\"value\":1000000,\"children\":[{\"name\":\"股票\",\"value\":400000,\"children\":[{\"name\":\"科技股\",\"value\":180000},{\"name\":\"金融股\",\"value\":120000},{\"name\":\"消费股\",\"value\":100000}]},{\"name\":\"债券\",\"value\":300000,\"children\":[{\"name\":\"国债\",\"value\":150000},{\"name\":\"企业债\",\"value\":100000},{\"name\":\"可转债\",\"value\":50000}]},{\"name\":\"基金\",\"value\":200000,\"children\":[{\"name\":\"股票型基金\",\"value\":80000},{\"name\":\"债券型基金\",\"value\":70000},{\"name\":\"混合型基金\",\"value\":50000}]},{\"name\":\"现金\",\"value\":100000}]}", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n autoFit: true,\n});\n\nconst portfolioData = {\n name: '投资组合',\n value: 1000000,\n children: [\n {\n name: '股票',\n value: 400000,\n children: [\n { name: '科技股', value: 180000 },\n { name: '金融股', value: 120000 },\n { name: '消费股', value: 100000 },\n ],\n },\n {\n name: '债券',\n value: 300000,\n children: [\n { name: '国债', value: 150000 },\n { name: '企业债', value: 100000 },\n { name: '可转债', value: 50000 },\n ],\n },\n {\n name: '基金',\n value: 200000,\n children: [\n { name: '股票型基金', value: 80000 },\n { name: '债券型基金', value: 70000 },\n { name: '混合型基金', value: 50000 },\n ],\n },\n {\n name: '现金',\n value: 100000,\n },\n ],\n};\n\nchart.options({\n type: 'pack',\n width: 600,\n height: 600,\n data: { value: portfolioData },\n layout: {\n padding: 3,\n },\n encode: {\n value: 'value',\n color: (d) => {\n const parentName =\n d.depth === 0 ? 'root' : d.parent?.data?.name || d.data.name;\n return parentName;\n },\n },\n scale: {\n color: {\n range: ['#FFF7E6', '#FFE7BA', '#FFC069', '#FA8C16', '#D46B08'],\n },\n },\n style: {\n labelText: (d) => {\n if (d.height === 0) return d.data.name;\n if (d.depth === 0) return '';\n return d.data.name;\n },\n labelFill: '#fff',\n labelFontWeight: 'bold',\n labelFontSize: (d) => Math.max(8, Math.min(12, d.r / 4)),\n stroke: '#fff',\n strokeWidth: 1,\n fillOpacity: 0.8,\n labelBackground: (d) => d.data.children, // 背景展示\n labelBackgroundFill: '#fff',\n labelTransform: [\n { type: 'contrastReverse' },\n { type: 'overflowStroke' },\n { type: 'overlapDodgeY', padding: 8 },\n ],\n },\n legend: { color: false },\n tooltip: {\n title: (d) => d.data.name,\n items: [\n {\n field: 'value',\n name: '金额',\n valueFormatter: (v) => `¥${(v / 10000).toFixed(1)}万`,\n },\n ],\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '投资组合',\n value: 1000000,\n children: [\n {\n name: '股票',\n value: 400000,\n children: [\n { name: '科技股', value: 180000 },\n { name: '金融股', value: 120000 },\n { name: '消费股', value: 100000 },\n ],\n },\n {\n name: '债券',\n value: 300000,\n children: [\n { name: '国债', value: 150000 },\n { name: '企业债', value: 100000 },\n { name: '可转债', value: 50000 },\n ],\n },\n {\n name: '基金',\n value: 200000,\n children: [\n { name: '股票型基金', value: 80000 },\n { name: '债券型基金', value: 70000 },\n { name: '混合型基金', value: 50000 },\n ],\n },\n {\n name: '现金',\n value: 100000,\n },\n ],\n};\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 600,\n});\n\nchart.options({\n type: 'pack',\n data: { value: data },\n encode: {\n value: 'value',\n color: (d) => d.path?.[1] || d.data?.name,\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A', '#9A64DC'],\n },\n },\n style: {\n fillOpacity: 0.85,\n stroke: '#fff',\n lineWidth: 2,\n },\n labels: [\n {\n text: (d) => {\n if (d.height > 0) return '';\n return `${d.data?.name}\\n¥${d.value?.toLocaleString()}`;\n },\n position: 'inside',\n fontSize: 11,\n fill: '#fff',\n textAlign: 'center',\n transform: [{ type: 'overlapHide' }],\n },\n ],\n tooltip: {\n title: (d) => d.data?.name,\n items: [\n {\n field: 'value',\n name: '金额',\n valueFormatter: (v) => `¥${v?.toLocaleString()}`,\n },\n {\n field: (d) => d.path?.[1],\n name: '父类别',\n },\n ],\n },\n legend: {\n color: {\n position: 'top',\n title: '资产类别',\n },\n },\n});\n\nchart.render();", + "duration": 13277, + "retrievedSkillIds": [ + "g2-mark-partition", + "g2-mark-pack", + "g2-mark-interval-basic", + "g2-mark-treemap", + "g2-mark-tree" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1829, + "expectedLength": 2078, + "similarity": 0.6907444812103922, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '投资组合',\n value: 1000000,\n children: [\n {\n name: '股票',\n value: 400000,\n children: [\n { name: '科技股', value: 180000 },\n { name: '金融股', value: 120000 },\n { name: '消费股', value: 100000 },\n ],\n },\n {\n name: '债券',\n value: 300000,\n children: [\n { name: '国债', value: 150000 },\n { name: '企业债', value: 100000 },\n { name: '可转债', value: 50000 },\n ],\n },\n {\n name: '基金',\n value: 200000,\n children: [\n { name: '股票型基金', value: 80000 },\n { name: '债券型基金', value: 70000 },\n { name: '混合型基金', value: 50000 },\n ],\n },\n {\n name: '现金',\n value: 100000,\n },\n ],\n};\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 600,\n});\n\nchart.options({\n type: 'pack',\n data: { value: data },\n encode: {\n value: 'value',\n color: (d) => d.path?.[1] || d.data?.name,\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A', '#9A64DC'],\n },\n },\n style: {\n fillOpacity: 0.85,\n stroke: '#fff',\n lineWidth: 2,\n },\n labels: [\n {\n text: (d) => {\n if (d.height > 0) return '';\n return `${d.data?.name}\\n¥${d.value?.toLocaleString()}`;\n },\n position: 'inside',\n fontSize: 11,\n fill: '#fff',\n textAlign: 'center',\n transform: [{ type: 'overlapHide' }],\n },\n ],\n tooltip: {\n title: (d) => d.data?.name,\n items: [\n {\n field: 'value',\n name: '金额',\n valueFormatter: (v) => `¥${v?.toLocaleString()}`,\n },\n {\n field: (d) => d.path?.[1],\n name: '父类别',\n },\n ],\n },\n legend: {\n color: {\n position: 'top',\n title: '资产类别',\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toLocaleString", + "toLocaleString", + "render" + ], + "objectKeys": [ + "name", + "value", + "children", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "container", + "width", + "height", + "type", + "data", + "value", + "encode", + "value", + "color", + "scale", + "color", + "range", + "style", + "fillOpacity", + "stroke", + "lineWidth", + "labels", + "text", + "position", + "fontSize", + "fill", + "textAlign", + "transform", + "type", + "tooltip", + "title", + "items", + "field", + "name", + "valueFormatter", + "field", + "name", + "legend", + "color", + "position", + "title" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "view.children", + "x6.labels" + ] + } + } + }, + { + "id": "case-67", + "query": "根据描述绘制图表,使用折线图展示某股票的收盘价走势,并通过指数移动平均线(EMA)对价格数据进行平滑处理,形成两条线:一条为原始收盘价的折线,另一条为经过 EMA 计算后的平滑折线。参考数据:[{\"date\":\"2007-04-23\",\"close\":93.24},{\"date\":\"2007-04-24\",\"close\":95.35},{\"date\":\"2007-04-25\",\"close\":98.84},{\"date\":\"2007-04-26\",\"close\":99.92},{\"date\":\"2007-04-29\",\"close\":99.8},{\"date\":\"2007-05-01\",\"close\":99.47},{\"date\":\"2007-05-02\",\"close\":100.39},{\"date\":\"2007-05-03\",\"close\":100.4},{\"date\":\"2007-05-04\",\"close\":100.81},{\"date\":\"2007-05-07\",\"close\":103.92}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'view',\n children: [\n {\n type: 'line',\n data: {\n type: 'inline',\n value: [\n {\n \"date\": \"2007-04-23\",\n \"close\": 93.24\n },\n {\n \"date\": \"2007-04-24\",\n \"close\": 95.35\n },\n {\n \"date\": \"2007-04-25\",\n \"close\": 98.84\n },\n {\n \"date\": \"2007-04-26\",\n \"close\": 99.92\n },\n {\n \"date\": \"2007-04-29\",\n \"close\": 99.8\n },\n {\n \"date\": \"2007-05-01\",\n \"close\": 99.47\n },\n {\n \"date\": \"2007-05-02\",\n \"close\": 100.39\n },\n {\n \"date\": \"2007-05-03\",\n \"close\": 100.4\n },\n {\n \"date\": \"2007-05-04\",\n \"close\": 100.81\n },\n {\n \"date\": \"2007-05-07\",\n \"close\": 103.92\n },\n {\n \"date\": \"2007-05-08\",\n \"close\": 105.06\n },\n {\n \"date\": \"2007-05-09\",\n \"close\": 106.88\n },\n {\n \"date\": \"2007-05-09\",\n \"close\": 107.34\n },\n {\n \"date\": \"2007-05-10\",\n \"close\": 108.74\n },\n {\n \"date\": \"2007-05-13\",\n \"close\": 109.36\n },\n {\n \"date\": \"2007-05-14\",\n \"close\": 107.52\n },\n {\n \"date\": \"2007-05-15\",\n \"close\": 107.34\n },\n {\n \"date\": \"2007-05-16\",\n \"close\": 109.44\n },\n {\n \"date\": \"2007-05-17\",\n \"close\": 110.02\n },\n {\n \"date\": \"2007-05-20\",\n \"close\": 111.98\n },\n {\n \"date\": \"2007-05-21\",\n \"close\": 113.54\n },\n {\n \"date\": \"2007-05-22\",\n \"close\": 112.89\n },\n {\n \"date\": \"2007-05-23\",\n \"close\": 110.69\n },\n {\n \"date\": \"2007-05-24\",\n \"close\": 113.62\n },\n {\n \"date\": \"2007-05-28\",\n \"close\": 114.35\n },\n {\n \"date\": \"2007-05-29\",\n \"close\": 118.77\n },\n {\n \"date\": \"2007-05-30\",\n \"close\": 121.19\n },\n {\n \"date\": \"2007-06-01\",\n \"close\": 118.4\n },\n {\n \"date\": \"2007-06-04\",\n \"close\": 121.33\n },\n {\n \"date\": \"2007-06-05\",\n \"close\": 122.67\n },\n {\n \"date\": \"2007-06-06\",\n \"close\": 123.64\n },\n {\n \"date\": \"2007-06-07\",\n \"close\": 124.07\n },\n {\n \"date\": \"2007-06-08\",\n \"close\": 124.49\n },\n {\n \"date\": \"2007-06-10\",\n \"close\": 120.19\n },\n {\n \"date\": \"2007-06-11\",\n \"close\": 120.38\n },\n {\n \"date\": \"2007-06-12\",\n \"close\": 117.5\n },\n {\n \"date\": \"2007-06-13\",\n \"close\": 118.75\n },\n {\n \"date\": \"2007-06-14\",\n \"close\": 120.5\n },\n {\n \"date\": \"2007-06-17\",\n \"close\": 125.09\n },\n {\n \"date\": \"2007-06-18\",\n \"close\": 123.66\n },\n {\n \"date\": \"2007-06-19\",\n \"close\": 121.55\n },\n {\n \"date\": \"2007-06-20\",\n \"close\": 123.9\n },\n {\n \"date\": \"2007-06-21\",\n \"close\": 123\n },\n {\n \"date\": \"2007-06-24\",\n \"close\": 122.34\n },\n {\n \"date\": \"2007-06-25\",\n \"close\": 119.65\n },\n {\n \"date\": \"2007-06-26\",\n \"close\": 121.89\n },\n {\n \"date\": \"2007-06-27\",\n \"close\": 120.56\n },\n {\n \"date\": \"2007-06-28\",\n \"close\": 122.04\n },\n {\n \"date\": \"2007-07-02\",\n \"close\": 121.26\n },\n {\n \"date\": \"2007-07-03\",\n \"close\": 127.17\n },\n {\n \"date\": \"2007-07-05\",\n \"close\": 132.75\n },\n {\n \"date\": \"2007-07-06\",\n \"close\": 132.3\n },\n {\n \"date\": \"2007-07-09\",\n \"close\": 130.33\n },\n {\n \"date\": \"2007-07-09\",\n \"close\": 132.35\n },\n {\n \"date\": \"2007-07-10\",\n \"close\": 132.39\n },\n {\n \"date\": \"2007-07-11\",\n \"close\": 134.07\n },\n {\n \"date\": \"2007-07-12\",\n \"close\": 137.73\n },\n {\n \"date\": \"2007-07-15\",\n \"close\": 138.1\n },\n {\n \"date\": \"2007-07-16\",\n \"close\": 138.91\n },\n {\n \"date\": \"2007-07-17\",\n \"close\": 138.12\n },\n {\n \"date\": \"2007-07-18\",\n \"close\": 140\n },\n {\n \"date\": \"2007-07-19\",\n \"close\": 143.75\n },\n {\n \"date\": \"2007-07-22\",\n \"close\": 143.7\n },\n {\n \"date\": \"2007-07-23\",\n \"close\": 134.89\n },\n {\n \"date\": \"2007-07-24\",\n \"close\": 137.26\n },\n {\n \"date\": \"2007-07-25\",\n \"close\": 146\n },\n {\n \"date\": \"2007-07-26\",\n \"close\": 143.85\n },\n {\n \"date\": \"2007-07-29\",\n \"close\": 141.43\n },\n {\n \"date\": \"2007-07-30\",\n \"close\": 131.76\n },\n {\n \"date\": \"2007-08-01\",\n \"close\": 135\n },\n {\n \"date\": \"2007-08-02\",\n \"close\": 136.49\n },\n {\n \"date\": \"2007-08-03\",\n \"close\": 131.85\n },\n {\n \"date\": \"2007-08-06\",\n \"close\": 135.25\n },\n {\n \"date\": \"2007-08-07\",\n \"close\": 135.03\n },\n {\n \"date\": \"2007-08-08\",\n \"close\": 134.01\n },\n {\n \"date\": \"2007-08-09\",\n \"close\": 126.39\n },\n {\n \"date\": \"2007-08-09\",\n \"close\": 125\n },\n {\n \"date\": \"2007-08-12\",\n \"close\": 127.79\n },\n {\n \"date\": \"2007-08-13\",\n \"close\": 124.03\n },\n {\n \"date\": \"2007-08-14\",\n \"close\": 119.9\n },\n {\n \"date\": \"2007-08-15\",\n \"close\": 117.05\n },\n {\n \"date\": \"2007-08-16\",\n \"close\": 122.06\n },\n {\n \"date\": \"2007-08-19\",\n \"close\": 122.22\n },\n {\n \"date\": \"2007-08-20\",\n \"close\": 127.57\n },\n {\n \"date\": \"2007-08-21\",\n \"close\": 132.51\n },\n {\n \"date\": \"2007-08-22\",\n \"close\": 131.07\n },\n {\n \"date\": \"2007-08-23\",\n \"close\": 135.3\n },\n {\n \"date\": \"2007-08-26\",\n \"close\": 132.25\n },\n {\n \"date\": \"2007-08-27\",\n \"close\": 126.82\n },\n {\n \"date\": \"2007-08-28\",\n \"close\": 134.08\n },\n {\n \"date\": \"2007-08-29\",\n \"close\": 136.25\n },\n {\n \"date\": \"2007-08-30\",\n \"close\": 138.48\n },\n {\n \"date\": \"2007-09-04\",\n \"close\": 144.16\n },\n {\n \"date\": \"2007-09-05\",\n \"close\": 136.76\n },\n {\n \"date\": \"2007-09-06\",\n \"close\": 135.01\n },\n {\n \"date\": \"2007-09-07\",\n \"close\": 131.77\n },\n {\n \"date\": \"2007-09-09\",\n \"close\": 136.71\n },\n {\n \"date\": \"2007-09-10\",\n \"close\": 135.49\n },\n {\n \"date\": \"2007-09-11\",\n \"close\": 136.85\n },\n {\n \"date\": \"2007-09-12\",\n \"close\": 137.2\n },\n {\n \"date\": \"2007-09-13\",\n \"close\": 138.81\n },\n {\n \"date\": \"2007-09-16\",\n \"close\": 138.41\n },\n {\n \"date\": \"2007-09-17\",\n \"close\": 140.92\n },\n {\n \"date\": \"2007-09-18\",\n \"close\": 140.77\n },\n {\n \"date\": \"2007-09-19\",\n \"close\": 140.31\n },\n {\n \"date\": \"2007-09-20\",\n \"close\": 144.15\n },\n {\n \"date\": \"2007-09-23\",\n \"close\": 148.28\n },\n {\n \"date\": \"2007-09-24\",\n \"close\": 153.18\n },\n {\n \"date\": \"2007-09-25\",\n \"close\": 152.77\n },\n {\n \"date\": \"2007-09-26\",\n \"close\": 154.5\n },\n {\n \"date\": \"2007-09-27\",\n \"close\": 153.47\n },\n {\n \"date\": \"2007-10-01\",\n \"close\": 156.34\n },\n {\n \"date\": \"2007-10-02\",\n \"close\": 158.45\n },\n {\n \"date\": \"2007-10-03\",\n \"close\": 157.92\n },\n {\n \"date\": \"2007-10-04\",\n \"close\": 156.24\n },\n {\n \"date\": \"2007-10-05\",\n \"close\": 161.45\n },\n {\n \"date\": \"2007-10-08\",\n \"close\": 167.91\n },\n {\n \"date\": \"2007-10-09\",\n \"close\": 167.86\n },\n {\n \"date\": \"2007-10-09\",\n \"close\": 166.79\n },\n {\n \"date\": \"2007-10-10\",\n \"close\": 162.23\n },\n {\n \"date\": \"2007-10-11\",\n \"close\": 167.25\n },\n {\n \"date\": \"2007-10-14\",\n \"close\": 166.98\n },\n {\n \"date\": \"2007-10-15\",\n \"close\": 169.58\n },\n {\n \"date\": \"2007-10-16\",\n \"close\": 172.75\n },\n {\n \"date\": \"2007-10-17\",\n \"close\": 173.5\n },\n {\n \"date\": \"2007-10-18\",\n \"close\": 170.42\n },\n {\n \"date\": \"2007-10-21\",\n \"close\": 174.36\n },\n {\n \"date\": \"2007-10-22\",\n \"close\": 186.16\n },\n {\n \"date\": \"2007-10-23\",\n \"close\": 185.93\n },\n {\n \"date\": \"2007-10-24\",\n \"close\": 182.78\n },\n {\n \"date\": \"2007-10-25\",\n \"close\": 184.7\n },\n {\n \"date\": \"2007-10-28\",\n \"close\": 185.09\n },\n {\n \"date\": \"2007-10-29\",\n \"close\": 187\n },\n {\n \"date\": \"2007-10-30\",\n \"close\": 189.95\n },\n {\n \"date\": \"2007-11-01\",\n \"close\": 187.44\n },\n {\n \"date\": \"2007-11-02\",\n \"close\": 187.87\n },\n {\n \"date\": \"2007-11-05\",\n \"close\": 186.18\n },\n {\n \"date\": \"2007-11-06\",\n \"close\": 191.79\n },\n {\n \"date\": \"2007-11-07\",\n \"close\": 186.3\n },\n {\n \"date\": \"2007-11-08\",\n \"close\": 175.47\n },\n {\n \"date\": \"2007-11-09\",\n \"close\": 165.37\n },\n {\n \"date\": \"2007-11-11\",\n \"close\": 153.76\n },\n {\n \"date\": \"2007-11-12\",\n \"close\": 169.96\n },\n {\n \"date\": \"2007-11-13\",\n \"close\": 166.11\n },\n {\n \"date\": \"2007-11-14\",\n \"close\": 164.3\n },\n {\n \"date\": \"2007-11-15\",\n \"close\": 166.39\n },\n {\n \"date\": \"2007-11-18\",\n \"close\": 163.95\n },\n {\n \"date\": \"2007-11-19\",\n \"close\": 168.85\n },\n {\n \"date\": \"2007-11-20\",\n \"close\": 168.46\n },\n {\n \"date\": \"2007-11-22\",\n \"close\": 171.54\n },\n {\n \"date\": \"2007-11-25\",\n \"close\": 172.54\n },\n {\n \"date\": \"2007-11-26\",\n \"close\": 174.81\n },\n {\n \"date\": \"2007-11-27\",\n \"close\": 180.22\n },\n {\n \"date\": \"2007-11-28\",\n \"close\": 184.29\n },\n {\n \"date\": \"2007-11-29\",\n \"close\": 182.22\n },\n {\n \"date\": \"2007-12-03\",\n \"close\": 178.86\n },\n {\n \"date\": \"2007-12-04\",\n \"close\": 179.81\n },\n {\n \"date\": \"2007-12-05\",\n \"close\": 185.5\n },\n {\n \"date\": \"2007-12-06\",\n \"close\": 189.95\n },\n {\n \"date\": \"2007-12-07\",\n \"close\": 194.3\n },\n {\n \"date\": \"2007-12-09\",\n \"close\": 194.21\n },\n {\n \"date\": \"2007-12-10\",\n \"close\": 188.54\n },\n {\n \"date\": \"2007-12-11\",\n \"close\": 190.86\n },\n {\n \"date\": \"2007-12-12\",\n \"close\": 191.83\n },\n {\n \"date\": \"2007-12-13\",\n \"close\": 190.39\n },\n {\n \"date\": \"2007-12-16\",\n \"close\": 184.4\n },\n {\n \"date\": \"2007-12-17\",\n \"close\": 182.98\n },\n {\n \"date\": \"2007-12-18\",\n \"close\": 183.12\n },\n {\n \"date\": \"2007-12-19\",\n \"close\": 187.21\n },\n {\n \"date\": \"2007-12-20\",\n \"close\": 193.91\n },\n {\n \"date\": \"2007-12-23\",\n \"close\": 198.8\n },\n {\n \"date\": \"2007-12-25\",\n \"close\": 198.95\n },\n {\n \"date\": \"2007-12-26\",\n \"close\": 198.57\n },\n {\n \"date\": \"2007-12-27\",\n \"close\": 199.83\n },\n {\n \"date\": \"2007-12-30\",\n \"close\": 198.08\n },\n {\n \"date\": \"2008-01-02\",\n \"close\": 194.84\n },\n {\n \"date\": \"2008-01-03\",\n \"close\": 194.93\n },\n {\n \"date\": \"2008-01-04\",\n \"close\": 180.05\n },\n {\n \"date\": \"2008-01-07\",\n \"close\": 177.64\n },\n {\n \"date\": \"2008-01-08\",\n \"close\": 171.25\n },\n {\n \"date\": \"2008-01-09\",\n \"close\": 179.4\n },\n {\n \"date\": \"2008-01-09\",\n \"close\": 178.02\n },\n {\n \"date\": \"2008-01-10\",\n \"close\": 172.69\n },\n {\n \"date\": \"2008-01-13\",\n \"close\": 178.78\n },\n {\n \"date\": \"2008-01-14\",\n \"close\": 169.04\n },\n {\n \"date\": \"2008-01-15\",\n \"close\": 159.64\n },\n {\n \"date\": \"2008-01-16\",\n \"close\": 160.89\n },\n {\n \"date\": \"2008-01-17\",\n \"close\": 161.36\n },\n {\n \"date\": \"2008-01-21\",\n \"close\": 155.64\n },\n {\n \"date\": \"2008-01-22\",\n \"close\": 139.07\n },\n {\n \"date\": \"2008-01-23\",\n \"close\": 135.6\n },\n {\n \"date\": \"2008-01-24\",\n \"close\": 130.01\n },\n {\n \"date\": \"2008-01-27\",\n \"close\": 130.01\n },\n {\n \"date\": \"2008-01-28\",\n \"close\": 131.54\n },\n {\n \"date\": \"2008-01-29\",\n \"close\": 132.18\n },\n {\n \"date\": \"2008-01-30\",\n \"close\": 135.36\n },\n {\n \"date\": \"2008-02-01\",\n \"close\": 133.75\n },\n {\n \"date\": \"2008-02-04\",\n \"close\": 131.65\n },\n {\n \"date\": \"2008-02-05\",\n \"close\": 129.36\n },\n {\n \"date\": \"2008-02-06\",\n \"close\": 122\n },\n {\n \"date\": \"2008-02-07\",\n \"close\": 121.24\n },\n {\n \"date\": \"2008-02-08\",\n \"close\": 125.48\n },\n {\n \"date\": \"2008-02-10\",\n \"close\": 129.45\n },\n {\n \"date\": \"2008-02-11\",\n \"close\": 124.86\n },\n {\n \"date\": \"2008-02-12\",\n \"close\": 129.4\n },\n {\n \"date\": \"2008-02-13\",\n \"close\": 127.46\n },\n {\n \"date\": \"2008-02-14\",\n \"close\": 124.63\n },\n {\n \"date\": \"2008-02-18\",\n \"close\": 122.18\n },\n {\n \"date\": \"2008-02-19\",\n \"close\": 123.82\n },\n {\n \"date\": \"2008-02-20\",\n \"close\": 121.54\n },\n {\n \"date\": \"2008-02-21\",\n \"close\": 119.46\n },\n {\n \"date\": \"2008-02-24\",\n \"close\": 119.74\n },\n {\n \"date\": \"2008-02-25\",\n \"close\": 119.15\n },\n {\n \"date\": \"2008-02-26\",\n \"close\": 122.96\n },\n {\n \"date\": \"2008-02-27\",\n \"close\": 129.91\n },\n {\n \"date\": \"2008-02-28\",\n \"close\": 125.02\n },\n {\n \"date\": \"2008-03-03\",\n \"close\": 121.73\n },\n {\n \"date\": \"2008-03-04\",\n \"close\": 124.62\n },\n {\n \"date\": \"2008-03-05\",\n \"close\": 124.49\n },\n {\n \"date\": \"2008-03-06\",\n \"close\": 120.93\n },\n {\n \"date\": \"2008-03-07\",\n \"close\": 122.25\n },\n {\n \"date\": \"2008-03-09\",\n \"close\": 119.69\n },\n {\n \"date\": \"2008-03-10\",\n \"close\": 127.35\n },\n {\n \"date\": \"2008-03-11\",\n \"close\": 126.03\n },\n {\n \"date\": \"2008-03-12\",\n \"close\": 127.94\n },\n {\n \"date\": \"2008-03-13\",\n \"close\": 126.61\n },\n {\n \"date\": \"2008-03-16\",\n \"close\": 126.73\n },\n {\n \"date\": \"2008-03-17\",\n \"close\": 132.82\n },\n {\n \"date\": \"2008-03-18\",\n \"close\": 129.67\n },\n {\n \"date\": \"2008-03-19\",\n \"close\": 133.27\n },\n {\n \"date\": \"2008-03-23\",\n \"close\": 139.53\n },\n {\n \"date\": \"2008-03-24\",\n \"close\": 140.98\n },\n {\n \"date\": \"2008-03-25\",\n \"close\": 145.06\n },\n {\n \"date\": \"2008-03-26\",\n \"close\": 140.25\n },\n {\n \"date\": \"2008-03-27\",\n \"close\": 143.01\n },\n {\n \"date\": \"2008-03-30\",\n \"close\": 143.5\n },\n {\n \"date\": \"2008-04-01\",\n \"close\": 149.53\n },\n {\n \"date\": \"2008-04-02\",\n \"close\": 147.49\n },\n {\n \"date\": \"2008-04-03\",\n \"close\": 151.61\n },\n {\n \"date\": \"2008-04-04\",\n \"close\": 153.08\n },\n {\n \"date\": \"2008-04-07\",\n \"close\": 155.89\n },\n {\n \"date\": \"2008-04-08\",\n \"close\": 152.84\n },\n {\n \"date\": \"2008-04-09\",\n \"close\": 151.44\n },\n {\n \"date\": \"2008-04-09\",\n \"close\": 154.55\n },\n {\n \"date\": \"2008-04-10\",\n \"close\": 147.14\n },\n {\n \"date\": \"2008-04-13\",\n \"close\": 147.78\n },\n {\n \"date\": \"2008-04-14\",\n \"close\": 148.38\n },\n {\n \"date\": \"2008-04-15\",\n \"close\": 153.7\n },\n {\n \"date\": \"2008-04-16\",\n \"close\": 154.49\n },\n {\n \"date\": \"2008-04-17\",\n \"close\": 161.04\n },\n {\n \"date\": \"2008-04-20\",\n \"close\": 168.16\n },\n {\n \"date\": \"2008-04-21\",\n \"close\": 160.2\n },\n {\n \"date\": \"2008-04-22\",\n \"close\": 162.89\n },\n {\n \"date\": \"2008-04-23\",\n \"close\": 168.94\n },\n {\n \"date\": \"2008-04-24\",\n \"close\": 169.73\n },\n {\n \"date\": \"2008-04-27\",\n \"close\": 172.24\n },\n {\n \"date\": \"2008-04-28\",\n \"close\": 175.05\n },\n {\n \"date\": \"2008-04-29\",\n \"close\": 173.95\n },\n {\n \"date\": \"2008-05-01\",\n \"close\": 180\n },\n {\n \"date\": \"2008-05-02\",\n \"close\": 180.94\n },\n {\n \"date\": \"2008-05-05\",\n \"close\": 184.73\n },\n {\n \"date\": \"2008-05-06\",\n \"close\": 186.66\n },\n {\n \"date\": \"2008-05-07\",\n \"close\": 182.59\n },\n {\n \"date\": \"2008-05-08\",\n \"close\": 185.06\n },\n {\n \"date\": \"2008-05-09\",\n \"close\": 183.45\n },\n {\n \"date\": \"2008-05-11\",\n \"close\": 188.16\n },\n {\n \"date\": \"2008-05-12\",\n \"close\": 189.96\n },\n {\n \"date\": \"2008-05-13\",\n \"close\": 186.26\n },\n {\n \"date\": \"2008-05-14\",\n \"close\": 189.73\n },\n {\n \"date\": \"2008-05-15\",\n \"close\": 187.62\n },\n {\n \"date\": \"2008-05-18\",\n \"close\": 183.6\n },\n {\n \"date\": \"2008-05-19\",\n \"close\": 185.9\n },\n {\n \"date\": \"2008-05-20\",\n \"close\": 178.19\n },\n {\n \"date\": \"2008-05-21\",\n \"close\": 177.05\n },\n {\n \"date\": \"2008-05-22\",\n \"close\": 181.17\n },\n {\n \"date\": \"2008-05-26\",\n \"close\": 186.43\n },\n {\n \"date\": \"2008-05-27\",\n \"close\": 187.01\n },\n {\n \"date\": \"2008-05-28\",\n \"close\": 186.69\n },\n {\n \"date\": \"2008-05-29\",\n \"close\": 188.75\n },\n {\n \"date\": \"2008-06-02\",\n \"close\": 186.1\n },\n {\n \"date\": \"2008-06-03\",\n \"close\": 185.37\n },\n {\n \"date\": \"2008-06-04\",\n \"close\": 185.19\n },\n {\n \"date\": \"2008-06-05\",\n \"close\": 189.43\n },\n {\n \"date\": \"2008-06-06\",\n \"close\": 185.64\n },\n {\n \"date\": \"2008-06-09\",\n \"close\": 181.61\n },\n {\n \"date\": \"2008-06-09\",\n \"close\": 185.64\n },\n {\n \"date\": \"2008-06-10\",\n \"close\": 180.81\n },\n {\n \"date\": \"2008-06-11\",\n \"close\": 173.26\n },\n {\n \"date\": \"2008-06-12\",\n \"close\": 172.37\n },\n {\n \"date\": \"2008-06-15\",\n \"close\": 176.84\n },\n {\n \"date\": \"2008-06-16\",\n \"close\": 181.43\n },\n {\n \"date\": \"2008-06-17\",\n \"close\": 178.75\n },\n {\n \"date\": \"2008-06-18\",\n \"close\": 180.9\n },\n {\n \"date\": \"2008-06-19\",\n \"close\": 175.27\n },\n {\n \"date\": \"2008-06-22\",\n \"close\": 173.16\n },\n {\n \"date\": \"2008-06-23\",\n \"close\": 173.25\n },\n {\n \"date\": \"2008-06-24\",\n \"close\": 177.39\n },\n {\n \"date\": \"2008-06-25\",\n \"close\": 168.26\n },\n {\n \"date\": \"2008-06-26\",\n \"close\": 170.09\n },\n {\n \"date\": \"2008-06-29\",\n \"close\": 167.44\n },\n {\n \"date\": \"2008-07-01\",\n \"close\": 174.68\n },\n {\n \"date\": \"2008-07-02\",\n \"close\": 168.18\n },\n {\n \"date\": \"2008-07-03\",\n \"close\": 170.12\n },\n {\n \"date\": \"2008-07-07\",\n \"close\": 175.16\n },\n {\n \"date\": \"2008-07-08\",\n \"close\": 179.55\n },\n {\n \"date\": \"2008-07-09\",\n \"close\": 174.25\n },\n {\n \"date\": \"2008-07-09\",\n \"close\": 176.63\n },\n {\n \"date\": \"2008-07-10\",\n \"close\": 172.58\n },\n {\n \"date\": \"2008-07-13\",\n \"close\": 173.88\n },\n {\n \"date\": \"2008-07-14\",\n \"close\": 169.64\n },\n {\n \"date\": \"2008-07-15\",\n \"close\": 172.81\n },\n {\n \"date\": \"2008-07-16\",\n \"close\": 171.81\n },\n {\n \"date\": \"2008-07-17\",\n \"close\": 165.15\n },\n {\n \"date\": \"2008-07-20\",\n \"close\": 166.29\n },\n {\n \"date\": \"2008-07-21\",\n \"close\": 162.02\n },\n {\n \"date\": \"2008-07-22\",\n \"close\": 166.26\n },\n {\n \"date\": \"2008-07-23\",\n \"close\": 159.03\n },\n {\n \"date\": \"2008-07-24\",\n \"close\": 162.12\n },\n {\n \"date\": \"2008-07-27\",\n \"close\": 154.4\n },\n {\n \"date\": \"2008-07-28\",\n \"close\": 157.08\n },\n {\n \"date\": \"2008-07-29\",\n \"close\": 159.88\n },\n {\n \"date\": \"2008-07-30\",\n \"close\": 158.95\n },\n {\n \"date\": \"2008-08-01\",\n \"close\": 156.66\n },\n {\n \"date\": \"2008-08-04\",\n \"close\": 153.23\n },\n {\n \"date\": \"2008-08-05\",\n \"close\": 160.64\n },\n {\n \"date\": \"2008-08-06\",\n \"close\": 164.19\n },\n {\n \"date\": \"2008-08-07\",\n \"close\": 163.57\n },\n {\n \"date\": \"2008-08-08\",\n \"close\": 169.55\n },\n {\n \"date\": \"2008-08-10\",\n \"close\": 173.56\n },\n {\n \"date\": \"2008-08-11\",\n \"close\": 176.73\n },\n {\n \"date\": \"2008-08-12\",\n \"close\": 179.3\n },\n {\n \"date\": \"2008-08-13\",\n \"close\": 179.32\n },\n {\n \"date\": \"2008-08-14\",\n \"close\": 175.74\n },\n {\n \"date\": \"2008-08-17\",\n \"close\": 175.39\n },\n {\n \"date\": \"2008-08-18\",\n \"close\": 173.53\n },\n {\n \"date\": \"2008-08-19\",\n \"close\": 175.84\n },\n {\n \"date\": \"2008-08-20\",\n \"close\": 174.29\n },\n {\n \"date\": \"2008-08-21\",\n \"close\": 176.79\n },\n {\n \"date\": \"2008-08-24\",\n \"close\": 172.55\n },\n {\n \"date\": \"2008-08-25\",\n \"close\": 173.64\n },\n {\n \"date\": \"2008-08-26\",\n \"close\": 174.67\n },\n {\n \"date\": \"2008-08-27\",\n \"close\": 173.74\n },\n {\n \"date\": \"2008-08-28\",\n \"close\": 169.53\n },\n {\n \"date\": \"2008-09-02\",\n \"close\": 166.19\n },\n {\n \"date\": \"2008-09-03\",\n \"close\": 166.96\n },\n {\n \"date\": \"2008-09-04\",\n \"close\": 161.22\n },\n {\n \"date\": \"2008-09-05\",\n \"close\": 160.18\n },\n {\n \"date\": \"2008-09-08\",\n \"close\": 157.92\n },\n {\n \"date\": \"2008-09-09\",\n \"close\": 151.68\n },\n {\n \"date\": \"2008-09-09\",\n \"close\": 151.61\n },\n {\n \"date\": \"2008-09-10\",\n \"close\": 152.65\n },\n {\n \"date\": \"2008-09-11\",\n \"close\": 148.94\n },\n {\n \"date\": \"2008-09-14\",\n \"close\": 140.36\n },\n {\n \"date\": \"2008-09-15\",\n \"close\": 139.88\n },\n {\n \"date\": \"2008-09-16\",\n \"close\": 127.83\n },\n {\n \"date\": \"2008-09-17\",\n \"close\": 134.09\n },\n {\n \"date\": \"2008-09-18\",\n \"close\": 140.91\n },\n {\n \"date\": \"2008-09-21\",\n \"close\": 131.05\n },\n {\n \"date\": \"2008-09-22\",\n \"close\": 126.84\n },\n {\n \"date\": \"2008-09-23\",\n \"close\": 128.71\n },\n {\n \"date\": \"2008-09-24\",\n \"close\": 131.93\n },\n {\n \"date\": \"2008-09-25\",\n \"close\": 128.24\n },\n {\n \"date\": \"2008-09-28\",\n \"close\": 105.26\n },\n {\n \"date\": \"2008-09-29\",\n \"close\": 113.66\n },\n {\n \"date\": \"2008-10-01\",\n \"close\": 109.12\n },\n {\n \"date\": \"2008-10-02\",\n \"close\": 100.1\n },\n {\n \"date\": \"2008-10-03\",\n \"close\": 97.07\n },\n {\n \"date\": \"2008-10-06\",\n \"close\": 98.14\n },\n {\n \"date\": \"2008-10-07\",\n \"close\": 89.16\n },\n {\n \"date\": \"2008-10-08\",\n \"close\": 89.79\n },\n {\n \"date\": \"2008-10-09\",\n \"close\": 88.74\n },\n {\n \"date\": \"2008-10-09\",\n \"close\": 96.8\n },\n {\n \"date\": \"2008-10-12\",\n \"close\": 110.26\n },\n {\n \"date\": \"2008-10-13\",\n \"close\": 104.08\n },\n {\n \"date\": \"2008-10-14\",\n \"close\": 97.95\n },\n {\n \"date\": \"2008-10-15\",\n \"close\": 101.89\n },\n {\n \"date\": \"2008-10-16\",\n \"close\": 97.4\n },\n {\n \"date\": \"2008-10-19\",\n \"close\": 98.44\n },\n {\n \"date\": \"2008-10-20\",\n \"close\": 91.49\n },\n {\n \"date\": \"2008-10-21\",\n \"close\": 96.87\n },\n {\n \"date\": \"2008-10-22\",\n \"close\": 98.23\n },\n {\n \"date\": \"2008-10-23\",\n \"close\": 96.38\n },\n {\n \"date\": \"2008-10-26\",\n \"close\": 92.09\n },\n {\n \"date\": \"2008-10-27\",\n \"close\": 99.91\n },\n {\n \"date\": \"2008-10-28\",\n \"close\": 104.55\n },\n {\n \"date\": \"2008-10-29\",\n \"close\": 111.04\n },\n {\n \"date\": \"2008-10-30\",\n \"close\": 107.59\n },\n {\n \"date\": \"2008-11-03\",\n \"close\": 106.96\n },\n {\n \"date\": \"2008-11-04\",\n \"close\": 110.99\n },\n {\n \"date\": \"2008-11-05\",\n \"close\": 103.3\n },\n {\n \"date\": \"2008-11-06\",\n \"close\": 99.1\n },\n {\n \"date\": \"2008-11-07\",\n \"close\": 98.24\n },\n {\n \"date\": \"2008-11-09\",\n \"close\": 95.88\n },\n {\n \"date\": \"2008-11-10\",\n \"close\": 94.77\n },\n {\n \"date\": \"2008-11-11\",\n \"close\": 90.12\n },\n {\n \"date\": \"2008-11-12\",\n \"close\": 96.44\n },\n {\n \"date\": \"2008-11-13\",\n \"close\": 90.24\n },\n {\n \"date\": \"2008-11-16\",\n \"close\": 88.14\n },\n {\n \"date\": \"2008-11-17\",\n \"close\": 89.91\n },\n {\n \"date\": \"2008-11-18\",\n \"close\": 86.29\n },\n {\n \"date\": \"2008-11-19\",\n \"close\": 80.49\n },\n {\n \"date\": \"2008-11-20\",\n \"close\": 82.58\n },\n {\n \"date\": \"2008-11-23\",\n \"close\": 92.95\n },\n {\n \"date\": \"2008-11-24\",\n \"close\": 90.8\n },\n {\n \"date\": \"2008-11-25\",\n \"close\": 95\n },\n {\n \"date\": \"2008-11-26\",\n \"close\": 95\n },\n {\n \"date\": \"2008-11-27\",\n \"close\": 92.67\n },\n {\n \"date\": \"2008-12-01\",\n \"close\": 88.93\n },\n {\n \"date\": \"2008-12-02\",\n \"close\": 92.47\n },\n {\n \"date\": \"2008-12-03\",\n \"close\": 95.9\n },\n {\n \"date\": \"2008-12-04\",\n \"close\": 91.41\n },\n {\n \"date\": \"2008-12-05\",\n \"close\": 94\n },\n {\n \"date\": \"2008-12-08\",\n \"close\": 99.72\n },\n {\n \"date\": \"2008-12-09\",\n \"close\": 100.06\n },\n {\n \"date\": \"2008-12-09\",\n \"close\": 98.21\n },\n {\n \"date\": \"2008-12-10\",\n \"close\": 95\n },\n {\n \"date\": \"2008-12-11\",\n \"close\": 98.27\n },\n {\n \"date\": \"2008-12-14\",\n \"close\": 94.75\n },\n {\n \"date\": \"2008-12-15\",\n \"close\": 95.43\n },\n {\n \"date\": \"2008-12-16\",\n \"close\": 89.16\n },\n {\n \"date\": \"2008-12-17\",\n \"close\": 89.43\n },\n {\n \"date\": \"2008-12-18\",\n \"close\": 90\n },\n {\n \"date\": \"2008-12-21\",\n \"close\": 85.74\n },\n {\n \"date\": \"2008-12-22\",\n \"close\": 86.38\n },\n {\n \"date\": \"2008-12-23\",\n \"close\": 85.04\n },\n {\n \"date\": \"2008-12-24\",\n \"close\": 85.04\n },\n {\n \"date\": \"2008-12-25\",\n \"close\": 85.81\n },\n {\n \"date\": \"2008-12-28\",\n \"close\": 86.61\n },\n {\n \"date\": \"2008-12-29\",\n \"close\": 86.29\n },\n {\n \"date\": \"2008-12-30\",\n \"close\": 85.35\n },\n {\n \"date\": \"2009-01-01\",\n \"close\": 85.35\n },\n {\n \"date\": \"2009-01-02\",\n \"close\": 90.75\n },\n {\n \"date\": \"2009-01-05\",\n \"close\": 94.58\n },\n {\n \"date\": \"2009-01-06\",\n \"close\": 93.02\n },\n {\n \"date\": \"2009-01-07\",\n \"close\": 91.01\n },\n {\n \"date\": \"2009-01-08\",\n \"close\": 92.7\n },\n {\n \"date\": \"2009-01-09\",\n \"close\": 90.58\n },\n {\n \"date\": \"2009-01-11\",\n \"close\": 88.66\n },\n {\n \"date\": \"2009-01-12\",\n \"close\": 87.71\n },\n {\n \"date\": \"2009-01-13\",\n \"close\": 85.33\n },\n {\n \"date\": \"2009-01-14\",\n \"close\": 83.38\n },\n {\n \"date\": \"2009-01-15\",\n \"close\": 82.33\n },\n {\n \"date\": \"2009-01-19\",\n \"close\": 78.2\n },\n {\n \"date\": \"2009-01-20\",\n \"close\": 82.83\n },\n {\n \"date\": \"2009-01-21\",\n \"close\": 88.36\n },\n {\n \"date\": \"2009-01-22\",\n \"close\": 88.36\n },\n {\n \"date\": \"2009-01-25\",\n \"close\": 89.64\n },\n {\n \"date\": \"2009-01-26\",\n \"close\": 90.73\n },\n {\n \"date\": \"2009-01-27\",\n \"close\": 94.2\n },\n {\n \"date\": \"2009-01-28\",\n \"close\": 93\n },\n {\n \"date\": \"2009-01-29\",\n \"close\": 90.13\n },\n {\n \"date\": \"2009-02-02\",\n \"close\": 91.51\n },\n {\n \"date\": \"2009-02-03\",\n \"close\": 92.98\n },\n {\n \"date\": \"2009-02-04\",\n \"close\": 93.55\n },\n {\n \"date\": \"2009-02-05\",\n \"close\": 96.46\n },\n {\n \"date\": \"2009-02-06\",\n \"close\": 99.72\n },\n {\n \"date\": \"2009-02-09\",\n \"close\": 102.51\n },\n {\n \"date\": \"2009-02-09\",\n \"close\": 97.83\n },\n {\n \"date\": \"2009-02-10\",\n \"close\": 96.82\n },\n {\n \"date\": \"2009-02-11\",\n \"close\": 99.27\n },\n {\n \"date\": \"2009-02-12\",\n \"close\": 99.16\n },\n {\n \"date\": \"2009-02-16\",\n \"close\": 94.53\n },\n {\n \"date\": \"2009-02-17\",\n \"close\": 94.37\n },\n {\n \"date\": \"2009-02-18\",\n \"close\": 90.64\n },\n {\n \"date\": \"2009-02-19\",\n \"close\": 91.2\n },\n {\n \"date\": \"2009-02-22\",\n \"close\": 86.95\n },\n {\n \"date\": \"2009-02-23\",\n \"close\": 90.25\n },\n {\n \"date\": \"2009-02-24\",\n \"close\": 91.16\n },\n {\n \"date\": \"2009-02-25\",\n \"close\": 89.19\n },\n {\n \"date\": \"2009-02-26\",\n \"close\": 89.31\n },\n {\n \"date\": \"2009-03-02\",\n \"close\": 87.94\n },\n {\n \"date\": \"2009-03-03\",\n \"close\": 88.37\n },\n {\n \"date\": \"2009-03-04\",\n \"close\": 91.17\n },\n {\n \"date\": \"2009-03-05\",\n \"close\": 88.84\n },\n {\n \"date\": \"2009-03-06\",\n \"close\": 85.3\n },\n {\n \"date\": \"2009-03-09\",\n \"close\": 83.11\n },\n {\n \"date\": \"2009-03-09\",\n \"close\": 88.63\n },\n {\n \"date\": \"2009-03-10\",\n \"close\": 92.68\n },\n {\n \"date\": \"2009-03-11\",\n \"close\": 96.35\n },\n {\n \"date\": \"2009-03-12\",\n \"close\": 95.93\n },\n {\n \"date\": \"2009-03-15\",\n \"close\": 95.42\n },\n {\n \"date\": \"2009-03-16\",\n \"close\": 99.66\n },\n {\n \"date\": \"2009-03-17\",\n \"close\": 101.52\n },\n {\n \"date\": \"2009-03-18\",\n \"close\": 101.62\n },\n {\n \"date\": \"2009-03-19\",\n \"close\": 101.59\n },\n {\n \"date\": \"2009-03-22\",\n \"close\": 107.66\n },\n {\n \"date\": \"2009-03-23\",\n \"close\": 106.5\n },\n {\n \"date\": \"2009-03-24\",\n \"close\": 106.49\n },\n {\n \"date\": \"2009-03-25\",\n \"close\": 109.87\n },\n {\n \"date\": \"2009-03-26\",\n \"close\": 106.85\n },\n {\n \"date\": \"2009-03-29\",\n \"close\": 104.49\n },\n {\n \"date\": \"2009-03-30\",\n \"close\": 105.12\n },\n {\n \"date\": \"2009-04-01\",\n \"close\": 108.69\n },\n {\n \"date\": \"2009-04-02\",\n \"close\": 112.71\n },\n {\n \"date\": \"2009-04-03\",\n \"close\": 115.99\n },\n {\n \"date\": \"2009-04-06\",\n \"close\": 118.45\n },\n {\n \"date\": \"2009-04-07\",\n \"close\": 115\n },\n {\n \"date\": \"2009-04-08\",\n \"close\": 116.32\n },\n {\n \"date\": \"2009-04-09\",\n \"close\": 119.57\n },\n {\n \"date\": \"2009-04-09\",\n \"close\": 119.57\n },\n {\n \"date\": \"2009-04-12\",\n \"close\": 120.22\n },\n {\n \"date\": \"2009-04-13\",\n \"close\": 118.31\n },\n {\n \"date\": \"2009-04-14\",\n \"close\": 117.64\n },\n {\n \"date\": \"2009-04-15\",\n \"close\": 121.45\n },\n {\n \"date\": \"2009-04-16\",\n \"close\": 123.42\n },\n {\n \"date\": \"2009-04-19\",\n \"close\": 120.5\n },\n {\n \"date\": \"2009-04-20\",\n \"close\": 121.76\n },\n {\n \"date\": \"2009-04-21\",\n \"close\": 121.51\n },\n {\n \"date\": \"2009-04-22\",\n \"close\": 125.4\n },\n {\n \"date\": \"2009-04-23\",\n \"close\": 123.9\n },\n {\n \"date\": \"2009-04-26\",\n \"close\": 124.73\n },\n {\n \"date\": \"2009-04-27\",\n \"close\": 123.9\n },\n {\n \"date\": \"2009-04-28\",\n \"close\": 125.14\n },\n {\n \"date\": \"2009-04-29\",\n \"close\": 125.83\n },\n {\n \"date\": \"2009-05-01\",\n \"close\": 127.24\n },\n {\n \"date\": \"2009-05-04\",\n \"close\": 132.07\n },\n {\n \"date\": \"2009-05-05\",\n \"close\": 132.71\n },\n {\n \"date\": \"2009-05-06\",\n \"close\": 132.5\n },\n {\n \"date\": \"2009-05-07\",\n \"close\": 129.06\n },\n {\n \"date\": \"2009-05-08\",\n \"close\": 129.19\n },\n {\n \"date\": \"2009-05-10\",\n \"close\": 129.57\n },\n {\n \"date\": \"2009-05-11\",\n \"close\": 124.42\n },\n {\n \"date\": \"2009-05-12\",\n \"close\": 119.49\n },\n {\n \"date\": \"2009-05-13\",\n \"close\": 122.95\n },\n {\n \"date\": \"2009-05-14\",\n \"close\": 122.42\n },\n {\n \"date\": \"2009-05-17\",\n \"close\": 126.65\n },\n {\n \"date\": \"2009-05-18\",\n \"close\": 127.45\n },\n {\n \"date\": \"2009-05-19\",\n \"close\": 125.87\n },\n {\n \"date\": \"2009-05-20\",\n \"close\": 124.18\n },\n {\n \"date\": \"2009-05-21\",\n \"close\": 122.5\n },\n {\n \"date\": \"2009-05-25\",\n \"close\": 130.78\n },\n {\n \"date\": \"2009-05-26\",\n \"close\": 133.05\n },\n {\n \"date\": \"2009-05-27\",\n \"close\": 135.07\n },\n {\n \"date\": \"2009-05-28\",\n \"close\": 135.81\n },\n {\n \"date\": \"2009-06-01\",\n \"close\": 139.35\n },\n {\n \"date\": \"2009-06-02\",\n \"close\": 139.49\n },\n {\n \"date\": \"2009-06-03\",\n \"close\": 140.95\n },\n {\n \"date\": \"2009-06-04\",\n \"close\": 143.74\n },\n {\n \"date\": \"2009-06-05\",\n \"close\": 144.67\n },\n {\n \"date\": \"2009-06-08\",\n \"close\": 143.85\n },\n {\n \"date\": \"2009-06-09\",\n \"close\": 142.72\n },\n {\n \"date\": \"2009-06-09\",\n \"close\": 140.25\n },\n {\n \"date\": \"2009-06-10\",\n \"close\": 139.95\n },\n {\n \"date\": \"2009-06-11\",\n \"close\": 136.97\n },\n {\n \"date\": \"2009-06-14\",\n \"close\": 136.09\n },\n {\n \"date\": \"2009-06-15\",\n \"close\": 136.35\n },\n {\n \"date\": \"2009-06-16\",\n \"close\": 135.58\n },\n {\n \"date\": \"2009-06-17\",\n \"close\": 135.88\n },\n {\n \"date\": \"2009-06-18\",\n \"close\": 139.48\n },\n {\n \"date\": \"2009-06-21\",\n \"close\": 137.37\n },\n {\n \"date\": \"2009-06-22\",\n \"close\": 134.01\n },\n {\n \"date\": \"2009-06-23\",\n \"close\": 136.22\n },\n {\n \"date\": \"2009-06-24\",\n \"close\": 139.86\n },\n {\n \"date\": \"2009-06-25\",\n \"close\": 142.44\n },\n {\n \"date\": \"2009-06-28\",\n \"close\": 141.97\n },\n {\n \"date\": \"2009-06-29\",\n \"close\": 142.43\n },\n {\n \"date\": \"2009-07-01\",\n \"close\": 142.83\n },\n {\n \"date\": \"2009-07-02\",\n \"close\": 140.02\n },\n {\n \"date\": \"2009-07-03\",\n \"close\": 140.02\n },\n {\n \"date\": \"2009-07-06\",\n \"close\": 138.61\n },\n {\n \"date\": \"2009-07-07\",\n \"close\": 135.4\n },\n {\n \"date\": \"2009-07-08\",\n \"close\": 137.22\n },\n {\n \"date\": \"2009-07-09\",\n \"close\": 136.36\n },\n {\n \"date\": \"2009-07-09\",\n \"close\": 138.52\n },\n {\n \"date\": \"2009-07-12\",\n \"close\": 142.34\n },\n {\n \"date\": \"2009-07-13\",\n \"close\": 142.27\n },\n {\n \"date\": \"2009-07-14\",\n \"close\": 146.88\n },\n {\n \"date\": \"2009-07-15\",\n \"close\": 147.52\n },\n {\n \"date\": \"2009-07-16\",\n \"close\": 151.75\n },\n {\n \"date\": \"2009-07-19\",\n \"close\": 152.91\n },\n {\n \"date\": \"2009-07-20\",\n \"close\": 151.51\n },\n {\n \"date\": \"2009-07-21\",\n \"close\": 156.74\n },\n {\n \"date\": \"2009-07-22\",\n \"close\": 157.82\n },\n {\n \"date\": \"2009-07-23\",\n \"close\": 159.99\n },\n {\n \"date\": \"2009-07-26\",\n \"close\": 160.1\n },\n {\n \"date\": \"2009-07-27\",\n \"close\": 160\n },\n {\n \"date\": \"2009-07-28\",\n \"close\": 160.03\n },\n {\n \"date\": \"2009-07-29\",\n \"close\": 162.79\n },\n {\n \"date\": \"2009-07-30\",\n \"close\": 163.39\n },\n {\n \"date\": \"2009-08-03\",\n \"close\": 166.43\n },\n {\n \"date\": \"2009-08-04\",\n \"close\": 165.55\n },\n {\n \"date\": \"2009-08-05\",\n \"close\": 165.11\n },\n {\n \"date\": \"2009-08-06\",\n \"close\": 163.91\n },\n {\n \"date\": \"2009-08-07\",\n \"close\": 165.51\n },\n {\n \"date\": \"2009-08-09\",\n \"close\": 164.72\n },\n {\n \"date\": \"2009-08-11\",\n \"close\": 165.31\n },\n {\n \"date\": \"2009-08-12\",\n \"close\": 168.42\n },\n {\n \"date\": \"2009-08-13\",\n \"close\": 166.78\n },\n {\n \"date\": \"2009-08-16\",\n \"close\": 159.59\n },\n {\n \"date\": \"2009-08-17\",\n \"close\": 164\n },\n {\n \"date\": \"2009-08-18\",\n \"close\": 164.6\n },\n {\n \"date\": \"2009-08-19\",\n \"close\": 166.33\n },\n {\n \"date\": \"2009-08-20\",\n \"close\": 169.22\n },\n {\n \"date\": \"2009-08-23\",\n \"close\": 169.06\n },\n {\n \"date\": \"2009-08-24\",\n \"close\": 169.4\n },\n {\n \"date\": \"2009-08-25\",\n \"close\": 167.41\n },\n {\n \"date\": \"2009-08-26\",\n \"close\": 169.45\n },\n {\n \"date\": \"2009-08-27\",\n \"close\": 170.05\n },\n {\n \"date\": \"2009-08-30\",\n \"close\": 168.21\n },\n {\n \"date\": \"2009-09-01\",\n \"close\": 165.3\n },\n {\n \"date\": \"2009-09-02\",\n \"close\": 165.18\n },\n {\n \"date\": \"2009-09-03\",\n \"close\": 166.55\n },\n {\n \"date\": \"2009-09-04\",\n \"close\": 170.31\n },\n {\n \"date\": \"2009-09-08\",\n \"close\": 172.93\n },\n {\n \"date\": \"2009-09-09\",\n \"close\": 171.14\n },\n {\n \"date\": \"2009-09-09\",\n \"close\": 172.56\n },\n {\n \"date\": \"2009-09-10\",\n \"close\": 172.16\n },\n {\n \"date\": \"2009-09-13\",\n \"close\": 173.72\n },\n {\n \"date\": \"2009-09-14\",\n \"close\": 175.16\n },\n {\n \"date\": \"2009-09-15\",\n \"close\": 181.87\n },\n {\n \"date\": \"2009-09-16\",\n \"close\": 184.55\n },\n {\n \"date\": \"2009-09-17\",\n \"close\": 185.02\n },\n {\n \"date\": \"2009-09-20\",\n \"close\": 184.02\n },\n {\n \"date\": \"2009-09-21\",\n \"close\": 184.48\n },\n {\n \"date\": \"2009-09-22\",\n \"close\": 185.5\n },\n {\n \"date\": \"2009-09-23\",\n \"close\": 183.82\n },\n {\n \"date\": \"2009-09-24\",\n \"close\": 182.37\n },\n {\n \"date\": \"2009-09-27\",\n \"close\": 186.15\n },\n {\n \"date\": \"2009-09-28\",\n \"close\": 185.38\n },\n {\n \"date\": \"2009-09-29\",\n \"close\": 185.35\n },\n {\n \"date\": \"2009-10-01\",\n \"close\": 180.86\n },\n {\n \"date\": \"2009-10-02\",\n \"close\": 184.9\n },\n {\n \"date\": \"2009-10-05\",\n \"close\": 186.02\n },\n {\n \"date\": \"2009-10-06\",\n \"close\": 190.01\n },\n {\n \"date\": \"2009-10-07\",\n \"close\": 190.25\n },\n {\n \"date\": \"2009-10-08\",\n \"close\": 189.27\n },\n {\n \"date\": \"2009-10-09\",\n \"close\": 190.47\n },\n {\n \"date\": \"2009-10-11\",\n \"close\": 190.81\n },\n {\n \"date\": \"2009-10-12\",\n \"close\": 190.02\n },\n {\n \"date\": \"2009-10-13\",\n \"close\": 191.29\n },\n {\n \"date\": \"2009-10-14\",\n \"close\": 190.56\n },\n {\n \"date\": \"2009-10-15\",\n \"close\": 188.05\n },\n {\n \"date\": \"2009-10-18\",\n \"close\": 189.86\n },\n {\n \"date\": \"2009-10-19\",\n \"close\": 198.76\n },\n {\n \"date\": \"2009-10-20\",\n \"close\": 204.92\n },\n {\n \"date\": \"2009-10-21\",\n \"close\": 205.2\n },\n {\n \"date\": \"2009-10-22\",\n \"close\": 203.94\n },\n {\n \"date\": \"2009-10-25\",\n \"close\": 202.48\n },\n {\n \"date\": \"2009-10-26\",\n \"close\": 197.37\n },\n {\n \"date\": \"2009-10-27\",\n \"close\": 192.4\n },\n {\n \"date\": \"2009-10-28\",\n \"close\": 196.35\n },\n {\n \"date\": \"2009-10-29\",\n \"close\": 188.5\n },\n {\n \"date\": \"2009-11-02\",\n \"close\": 189.31\n },\n {\n \"date\": \"2009-11-03\",\n \"close\": 188.75\n },\n {\n \"date\": \"2009-11-04\",\n \"close\": 190.81\n },\n {\n \"date\": \"2009-11-05\",\n \"close\": 194.03\n },\n {\n \"date\": \"2009-11-06\",\n \"close\": 194.34\n },\n {\n \"date\": \"2009-11-09\",\n \"close\": 201.46\n },\n {\n \"date\": \"2009-11-09\",\n \"close\": 202.98\n },\n {\n \"date\": \"2009-11-10\",\n \"close\": 203.25\n },\n {\n \"date\": \"2009-11-11\",\n \"close\": 201.99\n },\n {\n \"date\": \"2009-11-12\",\n \"close\": 204.45\n },\n {\n \"date\": \"2009-11-15\",\n \"close\": 206.63\n },\n {\n \"date\": \"2009-11-16\",\n \"close\": 207\n },\n {\n \"date\": \"2009-11-17\",\n \"close\": 205.96\n },\n {\n \"date\": \"2009-11-18\",\n \"close\": 200.51\n },\n {\n \"date\": \"2009-11-19\",\n \"close\": 199.92\n },\n {\n \"date\": \"2009-11-22\",\n \"close\": 205.88\n },\n {\n \"date\": \"2009-11-23\",\n \"close\": 204.44\n },\n {\n \"date\": \"2009-11-24\",\n \"close\": 204.19\n },\n {\n \"date\": \"2009-11-25\",\n \"close\": 204.19\n },\n {\n \"date\": \"2009-11-26\",\n \"close\": 200.59\n },\n {\n \"date\": \"2009-11-29\",\n \"close\": 199.91\n },\n {\n \"date\": \"2009-12-01\",\n \"close\": 196.97\n },\n {\n \"date\": \"2009-12-02\",\n \"close\": 196.23\n },\n {\n \"date\": \"2009-12-03\",\n \"close\": 196.48\n },\n {\n \"date\": \"2009-12-04\",\n \"close\": 193.32\n },\n {\n \"date\": \"2009-12-07\",\n \"close\": 188.95\n },\n {\n \"date\": \"2009-12-08\",\n \"close\": 189.87\n },\n {\n \"date\": \"2009-12-09\",\n \"close\": 197.8\n },\n {\n \"date\": \"2009-12-09\",\n \"close\": 196.43\n },\n {\n \"date\": \"2009-12-10\",\n \"close\": 194.67\n },\n {\n \"date\": \"2009-12-13\",\n \"close\": 196.98\n },\n {\n \"date\": \"2009-12-14\",\n \"close\": 194.17\n },\n {\n \"date\": \"2009-12-15\",\n \"close\": 195.03\n },\n {\n \"date\": \"2009-12-16\",\n \"close\": 191.86\n },\n {\n \"date\": \"2009-12-17\",\n \"close\": 195.43\n },\n {\n \"date\": \"2009-12-20\",\n \"close\": 198.23\n },\n {\n \"date\": \"2009-12-21\",\n \"close\": 200.36\n },\n {\n \"date\": \"2009-12-22\",\n \"close\": 202.1\n },\n {\n \"date\": \"2009-12-23\",\n \"close\": 209.04\n },\n {\n \"date\": \"2009-12-24\",\n \"close\": 209.04\n },\n {\n \"date\": \"2009-12-27\",\n \"close\": 211.61\n },\n {\n \"date\": \"2009-12-28\",\n \"close\": 209.1\n },\n {\n \"date\": \"2009-12-29\",\n \"close\": 211.64\n },\n {\n \"date\": \"2009-12-30\",\n \"close\": 210.73\n },\n {\n \"date\": \"2010-01-01\",\n \"close\": 210.73\n },\n {\n \"date\": \"2010-01-04\",\n \"close\": 214.01\n },\n {\n \"date\": \"2010-01-05\",\n \"close\": 214.38\n },\n {\n \"date\": \"2010-01-06\",\n \"close\": 210.97\n },\n {\n \"date\": \"2010-01-07\",\n \"close\": 210.58\n },\n {\n \"date\": \"2010-01-08\",\n \"close\": 211.98\n },\n {\n \"date\": \"2010-01-10\",\n \"close\": 210.11\n },\n {\n \"date\": \"2010-01-11\",\n \"close\": 207.72\n },\n {\n \"date\": \"2010-01-12\",\n \"close\": 210.65\n },\n {\n \"date\": \"2010-01-13\",\n \"close\": 209.43\n },\n {\n \"date\": \"2010-01-14\",\n \"close\": 205.93\n },\n {\n \"date\": \"2010-01-17\",\n \"close\": 205.93\n },\n {\n \"date\": \"2010-01-18\",\n \"close\": 215.04\n },\n {\n \"date\": \"2010-01-19\",\n \"close\": 211.72\n },\n {\n \"date\": \"2010-01-20\",\n \"close\": 208.07\n },\n {\n \"date\": \"2010-01-21\",\n \"close\": 197.75\n },\n {\n \"date\": \"2010-01-24\",\n \"close\": 203.08\n },\n {\n \"date\": \"2010-01-25\",\n \"close\": 205.94\n },\n {\n \"date\": \"2010-01-26\",\n \"close\": 207.88\n },\n {\n \"date\": \"2010-01-27\",\n \"close\": 199.29\n },\n {\n \"date\": \"2010-01-28\",\n \"close\": 192.06\n },\n {\n \"date\": \"2010-02-01\",\n \"close\": 194.73\n },\n {\n \"date\": \"2010-02-02\",\n \"close\": 195.86\n },\n {\n \"date\": \"2010-02-03\",\n \"close\": 199.23\n },\n {\n \"date\": \"2010-02-04\",\n \"close\": 192.05\n },\n {\n \"date\": \"2010-02-05\",\n \"close\": 195.46\n },\n {\n \"date\": \"2010-02-08\",\n \"close\": 194.12\n },\n {\n \"date\": \"2010-02-09\",\n \"close\": 196.19\n },\n {\n \"date\": \"2010-02-09\",\n \"close\": 195.12\n },\n {\n \"date\": \"2010-02-10\",\n \"close\": 198.67\n },\n {\n \"date\": \"2010-02-11\",\n \"close\": 200.38\n },\n {\n \"date\": \"2010-02-14\",\n \"close\": 200.38\n },\n {\n \"date\": \"2010-02-15\",\n \"close\": 203.4\n },\n {\n \"date\": \"2010-02-16\",\n \"close\": 202.55\n },\n {\n \"date\": \"2010-02-17\",\n \"close\": 202.93\n },\n {\n \"date\": \"2010-02-18\",\n \"close\": 201.67\n },\n {\n \"date\": \"2010-02-21\",\n \"close\": 200.42\n },\n {\n \"date\": \"2010-02-22\",\n \"close\": 197.06\n },\n {\n \"date\": \"2010-02-23\",\n \"close\": 200.66\n },\n {\n \"date\": \"2010-02-24\",\n \"close\": 202\n },\n {\n \"date\": \"2010-02-25\",\n \"close\": 204.62\n },\n {\n \"date\": \"2010-03-01\",\n \"close\": 208.99\n },\n {\n \"date\": \"2010-03-02\",\n \"close\": 208.85\n },\n {\n \"date\": \"2010-03-03\",\n \"close\": 209.33\n },\n {\n \"date\": \"2010-03-04\",\n \"close\": 210.71\n },\n {\n \"date\": \"2010-03-05\",\n \"close\": 218.95\n },\n {\n \"date\": \"2010-03-08\",\n \"close\": 219.08\n },\n {\n \"date\": \"2010-03-09\",\n \"close\": 223.02\n },\n {\n \"date\": \"2010-03-09\",\n \"close\": 224.84\n },\n {\n \"date\": \"2010-03-10\",\n \"close\": 225.5\n },\n {\n \"date\": \"2010-03-11\",\n \"close\": 226.6\n },\n {\n \"date\": \"2010-03-14\",\n \"close\": 223.84\n },\n {\n \"date\": \"2010-03-15\",\n \"close\": 224.45\n },\n {\n \"date\": \"2010-03-16\",\n \"close\": 224.12\n },\n {\n \"date\": \"2010-03-17\",\n \"close\": 224.65\n },\n {\n \"date\": \"2010-03-18\",\n \"close\": 222.25\n },\n {\n \"date\": \"2010-03-21\",\n \"close\": 224.75\n },\n {\n \"date\": \"2010-03-22\",\n \"close\": 228.36\n },\n {\n \"date\": \"2010-03-23\",\n \"close\": 229.37\n },\n {\n \"date\": \"2010-03-24\",\n \"close\": 226.65\n },\n {\n \"date\": \"2010-03-25\",\n \"close\": 230.9\n },\n {\n \"date\": \"2010-03-28\",\n \"close\": 232.39\n },\n {\n \"date\": \"2010-03-29\",\n \"close\": 235.84\n },\n {\n \"date\": \"2010-03-30\",\n \"close\": 235\n },\n {\n \"date\": \"2010-04-01\",\n \"close\": 235.97\n },\n {\n \"date\": \"2010-04-02\",\n \"close\": 235.97\n },\n {\n \"date\": \"2010-04-05\",\n \"close\": 238.49\n },\n {\n \"date\": \"2010-04-06\",\n \"close\": 239.54\n },\n {\n \"date\": \"2010-04-07\",\n \"close\": 240.6\n },\n {\n \"date\": \"2010-04-08\",\n \"close\": 239.95\n },\n {\n \"date\": \"2010-04-09\",\n \"close\": 241.79\n },\n {\n \"date\": \"2010-04-11\",\n \"close\": 242.29\n },\n {\n \"date\": \"2010-04-12\",\n \"close\": 242.43\n },\n {\n \"date\": \"2010-04-13\",\n \"close\": 245.69\n },\n {\n \"date\": \"2010-04-14\",\n \"close\": 248.92\n },\n {\n \"date\": \"2010-04-15\",\n \"close\": 247.4\n },\n {\n \"date\": \"2010-04-18\",\n \"close\": 247.07\n },\n {\n \"date\": \"2010-04-19\",\n \"close\": 244.59\n },\n {\n \"date\": \"2010-04-20\",\n \"close\": 259.22\n },\n {\n \"date\": \"2010-04-21\",\n \"close\": 266.47\n },\n {\n \"date\": \"2010-04-22\",\n \"close\": 270.83\n },\n {\n \"date\": \"2010-04-25\",\n \"close\": 269.5\n },\n {\n \"date\": \"2010-04-26\",\n \"close\": 262.04\n },\n {\n \"date\": \"2010-04-27\",\n \"close\": 261.6\n },\n {\n \"date\": \"2010-04-28\",\n \"close\": 268.64\n },\n {\n \"date\": \"2010-04-29\",\n \"close\": 261.09\n },\n {\n \"date\": \"2010-05-03\",\n \"close\": 266.35\n },\n {\n \"date\": \"2010-05-04\",\n \"close\": 258.68\n },\n {\n \"date\": \"2010-05-05\",\n \"close\": 255.98\n },\n {\n \"date\": \"2010-05-06\",\n \"close\": 246.25\n },\n {\n \"date\": \"2010-05-07\",\n \"close\": 235.86\n },\n {\n \"date\": \"2010-05-09\",\n \"close\": 253.99\n },\n {\n \"date\": \"2010-05-10\",\n \"close\": 256.52\n },\n {\n \"date\": \"2010-05-11\",\n \"close\": 262.09\n },\n {\n \"date\": \"2010-05-12\",\n \"close\": 258.36\n },\n {\n \"date\": \"2010-05-13\",\n \"close\": 253.82\n },\n {\n \"date\": \"2010-05-16\",\n \"close\": 254.22\n },\n {\n \"date\": \"2010-05-17\",\n \"close\": 252.36\n },\n {\n \"date\": \"2010-05-18\",\n \"close\": 248.34\n },\n {\n \"date\": \"2010-05-19\",\n \"close\": 237.76\n },\n {\n \"date\": \"2010-05-20\",\n \"close\": 242.32\n },\n {\n \"date\": \"2010-05-23\",\n \"close\": 246.76\n },\n {\n \"date\": \"2010-05-24\",\n \"close\": 245.22\n },\n {\n \"date\": \"2010-05-25\",\n \"close\": 244.11\n },\n {\n \"date\": \"2010-05-26\",\n \"close\": 253.35\n },\n {\n \"date\": \"2010-05-27\",\n \"close\": 256.88\n },\n {\n \"date\": \"2010-05-30\",\n \"close\": 256.88\n },\n {\n \"date\": \"2010-06-01\",\n \"close\": 260.83\n },\n {\n \"date\": \"2010-06-02\",\n \"close\": 263.95\n },\n {\n \"date\": \"2010-06-03\",\n \"close\": 263.12\n },\n {\n \"date\": \"2010-06-04\",\n \"close\": 255.96\n },\n {\n \"date\": \"2010-06-07\",\n \"close\": 250.94\n },\n {\n \"date\": \"2010-06-08\",\n \"close\": 249.33\n },\n {\n \"date\": \"2010-06-09\",\n \"close\": 243.2\n },\n {\n \"date\": \"2010-06-09\",\n \"close\": 250.51\n },\n {\n \"date\": \"2010-06-10\",\n \"close\": 253.51\n },\n {\n \"date\": \"2010-06-13\",\n \"close\": 254.28\n },\n {\n \"date\": \"2010-06-14\",\n \"close\": 259.69\n },\n {\n \"date\": \"2010-06-15\",\n \"close\": 267.25\n },\n {\n \"date\": \"2010-06-16\",\n \"close\": 271.87\n },\n {\n \"date\": \"2010-06-17\",\n \"close\": 274.07\n },\n {\n \"date\": \"2010-06-20\",\n \"close\": 270.17\n },\n {\n \"date\": \"2010-06-21\",\n \"close\": 273.85\n },\n {\n \"date\": \"2010-06-22\",\n \"close\": 270.97\n },\n {\n \"date\": \"2010-06-23\",\n \"close\": 269\n },\n {\n \"date\": \"2010-06-24\",\n \"close\": 266.7\n },\n {\n \"date\": \"2010-06-27\",\n \"close\": 268.3\n },\n {\n \"date\": \"2010-06-28\",\n \"close\": 256.17\n },\n {\n \"date\": \"2010-06-29\",\n \"close\": 251.53\n },\n {\n \"date\": \"2010-07-01\",\n \"close\": 248.48\n },\n {\n \"date\": \"2010-07-02\",\n \"close\": 246.94\n },\n {\n \"date\": \"2010-07-05\",\n \"close\": 246.94\n },\n {\n \"date\": \"2010-07-06\",\n \"close\": 248.63\n },\n {\n \"date\": \"2010-07-07\",\n \"close\": 258.66\n },\n {\n \"date\": \"2010-07-08\",\n \"close\": 258.09\n },\n {\n \"date\": \"2010-07-09\",\n \"close\": 259.62\n },\n {\n \"date\": \"2010-07-11\",\n \"close\": 257.28\n },\n {\n \"date\": \"2010-07-12\",\n \"close\": 251.8\n },\n {\n \"date\": \"2010-07-13\",\n \"close\": 252.73\n },\n {\n \"date\": \"2010-07-14\",\n \"close\": 251.45\n },\n {\n \"date\": \"2010-07-15\",\n \"close\": 249.9\n },\n {\n \"date\": \"2010-07-18\",\n \"close\": 245.58\n },\n {\n \"date\": \"2010-07-19\",\n \"close\": 251.89\n },\n {\n \"date\": \"2010-07-20\",\n \"close\": 254.24\n },\n {\n \"date\": \"2010-07-21\",\n \"close\": 259.02\n },\n {\n \"date\": \"2010-07-22\",\n \"close\": 259.94\n },\n {\n \"date\": \"2010-07-25\",\n \"close\": 259.28\n },\n {\n \"date\": \"2010-07-26\",\n \"close\": 264.08\n },\n {\n \"date\": \"2010-07-27\",\n \"close\": 260.96\n },\n {\n \"date\": \"2010-07-28\",\n \"close\": 258.11\n },\n {\n \"date\": \"2010-07-29\",\n \"close\": 257.25\n },\n {\n \"date\": \"2010-08-02\",\n \"close\": 261.85\n },\n {\n \"date\": \"2010-08-03\",\n \"close\": 261.93\n },\n {\n \"date\": \"2010-08-04\",\n \"close\": 262.98\n },\n {\n \"date\": \"2010-08-05\",\n \"close\": 261.7\n },\n {\n \"date\": \"2010-08-06\",\n \"close\": 260.09\n },\n {\n \"date\": \"2010-08-09\",\n \"close\": 261.75\n },\n {\n \"date\": \"2010-08-09\",\n \"close\": 259.41\n },\n {\n \"date\": \"2010-08-10\",\n \"close\": 250.19\n },\n {\n \"date\": \"2010-08-11\",\n \"close\": 251.79\n },\n {\n \"date\": \"2010-08-12\",\n \"close\": 249.1\n },\n {\n \"date\": \"2010-08-15\",\n \"close\": 247.64\n },\n {\n \"date\": \"2010-08-16\",\n \"close\": 251.97\n },\n {\n \"date\": \"2010-08-17\",\n \"close\": 253.07\n },\n {\n \"date\": \"2010-08-18\",\n \"close\": 249.88\n },\n {\n \"date\": \"2010-08-19\",\n \"close\": 249.64\n },\n {\n \"date\": \"2010-08-22\",\n \"close\": 245.8\n },\n {\n \"date\": \"2010-08-23\",\n \"close\": 239.93\n },\n {\n \"date\": \"2010-08-24\",\n \"close\": 242.89\n },\n {\n \"date\": \"2010-08-25\",\n \"close\": 240.28\n },\n {\n \"date\": \"2010-08-26\",\n \"close\": 241.62\n },\n {\n \"date\": \"2010-08-29\",\n \"close\": 242.5\n },\n {\n \"date\": \"2010-08-30\",\n \"close\": 243.1\n },\n {\n \"date\": \"2010-09-01\",\n \"close\": 250.33\n },\n {\n \"date\": \"2010-09-02\",\n \"close\": 252.17\n },\n {\n \"date\": \"2010-09-03\",\n \"close\": 258.77\n },\n {\n \"date\": \"2010-09-06\",\n \"close\": 258.77\n },\n {\n \"date\": \"2010-09-07\",\n \"close\": 257.81\n },\n {\n \"date\": \"2010-09-08\",\n \"close\": 262.92\n },\n {\n \"date\": \"2010-09-09\",\n \"close\": 263.07\n },\n {\n \"date\": \"2010-09-09\",\n \"close\": 263.41\n },\n {\n \"date\": \"2010-09-12\",\n \"close\": 267.04\n },\n {\n \"date\": \"2010-09-13\",\n \"close\": 268.06\n },\n {\n \"date\": \"2010-09-14\",\n \"close\": 270.22\n },\n {\n \"date\": \"2010-09-15\",\n \"close\": 276.57\n },\n {\n \"date\": \"2010-09-16\",\n \"close\": 275.37\n },\n {\n \"date\": \"2010-09-19\",\n \"close\": 283.23\n },\n {\n \"date\": \"2010-09-20\",\n \"close\": 283.77\n },\n {\n \"date\": \"2010-09-21\",\n \"close\": 287.75\n },\n {\n \"date\": \"2010-09-22\",\n \"close\": 288.92\n },\n {\n \"date\": \"2010-09-23\",\n \"close\": 292.32\n },\n {\n \"date\": \"2010-09-26\",\n \"close\": 291.16\n },\n {\n \"date\": \"2010-09-27\",\n \"close\": 286.86\n },\n {\n \"date\": \"2010-09-28\",\n \"close\": 287.37\n },\n {\n \"date\": \"2010-09-29\",\n \"close\": 283.75\n },\n {\n \"date\": \"2010-10-01\",\n \"close\": 282.52\n },\n {\n \"date\": \"2010-10-04\",\n \"close\": 278.64\n },\n {\n \"date\": \"2010-10-05\",\n \"close\": 288.94\n },\n {\n \"date\": \"2010-10-06\",\n \"close\": 289.19\n },\n {\n \"date\": \"2010-10-07\",\n \"close\": 289.22\n },\n {\n \"date\": \"2010-10-08\",\n \"close\": 294.07\n },\n {\n \"date\": \"2010-10-10\",\n \"close\": 295.36\n },\n {\n \"date\": \"2010-10-11\",\n \"close\": 298.54\n },\n {\n \"date\": \"2010-10-12\",\n \"close\": 300.14\n },\n {\n \"date\": \"2010-10-13\",\n \"close\": 302.31\n },\n {\n \"date\": \"2010-10-14\",\n \"close\": 314.74\n },\n {\n \"date\": \"2010-10-17\",\n \"close\": 318\n },\n {\n \"date\": \"2010-10-18\",\n \"close\": 309.49\n },\n {\n \"date\": \"2010-10-19\",\n \"close\": 310.53\n },\n {\n \"date\": \"2010-10-20\",\n \"close\": 309.52\n },\n {\n \"date\": \"2010-10-21\",\n \"close\": 307.47\n },\n {\n \"date\": \"2010-10-24\",\n \"close\": 308.84\n },\n {\n \"date\": \"2010-10-25\",\n \"close\": 308.05\n },\n {\n \"date\": \"2010-10-26\",\n \"close\": 307.83\n },\n {\n \"date\": \"2010-10-27\",\n \"close\": 305.24\n },\n {\n \"date\": \"2010-10-28\",\n \"close\": 300.98\n },\n {\n \"date\": \"2010-11-01\",\n \"close\": 304.18\n },\n {\n \"date\": \"2010-11-02\",\n \"close\": 309.36\n },\n {\n \"date\": \"2010-11-03\",\n \"close\": 312.8\n },\n {\n \"date\": \"2010-11-04\",\n \"close\": 318.27\n },\n {\n \"date\": \"2010-11-05\",\n \"close\": 317.13\n },\n {\n \"date\": \"2010-11-08\",\n \"close\": 318.62\n },\n {\n \"date\": \"2010-11-09\",\n \"close\": 316.08\n },\n {\n \"date\": \"2010-11-09\",\n \"close\": 318.03\n },\n {\n \"date\": \"2010-11-10\",\n \"close\": 316.66\n },\n {\n \"date\": \"2010-11-11\",\n \"close\": 308.03\n },\n {\n \"date\": \"2010-11-14\",\n \"close\": 307.04\n },\n {\n \"date\": \"2010-11-15\",\n \"close\": 301.59\n },\n {\n \"date\": \"2010-11-16\",\n \"close\": 300.5\n },\n {\n \"date\": \"2010-11-17\",\n \"close\": 308.43\n },\n {\n \"date\": \"2010-11-18\",\n \"close\": 306.73\n },\n {\n \"date\": \"2010-11-21\",\n \"close\": 313.36\n },\n {\n \"date\": \"2010-11-22\",\n \"close\": 308.73\n },\n {\n \"date\": \"2010-11-23\",\n \"close\": 314.8\n },\n {\n \"date\": \"2010-11-25\",\n \"close\": 315\n },\n {\n \"date\": \"2010-11-28\",\n \"close\": 316.87\n },\n {\n \"date\": \"2010-11-29\",\n \"close\": 311.15\n },\n {\n \"date\": \"2010-12-01\",\n \"close\": 316.4\n },\n {\n \"date\": \"2010-12-02\",\n \"close\": 318.15\n },\n {\n \"date\": \"2010-12-03\",\n \"close\": 317.44\n },\n {\n \"date\": \"2010-12-06\",\n \"close\": 320.15\n },\n {\n \"date\": \"2010-12-07\",\n \"close\": 318.21\n },\n {\n \"date\": \"2010-12-08\",\n \"close\": 321.01\n },\n {\n \"date\": \"2010-12-09\",\n \"close\": 319.76\n },\n {\n \"date\": \"2010-12-09\",\n \"close\": 320.56\n },\n {\n \"date\": \"2010-12-12\",\n \"close\": 321.67\n },\n {\n \"date\": \"2010-12-13\",\n \"close\": 320.29\n },\n {\n \"date\": \"2010-12-14\",\n \"close\": 320.36\n },\n {\n \"date\": \"2010-12-15\",\n \"close\": 321.25\n },\n {\n \"date\": \"2010-12-16\",\n \"close\": 320.61\n },\n {\n \"date\": \"2010-12-19\",\n \"close\": 322.21\n },\n {\n \"date\": \"2010-12-20\",\n \"close\": 324.2\n },\n {\n \"date\": \"2010-12-21\",\n \"close\": 325.16\n },\n {\n \"date\": \"2010-12-22\",\n \"close\": 323.6\n },\n {\n \"date\": \"2010-12-26\",\n \"close\": 324.68\n },\n {\n \"date\": \"2010-12-27\",\n \"close\": 325.47\n },\n {\n \"date\": \"2010-12-28\",\n \"close\": 325.29\n },\n {\n \"date\": \"2010-12-29\",\n \"close\": 323.66\n },\n {\n \"date\": \"2010-12-30\",\n \"close\": 322.56\n },\n {\n \"date\": \"2011-01-03\",\n \"close\": 329.57\n },\n {\n \"date\": \"2011-01-04\",\n \"close\": 331.29\n },\n {\n \"date\": \"2011-01-05\",\n \"close\": 334\n },\n {\n \"date\": \"2011-01-06\",\n \"close\": 333.73\n },\n {\n \"date\": \"2011-01-07\",\n \"close\": 336.12\n },\n {\n \"date\": \"2011-01-09\",\n \"close\": 342.46\n },\n {\n \"date\": \"2011-01-10\",\n \"close\": 341.64\n },\n {\n \"date\": \"2011-01-11\",\n \"close\": 344.42\n },\n {\n \"date\": \"2011-01-12\",\n \"close\": 345.68\n },\n {\n \"date\": \"2011-01-13\",\n \"close\": 348.48\n },\n {\n \"date\": \"2011-01-17\",\n \"close\": 340.65\n },\n {\n \"date\": \"2011-01-18\",\n \"close\": 338.84\n },\n {\n \"date\": \"2011-01-19\",\n \"close\": 332.68\n },\n {\n \"date\": \"2011-01-20\",\n \"close\": 326.72\n },\n {\n \"date\": \"2011-01-23\",\n \"close\": 337.45\n },\n {\n \"date\": \"2011-01-24\",\n \"close\": 341.4\n },\n {\n \"date\": \"2011-01-25\",\n \"close\": 343.85\n },\n {\n \"date\": \"2011-01-26\",\n \"close\": 343.21\n },\n {\n \"date\": \"2011-01-27\",\n \"close\": 336.1\n },\n {\n \"date\": \"2011-01-30\",\n \"close\": 339.32\n },\n {\n \"date\": \"2011-02-01\",\n \"close\": 345.03\n },\n {\n \"date\": \"2011-02-02\",\n \"close\": 344.32\n },\n {\n \"date\": \"2011-02-03\",\n \"close\": 343.44\n },\n {\n \"date\": \"2011-02-04\",\n \"close\": 346.5\n },\n {\n \"date\": \"2011-02-07\",\n \"close\": 351.88\n },\n {\n \"date\": \"2011-02-08\",\n \"close\": 355.2\n },\n {\n \"date\": \"2011-02-09\",\n \"close\": 358.16\n },\n {\n \"date\": \"2011-02-09\",\n \"close\": 354.54\n },\n {\n \"date\": \"2011-02-10\",\n \"close\": 356.85\n },\n {\n \"date\": \"2011-02-13\",\n \"close\": 359.18\n },\n {\n \"date\": \"2011-02-14\",\n \"close\": 359.9\n },\n {\n \"date\": \"2011-02-15\",\n \"close\": 363.13\n },\n {\n \"date\": \"2011-02-16\",\n \"close\": 358.3\n },\n {\n \"date\": \"2011-02-17\",\n \"close\": 350.56\n },\n {\n \"date\": \"2011-02-21\",\n \"close\": 338.61\n },\n {\n \"date\": \"2011-02-22\",\n \"close\": 342.62\n },\n {\n \"date\": \"2011-02-23\",\n \"close\": 342.88\n },\n {\n \"date\": \"2011-02-24\",\n \"close\": 348.16\n },\n {\n \"date\": \"2011-02-27\",\n \"close\": 353.21\n },\n {\n \"date\": \"2011-03-01\",\n \"close\": 349.31\n },\n {\n \"date\": \"2011-03-02\",\n \"close\": 352.12\n },\n {\n \"date\": \"2011-03-03\",\n \"close\": 359.56\n },\n {\n \"date\": \"2011-03-04\",\n \"close\": 360\n },\n {\n \"date\": \"2011-03-07\",\n \"close\": 355.36\n },\n {\n \"date\": \"2011-03-08\",\n \"close\": 355.76\n },\n {\n \"date\": \"2011-03-09\",\n \"close\": 352.47\n },\n {\n \"date\": \"2011-03-09\",\n \"close\": 346.67\n },\n {\n \"date\": \"2011-03-10\",\n \"close\": 351.99\n },\n {\n \"date\": \"2011-03-13\",\n \"close\": 353.56\n },\n {\n \"date\": \"2011-03-14\",\n \"close\": 345.43\n },\n {\n \"date\": \"2011-03-15\",\n \"close\": 330.01\n },\n {\n \"date\": \"2011-03-16\",\n \"close\": 334.64\n },\n {\n \"date\": \"2011-03-17\",\n \"close\": 330.67\n },\n {\n \"date\": \"2011-03-20\",\n \"close\": 339.3\n },\n {\n \"date\": \"2011-03-21\",\n \"close\": 341.2\n },\n {\n \"date\": \"2011-03-22\",\n \"close\": 339.19\n },\n {\n \"date\": \"2011-03-23\",\n \"close\": 344.97\n },\n {\n \"date\": \"2011-03-24\",\n \"close\": 351.54\n },\n {\n \"date\": \"2011-03-27\",\n \"close\": 350.44\n },\n {\n \"date\": \"2011-03-28\",\n \"close\": 350.96\n },\n {\n \"date\": \"2011-03-29\",\n \"close\": 348.63\n },\n {\n \"date\": \"2011-03-30\",\n \"close\": 348.51\n },\n {\n \"date\": \"2011-04-01\",\n \"close\": 344.56\n },\n {\n \"date\": \"2011-04-04\",\n \"close\": 341.19\n },\n {\n \"date\": \"2011-04-05\",\n \"close\": 338.89\n },\n {\n \"date\": \"2011-04-06\",\n \"close\": 338.04\n },\n {\n \"date\": \"2011-04-07\",\n \"close\": 338.08\n },\n {\n \"date\": \"2011-04-08\",\n \"close\": 335.06\n },\n {\n \"date\": \"2011-04-10\",\n \"close\": 330.8\n },\n {\n \"date\": \"2011-04-11\",\n \"close\": 332.4\n },\n {\n \"date\": \"2011-04-12\",\n \"close\": 336.13\n },\n {\n \"date\": \"2011-04-13\",\n \"close\": 332.42\n },\n {\n \"date\": \"2011-04-14\",\n \"close\": 327.46\n },\n {\n \"date\": \"2011-04-17\",\n \"close\": 331.85\n },\n {\n \"date\": \"2011-04-18\",\n \"close\": 337.86\n },\n {\n \"date\": \"2011-04-19\",\n \"close\": 342.41\n },\n {\n \"date\": \"2011-04-20\",\n \"close\": 350.7\n },\n {\n \"date\": \"2011-04-24\",\n \"close\": 353.01\n },\n {\n \"date\": \"2011-04-25\",\n \"close\": 350.42\n },\n {\n \"date\": \"2011-04-26\",\n \"close\": 350.15\n },\n {\n \"date\": \"2011-04-27\",\n \"close\": 346.75\n },\n {\n \"date\": \"2011-04-28\",\n \"close\": 350.13\n },\n {\n \"date\": \"2011-05-02\",\n \"close\": 346.28\n },\n {\n \"date\": \"2011-05-03\",\n \"close\": 348.2\n },\n {\n \"date\": \"2011-05-04\",\n \"close\": 349.57\n },\n {\n \"date\": \"2011-05-05\",\n \"close\": 346.75\n },\n {\n \"date\": \"2011-05-06\",\n \"close\": 346.66\n },\n {\n \"date\": \"2011-05-09\",\n \"close\": 347.6\n },\n {\n \"date\": \"2011-05-09\",\n \"close\": 349.45\n },\n {\n \"date\": \"2011-05-10\",\n \"close\": 347.23\n },\n {\n \"date\": \"2011-05-11\",\n \"close\": 346.57\n },\n {\n \"date\": \"2011-05-12\",\n \"close\": 340.5\n },\n {\n \"date\": \"2011-05-15\",\n \"close\": 333.3\n },\n {\n \"date\": \"2011-05-16\",\n \"close\": 336.14\n },\n {\n \"date\": \"2011-05-17\",\n \"close\": 339.87\n },\n {\n \"date\": \"2011-05-18\",\n \"close\": 340.53\n },\n {\n \"date\": \"2011-05-19\",\n \"close\": 335.22\n },\n {\n \"date\": \"2011-05-22\",\n \"close\": 334.4\n },\n {\n \"date\": \"2011-05-23\",\n \"close\": 332.19\n },\n {\n \"date\": \"2011-05-24\",\n \"close\": 336.78\n },\n {\n \"date\": \"2011-05-25\",\n \"close\": 335\n },\n {\n \"date\": \"2011-05-26\",\n \"close\": 337.41\n },\n {\n \"date\": \"2011-05-30\",\n \"close\": 347.83\n },\n {\n \"date\": \"2011-06-01\",\n \"close\": 345.51\n },\n {\n \"date\": \"2011-06-02\",\n \"close\": 346.1\n },\n {\n \"date\": \"2011-06-03\",\n \"close\": 343.44\n },\n {\n \"date\": \"2011-06-06\",\n \"close\": 338.04\n },\n {\n \"date\": \"2011-06-07\",\n \"close\": 332.04\n },\n {\n \"date\": \"2011-06-08\",\n \"close\": 332.24\n },\n {\n \"date\": \"2011-06-09\",\n \"close\": 331.49\n },\n {\n \"date\": \"2011-06-09\",\n \"close\": 325.9\n },\n {\n \"date\": \"2011-06-12\",\n \"close\": 326.6\n },\n {\n \"date\": \"2011-06-13\",\n \"close\": 332.44\n },\n {\n \"date\": \"2011-06-14\",\n \"close\": 326.75\n },\n {\n \"date\": \"2011-06-15\",\n \"close\": 325.16\n },\n {\n \"date\": \"2011-06-16\",\n \"close\": 320.26\n },\n {\n \"date\": \"2011-06-19\",\n \"close\": 315.32\n },\n {\n \"date\": \"2011-06-20\",\n \"close\": 325.3\n },\n {\n \"date\": \"2011-06-21\",\n \"close\": 322.61\n },\n {\n \"date\": \"2011-06-22\",\n \"close\": 331.23\n },\n {\n \"date\": \"2011-06-23\",\n \"close\": 326.35\n },\n {\n \"date\": \"2011-06-26\",\n \"close\": 332.04\n },\n {\n \"date\": \"2011-06-27\",\n \"close\": 335.26\n },\n {\n \"date\": \"2011-06-28\",\n \"close\": 334.04\n },\n {\n \"date\": \"2011-06-29\",\n \"close\": 335.67\n },\n {\n \"date\": \"2011-07-01\",\n \"close\": 343.26\n },\n {\n \"date\": \"2011-07-05\",\n \"close\": 349.43\n },\n {\n \"date\": \"2011-07-06\",\n \"close\": 351.76\n },\n {\n \"date\": \"2011-07-07\",\n \"close\": 357.2\n },\n {\n \"date\": \"2011-07-08\",\n \"close\": 359.71\n },\n {\n \"date\": \"2011-07-10\",\n \"close\": 354\n },\n {\n \"date\": \"2011-07-11\",\n \"close\": 353.75\n },\n {\n \"date\": \"2011-07-12\",\n \"close\": 358.02\n },\n {\n \"date\": \"2011-07-13\",\n \"close\": 357.77\n },\n {\n \"date\": \"2011-07-14\",\n \"close\": 364.92\n },\n {\n \"date\": \"2011-07-17\",\n \"close\": 373.8\n },\n {\n \"date\": \"2011-07-18\",\n \"close\": 376.85\n },\n {\n \"date\": \"2011-07-19\",\n \"close\": 386.9\n },\n {\n \"date\": \"2011-07-20\",\n \"close\": 387.29\n },\n {\n \"date\": \"2011-07-21\",\n \"close\": 393.3\n },\n {\n \"date\": \"2011-07-24\",\n \"close\": 398.5\n },\n {\n \"date\": \"2011-07-25\",\n \"close\": 403.41\n },\n {\n \"date\": \"2011-07-26\",\n \"close\": 392.59\n },\n {\n \"date\": \"2011-07-27\",\n \"close\": 391.82\n },\n {\n \"date\": \"2011-07-28\",\n \"close\": 390.48\n },\n {\n \"date\": \"2011-08-01\",\n \"close\": 396.75\n },\n {\n \"date\": \"2011-08-02\",\n \"close\": 388.91\n },\n {\n \"date\": \"2011-08-03\",\n \"close\": 392.57\n },\n {\n \"date\": \"2011-08-04\",\n \"close\": 377.37\n },\n {\n \"date\": \"2011-08-05\",\n \"close\": 373.62\n },\n {\n \"date\": \"2011-08-08\",\n \"close\": 353.21\n },\n {\n \"date\": \"2011-08-09\",\n \"close\": 374.01\n },\n {\n \"date\": \"2011-08-09\",\n \"close\": 363.69\n },\n {\n \"date\": \"2011-08-10\",\n \"close\": 373.7\n },\n {\n \"date\": \"2011-08-11\",\n \"close\": 376.99\n },\n {\n \"date\": \"2011-08-14\",\n \"close\": 383.41\n },\n {\n \"date\": \"2011-08-15\",\n \"close\": 380.48\n },\n {\n \"date\": \"2011-08-16\",\n \"close\": 380.44\n },\n {\n \"date\": \"2011-08-17\",\n \"close\": 366.05\n },\n {\n \"date\": \"2011-08-18\",\n \"close\": 356.03\n },\n {\n \"date\": \"2011-08-21\",\n \"close\": 356.44\n },\n {\n \"date\": \"2011-08-22\",\n \"close\": 373.6\n },\n {\n \"date\": \"2011-08-23\",\n \"close\": 376.18\n },\n {\n \"date\": \"2011-08-24\",\n \"close\": 373.72\n },\n {\n \"date\": \"2011-08-25\",\n \"close\": 383.58\n },\n {\n \"date\": \"2011-08-28\",\n \"close\": 389.97\n },\n {\n \"date\": \"2011-08-29\",\n \"close\": 389.99\n },\n {\n \"date\": \"2011-08-30\",\n \"close\": 384.83\n },\n {\n \"date\": \"2011-09-01\",\n \"close\": 381.03\n },\n {\n \"date\": \"2011-09-02\",\n \"close\": 374.05\n },\n {\n \"date\": \"2011-09-06\",\n \"close\": 379.74\n },\n {\n \"date\": \"2011-09-07\",\n \"close\": 383.93\n },\n {\n \"date\": \"2011-09-08\",\n \"close\": 384.14\n },\n {\n \"date\": \"2011-09-09\",\n \"close\": 377.48\n },\n {\n \"date\": \"2011-09-11\",\n \"close\": 379.94\n },\n {\n \"date\": \"2011-09-12\",\n \"close\": 384.62\n },\n {\n \"date\": \"2011-09-13\",\n \"close\": 389.3\n },\n {\n \"date\": \"2011-09-14\",\n \"close\": 392.96\n },\n {\n \"date\": \"2011-09-15\",\n \"close\": 400.5\n },\n {\n \"date\": \"2011-09-18\",\n \"close\": 411.63\n },\n {\n \"date\": \"2011-09-19\",\n \"close\": 413.45\n },\n {\n \"date\": \"2011-09-20\",\n \"close\": 412.14\n },\n {\n \"date\": \"2011-09-21\",\n \"close\": 401.82\n },\n {\n \"date\": \"2011-09-22\",\n \"close\": 404.3\n },\n {\n \"date\": \"2011-09-25\",\n \"close\": 403.17\n },\n {\n \"date\": \"2011-09-26\",\n \"close\": 399.26\n },\n {\n \"date\": \"2011-09-27\",\n \"close\": 397.01\n },\n {\n \"date\": \"2011-09-28\",\n \"close\": 390.57\n },\n {\n \"date\": \"2011-09-29\",\n \"close\": 381.32\n },\n {\n \"date\": \"2011-10-03\",\n \"close\": 374.6\n },\n {\n \"date\": \"2011-10-04\",\n \"close\": 372.5\n },\n {\n \"date\": \"2011-10-05\",\n \"close\": 378.25\n },\n {\n \"date\": \"2011-10-06\",\n \"close\": 377.37\n },\n {\n \"date\": \"2011-10-07\",\n \"close\": 369.8\n },\n {\n \"date\": \"2011-10-09\",\n \"close\": 388.81\n },\n {\n \"date\": \"2011-10-10\",\n \"close\": 400.29\n },\n {\n \"date\": \"2011-10-11\",\n \"close\": 402.19\n },\n {\n \"date\": \"2011-10-12\",\n \"close\": 408.43\n },\n {\n \"date\": \"2011-10-13\",\n \"close\": 422\n },\n {\n \"date\": \"2011-10-16\",\n \"close\": 419.99\n },\n {\n \"date\": \"2011-10-17\",\n \"close\": 422.24\n },\n {\n \"date\": \"2011-10-18\",\n \"close\": 398.62\n },\n {\n \"date\": \"2011-10-19\",\n \"close\": 395.31\n },\n {\n \"date\": \"2011-10-20\",\n \"close\": 392.87\n },\n {\n \"date\": \"2011-10-23\",\n \"close\": 405.77\n },\n {\n \"date\": \"2011-10-24\",\n \"close\": 397.77\n },\n {\n \"date\": \"2011-10-25\",\n \"close\": 400.6\n },\n {\n \"date\": \"2011-10-26\",\n \"close\": 404.69\n },\n {\n \"date\": \"2011-10-27\",\n \"close\": 404.95\n },\n {\n \"date\": \"2011-10-30\",\n \"close\": 404.78\n },\n {\n \"date\": \"2011-11-01\",\n \"close\": 396.51\n },\n {\n \"date\": \"2011-11-02\",\n \"close\": 397.41\n },\n {\n \"date\": \"2011-11-03\",\n \"close\": 403.07\n },\n {\n \"date\": \"2011-11-04\",\n \"close\": 400.24\n },\n {\n \"date\": \"2011-11-07\",\n \"close\": 399.73\n },\n {\n \"date\": \"2011-11-08\",\n \"close\": 406.23\n },\n {\n \"date\": \"2011-11-09\",\n \"close\": 395.28\n },\n {\n \"date\": \"2011-11-09\",\n \"close\": 385.22\n },\n {\n \"date\": \"2011-11-10\",\n \"close\": 384.62\n },\n {\n \"date\": \"2011-11-13\",\n \"close\": 379.26\n },\n {\n \"date\": \"2011-11-14\",\n \"close\": 388.83\n },\n {\n \"date\": \"2011-11-15\",\n \"close\": 384.77\n },\n {\n \"date\": \"2011-11-16\",\n \"close\": 377.41\n },\n {\n \"date\": \"2011-11-17\",\n \"close\": 374.94\n },\n {\n \"date\": \"2011-11-20\",\n \"close\": 369.01\n },\n {\n \"date\": \"2011-11-21\",\n \"close\": 376.51\n },\n {\n \"date\": \"2011-11-22\",\n \"close\": 366.99\n },\n {\n \"date\": \"2011-11-24\",\n \"close\": 363.57\n },\n {\n \"date\": \"2011-11-27\",\n \"close\": 376.12\n },\n {\n \"date\": \"2011-11-28\",\n \"close\": 373.2\n },\n {\n \"date\": \"2011-11-29\",\n \"close\": 382.2\n },\n {\n \"date\": \"2011-12-01\",\n \"close\": 387.93\n },\n {\n \"date\": \"2011-12-02\",\n \"close\": 389.7\n },\n {\n \"date\": \"2011-12-05\",\n \"close\": 393.01\n },\n {\n \"date\": \"2011-12-06\",\n \"close\": 390.95\n },\n {\n \"date\": \"2011-12-07\",\n \"close\": 389.09\n },\n {\n \"date\": \"2011-12-08\",\n \"close\": 390.66\n },\n {\n \"date\": \"2011-12-09\",\n \"close\": 393.62\n },\n {\n \"date\": \"2011-12-11\",\n \"close\": 391.84\n },\n {\n \"date\": \"2011-12-12\",\n \"close\": 388.81\n },\n {\n \"date\": \"2011-12-13\",\n \"close\": 380.19\n },\n {\n \"date\": \"2011-12-14\",\n \"close\": 378.94\n },\n {\n \"date\": \"2011-12-15\",\n \"close\": 381.02\n },\n {\n \"date\": \"2011-12-18\",\n \"close\": 382.21\n },\n {\n \"date\": \"2011-12-19\",\n \"close\": 395.95\n },\n {\n \"date\": \"2011-12-20\",\n \"close\": 396.44\n },\n {\n \"date\": \"2011-12-21\",\n \"close\": 398.55\n },\n {\n \"date\": \"2011-12-22\",\n \"close\": 403.43\n },\n {\n \"date\": \"2011-12-26\",\n \"close\": 406.53\n },\n {\n \"date\": \"2011-12-27\",\n \"close\": 402.64\n },\n {\n \"date\": \"2011-12-28\",\n \"close\": 405.12\n },\n {\n \"date\": \"2011-12-29\",\n \"close\": 405\n },\n {\n \"date\": \"2012-01-03\",\n \"close\": 411.23\n },\n {\n \"date\": \"2012-01-04\",\n \"close\": 413.44\n },\n {\n \"date\": \"2012-01-05\",\n \"close\": 418.03\n },\n {\n \"date\": \"2012-01-06\",\n \"close\": 422.4\n },\n {\n \"date\": \"2012-01-09\",\n \"close\": 421.73\n },\n {\n \"date\": \"2012-01-09\",\n \"close\": 423.24\n },\n {\n \"date\": \"2012-01-10\",\n \"close\": 422.55\n },\n {\n \"date\": \"2012-01-11\",\n \"close\": 421.39\n },\n {\n \"date\": \"2012-01-12\",\n \"close\": 419.81\n },\n {\n \"date\": \"2012-01-16\",\n \"close\": 424.7\n },\n {\n \"date\": \"2012-01-17\",\n \"close\": 429.11\n },\n {\n \"date\": \"2012-01-18\",\n \"close\": 427.75\n },\n {\n \"date\": \"2012-01-19\",\n \"close\": 420.3\n },\n {\n \"date\": \"2012-01-22\",\n \"close\": 427.41\n },\n {\n \"date\": \"2012-01-23\",\n \"close\": 420.41\n },\n {\n \"date\": \"2012-01-24\",\n \"close\": 446.66\n },\n {\n \"date\": \"2012-01-25\",\n \"close\": 444.63\n },\n {\n \"date\": \"2012-01-26\",\n \"close\": 447.28\n },\n {\n \"date\": \"2012-01-29\",\n \"close\": 453.01\n },\n {\n \"date\": \"2012-01-30\",\n \"close\": 456.48\n },\n {\n \"date\": \"2012-02-01\",\n \"close\": 456.19\n },\n {\n \"date\": \"2012-02-02\",\n \"close\": 455.12\n },\n {\n \"date\": \"2012-02-03\",\n \"close\": 459.68\n },\n {\n \"date\": \"2012-02-06\",\n \"close\": 463.97\n },\n {\n \"date\": \"2012-02-07\",\n \"close\": 468.83\n },\n {\n \"date\": \"2012-02-08\",\n \"close\": 476.68\n },\n {\n \"date\": \"2012-02-09\",\n \"close\": 493.17\n },\n {\n \"date\": \"2012-02-09\",\n \"close\": 493.42\n },\n {\n \"date\": \"2012-02-12\",\n \"close\": 502.6\n },\n {\n \"date\": \"2012-02-13\",\n \"close\": 509.46\n },\n {\n \"date\": \"2012-02-14\",\n \"close\": 497.67\n },\n {\n \"date\": \"2012-02-15\",\n \"close\": 502.21\n },\n {\n \"date\": \"2012-02-16\",\n \"close\": 502.12\n },\n {\n \"date\": \"2012-02-20\",\n \"close\": 514.85\n },\n {\n \"date\": \"2012-02-21\",\n \"close\": 513.04\n },\n {\n \"date\": \"2012-02-22\",\n \"close\": 516.39\n },\n {\n \"date\": \"2012-02-23\",\n \"close\": 522.41\n },\n {\n \"date\": \"2012-02-26\",\n \"close\": 525.76\n },\n {\n \"date\": \"2012-02-27\",\n \"close\": 535.41\n },\n {\n \"date\": \"2012-02-28\",\n \"close\": 542.44\n },\n {\n \"date\": \"2012-03-01\",\n \"close\": 544.47\n },\n {\n \"date\": \"2012-03-02\",\n \"close\": 545.18\n },\n {\n \"date\": \"2012-03-05\",\n \"close\": 533.16\n },\n {\n \"date\": \"2012-03-06\",\n \"close\": 530.26\n },\n {\n \"date\": \"2012-03-07\",\n \"close\": 530.69\n },\n {\n \"date\": \"2012-03-08\",\n \"close\": 541.99\n },\n {\n \"date\": \"2012-03-09\",\n \"close\": 545.17\n },\n {\n \"date\": \"2012-03-11\",\n \"close\": 552\n },\n {\n \"date\": \"2012-03-12\",\n \"close\": 568.1\n },\n {\n \"date\": \"2012-03-13\",\n \"close\": 589.58\n },\n {\n \"date\": \"2012-03-14\",\n \"close\": 585.56\n },\n {\n \"date\": \"2012-03-15\",\n \"close\": 585.57\n },\n {\n \"date\": \"2012-03-18\",\n \"close\": 601.1\n },\n {\n \"date\": \"2012-03-19\",\n \"close\": 605.96\n },\n {\n \"date\": \"2012-03-20\",\n \"close\": 602.5\n },\n {\n \"date\": \"2012-03-21\",\n \"close\": 599.34\n },\n {\n \"date\": \"2012-03-22\",\n \"close\": 596.05\n },\n {\n \"date\": \"2012-03-25\",\n \"close\": 606.98\n },\n {\n \"date\": \"2012-03-26\",\n \"close\": 614.48\n },\n {\n \"date\": \"2012-03-27\",\n \"close\": 617.62\n },\n {\n \"date\": \"2012-03-28\",\n \"close\": 609.86\n },\n {\n \"date\": \"2012-03-29\",\n \"close\": 599.55\n },\n {\n \"date\": \"2012-04-02\",\n \"close\": 618.63\n },\n {\n \"date\": \"2012-04-03\",\n \"close\": 629.32\n },\n {\n \"date\": \"2012-04-04\",\n \"close\": 624.31\n },\n {\n \"date\": \"2012-04-05\",\n \"close\": 633.68\n },\n {\n \"date\": \"2012-04-09\",\n \"close\": 636.23\n },\n {\n \"date\": \"2012-04-09\",\n \"close\": 628.44\n },\n {\n \"date\": \"2012-04-10\",\n \"close\": 626.2\n },\n {\n \"date\": \"2012-04-11\",\n \"close\": 622.77\n },\n {\n \"date\": \"2012-04-12\",\n \"close\": 605.23\n },\n {\n \"date\": \"2012-04-15\",\n \"close\": 580.13\n },\n {\n \"date\": \"2012-04-16\",\n \"close\": 609.7\n },\n {\n \"date\": \"2012-04-17\",\n \"close\": 608.34\n },\n {\n \"date\": \"2012-04-18\",\n \"close\": 587.44\n },\n {\n \"date\": \"2012-04-19\",\n \"close\": 572.98\n },\n {\n \"date\": \"2012-04-22\",\n \"close\": 571.7\n },\n {\n \"date\": \"2012-04-23\",\n \"close\": 560.28\n },\n {\n \"date\": \"2012-04-24\",\n \"close\": 610\n },\n {\n \"date\": \"2012-04-25\",\n \"close\": 607.7\n },\n {\n \"date\": \"2012-04-26\",\n \"close\": 603\n },\n {\n \"date\": \"2012-04-29\",\n \"close\": 583.98\n },\n {\n \"date\": \"2012-05-01\",\n \"close\": 582.13\n }\n ],\n transform: [\n {\n type: 'ema',\n field: 'close',\n alpha: 0.8,\n as: 'emaClose',\n },\n ],\n },\n encode: {\n x: 'date',\n y: 'emaClose',\n },\n },\n {\n type: 'line',\n style: {\n opacity: 0.3,\n },\n data: {\n type: 'inline',\n value: [\n {\n \"date\": \"2007-04-23\",\n \"close\": 93.24\n },\n {\n \"date\": \"2007-04-24\",\n \"close\": 95.35\n },\n {\n \"date\": \"2007-04-25\",\n \"close\": 98.84\n },\n {\n \"date\": \"2007-04-26\",\n \"close\": 99.92\n },\n {\n \"date\": \"2007-04-29\",\n \"close\": 99.8\n },\n {\n \"date\": \"2007-05-01\",\n \"close\": 99.47\n },\n {\n \"date\": \"2007-05-02\",\n \"close\": 100.39\n },\n {\n \"date\": \"2007-05-03\",\n \"close\": 100.4\n },\n {\n \"date\": \"2007-05-04\",\n \"close\": 100.81\n },\n {\n \"date\": \"2007-05-07\",\n \"close\": 103.92\n },\n {\n \"date\": \"2007-05-08\",\n \"close\": 105.06\n },\n {\n \"date\": \"2007-05-09\",\n \"close\": 106.88\n },\n {\n \"date\": \"2007-05-09\",\n \"close\": 107.34\n },\n {\n \"date\": \"2007-05-10\",\n \"close\": 108.74\n },\n {\n \"date\": \"2007-05-13\",\n \"close\": 109.36\n },\n {\n \"date\": \"2007-05-14\",\n \"close\": 107.52\n },\n {\n \"date\": \"2007-05-15\",\n \"close\": 107.34\n },\n {\n \"date\": \"2007-05-16\",\n \"close\": 109.44\n },\n {\n \"date\": \"2007-05-17\",\n \"close\": 110.02\n },\n {\n \"date\": \"2007-05-20\",\n \"close\": 111.98\n },\n {\n \"date\": \"2007-05-21\",\n \"close\": 113.54\n },\n {\n \"date\": \"2007-05-22\",\n \"close\": 112.89\n },\n {\n \"date\": \"2007-05-23\",\n \"close\": 110.69\n },\n {\n \"date\": \"2007-05-24\",\n \"close\": 113.62\n },\n {\n \"date\": \"2007-05-28\",\n \"close\": 114.35\n },\n {\n \"date\": \"2007-05-29\",\n \"close\": 118.77\n },\n {\n \"date\": \"2007-05-30\",\n \"close\": 121.19\n },\n {\n \"date\": \"2007-06-01\",\n \"close\": 118.4\n },\n {\n \"date\": \"2007-06-04\",\n \"close\": 121.33\n },\n {\n \"date\": \"2007-06-05\",\n \"close\": 122.67\n },\n {\n \"date\": \"2007-06-06\",\n \"close\": 123.64\n },\n {\n \"date\": \"2007-06-07\",\n \"close\": 124.07\n },\n {\n \"date\": \"2007-06-08\",\n \"close\": 124.49\n },\n {\n \"date\": \"2007-06-10\",\n \"close\": 120.19\n },\n {\n \"date\": \"2007-06-11\",\n \"close\": 120.38\n },\n {\n \"date\": \"2007-06-12\",\n \"close\": 117.5\n },\n {\n \"date\": \"2007-06-13\",\n \"close\": 118.75\n },\n {\n \"date\": \"2007-06-14\",\n \"close\": 120.5\n },\n {\n \"date\": \"2007-06-17\",\n \"close\": 125.09\n },\n {\n \"date\": \"2007-06-18\",\n \"close\": 123.66\n },\n {\n \"date\": \"2007-06-19\",\n \"close\": 121.55\n },\n {\n \"date\": \"2007-06-20\",\n \"close\": 123.9\n },\n {\n \"date\": \"2007-06-21\",\n \"close\": 123\n },\n {\n \"date\": \"2007-06-24\",\n \"close\": 122.34\n },\n {\n \"date\": \"2007-06-25\",\n \"close\": 119.65\n },\n {\n \"date\": \"2007-06-26\",\n \"close\": 121.89\n },\n {\n \"date\": \"2007-06-27\",\n \"close\": 120.56\n },\n {\n \"date\": \"2007-06-28\",\n \"close\": 122.04\n },\n {\n \"date\": \"2007-07-02\",\n \"close\": 121.26\n },\n {\n \"date\": \"2007-07-03\",\n \"close\": 127.17\n },\n {\n \"date\": \"2007-07-05\",\n \"close\": 132.75\n },\n {\n \"date\": \"2007-07-06\",\n \"close\": 132.3\n },\n {\n \"date\": \"2007-07-09\",\n \"close\": 130.33\n },\n {\n \"date\": \"2007-07-09\",\n \"close\": 132.35\n },\n {\n \"date\": \"2007-07-10\",\n \"close\": 132.39\n },\n {\n \"date\": \"2007-07-11\",\n \"close\": 134.07\n },\n {\n \"date\": \"2007-07-12\",\n \"close\": 137.73\n },\n {\n \"date\": \"2007-07-15\",\n \"close\": 138.1\n },\n {\n \"date\": \"2007-07-16\",\n \"close\": 138.91\n },\n {\n \"date\": \"2007-07-17\",\n \"close\": 138.12\n },\n {\n \"date\": \"2007-07-18\",\n \"close\": 140\n },\n {\n \"date\": \"2007-07-19\",\n \"close\": 143.75\n },\n {\n \"date\": \"2007-07-22\",\n \"close\": 143.7\n },\n {\n \"date\": \"2007-07-23\",\n \"close\": 134.89\n },\n {\n \"date\": \"2007-07-24\",\n \"close\": 137.26\n },\n {\n \"date\": \"2007-07-25\",\n \"close\": 146\n },\n {\n \"date\": \"2007-07-26\",\n \"close\": 143.85\n },\n {\n \"date\": \"2007-07-29\",\n \"close\": 141.43\n },\n {\n \"date\": \"2007-07-30\",\n \"close\": 131.76\n },\n {\n \"date\": \"2007-08-01\",\n \"close\": 135\n },\n {\n \"date\": \"2007-08-02\",\n \"close\": 136.49\n },\n {\n \"date\": \"2007-08-03\",\n \"close\": 131.85\n },\n {\n \"date\": \"2007-08-06\",\n \"close\": 135.25\n },\n {\n \"date\": \"2007-08-07\",\n \"close\": 135.03\n },\n {\n \"date\": \"2007-08-08\",\n \"close\": 134.01\n },\n {\n \"date\": \"2007-08-09\",\n \"close\": 126.39\n },\n {\n \"date\": \"2007-08-09\",\n \"close\": 125\n },\n {\n \"date\": \"2007-08-12\",\n \"close\": 127.79\n },\n {\n \"date\": \"2007-08-13\",\n \"close\": 124.03\n },\n {\n \"date\": \"2007-08-14\",\n \"close\": 119.9\n },\n {\n \"date\": \"2007-08-15\",\n \"close\": 117.05\n },\n {\n \"date\": \"2007-08-16\",\n \"close\": 122.06\n },\n {\n \"date\": \"2007-08-19\",\n \"close\": 122.22\n },\n {\n \"date\": \"2007-08-20\",\n \"close\": 127.57\n },\n {\n \"date\": \"2007-08-21\",\n \"close\": 132.51\n },\n {\n \"date\": \"2007-08-22\",\n \"close\": 131.07\n },\n {\n \"date\": \"2007-08-23\",\n \"close\": 135.3\n },\n {\n \"date\": \"2007-08-26\",\n \"close\": 132.25\n },\n {\n \"date\": \"2007-08-27\",\n \"close\": 126.82\n },\n {\n \"date\": \"2007-08-28\",\n \"close\": 134.08\n },\n {\n \"date\": \"2007-08-29\",\n \"close\": 136.25\n },\n {\n \"date\": \"2007-08-30\",\n \"close\": 138.48\n },\n {\n \"date\": \"2007-09-04\",\n \"close\": 144.16\n },\n {\n \"date\": \"2007-09-05\",\n \"close\": 136.76\n },\n {\n \"date\": \"2007-09-06\",\n \"close\": 135.01\n },\n {\n \"date\": \"2007-09-07\",\n \"close\": 131.77\n },\n {\n \"date\": \"2007-09-09\",\n \"close\": 136.71\n },\n {\n \"date\": \"2007-09-10\",\n \"close\": 135.49\n },\n {\n \"date\": \"2007-09-11\",\n \"close\": 136.85\n },\n {\n \"date\": \"2007-09-12\",\n \"close\": 137.2\n },\n {\n \"date\": \"2007-09-13\",\n \"close\": 138.81\n },\n {\n \"date\": \"2007-09-16\",\n \"close\": 138.41\n },\n {\n \"date\": \"2007-09-17\",\n \"close\": 140.92\n },\n {\n \"date\": \"2007-09-18\",\n \"close\": 140.77\n },\n {\n \"date\": \"2007-09-19\",\n \"close\": 140.31\n },\n {\n \"date\": \"2007-09-20\",\n \"close\": 144.15\n },\n {\n \"date\": \"2007-09-23\",\n \"close\": 148.28\n },\n {\n \"date\": \"2007-09-24\",\n \"close\": 153.18\n },\n {\n \"date\": \"2007-09-25\",\n \"close\": 152.77\n },\n {\n \"date\": \"2007-09-26\",\n \"close\": 154.5\n },\n {\n \"date\": \"2007-09-27\",\n \"close\": 153.47\n },\n {\n \"date\": \"2007-10-01\",\n \"close\": 156.34\n },\n {\n \"date\": \"2007-10-02\",\n \"close\": 158.45\n },\n {\n \"date\": \"2007-10-03\",\n \"close\": 157.92\n },\n {\n \"date\": \"2007-10-04\",\n \"close\": 156.24\n },\n {\n \"date\": \"2007-10-05\",\n \"close\": 161.45\n },\n {\n \"date\": \"2007-10-08\",\n \"close\": 167.91\n },\n {\n \"date\": \"2007-10-09\",\n \"close\": 167.86\n },\n {\n \"date\": \"2007-10-09\",\n \"close\": 166.79\n },\n {\n \"date\": \"2007-10-10\",\n \"close\": 162.23\n },\n {\n \"date\": \"2007-10-11\",\n \"close\": 167.25\n },\n {\n \"date\": \"2007-10-14\",\n \"close\": 166.98\n },\n {\n \"date\": \"2007-10-15\",\n \"close\": 169.58\n },\n {\n \"date\": \"2007-10-16\",\n \"close\": 172.75\n },\n {\n \"date\": \"2007-10-17\",\n \"close\": 173.5\n },\n {\n \"date\": \"2007-10-18\",\n \"close\": 170.42\n },\n {\n \"date\": \"2007-10-21\",\n \"close\": 174.36\n },\n {\n \"date\": \"2007-10-22\",\n \"close\": 186.16\n },\n {\n \"date\": \"2007-10-23\",\n \"close\": 185.93\n },\n {\n \"date\": \"2007-10-24\",\n \"close\": 182.78\n },\n {\n \"date\": \"2007-10-25\",\n \"close\": 184.7\n },\n {\n \"date\": \"2007-10-28\",\n \"close\": 185.09\n },\n {\n \"date\": \"2007-10-29\",\n \"close\": 187\n },\n {\n \"date\": \"2007-10-30\",\n \"close\": 189.95\n },\n {\n \"date\": \"2007-11-01\",\n \"close\": 187.44\n },\n {\n \"date\": \"2007-11-02\",\n \"close\": 187.87\n },\n {\n \"date\": \"2007-11-05\",\n \"close\": 186.18\n },\n {\n \"date\": \"2007-11-06\",\n \"close\": 191.79\n },\n {\n \"date\": \"2007-11-07\",\n \"close\": 186.3\n },\n {\n \"date\": \"2007-11-08\",\n \"close\": 175.47\n },\n {\n \"date\": \"2007-11-09\",\n \"close\": 165.37\n },\n {\n \"date\": \"2007-11-11\",\n \"close\": 153.76\n },\n {\n \"date\": \"2007-11-12\",\n \"close\": 169.96\n },\n {\n \"date\": \"2007-11-13\",\n \"close\": 166.11\n },\n {\n \"date\": \"2007-11-14\",\n \"close\": 164.3\n },\n {\n \"date\": \"2007-11-15\",\n \"close\": 166.39\n },\n {\n \"date\": \"2007-11-18\",\n \"close\": 163.95\n },\n {\n \"date\": \"2007-11-19\",\n \"close\": 168.85\n },\n {\n \"date\": \"2007-11-20\",\n \"close\": 168.46\n },\n {\n \"date\": \"2007-11-22\",\n \"close\": 171.54\n },\n {\n \"date\": \"2007-11-25\",\n \"close\": 172.54\n },\n {\n \"date\": \"2007-11-26\",\n \"close\": 174.81\n },\n {\n \"date\": \"2007-11-27\",\n \"close\": 180.22\n },\n {\n \"date\": \"2007-11-28\",\n \"close\": 184.29\n },\n {\n \"date\": \"2007-11-29\",\n \"close\": 182.22\n },\n {\n \"date\": \"2007-12-03\",\n \"close\": 178.86\n },\n {\n \"date\": \"2007-12-04\",\n \"close\": 179.81\n },\n {\n \"date\": \"2007-12-05\",\n \"close\": 185.5\n },\n {\n \"date\": \"2007-12-06\",\n \"close\": 189.95\n },\n {\n \"date\": \"2007-12-07\",\n \"close\": 194.3\n },\n {\n \"date\": \"2007-12-09\",\n \"close\": 194.21\n },\n {\n \"date\": \"2007-12-10\",\n \"close\": 188.54\n },\n {\n \"date\": \"2007-12-11\",\n \"close\": 190.86\n },\n {\n \"date\": \"2007-12-12\",\n \"close\": 191.83\n },\n {\n \"date\": \"2007-12-13\",\n \"close\": 190.39\n },\n {\n \"date\": \"2007-12-16\",\n \"close\": 184.4\n },\n {\n \"date\": \"2007-12-17\",\n \"close\": 182.98\n },\n {\n \"date\": \"2007-12-18\",\n \"close\": 183.12\n },\n {\n \"date\": \"2007-12-19\",\n \"close\": 187.21\n },\n {\n \"date\": \"2007-12-20\",\n \"close\": 193.91\n },\n {\n \"date\": \"2007-12-23\",\n \"close\": 198.8\n },\n {\n \"date\": \"2007-12-25\",\n \"close\": 198.95\n },\n {\n \"date\": \"2007-12-26\",\n \"close\": 198.57\n },\n {\n \"date\": \"2007-12-27\",\n \"close\": 199.83\n },\n {\n \"date\": \"2007-12-30\",\n \"close\": 198.08\n },\n {\n \"date\": \"2008-01-02\",\n \"close\": 194.84\n },\n {\n \"date\": \"2008-01-03\",\n \"close\": 194.93\n },\n {\n \"date\": \"2008-01-04\",\n \"close\": 180.05\n },\n {\n \"date\": \"2008-01-07\",\n \"close\": 177.64\n },\n {\n \"date\": \"2008-01-08\",\n \"close\": 171.25\n },\n {\n \"date\": \"2008-01-09\",\n \"close\": 179.4\n },\n {\n \"date\": \"2008-01-09\",\n \"close\": 178.02\n },\n {\n \"date\": \"2008-01-10\",\n \"close\": 172.69\n },\n {\n \"date\": \"2008-01-13\",\n \"close\": 178.78\n },\n {\n \"date\": \"2008-01-14\",\n \"close\": 169.04\n },\n {\n \"date\": \"2008-01-15\",\n \"close\": 159.64\n },\n {\n \"date\": \"2008-01-16\",\n \"close\": 160.89\n },\n {\n \"date\": \"2008-01-17\",\n \"close\": 161.36\n },\n {\n \"date\": \"2008-01-21\",\n \"close\": 155.64\n },\n {\n \"date\": \"2008-01-22\",\n \"close\": 139.07\n },\n {\n \"date\": \"2008-01-23\",\n \"close\": 135.6\n },\n {\n \"date\": \"2008-01-24\",\n \"close\": 130.01\n },\n {\n \"date\": \"2008-01-27\",\n \"close\": 130.01\n },\n {\n \"date\": \"2008-01-28\",\n \"close\": 131.54\n },\n {\n \"date\": \"2008-01-29\",\n \"close\": 132.18\n },\n {\n \"date\": \"2008-01-30\",\n \"close\": 135.36\n },\n {\n \"date\": \"2008-02-01\",\n \"close\": 133.75\n },\n {\n \"date\": \"2008-02-04\",\n \"close\": 131.65\n },\n {\n \"date\": \"2008-02-05\",\n \"close\": 129.36\n },\n {\n \"date\": \"2008-02-06\",\n \"close\": 122\n },\n {\n \"date\": \"2008-02-07\",\n \"close\": 121.24\n },\n {\n \"date\": \"2008-02-08\",\n \"close\": 125.48\n },\n {\n \"date\": \"2008-02-10\",\n \"close\": 129.45\n },\n {\n \"date\": \"2008-02-11\",\n \"close\": 124.86\n },\n {\n \"date\": \"2008-02-12\",\n \"close\": 129.4\n },\n {\n \"date\": \"2008-02-13\",\n \"close\": 127.46\n },\n {\n \"date\": \"2008-02-14\",\n \"close\": 124.63\n },\n {\n \"date\": \"2008-02-18\",\n \"close\": 122.18\n },\n {\n \"date\": \"2008-02-19\",\n \"close\": 123.82\n },\n {\n \"date\": \"2008-02-20\",\n \"close\": 121.54\n },\n {\n \"date\": \"2008-02-21\",\n \"close\": 119.46\n },\n {\n \"date\": \"2008-02-24\",\n \"close\": 119.74\n },\n {\n \"date\": \"2008-02-25\",\n \"close\": 119.15\n },\n {\n \"date\": \"2008-02-26\",\n \"close\": 122.96\n },\n {\n \"date\": \"2008-02-27\",\n \"close\": 129.91\n },\n {\n \"date\": \"2008-02-28\",\n \"close\": 125.02\n },\n {\n \"date\": \"2008-03-03\",\n \"close\": 121.73\n },\n {\n \"date\": \"2008-03-04\",\n \"close\": 124.62\n },\n {\n \"date\": \"2008-03-05\",\n \"close\": 124.49\n },\n {\n \"date\": \"2008-03-06\",\n \"close\": 120.93\n },\n {\n \"date\": \"2008-03-07\",\n \"close\": 122.25\n },\n {\n \"date\": \"2008-03-09\",\n \"close\": 119.69\n },\n {\n \"date\": \"2008-03-10\",\n \"close\": 127.35\n },\n {\n \"date\": \"2008-03-11\",\n \"close\": 126.03\n },\n {\n \"date\": \"2008-03-12\",\n \"close\": 127.94\n },\n {\n \"date\": \"2008-03-13\",\n \"close\": 126.61\n },\n {\n \"date\": \"2008-03-16\",\n \"close\": 126.73\n },\n {\n \"date\": \"2008-03-17\",\n \"close\": 132.82\n },\n {\n \"date\": \"2008-03-18\",\n \"close\": 129.67\n },\n {\n \"date\": \"2008-03-19\",\n \"close\": 133.27\n },\n {\n \"date\": \"2008-03-23\",\n \"close\": 139.53\n },\n {\n \"date\": \"2008-03-24\",\n \"close\": 140.98\n },\n {\n \"date\": \"2008-03-25\",\n \"close\": 145.06\n },\n {\n \"date\": \"2008-03-26\",\n \"close\": 140.25\n },\n {\n \"date\": \"2008-03-27\",\n \"close\": 143.01\n },\n {\n \"date\": \"2008-03-30\",\n \"close\": 143.5\n },\n {\n \"date\": \"2008-04-01\",\n \"close\": 149.53\n },\n {\n \"date\": \"2008-04-02\",\n \"close\": 147.49\n },\n {\n \"date\": \"2008-04-03\",\n \"close\": 151.61\n },\n {\n \"date\": \"2008-04-04\",\n \"close\": 153.08\n },\n {\n \"date\": \"2008-04-07\",\n \"close\": 155.89\n },\n {\n \"date\": \"2008-04-08\",\n \"close\": 152.84\n },\n {\n \"date\": \"2008-04-09\",\n \"close\": 151.44\n },\n {\n \"date\": \"2008-04-09\",\n \"close\": 154.55\n },\n {\n \"date\": \"2008-04-10\",\n \"close\": 147.14\n },\n {\n \"date\": \"2008-04-13\",\n \"close\": 147.78\n },\n {\n \"date\": \"2008-04-14\",\n \"close\": 148.38\n },\n {\n \"date\": \"2008-04-15\",\n \"close\": 153.7\n },\n {\n \"date\": \"2008-04-16\",\n \"close\": 154.49\n },\n {\n \"date\": \"2008-04-17\",\n \"close\": 161.04\n },\n {\n \"date\": \"2008-04-20\",\n \"close\": 168.16\n },\n {\n \"date\": \"2008-04-21\",\n \"close\": 160.2\n },\n {\n \"date\": \"2008-04-22\",\n \"close\": 162.89\n },\n {\n \"date\": \"2008-04-23\",\n \"close\": 168.94\n },\n {\n \"date\": \"2008-04-24\",\n \"close\": 169.73\n },\n {\n \"date\": \"2008-04-27\",\n \"close\": 172.24\n },\n {\n \"date\": \"2008-04-28\",\n \"close\": 175.05\n },\n {\n \"date\": \"2008-04-29\",\n \"close\": 173.95\n },\n {\n \"date\": \"2008-05-01\",\n \"close\": 180\n },\n {\n \"date\": \"2008-05-02\",\n \"close\": 180.94\n },\n {\n \"date\": \"2008-05-05\",\n \"close\": 184.73\n },\n {\n \"date\": \"2008-05-06\",\n \"close\": 186.66\n },\n {\n \"date\": \"2008-05-07\",\n \"close\": 182.59\n },\n {\n \"date\": \"2008-05-08\",\n \"close\": 185.06\n },\n {\n \"date\": \"2008-05-09\",\n \"close\": 183.45\n },\n {\n \"date\": \"2008-05-11\",\n \"close\": 188.16\n },\n {\n \"date\": \"2008-05-12\",\n \"close\": 189.96\n },\n {\n \"date\": \"2008-05-13\",\n \"close\": 186.26\n },\n {\n \"date\": \"2008-05-14\",\n \"close\": 189.73\n },\n {\n \"date\": \"2008-05-15\",\n \"close\": 187.62\n },\n {\n \"date\": \"2008-05-18\",\n \"close\": 183.6\n },\n {\n \"date\": \"2008-05-19\",\n \"close\": 185.9\n },\n {\n \"date\": \"2008-05-20\",\n \"close\": 178.19\n },\n {\n \"date\": \"2008-05-21\",\n \"close\": 177.05\n },\n {\n \"date\": \"2008-05-22\",\n \"close\": 181.17\n },\n {\n \"date\": \"2008-05-26\",\n \"close\": 186.43\n },\n {\n \"date\": \"2008-05-27\",\n \"close\": 187.01\n },\n {\n \"date\": \"2008-05-28\",\n \"close\": 186.69\n },\n {\n \"date\": \"2008-05-29\",\n \"close\": 188.75\n },\n {\n \"date\": \"2008-06-02\",\n \"close\": 186.1\n },\n {\n \"date\": \"2008-06-03\",\n \"close\": 185.37\n },\n {\n \"date\": \"2008-06-04\",\n \"close\": 185.19\n },\n {\n \"date\": \"2008-06-05\",\n \"close\": 189.43\n },\n {\n \"date\": \"2008-06-06\",\n \"close\": 185.64\n },\n {\n \"date\": \"2008-06-09\",\n \"close\": 181.61\n },\n {\n \"date\": \"2008-06-09\",\n \"close\": 185.64\n },\n {\n \"date\": \"2008-06-10\",\n \"close\": 180.81\n },\n {\n \"date\": \"2008-06-11\",\n \"close\": 173.26\n },\n {\n \"date\": \"2008-06-12\",\n \"close\": 172.37\n },\n {\n \"date\": \"2008-06-15\",\n \"close\": 176.84\n },\n {\n \"date\": \"2008-06-16\",\n \"close\": 181.43\n },\n {\n \"date\": \"2008-06-17\",\n \"close\": 178.75\n },\n {\n \"date\": \"2008-06-18\",\n \"close\": 180.9\n },\n {\n \"date\": \"2008-06-19\",\n \"close\": 175.27\n },\n {\n \"date\": \"2008-06-22\",\n \"close\": 173.16\n },\n {\n \"date\": \"2008-06-23\",\n \"close\": 173.25\n },\n {\n \"date\": \"2008-06-24\",\n \"close\": 177.39\n },\n {\n \"date\": \"2008-06-25\",\n \"close\": 168.26\n },\n {\n \"date\": \"2008-06-26\",\n \"close\": 170.09\n },\n {\n \"date\": \"2008-06-29\",\n \"close\": 167.44\n },\n {\n \"date\": \"2008-07-01\",\n \"close\": 174.68\n },\n {\n \"date\": \"2008-07-02\",\n \"close\": 168.18\n },\n {\n \"date\": \"2008-07-03\",\n \"close\": 170.12\n },\n {\n \"date\": \"2008-07-07\",\n \"close\": 175.16\n },\n {\n \"date\": \"2008-07-08\",\n \"close\": 179.55\n },\n {\n \"date\": \"2008-07-09\",\n \"close\": 174.25\n },\n {\n \"date\": \"2008-07-09\",\n \"close\": 176.63\n },\n {\n \"date\": \"2008-07-10\",\n \"close\": 172.58\n },\n {\n \"date\": \"2008-07-13\",\n \"close\": 173.88\n },\n {\n \"date\": \"2008-07-14\",\n \"close\": 169.64\n },\n {\n \"date\": \"2008-07-15\",\n \"close\": 172.81\n },\n {\n \"date\": \"2008-07-16\",\n \"close\": 171.81\n },\n {\n \"date\": \"2008-07-17\",\n \"close\": 165.15\n },\n {\n \"date\": \"2008-07-20\",\n \"close\": 166.29\n },\n {\n \"date\": \"2008-07-21\",\n \"close\": 162.02\n },\n {\n \"date\": \"2008-07-22\",\n \"close\": 166.26\n },\n {\n \"date\": \"2008-07-23\",\n \"close\": 159.03\n },\n {\n \"date\": \"2008-07-24\",\n \"close\": 162.12\n },\n {\n \"date\": \"2008-07-27\",\n \"close\": 154.4\n },\n {\n \"date\": \"2008-07-28\",\n \"close\": 157.08\n },\n {\n \"date\": \"2008-07-29\",\n \"close\": 159.88\n },\n {\n \"date\": \"2008-07-30\",\n \"close\": 158.95\n },\n {\n \"date\": \"2008-08-01\",\n \"close\": 156.66\n },\n {\n \"date\": \"2008-08-04\",\n \"close\": 153.23\n },\n {\n \"date\": \"2008-08-05\",\n \"close\": 160.64\n },\n {\n \"date\": \"2008-08-06\",\n \"close\": 164.19\n },\n {\n \"date\": \"2008-08-07\",\n \"close\": 163.57\n },\n {\n \"date\": \"2008-08-08\",\n \"close\": 169.55\n },\n {\n \"date\": \"2008-08-10\",\n \"close\": 173.56\n },\n {\n \"date\": \"2008-08-11\",\n \"close\": 176.73\n },\n {\n \"date\": \"2008-08-12\",\n \"close\": 179.3\n },\n {\n \"date\": \"2008-08-13\",\n \"close\": 179.32\n },\n {\n \"date\": \"2008-08-14\",\n \"close\": 175.74\n },\n {\n \"date\": \"2008-08-17\",\n \"close\": 175.39\n },\n {\n \"date\": \"2008-08-18\",\n \"close\": 173.53\n },\n {\n \"date\": \"2008-08-19\",\n \"close\": 175.84\n },\n {\n \"date\": \"2008-08-20\",\n \"close\": 174.29\n },\n {\n \"date\": \"2008-08-21\",\n \"close\": 176.79\n },\n {\n \"date\": \"2008-08-24\",\n \"close\": 172.55\n },\n {\n \"date\": \"2008-08-25\",\n \"close\": 173.64\n },\n {\n \"date\": \"2008-08-26\",\n \"close\": 174.67\n },\n {\n \"date\": \"2008-08-27\",\n \"close\": 173.74\n },\n {\n \"date\": \"2008-08-28\",\n \"close\": 169.53\n },\n {\n \"date\": \"2008-09-02\",\n \"close\": 166.19\n },\n {\n \"date\": \"2008-09-03\",\n \"close\": 166.96\n },\n {\n \"date\": \"2008-09-04\",\n \"close\": 161.22\n },\n {\n \"date\": \"2008-09-05\",\n \"close\": 160.18\n },\n {\n \"date\": \"2008-09-08\",\n \"close\": 157.92\n },\n {\n \"date\": \"2008-09-09\",\n \"close\": 151.68\n },\n {\n \"date\": \"2008-09-09\",\n \"close\": 151.61\n },\n {\n \"date\": \"2008-09-10\",\n \"close\": 152.65\n },\n {\n \"date\": \"2008-09-11\",\n \"close\": 148.94\n },\n {\n \"date\": \"2008-09-14\",\n \"close\": 140.36\n },\n {\n \"date\": \"2008-09-15\",\n \"close\": 139.88\n },\n {\n \"date\": \"2008-09-16\",\n \"close\": 127.83\n },\n {\n \"date\": \"2008-09-17\",\n \"close\": 134.09\n },\n {\n \"date\": \"2008-09-18\",\n \"close\": 140.91\n },\n {\n \"date\": \"2008-09-21\",\n \"close\": 131.05\n },\n {\n \"date\": \"2008-09-22\",\n \"close\": 126.84\n },\n {\n \"date\": \"2008-09-23\",\n \"close\": 128.71\n },\n {\n \"date\": \"2008-09-24\",\n \"close\": 131.93\n },\n {\n \"date\": \"2008-09-25\",\n \"close\": 128.24\n },\n {\n \"date\": \"2008-09-28\",\n \"close\": 105.26\n },\n {\n \"date\": \"2008-09-29\",\n \"close\": 113.66\n },\n {\n \"date\": \"2008-10-01\",\n \"close\": 109.12\n },\n {\n \"date\": \"2008-10-02\",\n \"close\": 100.1\n },\n {\n \"date\": \"2008-10-03\",\n \"close\": 97.07\n },\n {\n \"date\": \"2008-10-06\",\n \"close\": 98.14\n },\n {\n \"date\": \"2008-10-07\",\n \"close\": 89.16\n },\n {\n \"date\": \"2008-10-08\",\n \"close\": 89.79\n },\n {\n \"date\": \"2008-10-09\",\n \"close\": 88.74\n },\n {\n \"date\": \"2008-10-09\",\n \"close\": 96.8\n },\n {\n \"date\": \"2008-10-12\",\n \"close\": 110.26\n },\n {\n \"date\": \"2008-10-13\",\n \"close\": 104.08\n },\n {\n \"date\": \"2008-10-14\",\n \"close\": 97.95\n },\n {\n \"date\": \"2008-10-15\",\n \"close\": 101.89\n },\n {\n \"date\": \"2008-10-16\",\n \"close\": 97.4\n },\n {\n \"date\": \"2008-10-19\",\n \"close\": 98.44\n },\n {\n \"date\": \"2008-10-20\",\n \"close\": 91.49\n },\n {\n \"date\": \"2008-10-21\",\n \"close\": 96.87\n },\n {\n \"date\": \"2008-10-22\",\n \"close\": 98.23\n },\n {\n \"date\": \"2008-10-23\",\n \"close\": 96.38\n },\n {\n \"date\": \"2008-10-26\",\n \"close\": 92.09\n },\n {\n \"date\": \"2008-10-27\",\n \"close\": 99.91\n },\n {\n \"date\": \"2008-10-28\",\n \"close\": 104.55\n },\n {\n \"date\": \"2008-10-29\",\n \"close\": 111.04\n },\n {\n \"date\": \"2008-10-30\",\n \"close\": 107.59\n },\n {\n \"date\": \"2008-11-03\",\n \"close\": 106.96\n },\n {\n \"date\": \"2008-11-04\",\n \"close\": 110.99\n },\n {\n \"date\": \"2008-11-05\",\n \"close\": 103.3\n },\n {\n \"date\": \"2008-11-06\",\n \"close\": 99.1\n },\n {\n \"date\": \"2008-11-07\",\n \"close\": 98.24\n },\n {\n \"date\": \"2008-11-09\",\n \"close\": 95.88\n },\n {\n \"date\": \"2008-11-10\",\n \"close\": 94.77\n },\n {\n \"date\": \"2008-11-11\",\n \"close\": 90.12\n },\n {\n \"date\": \"2008-11-12\",\n \"close\": 96.44\n },\n {\n \"date\": \"2008-11-13\",\n \"close\": 90.24\n },\n {\n \"date\": \"2008-11-16\",\n \"close\": 88.14\n },\n {\n \"date\": \"2008-11-17\",\n \"close\": 89.91\n },\n {\n \"date\": \"2008-11-18\",\n \"close\": 86.29\n },\n {\n \"date\": \"2008-11-19\",\n \"close\": 80.49\n },\n {\n \"date\": \"2008-11-20\",\n \"close\": 82.58\n },\n {\n \"date\": \"2008-11-23\",\n \"close\": 92.95\n },\n {\n \"date\": \"2008-11-24\",\n \"close\": 90.8\n },\n {\n \"date\": \"2008-11-25\",\n \"close\": 95\n },\n {\n \"date\": \"2008-11-26\",\n \"close\": 95\n },\n {\n \"date\": \"2008-11-27\",\n \"close\": 92.67\n },\n {\n \"date\": \"2008-12-01\",\n \"close\": 88.93\n },\n {\n \"date\": \"2008-12-02\",\n \"close\": 92.47\n },\n {\n \"date\": \"2008-12-03\",\n \"close\": 95.9\n },\n {\n \"date\": \"2008-12-04\",\n \"close\": 91.41\n },\n {\n \"date\": \"2008-12-05\",\n \"close\": 94\n },\n {\n \"date\": \"2008-12-08\",\n \"close\": 99.72\n },\n {\n \"date\": \"2008-12-09\",\n \"close\": 100.06\n },\n {\n \"date\": \"2008-12-09\",\n \"close\": 98.21\n },\n {\n \"date\": \"2008-12-10\",\n \"close\": 95\n },\n {\n \"date\": \"2008-12-11\",\n \"close\": 98.27\n },\n {\n \"date\": \"2008-12-14\",\n \"close\": 94.75\n },\n {\n \"date\": \"2008-12-15\",\n \"close\": 95.43\n },\n {\n \"date\": \"2008-12-16\",\n \"close\": 89.16\n },\n {\n \"date\": \"2008-12-17\",\n \"close\": 89.43\n },\n {\n \"date\": \"2008-12-18\",\n \"close\": 90\n },\n {\n \"date\": \"2008-12-21\",\n \"close\": 85.74\n },\n {\n \"date\": \"2008-12-22\",\n \"close\": 86.38\n },\n {\n \"date\": \"2008-12-23\",\n \"close\": 85.04\n },\n {\n \"date\": \"2008-12-24\",\n \"close\": 85.04\n },\n {\n \"date\": \"2008-12-25\",\n \"close\": 85.81\n },\n {\n \"date\": \"2008-12-28\",\n \"close\": 86.61\n },\n {\n \"date\": \"2008-12-29\",\n \"close\": 86.29\n },\n {\n \"date\": \"2008-12-30\",\n \"close\": 85.35\n },\n {\n \"date\": \"2009-01-01\",\n \"close\": 85.35\n },\n {\n \"date\": \"2009-01-02\",\n \"close\": 90.75\n },\n {\n \"date\": \"2009-01-05\",\n \"close\": 94.58\n },\n {\n \"date\": \"2009-01-06\",\n \"close\": 93.02\n },\n {\n \"date\": \"2009-01-07\",\n \"close\": 91.01\n },\n {\n \"date\": \"2009-01-08\",\n \"close\": 92.7\n },\n {\n \"date\": \"2009-01-09\",\n \"close\": 90.58\n },\n {\n \"date\": \"2009-01-11\",\n \"close\": 88.66\n },\n {\n \"date\": \"2009-01-12\",\n \"close\": 87.71\n },\n {\n \"date\": \"2009-01-13\",\n \"close\": 85.33\n },\n {\n \"date\": \"2009-01-14\",\n \"close\": 83.38\n },\n {\n \"date\": \"2009-01-15\",\n \"close\": 82.33\n },\n {\n \"date\": \"2009-01-19\",\n \"close\": 78.2\n },\n {\n \"date\": \"2009-01-20\",\n \"close\": 82.83\n },\n {\n \"date\": \"2009-01-21\",\n \"close\": 88.36\n },\n {\n \"date\": \"2009-01-22\",\n \"close\": 88.36\n },\n {\n \"date\": \"2009-01-25\",\n \"close\": 89.64\n },\n {\n \"date\": \"2009-01-26\",\n \"close\": 90.73\n },\n {\n \"date\": \"2009-01-27\",\n \"close\": 94.2\n },\n {\n \"date\": \"2009-01-28\",\n \"close\": 93\n },\n {\n \"date\": \"2009-01-29\",\n \"close\": 90.13\n },\n {\n \"date\": \"2009-02-02\",\n \"close\": 91.51\n },\n {\n \"date\": \"2009-02-03\",\n \"close\": 92.98\n },\n {\n \"date\": \"2009-02-04\",\n \"close\": 93.55\n },\n {\n \"date\": \"2009-02-05\",\n \"close\": 96.46\n },\n {\n \"date\": \"2009-02-06\",\n \"close\": 99.72\n },\n {\n \"date\": \"2009-02-09\",\n \"close\": 102.51\n },\n {\n \"date\": \"2009-02-09\",\n \"close\": 97.83\n },\n {\n \"date\": \"2009-02-10\",\n \"close\": 96.82\n },\n {\n \"date\": \"2009-02-11\",\n \"close\": 99.27\n },\n {\n \"date\": \"2009-02-12\",\n \"close\": 99.16\n },\n {\n \"date\": \"2009-02-16\",\n \"close\": 94.53\n },\n {\n \"date\": \"2009-02-17\",\n \"close\": 94.37\n },\n {\n \"date\": \"2009-02-18\",\n \"close\": 90.64\n },\n {\n \"date\": \"2009-02-19\",\n \"close\": 91.2\n },\n {\n \"date\": \"2009-02-22\",\n \"close\": 86.95\n },\n {\n \"date\": \"2009-02-23\",\n \"close\": 90.25\n },\n {\n \"date\": \"2009-02-24\",\n \"close\": 91.16\n },\n {\n \"date\": \"2009-02-25\",\n \"close\": 89.19\n },\n {\n \"date\": \"2009-02-26\",\n \"close\": 89.31\n },\n {\n \"date\": \"2009-03-02\",\n \"close\": 87.94\n },\n {\n \"date\": \"2009-03-03\",\n \"close\": 88.37\n },\n {\n \"date\": \"2009-03-04\",\n \"close\": 91.17\n },\n {\n \"date\": \"2009-03-05\",\n \"close\": 88.84\n },\n {\n \"date\": \"2009-03-06\",\n \"close\": 85.3\n },\n {\n \"date\": \"2009-03-09\",\n \"close\": 83.11\n },\n {\n \"date\": \"2009-03-09\",\n \"close\": 88.63\n },\n {\n \"date\": \"2009-03-10\",\n \"close\": 92.68\n },\n {\n \"date\": \"2009-03-11\",\n \"close\": 96.35\n },\n {\n \"date\": \"2009-03-12\",\n \"close\": 95.93\n },\n {\n \"date\": \"2009-03-15\",\n \"close\": 95.42\n },\n {\n \"date\": \"2009-03-16\",\n \"close\": 99.66\n },\n {\n \"date\": \"2009-03-17\",\n \"close\": 101.52\n },\n {\n \"date\": \"2009-03-18\",\n \"close\": 101.62\n },\n {\n \"date\": \"2009-03-19\",\n \"close\": 101.59\n },\n {\n \"date\": \"2009-03-22\",\n \"close\": 107.66\n },\n {\n \"date\": \"2009-03-23\",\n \"close\": 106.5\n },\n {\n \"date\": \"2009-03-24\",\n \"close\": 106.49\n },\n {\n \"date\": \"2009-03-25\",\n \"close\": 109.87\n },\n {\n \"date\": \"2009-03-26\",\n \"close\": 106.85\n },\n {\n \"date\": \"2009-03-29\",\n \"close\": 104.49\n },\n {\n \"date\": \"2009-03-30\",\n \"close\": 105.12\n },\n {\n \"date\": \"2009-04-01\",\n \"close\": 108.69\n },\n {\n \"date\": \"2009-04-02\",\n \"close\": 112.71\n },\n {\n \"date\": \"2009-04-03\",\n \"close\": 115.99\n },\n {\n \"date\": \"2009-04-06\",\n \"close\": 118.45\n },\n {\n \"date\": \"2009-04-07\",\n \"close\": 115\n },\n {\n \"date\": \"2009-04-08\",\n \"close\": 116.32\n },\n {\n \"date\": \"2009-04-09\",\n \"close\": 119.57\n },\n {\n \"date\": \"2009-04-09\",\n \"close\": 119.57\n },\n {\n \"date\": \"2009-04-12\",\n \"close\": 120.22\n },\n {\n \"date\": \"2009-04-13\",\n \"close\": 118.31\n },\n {\n \"date\": \"2009-04-14\",\n \"close\": 117.64\n },\n {\n \"date\": \"2009-04-15\",\n \"close\": 121.45\n },\n {\n \"date\": \"2009-04-16\",\n \"close\": 123.42\n },\n {\n \"date\": \"2009-04-19\",\n \"close\": 120.5\n },\n {\n \"date\": \"2009-04-20\",\n \"close\": 121.76\n },\n {\n \"date\": \"2009-04-21\",\n \"close\": 121.51\n },\n {\n \"date\": \"2009-04-22\",\n \"close\": 125.4\n },\n {\n \"date\": \"2009-04-23\",\n \"close\": 123.9\n },\n {\n \"date\": \"2009-04-26\",\n \"close\": 124.73\n },\n {\n \"date\": \"2009-04-27\",\n \"close\": 123.9\n },\n {\n \"date\": \"2009-04-28\",\n \"close\": 125.14\n },\n {\n \"date\": \"2009-04-29\",\n \"close\": 125.83\n },\n {\n \"date\": \"2009-05-01\",\n \"close\": 127.24\n },\n {\n \"date\": \"2009-05-04\",\n \"close\": 132.07\n },\n {\n \"date\": \"2009-05-05\",\n \"close\": 132.71\n },\n {\n \"date\": \"2009-05-06\",\n \"close\": 132.5\n },\n {\n \"date\": \"2009-05-07\",\n \"close\": 129.06\n },\n {\n \"date\": \"2009-05-08\",\n \"close\": 129.19\n },\n {\n \"date\": \"2009-05-10\",\n \"close\": 129.57\n },\n {\n \"date\": \"2009-05-11\",\n \"close\": 124.42\n },\n {\n \"date\": \"2009-05-12\",\n \"close\": 119.49\n },\n {\n \"date\": \"2009-05-13\",\n \"close\": 122.95\n },\n {\n \"date\": \"2009-05-14\",\n \"close\": 122.42\n },\n {\n \"date\": \"2009-05-17\",\n \"close\": 126.65\n },\n {\n \"date\": \"2009-05-18\",\n \"close\": 127.45\n },\n {\n \"date\": \"2009-05-19\",\n \"close\": 125.87\n },\n {\n \"date\": \"2009-05-20\",\n \"close\": 124.18\n },\n {\n \"date\": \"2009-05-21\",\n \"close\": 122.5\n },\n {\n \"date\": \"2009-05-25\",\n \"close\": 130.78\n },\n {\n \"date\": \"2009-05-26\",\n \"close\": 133.05\n },\n {\n \"date\": \"2009-05-27\",\n \"close\": 135.07\n },\n {\n \"date\": \"2009-05-28\",\n \"close\": 135.81\n },\n {\n \"date\": \"2009-06-01\",\n \"close\": 139.35\n },\n {\n \"date\": \"2009-06-02\",\n \"close\": 139.49\n },\n {\n \"date\": \"2009-06-03\",\n \"close\": 140.95\n },\n {\n \"date\": \"2009-06-04\",\n \"close\": 143.74\n },\n {\n \"date\": \"2009-06-05\",\n \"close\": 144.67\n },\n {\n \"date\": \"2009-06-08\",\n \"close\": 143.85\n },\n {\n \"date\": \"2009-06-09\",\n \"close\": 142.72\n },\n {\n \"date\": \"2009-06-09\",\n \"close\": 140.25\n },\n {\n \"date\": \"2009-06-10\",\n \"close\": 139.95\n },\n {\n \"date\": \"2009-06-11\",\n \"close\": 136.97\n },\n {\n \"date\": \"2009-06-14\",\n \"close\": 136.09\n },\n {\n \"date\": \"2009-06-15\",\n \"close\": 136.35\n },\n {\n \"date\": \"2009-06-16\",\n \"close\": 135.58\n },\n {\n \"date\": \"2009-06-17\",\n \"close\": 135.88\n },\n {\n \"date\": \"2009-06-18\",\n \"close\": 139.48\n },\n {\n \"date\": \"2009-06-21\",\n \"close\": 137.37\n },\n {\n \"date\": \"2009-06-22\",\n \"close\": 134.01\n },\n {\n \"date\": \"2009-06-23\",\n \"close\": 136.22\n },\n {\n \"date\": \"2009-06-24\",\n \"close\": 139.86\n },\n {\n \"date\": \"2009-06-25\",\n \"close\": 142.44\n },\n {\n \"date\": \"2009-06-28\",\n \"close\": 141.97\n },\n {\n \"date\": \"2009-06-29\",\n \"close\": 142.43\n },\n {\n \"date\": \"2009-07-01\",\n \"close\": 142.83\n },\n {\n \"date\": \"2009-07-02\",\n \"close\": 140.02\n },\n {\n \"date\": \"2009-07-03\",\n \"close\": 140.02\n },\n {\n \"date\": \"2009-07-06\",\n \"close\": 138.61\n },\n {\n \"date\": \"2009-07-07\",\n \"close\": 135.4\n },\n {\n \"date\": \"2009-07-08\",\n \"close\": 137.22\n },\n {\n \"date\": \"2009-07-09\",\n \"close\": 136.36\n },\n {\n \"date\": \"2009-07-09\",\n \"close\": 138.52\n },\n {\n \"date\": \"2009-07-12\",\n \"close\": 142.34\n },\n {\n \"date\": \"2009-07-13\",\n \"close\": 142.27\n },\n {\n \"date\": \"2009-07-14\",\n \"close\": 146.88\n },\n {\n \"date\": \"2009-07-15\",\n \"close\": 147.52\n },\n {\n \"date\": \"2009-07-16\",\n \"close\": 151.75\n },\n {\n \"date\": \"2009-07-19\",\n \"close\": 152.91\n },\n {\n \"date\": \"2009-07-20\",\n \"close\": 151.51\n },\n {\n \"date\": \"2009-07-21\",\n \"close\": 156.74\n },\n {\n \"date\": \"2009-07-22\",\n \"close\": 157.82\n },\n {\n \"date\": \"2009-07-23\",\n \"close\": 159.99\n },\n {\n \"date\": \"2009-07-26\",\n \"close\": 160.1\n },\n {\n \"date\": \"2009-07-27\",\n \"close\": 160\n },\n {\n \"date\": \"2009-07-28\",\n \"close\": 160.03\n },\n {\n \"date\": \"2009-07-29\",\n \"close\": 162.79\n },\n {\n \"date\": \"2009-07-30\",\n \"close\": 163.39\n },\n {\n \"date\": \"2009-08-03\",\n \"close\": 166.43\n },\n {\n \"date\": \"2009-08-04\",\n \"close\": 165.55\n },\n {\n \"date\": \"2009-08-05\",\n \"close\": 165.11\n },\n {\n \"date\": \"2009-08-06\",\n \"close\": 163.91\n },\n {\n \"date\": \"2009-08-07\",\n \"close\": 165.51\n },\n {\n \"date\": \"2009-08-09\",\n \"close\": 164.72\n },\n {\n \"date\": \"2009-08-11\",\n \"close\": 165.31\n },\n {\n \"date\": \"2009-08-12\",\n \"close\": 168.42\n },\n {\n \"date\": \"2009-08-13\",\n \"close\": 166.78\n },\n {\n \"date\": \"2009-08-16\",\n \"close\": 159.59\n },\n {\n \"date\": \"2009-08-17\",\n \"close\": 164\n },\n {\n \"date\": \"2009-08-18\",\n \"close\": 164.6\n },\n {\n \"date\": \"2009-08-19\",\n \"close\": 166.33\n },\n {\n \"date\": \"2009-08-20\",\n \"close\": 169.22\n },\n {\n \"date\": \"2009-08-23\",\n \"close\": 169.06\n },\n {\n \"date\": \"2009-08-24\",\n \"close\": 169.4\n },\n {\n \"date\": \"2009-08-25\",\n \"close\": 167.41\n },\n {\n \"date\": \"2009-08-26\",\n \"close\": 169.45\n },\n {\n \"date\": \"2009-08-27\",\n \"close\": 170.05\n },\n {\n \"date\": \"2009-08-30\",\n \"close\": 168.21\n },\n {\n \"date\": \"2009-09-01\",\n \"close\": 165.3\n },\n {\n \"date\": \"2009-09-02\",\n \"close\": 165.18\n },\n {\n \"date\": \"2009-09-03\",\n \"close\": 166.55\n },\n {\n \"date\": \"2009-09-04\",\n \"close\": 170.31\n },\n {\n \"date\": \"2009-09-08\",\n \"close\": 172.93\n },\n {\n \"date\": \"2009-09-09\",\n \"close\": 171.14\n },\n {\n \"date\": \"2009-09-09\",\n \"close\": 172.56\n },\n {\n \"date\": \"2009-09-10\",\n \"close\": 172.16\n },\n {\n \"date\": \"2009-09-13\",\n \"close\": 173.72\n },\n {\n \"date\": \"2009-09-14\",\n \"close\": 175.16\n },\n {\n \"date\": \"2009-09-15\",\n \"close\": 181.87\n },\n {\n \"date\": \"2009-09-16\",\n \"close\": 184.55\n },\n {\n \"date\": \"2009-09-17\",\n \"close\": 185.02\n },\n {\n \"date\": \"2009-09-20\",\n \"close\": 184.02\n },\n {\n \"date\": \"2009-09-21\",\n \"close\": 184.48\n },\n {\n \"date\": \"2009-09-22\",\n \"close\": 185.5\n },\n {\n \"date\": \"2009-09-23\",\n \"close\": 183.82\n },\n {\n \"date\": \"2009-09-24\",\n \"close\": 182.37\n },\n {\n \"date\": \"2009-09-27\",\n \"close\": 186.15\n },\n {\n \"date\": \"2009-09-28\",\n \"close\": 185.38\n },\n {\n \"date\": \"2009-09-29\",\n \"close\": 185.35\n },\n {\n \"date\": \"2009-10-01\",\n \"close\": 180.86\n },\n {\n \"date\": \"2009-10-02\",\n \"close\": 184.9\n },\n {\n \"date\": \"2009-10-05\",\n \"close\": 186.02\n },\n {\n \"date\": \"2009-10-06\",\n \"close\": 190.01\n },\n {\n \"date\": \"2009-10-07\",\n \"close\": 190.25\n },\n {\n \"date\": \"2009-10-08\",\n \"close\": 189.27\n },\n {\n \"date\": \"2009-10-09\",\n \"close\": 190.47\n },\n {\n \"date\": \"2009-10-11\",\n \"close\": 190.81\n },\n {\n \"date\": \"2009-10-12\",\n \"close\": 190.02\n },\n {\n \"date\": \"2009-10-13\",\n \"close\": 191.29\n },\n {\n \"date\": \"2009-10-14\",\n \"close\": 190.56\n },\n {\n \"date\": \"2009-10-15\",\n \"close\": 188.05\n },\n {\n \"date\": \"2009-10-18\",\n \"close\": 189.86\n },\n {\n \"date\": \"2009-10-19\",\n \"close\": 198.76\n },\n {\n \"date\": \"2009-10-20\",\n \"close\": 204.92\n },\n {\n \"date\": \"2009-10-21\",\n \"close\": 205.2\n },\n {\n \"date\": \"2009-10-22\",\n \"close\": 203.94\n },\n {\n \"date\": \"2009-10-25\",\n \"close\": 202.48\n },\n {\n \"date\": \"2009-10-26\",\n \"close\": 197.37\n },\n {\n \"date\": \"2009-10-27\",\n \"close\": 192.4\n },\n {\n \"date\": \"2009-10-28\",\n \"close\": 196.35\n },\n {\n \"date\": \"2009-10-29\",\n \"close\": 188.5\n },\n {\n \"date\": \"2009-11-02\",\n \"close\": 189.31\n },\n {\n \"date\": \"2009-11-03\",\n \"close\": 188.75\n },\n {\n \"date\": \"2009-11-04\",\n \"close\": 190.81\n },\n {\n \"date\": \"2009-11-05\",\n \"close\": 194.03\n },\n {\n \"date\": \"2009-11-06\",\n \"close\": 194.34\n },\n {\n \"date\": \"2009-11-09\",\n \"close\": 201.46\n },\n {\n \"date\": \"2009-11-09\",\n \"close\": 202.98\n },\n {\n \"date\": \"2009-11-10\",\n \"close\": 203.25\n },\n {\n \"date\": \"2009-11-11\",\n \"close\": 201.99\n },\n {\n \"date\": \"2009-11-12\",\n \"close\": 204.45\n },\n {\n \"date\": \"2009-11-15\",\n \"close\": 206.63\n },\n {\n \"date\": \"2009-11-16\",\n \"close\": 207\n },\n {\n \"date\": \"2009-11-17\",\n \"close\": 205.96\n },\n {\n \"date\": \"2009-11-18\",\n \"close\": 200.51\n },\n {\n \"date\": \"2009-11-19\",\n \"close\": 199.92\n },\n {\n \"date\": \"2009-11-22\",\n \"close\": 205.88\n },\n {\n \"date\": \"2009-11-23\",\n \"close\": 204.44\n },\n {\n \"date\": \"2009-11-24\",\n \"close\": 204.19\n },\n {\n \"date\": \"2009-11-25\",\n \"close\": 204.19\n },\n {\n \"date\": \"2009-11-26\",\n \"close\": 200.59\n },\n {\n \"date\": \"2009-11-29\",\n \"close\": 199.91\n },\n {\n \"date\": \"2009-12-01\",\n \"close\": 196.97\n },\n {\n \"date\": \"2009-12-02\",\n \"close\": 196.23\n },\n {\n \"date\": \"2009-12-03\",\n \"close\": 196.48\n },\n {\n \"date\": \"2009-12-04\",\n \"close\": 193.32\n },\n {\n \"date\": \"2009-12-07\",\n \"close\": 188.95\n },\n {\n \"date\": \"2009-12-08\",\n \"close\": 189.87\n },\n {\n \"date\": \"2009-12-09\",\n \"close\": 197.8\n },\n {\n \"date\": \"2009-12-09\",\n \"close\": 196.43\n },\n {\n \"date\": \"2009-12-10\",\n \"close\": 194.67\n },\n {\n \"date\": \"2009-12-13\",\n \"close\": 196.98\n },\n {\n \"date\": \"2009-12-14\",\n \"close\": 194.17\n },\n {\n \"date\": \"2009-12-15\",\n \"close\": 195.03\n },\n {\n \"date\": \"2009-12-16\",\n \"close\": 191.86\n },\n {\n \"date\": \"2009-12-17\",\n \"close\": 195.43\n },\n {\n \"date\": \"2009-12-20\",\n \"close\": 198.23\n },\n {\n \"date\": \"2009-12-21\",\n \"close\": 200.36\n },\n {\n \"date\": \"2009-12-22\",\n \"close\": 202.1\n },\n {\n \"date\": \"2009-12-23\",\n \"close\": 209.04\n },\n {\n \"date\": \"2009-12-24\",\n \"close\": 209.04\n },\n {\n \"date\": \"2009-12-27\",\n \"close\": 211.61\n },\n {\n \"date\": \"2009-12-28\",\n \"close\": 209.1\n },\n {\n \"date\": \"2009-12-29\",\n \"close\": 211.64\n },\n {\n \"date\": \"2009-12-30\",\n \"close\": 210.73\n },\n {\n \"date\": \"2010-01-01\",\n \"close\": 210.73\n },\n {\n \"date\": \"2010-01-04\",\n \"close\": 214.01\n },\n {\n \"date\": \"2010-01-05\",\n \"close\": 214.38\n },\n {\n \"date\": \"2010-01-06\",\n \"close\": 210.97\n },\n {\n \"date\": \"2010-01-07\",\n \"close\": 210.58\n },\n {\n \"date\": \"2010-01-08\",\n \"close\": 211.98\n },\n {\n \"date\": \"2010-01-10\",\n \"close\": 210.11\n },\n {\n \"date\": \"2010-01-11\",\n \"close\": 207.72\n },\n {\n \"date\": \"2010-01-12\",\n \"close\": 210.65\n },\n {\n \"date\": \"2010-01-13\",\n \"close\": 209.43\n },\n {\n \"date\": \"2010-01-14\",\n \"close\": 205.93\n },\n {\n \"date\": \"2010-01-17\",\n \"close\": 205.93\n },\n {\n \"date\": \"2010-01-18\",\n \"close\": 215.04\n },\n {\n \"date\": \"2010-01-19\",\n \"close\": 211.72\n },\n {\n \"date\": \"2010-01-20\",\n \"close\": 208.07\n },\n {\n \"date\": \"2010-01-21\",\n \"close\": 197.75\n },\n {\n \"date\": \"2010-01-24\",\n \"close\": 203.08\n },\n {\n \"date\": \"2010-01-25\",\n \"close\": 205.94\n },\n {\n \"date\": \"2010-01-26\",\n \"close\": 207.88\n },\n {\n \"date\": \"2010-01-27\",\n \"close\": 199.29\n },\n {\n \"date\": \"2010-01-28\",\n \"close\": 192.06\n },\n {\n \"date\": \"2010-02-01\",\n \"close\": 194.73\n },\n {\n \"date\": \"2010-02-02\",\n \"close\": 195.86\n },\n {\n \"date\": \"2010-02-03\",\n \"close\": 199.23\n },\n {\n \"date\": \"2010-02-04\",\n \"close\": 192.05\n },\n {\n \"date\": \"2010-02-05\",\n \"close\": 195.46\n },\n {\n \"date\": \"2010-02-08\",\n \"close\": 194.12\n },\n {\n \"date\": \"2010-02-09\",\n \"close\": 196.19\n },\n {\n \"date\": \"2010-02-09\",\n \"close\": 195.12\n },\n {\n \"date\": \"2010-02-10\",\n \"close\": 198.67\n },\n {\n \"date\": \"2010-02-11\",\n \"close\": 200.38\n },\n {\n \"date\": \"2010-02-14\",\n \"close\": 200.38\n },\n {\n \"date\": \"2010-02-15\",\n \"close\": 203.4\n },\n {\n \"date\": \"2010-02-16\",\n \"close\": 202.55\n },\n {\n \"date\": \"2010-02-17\",\n \"close\": 202.93\n },\n {\n \"date\": \"2010-02-18\",\n \"close\": 201.67\n },\n {\n \"date\": \"2010-02-21\",\n \"close\": 200.42\n },\n {\n \"date\": \"2010-02-22\",\n \"close\": 197.06\n },\n {\n \"date\": \"2010-02-23\",\n \"close\": 200.66\n },\n {\n \"date\": \"2010-02-24\",\n \"close\": 202\n },\n {\n \"date\": \"2010-02-25\",\n \"close\": 204.62\n },\n {\n \"date\": \"2010-03-01\",\n \"close\": 208.99\n },\n {\n \"date\": \"2010-03-02\",\n \"close\": 208.85\n },\n {\n \"date\": \"2010-03-03\",\n \"close\": 209.33\n },\n {\n \"date\": \"2010-03-04\",\n \"close\": 210.71\n },\n {\n \"date\": \"2010-03-05\",\n \"close\": 218.95\n },\n {\n \"date\": \"2010-03-08\",\n \"close\": 219.08\n },\n {\n \"date\": \"2010-03-09\",\n \"close\": 223.02\n },\n {\n \"date\": \"2010-03-09\",\n \"close\": 224.84\n },\n {\n \"date\": \"2010-03-10\",\n \"close\": 225.5\n },\n {\n \"date\": \"2010-03-11\",\n \"close\": 226.6\n },\n {\n \"date\": \"2010-03-14\",\n \"close\": 223.84\n },\n {\n \"date\": \"2010-03-15\",\n \"close\": 224.45\n },\n {\n \"date\": \"2010-03-16\",\n \"close\": 224.12\n },\n {\n \"date\": \"2010-03-17\",\n \"close\": 224.65\n },\n {\n \"date\": \"2010-03-18\",\n \"close\": 222.25\n },\n {\n \"date\": \"2010-03-21\",\n \"close\": 224.75\n },\n {\n \"date\": \"2010-03-22\",\n \"close\": 228.36\n },\n {\n \"date\": \"2010-03-23\",\n \"close\": 229.37\n },\n {\n \"date\": \"2010-03-24\",\n \"close\": 226.65\n },\n {\n \"date\": \"2010-03-25\",\n \"close\": 230.9\n },\n {\n \"date\": \"2010-03-28\",\n \"close\": 232.39\n },\n {\n \"date\": \"2010-03-29\",\n \"close\": 235.84\n },\n {\n \"date\": \"2010-03-30\",\n \"close\": 235\n },\n {\n \"date\": \"2010-04-01\",\n \"close\": 235.97\n },\n {\n \"date\": \"2010-04-02\",\n \"close\": 235.97\n },\n {\n \"date\": \"2010-04-05\",\n \"close\": 238.49\n },\n {\n \"date\": \"2010-04-06\",\n \"close\": 239.54\n },\n {\n \"date\": \"2010-04-07\",\n \"close\": 240.6\n },\n {\n \"date\": \"2010-04-08\",\n \"close\": 239.95\n },\n {\n \"date\": \"2010-04-09\",\n \"close\": 241.79\n },\n {\n \"date\": \"2010-04-11\",\n \"close\": 242.29\n },\n {\n \"date\": \"2010-04-12\",\n \"close\": 242.43\n },\n {\n \"date\": \"2010-04-13\",\n \"close\": 245.69\n },\n {\n \"date\": \"2010-04-14\",\n \"close\": 248.92\n },\n {\n \"date\": \"2010-04-15\",\n \"close\": 247.4\n },\n {\n \"date\": \"2010-04-18\",\n \"close\": 247.07\n },\n {\n \"date\": \"2010-04-19\",\n \"close\": 244.59\n },\n {\n \"date\": \"2010-04-20\",\n \"close\": 259.22\n },\n {\n \"date\": \"2010-04-21\",\n \"close\": 266.47\n },\n {\n \"date\": \"2010-04-22\",\n \"close\": 270.83\n },\n {\n \"date\": \"2010-04-25\",\n \"close\": 269.5\n },\n {\n \"date\": \"2010-04-26\",\n \"close\": 262.04\n },\n {\n \"date\": \"2010-04-27\",\n \"close\": 261.6\n },\n {\n \"date\": \"2010-04-28\",\n \"close\": 268.64\n },\n {\n \"date\": \"2010-04-29\",\n \"close\": 261.09\n },\n {\n \"date\": \"2010-05-03\",\n \"close\": 266.35\n },\n {\n \"date\": \"2010-05-04\",\n \"close\": 258.68\n },\n {\n \"date\": \"2010-05-05\",\n \"close\": 255.98\n },\n {\n \"date\": \"2010-05-06\",\n \"close\": 246.25\n },\n {\n \"date\": \"2010-05-07\",\n \"close\": 235.86\n },\n {\n \"date\": \"2010-05-09\",\n \"close\": 253.99\n },\n {\n \"date\": \"2010-05-10\",\n \"close\": 256.52\n },\n {\n \"date\": \"2010-05-11\",\n \"close\": 262.09\n },\n {\n \"date\": \"2010-05-12\",\n \"close\": 258.36\n },\n {\n \"date\": \"2010-05-13\",\n \"close\": 253.82\n },\n {\n \"date\": \"2010-05-16\",\n \"close\": 254.22\n },\n {\n \"date\": \"2010-05-17\",\n \"close\": 252.36\n },\n {\n \"date\": \"2010-05-18\",\n \"close\": 248.34\n },\n {\n \"date\": \"2010-05-19\",\n \"close\": 237.76\n },\n {\n \"date\": \"2010-05-20\",\n \"close\": 242.32\n },\n {\n \"date\": \"2010-05-23\",\n \"close\": 246.76\n },\n {\n \"date\": \"2010-05-24\",\n \"close\": 245.22\n },\n {\n \"date\": \"2010-05-25\",\n \"close\": 244.11\n },\n {\n \"date\": \"2010-05-26\",\n \"close\": 253.35\n },\n {\n \"date\": \"2010-05-27\",\n \"close\": 256.88\n },\n {\n \"date\": \"2010-05-30\",\n \"close\": 256.88\n },\n {\n \"date\": \"2010-06-01\",\n \"close\": 260.83\n },\n {\n \"date\": \"2010-06-02\",\n \"close\": 263.95\n },\n {\n \"date\": \"2010-06-03\",\n \"close\": 263.12\n },\n {\n \"date\": \"2010-06-04\",\n \"close\": 255.96\n },\n {\n \"date\": \"2010-06-07\",\n \"close\": 250.94\n },\n {\n \"date\": \"2010-06-08\",\n \"close\": 249.33\n },\n {\n \"date\": \"2010-06-09\",\n \"close\": 243.2\n },\n {\n \"date\": \"2010-06-09\",\n \"close\": 250.51\n },\n {\n \"date\": \"2010-06-10\",\n \"close\": 253.51\n },\n {\n \"date\": \"2010-06-13\",\n \"close\": 254.28\n },\n {\n \"date\": \"2010-06-14\",\n \"close\": 259.69\n },\n {\n \"date\": \"2010-06-15\",\n \"close\": 267.25\n },\n {\n \"date\": \"2010-06-16\",\n \"close\": 271.87\n },\n {\n \"date\": \"2010-06-17\",\n \"close\": 274.07\n },\n {\n \"date\": \"2010-06-20\",\n \"close\": 270.17\n },\n {\n \"date\": \"2010-06-21\",\n \"close\": 273.85\n },\n {\n \"date\": \"2010-06-22\",\n \"close\": 270.97\n },\n {\n \"date\": \"2010-06-23\",\n \"close\": 269\n },\n {\n \"date\": \"2010-06-24\",\n \"close\": 266.7\n },\n {\n \"date\": \"2010-06-27\",\n \"close\": 268.3\n },\n {\n \"date\": \"2010-06-28\",\n \"close\": 256.17\n },\n {\n \"date\": \"2010-06-29\",\n \"close\": 251.53\n },\n {\n \"date\": \"2010-07-01\",\n \"close\": 248.48\n },\n {\n \"date\": \"2010-07-02\",\n \"close\": 246.94\n },\n {\n \"date\": \"2010-07-05\",\n \"close\": 246.94\n },\n {\n \"date\": \"2010-07-06\",\n \"close\": 248.63\n },\n {\n \"date\": \"2010-07-07\",\n \"close\": 258.66\n },\n {\n \"date\": \"2010-07-08\",\n \"close\": 258.09\n },\n {\n \"date\": \"2010-07-09\",\n \"close\": 259.62\n },\n {\n \"date\": \"2010-07-11\",\n \"close\": 257.28\n },\n {\n \"date\": \"2010-07-12\",\n \"close\": 251.8\n },\n {\n \"date\": \"2010-07-13\",\n \"close\": 252.73\n },\n {\n \"date\": \"2010-07-14\",\n \"close\": 251.45\n },\n {\n \"date\": \"2010-07-15\",\n \"close\": 249.9\n },\n {\n \"date\": \"2010-07-18\",\n \"close\": 245.58\n },\n {\n \"date\": \"2010-07-19\",\n \"close\": 251.89\n },\n {\n \"date\": \"2010-07-20\",\n \"close\": 254.24\n },\n {\n \"date\": \"2010-07-21\",\n \"close\": 259.02\n },\n {\n \"date\": \"2010-07-22\",\n \"close\": 259.94\n },\n {\n \"date\": \"2010-07-25\",\n \"close\": 259.28\n },\n {\n \"date\": \"2010-07-26\",\n \"close\": 264.08\n },\n {\n \"date\": \"2010-07-27\",\n \"close\": 260.96\n },\n {\n \"date\": \"2010-07-28\",\n \"close\": 258.11\n },\n {\n \"date\": \"2010-07-29\",\n \"close\": 257.25\n },\n {\n \"date\": \"2010-08-02\",\n \"close\": 261.85\n },\n {\n \"date\": \"2010-08-03\",\n \"close\": 261.93\n },\n {\n \"date\": \"2010-08-04\",\n \"close\": 262.98\n },\n {\n \"date\": \"2010-08-05\",\n \"close\": 261.7\n },\n {\n \"date\": \"2010-08-06\",\n \"close\": 260.09\n },\n {\n \"date\": \"2010-08-09\",\n \"close\": 261.75\n },\n {\n \"date\": \"2010-08-09\",\n \"close\": 259.41\n },\n {\n \"date\": \"2010-08-10\",\n \"close\": 250.19\n },\n {\n \"date\": \"2010-08-11\",\n \"close\": 251.79\n },\n {\n \"date\": \"2010-08-12\",\n \"close\": 249.1\n },\n {\n \"date\": \"2010-08-15\",\n \"close\": 247.64\n },\n {\n \"date\": \"2010-08-16\",\n \"close\": 251.97\n },\n {\n \"date\": \"2010-08-17\",\n \"close\": 253.07\n },\n {\n \"date\": \"2010-08-18\",\n \"close\": 249.88\n },\n {\n \"date\": \"2010-08-19\",\n \"close\": 249.64\n },\n {\n \"date\": \"2010-08-22\",\n \"close\": 245.8\n },\n {\n \"date\": \"2010-08-23\",\n \"close\": 239.93\n },\n {\n \"date\": \"2010-08-24\",\n \"close\": 242.89\n },\n {\n \"date\": \"2010-08-25\",\n \"close\": 240.28\n },\n {\n \"date\": \"2010-08-26\",\n \"close\": 241.62\n },\n {\n \"date\": \"2010-08-29\",\n \"close\": 242.5\n },\n {\n \"date\": \"2010-08-30\",\n \"close\": 243.1\n },\n {\n \"date\": \"2010-09-01\",\n \"close\": 250.33\n },\n {\n \"date\": \"2010-09-02\",\n \"close\": 252.17\n },\n {\n \"date\": \"2010-09-03\",\n \"close\": 258.77\n },\n {\n \"date\": \"2010-09-06\",\n \"close\": 258.77\n },\n {\n \"date\": \"2010-09-07\",\n \"close\": 257.81\n },\n {\n \"date\": \"2010-09-08\",\n \"close\": 262.92\n },\n {\n \"date\": \"2010-09-09\",\n \"close\": 263.07\n },\n {\n \"date\": \"2010-09-09\",\n \"close\": 263.41\n },\n {\n \"date\": \"2010-09-12\",\n \"close\": 267.04\n },\n {\n \"date\": \"2010-09-13\",\n \"close\": 268.06\n },\n {\n \"date\": \"2010-09-14\",\n \"close\": 270.22\n },\n {\n \"date\": \"2010-09-15\",\n \"close\": 276.57\n },\n {\n \"date\": \"2010-09-16\",\n \"close\": 275.37\n },\n {\n \"date\": \"2010-09-19\",\n \"close\": 283.23\n },\n {\n \"date\": \"2010-09-20\",\n \"close\": 283.77\n },\n {\n \"date\": \"2010-09-21\",\n \"close\": 287.75\n },\n {\n \"date\": \"2010-09-22\",\n \"close\": 288.92\n },\n {\n \"date\": \"2010-09-23\",\n \"close\": 292.32\n },\n {\n \"date\": \"2010-09-26\",\n \"close\": 291.16\n },\n {\n \"date\": \"2010-09-27\",\n \"close\": 286.86\n },\n {\n \"date\": \"2010-09-28\",\n \"close\": 287.37\n },\n {\n \"date\": \"2010-09-29\",\n \"close\": 283.75\n },\n {\n \"date\": \"2010-10-01\",\n \"close\": 282.52\n },\n {\n \"date\": \"2010-10-04\",\n \"close\": 278.64\n },\n {\n \"date\": \"2010-10-05\",\n \"close\": 288.94\n },\n {\n \"date\": \"2010-10-06\",\n \"close\": 289.19\n },\n {\n \"date\": \"2010-10-07\",\n \"close\": 289.22\n },\n {\n \"date\": \"2010-10-08\",\n \"close\": 294.07\n },\n {\n \"date\": \"2010-10-10\",\n \"close\": 295.36\n },\n {\n \"date\": \"2010-10-11\",\n \"close\": 298.54\n },\n {\n \"date\": \"2010-10-12\",\n \"close\": 300.14\n },\n {\n \"date\": \"2010-10-13\",\n \"close\": 302.31\n },\n {\n \"date\": \"2010-10-14\",\n \"close\": 314.74\n },\n {\n \"date\": \"2010-10-17\",\n \"close\": 318\n },\n {\n \"date\": \"2010-10-18\",\n \"close\": 309.49\n },\n {\n \"date\": \"2010-10-19\",\n \"close\": 310.53\n },\n {\n \"date\": \"2010-10-20\",\n \"close\": 309.52\n },\n {\n \"date\": \"2010-10-21\",\n \"close\": 307.47\n },\n {\n \"date\": \"2010-10-24\",\n \"close\": 308.84\n },\n {\n \"date\": \"2010-10-25\",\n \"close\": 308.05\n },\n {\n \"date\": \"2010-10-26\",\n \"close\": 307.83\n },\n {\n \"date\": \"2010-10-27\",\n \"close\": 305.24\n },\n {\n \"date\": \"2010-10-28\",\n \"close\": 300.98\n },\n {\n \"date\": \"2010-11-01\",\n \"close\": 304.18\n },\n {\n \"date\": \"2010-11-02\",\n \"close\": 309.36\n },\n {\n \"date\": \"2010-11-03\",\n \"close\": 312.8\n },\n {\n \"date\": \"2010-11-04\",\n \"close\": 318.27\n },\n {\n \"date\": \"2010-11-05\",\n \"close\": 317.13\n },\n {\n \"date\": \"2010-11-08\",\n \"close\": 318.62\n },\n {\n \"date\": \"2010-11-09\",\n \"close\": 316.08\n },\n {\n \"date\": \"2010-11-09\",\n \"close\": 318.03\n },\n {\n \"date\": \"2010-11-10\",\n \"close\": 316.66\n },\n {\n \"date\": \"2010-11-11\",\n \"close\": 308.03\n },\n {\n \"date\": \"2010-11-14\",\n \"close\": 307.04\n },\n {\n \"date\": \"2010-11-15\",\n \"close\": 301.59\n },\n {\n \"date\": \"2010-11-16\",\n \"close\": 300.5\n },\n {\n \"date\": \"2010-11-17\",\n \"close\": 308.43\n },\n {\n \"date\": \"2010-11-18\",\n \"close\": 306.73\n },\n {\n \"date\": \"2010-11-21\",\n \"close\": 313.36\n },\n {\n \"date\": \"2010-11-22\",\n \"close\": 308.73\n },\n {\n \"date\": \"2010-11-23\",\n \"close\": 314.8\n },\n {\n \"date\": \"2010-11-25\",\n \"close\": 315\n },\n {\n \"date\": \"2010-11-28\",\n \"close\": 316.87\n },\n {\n \"date\": \"2010-11-29\",\n \"close\": 311.15\n },\n {\n \"date\": \"2010-12-01\",\n \"close\": 316.4\n },\n {\n \"date\": \"2010-12-02\",\n \"close\": 318.15\n },\n {\n \"date\": \"2010-12-03\",\n \"close\": 317.44\n },\n {\n \"date\": \"2010-12-06\",\n \"close\": 320.15\n },\n {\n \"date\": \"2010-12-07\",\n \"close\": 318.21\n },\n {\n \"date\": \"2010-12-08\",\n \"close\": 321.01\n },\n {\n \"date\": \"2010-12-09\",\n \"close\": 319.76\n },\n {\n \"date\": \"2010-12-09\",\n \"close\": 320.56\n },\n {\n \"date\": \"2010-12-12\",\n \"close\": 321.67\n },\n {\n \"date\": \"2010-12-13\",\n \"close\": 320.29\n },\n {\n \"date\": \"2010-12-14\",\n \"close\": 320.36\n },\n {\n \"date\": \"2010-12-15\",\n \"close\": 321.25\n },\n {\n \"date\": \"2010-12-16\",\n \"close\": 320.61\n },\n {\n \"date\": \"2010-12-19\",\n \"close\": 322.21\n },\n {\n \"date\": \"2010-12-20\",\n \"close\": 324.2\n },\n {\n \"date\": \"2010-12-21\",\n \"close\": 325.16\n },\n {\n \"date\": \"2010-12-22\",\n \"close\": 323.6\n },\n {\n \"date\": \"2010-12-26\",\n \"close\": 324.68\n },\n {\n \"date\": \"2010-12-27\",\n \"close\": 325.47\n },\n {\n \"date\": \"2010-12-28\",\n \"close\": 325.29\n },\n {\n \"date\": \"2010-12-29\",\n \"close\": 323.66\n },\n {\n \"date\": \"2010-12-30\",\n \"close\": 322.56\n },\n {\n \"date\": \"2011-01-03\",\n \"close\": 329.57\n },\n {\n \"date\": \"2011-01-04\",\n \"close\": 331.29\n },\n {\n \"date\": \"2011-01-05\",\n \"close\": 334\n },\n {\n \"date\": \"2011-01-06\",\n \"close\": 333.73\n },\n {\n \"date\": \"2011-01-07\",\n \"close\": 336.12\n },\n {\n \"date\": \"2011-01-09\",\n \"close\": 342.46\n },\n {\n \"date\": \"2011-01-10\",\n \"close\": 341.64\n },\n {\n \"date\": \"2011-01-11\",\n \"close\": 344.42\n },\n {\n \"date\": \"2011-01-12\",\n \"close\": 345.68\n },\n {\n \"date\": \"2011-01-13\",\n \"close\": 348.48\n },\n {\n \"date\": \"2011-01-17\",\n \"close\": 340.65\n },\n {\n \"date\": \"2011-01-18\",\n \"close\": 338.84\n },\n {\n \"date\": \"2011-01-19\",\n \"close\": 332.68\n },\n {\n \"date\": \"2011-01-20\",\n \"close\": 326.72\n },\n {\n \"date\": \"2011-01-23\",\n \"close\": 337.45\n },\n {\n \"date\": \"2011-01-24\",\n \"close\": 341.4\n },\n {\n \"date\": \"2011-01-25\",\n \"close\": 343.85\n },\n {\n \"date\": \"2011-01-26\",\n \"close\": 343.21\n },\n {\n \"date\": \"2011-01-27\",\n \"close\": 336.1\n },\n {\n \"date\": \"2011-01-30\",\n \"close\": 339.32\n },\n {\n \"date\": \"2011-02-01\",\n \"close\": 345.03\n },\n {\n \"date\": \"2011-02-02\",\n \"close\": 344.32\n },\n {\n \"date\": \"2011-02-03\",\n \"close\": 343.44\n },\n {\n \"date\": \"2011-02-04\",\n \"close\": 346.5\n },\n {\n \"date\": \"2011-02-07\",\n \"close\": 351.88\n },\n {\n \"date\": \"2011-02-08\",\n \"close\": 355.2\n },\n {\n \"date\": \"2011-02-09\",\n \"close\": 358.16\n },\n {\n \"date\": \"2011-02-09\",\n \"close\": 354.54\n },\n {\n \"date\": \"2011-02-10\",\n \"close\": 356.85\n },\n {\n \"date\": \"2011-02-13\",\n \"close\": 359.18\n },\n {\n \"date\": \"2011-02-14\",\n \"close\": 359.9\n },\n {\n \"date\": \"2011-02-15\",\n \"close\": 363.13\n },\n {\n \"date\": \"2011-02-16\",\n \"close\": 358.3\n },\n {\n \"date\": \"2011-02-17\",\n \"close\": 350.56\n },\n {\n \"date\": \"2011-02-21\",\n \"close\": 338.61\n },\n {\n \"date\": \"2011-02-22\",\n \"close\": 342.62\n },\n {\n \"date\": \"2011-02-23\",\n \"close\": 342.88\n },\n {\n \"date\": \"2011-02-24\",\n \"close\": 348.16\n },\n {\n \"date\": \"2011-02-27\",\n \"close\": 353.21\n },\n {\n \"date\": \"2011-03-01\",\n \"close\": 349.31\n },\n {\n \"date\": \"2011-03-02\",\n \"close\": 352.12\n },\n {\n \"date\": \"2011-03-03\",\n \"close\": 359.56\n },\n {\n \"date\": \"2011-03-04\",\n \"close\": 360\n },\n {\n \"date\": \"2011-03-07\",\n \"close\": 355.36\n },\n {\n \"date\": \"2011-03-08\",\n \"close\": 355.76\n },\n {\n \"date\": \"2011-03-09\",\n \"close\": 352.47\n },\n {\n \"date\": \"2011-03-09\",\n \"close\": 346.67\n },\n {\n \"date\": \"2011-03-10\",\n \"close\": 351.99\n },\n {\n \"date\": \"2011-03-13\",\n \"close\": 353.56\n },\n {\n \"date\": \"2011-03-14\",\n \"close\": 345.43\n },\n {\n \"date\": \"2011-03-15\",\n \"close\": 330.01\n },\n {\n \"date\": \"2011-03-16\",\n \"close\": 334.64\n },\n {\n \"date\": \"2011-03-17\",\n \"close\": 330.67\n },\n {\n \"date\": \"2011-03-20\",\n \"close\": 339.3\n },\n {\n \"date\": \"2011-03-21\",\n \"close\": 341.2\n },\n {\n \"date\": \"2011-03-22\",\n \"close\": 339.19\n },\n {\n \"date\": \"2011-03-23\",\n \"close\": 344.97\n },\n {\n \"date\": \"2011-03-24\",\n \"close\": 351.54\n },\n {\n \"date\": \"2011-03-27\",\n \"close\": 350.44\n },\n {\n \"date\": \"2011-03-28\",\n \"close\": 350.96\n },\n {\n \"date\": \"2011-03-29\",\n \"close\": 348.63\n },\n {\n \"date\": \"2011-03-30\",\n \"close\": 348.51\n },\n {\n \"date\": \"2011-04-01\",\n \"close\": 344.56\n },\n {\n \"date\": \"2011-04-04\",\n \"close\": 341.19\n },\n {\n \"date\": \"2011-04-05\",\n \"close\": 338.89\n },\n {\n \"date\": \"2011-04-06\",\n \"close\": 338.04\n },\n {\n \"date\": \"2011-04-07\",\n \"close\": 338.08\n },\n {\n \"date\": \"2011-04-08\",\n \"close\": 335.06\n },\n {\n \"date\": \"2011-04-10\",\n \"close\": 330.8\n },\n {\n \"date\": \"2011-04-11\",\n \"close\": 332.4\n },\n {\n \"date\": \"2011-04-12\",\n \"close\": 336.13\n },\n {\n \"date\": \"2011-04-13\",\n \"close\": 332.42\n },\n {\n \"date\": \"2011-04-14\",\n \"close\": 327.46\n },\n {\n \"date\": \"2011-04-17\",\n \"close\": 331.85\n },\n {\n \"date\": \"2011-04-18\",\n \"close\": 337.86\n },\n {\n \"date\": \"2011-04-19\",\n \"close\": 342.41\n },\n {\n \"date\": \"2011-04-20\",\n \"close\": 350.7\n },\n {\n \"date\": \"2011-04-24\",\n \"close\": 353.01\n },\n {\n \"date\": \"2011-04-25\",\n \"close\": 350.42\n },\n {\n \"date\": \"2011-04-26\",\n \"close\": 350.15\n },\n {\n \"date\": \"2011-04-27\",\n \"close\": 346.75\n },\n {\n \"date\": \"2011-04-28\",\n \"close\": 350.13\n },\n {\n \"date\": \"2011-05-02\",\n \"close\": 346.28\n },\n {\n \"date\": \"2011-05-03\",\n \"close\": 348.2\n },\n {\n \"date\": \"2011-05-04\",\n \"close\": 349.57\n },\n {\n \"date\": \"2011-05-05\",\n \"close\": 346.75\n },\n {\n \"date\": \"2011-05-06\",\n \"close\": 346.66\n },\n {\n \"date\": \"2011-05-09\",\n \"close\": 347.6\n },\n {\n \"date\": \"2011-05-09\",\n \"close\": 349.45\n },\n {\n \"date\": \"2011-05-10\",\n \"close\": 347.23\n },\n {\n \"date\": \"2011-05-11\",\n \"close\": 346.57\n },\n {\n \"date\": \"2011-05-12\",\n \"close\": 340.5\n },\n {\n \"date\": \"2011-05-15\",\n \"close\": 333.3\n },\n {\n \"date\": \"2011-05-16\",\n \"close\": 336.14\n },\n {\n \"date\": \"2011-05-17\",\n \"close\": 339.87\n },\n {\n \"date\": \"2011-05-18\",\n \"close\": 340.53\n },\n {\n \"date\": \"2011-05-19\",\n \"close\": 335.22\n },\n {\n \"date\": \"2011-05-22\",\n \"close\": 334.4\n },\n {\n \"date\": \"2011-05-23\",\n \"close\": 332.19\n },\n {\n \"date\": \"2011-05-24\",\n \"close\": 336.78\n },\n {\n \"date\": \"2011-05-25\",\n \"close\": 335\n },\n {\n \"date\": \"2011-05-26\",\n \"close\": 337.41\n },\n {\n \"date\": \"2011-05-30\",\n \"close\": 347.83\n },\n {\n \"date\": \"2011-06-01\",\n \"close\": 345.51\n },\n {\n \"date\": \"2011-06-02\",\n \"close\": 346.1\n },\n {\n \"date\": \"2011-06-03\",\n \"close\": 343.44\n },\n {\n \"date\": \"2011-06-06\",\n \"close\": 338.04\n },\n {\n \"date\": \"2011-06-07\",\n \"close\": 332.04\n },\n {\n \"date\": \"2011-06-08\",\n \"close\": 332.24\n },\n {\n \"date\": \"2011-06-09\",\n \"close\": 331.49\n },\n {\n \"date\": \"2011-06-09\",\n \"close\": 325.9\n },\n {\n \"date\": \"2011-06-12\",\n \"close\": 326.6\n },\n {\n \"date\": \"2011-06-13\",\n \"close\": 332.44\n },\n {\n \"date\": \"2011-06-14\",\n \"close\": 326.75\n },\n {\n \"date\": \"2011-06-15\",\n \"close\": 325.16\n },\n {\n \"date\": \"2011-06-16\",\n \"close\": 320.26\n },\n {\n \"date\": \"2011-06-19\",\n \"close\": 315.32\n },\n {\n \"date\": \"2011-06-20\",\n \"close\": 325.3\n },\n {\n \"date\": \"2011-06-21\",\n \"close\": 322.61\n },\n {\n \"date\": \"2011-06-22\",\n \"close\": 331.23\n },\n {\n \"date\": \"2011-06-23\",\n \"close\": 326.35\n },\n {\n \"date\": \"2011-06-26\",\n \"close\": 332.04\n },\n {\n \"date\": \"2011-06-27\",\n \"close\": 335.26\n },\n {\n \"date\": \"2011-06-28\",\n \"close\": 334.04\n },\n {\n \"date\": \"2011-06-29\",\n \"close\": 335.67\n },\n {\n \"date\": \"2011-07-01\",\n \"close\": 343.26\n },\n {\n \"date\": \"2011-07-05\",\n \"close\": 349.43\n },\n {\n \"date\": \"2011-07-06\",\n \"close\": 351.76\n },\n {\n \"date\": \"2011-07-07\",\n \"close\": 357.2\n },\n {\n \"date\": \"2011-07-08\",\n \"close\": 359.71\n },\n {\n \"date\": \"2011-07-10\",\n \"close\": 354\n },\n {\n \"date\": \"2011-07-11\",\n \"close\": 353.75\n },\n {\n \"date\": \"2011-07-12\",\n \"close\": 358.02\n },\n {\n \"date\": \"2011-07-13\",\n \"close\": 357.77\n },\n {\n \"date\": \"2011-07-14\",\n \"close\": 364.92\n },\n {\n \"date\": \"2011-07-17\",\n \"close\": 373.8\n },\n {\n \"date\": \"2011-07-18\",\n \"close\": 376.85\n },\n {\n \"date\": \"2011-07-19\",\n \"close\": 386.9\n },\n {\n \"date\": \"2011-07-20\",\n \"close\": 387.29\n },\n {\n \"date\": \"2011-07-21\",\n \"close\": 393.3\n },\n {\n \"date\": \"2011-07-24\",\n \"close\": 398.5\n },\n {\n \"date\": \"2011-07-25\",\n \"close\": 403.41\n },\n {\n \"date\": \"2011-07-26\",\n \"close\": 392.59\n },\n {\n \"date\": \"2011-07-27\",\n \"close\": 391.82\n },\n {\n \"date\": \"2011-07-28\",\n \"close\": 390.48\n },\n {\n \"date\": \"2011-08-01\",\n \"close\": 396.75\n },\n {\n \"date\": \"2011-08-02\",\n \"close\": 388.91\n },\n {\n \"date\": \"2011-08-03\",\n \"close\": 392.57\n },\n {\n \"date\": \"2011-08-04\",\n \"close\": 377.37\n },\n {\n \"date\": \"2011-08-05\",\n \"close\": 373.62\n },\n {\n \"date\": \"2011-08-08\",\n \"close\": 353.21\n },\n {\n \"date\": \"2011-08-09\",\n \"close\": 374.01\n },\n {\n \"date\": \"2011-08-09\",\n \"close\": 363.69\n },\n {\n \"date\": \"2011-08-10\",\n \"close\": 373.7\n },\n {\n \"date\": \"2011-08-11\",\n \"close\": 376.99\n },\n {\n \"date\": \"2011-08-14\",\n \"close\": 383.41\n },\n {\n \"date\": \"2011-08-15\",\n \"close\": 380.48\n },\n {\n \"date\": \"2011-08-16\",\n \"close\": 380.44\n },\n {\n \"date\": \"2011-08-17\",\n \"close\": 366.05\n },\n {\n \"date\": \"2011-08-18\",\n \"close\": 356.03\n },\n {\n \"date\": \"2011-08-21\",\n \"close\": 356.44\n },\n {\n \"date\": \"2011-08-22\",\n \"close\": 373.6\n },\n {\n \"date\": \"2011-08-23\",\n \"close\": 376.18\n },\n {\n \"date\": \"2011-08-24\",\n \"close\": 373.72\n },\n {\n \"date\": \"2011-08-25\",\n \"close\": 383.58\n },\n {\n \"date\": \"2011-08-28\",\n \"close\": 389.97\n },\n {\n \"date\": \"2011-08-29\",\n \"close\": 389.99\n },\n {\n \"date\": \"2011-08-30\",\n \"close\": 384.83\n },\n {\n \"date\": \"2011-09-01\",\n \"close\": 381.03\n },\n {\n \"date\": \"2011-09-02\",\n \"close\": 374.05\n },\n {\n \"date\": \"2011-09-06\",\n \"close\": 379.74\n },\n {\n \"date\": \"2011-09-07\",\n \"close\": 383.93\n },\n {\n \"date\": \"2011-09-08\",\n \"close\": 384.14\n },\n {\n \"date\": \"2011-09-09\",\n \"close\": 377.48\n },\n {\n \"date\": \"2011-09-11\",\n \"close\": 379.94\n },\n {\n \"date\": \"2011-09-12\",\n \"close\": 384.62\n },\n {\n \"date\": \"2011-09-13\",\n \"close\": 389.3\n },\n {\n \"date\": \"2011-09-14\",\n \"close\": 392.96\n },\n {\n \"date\": \"2011-09-15\",\n \"close\": 400.5\n },\n {\n \"date\": \"2011-09-18\",\n \"close\": 411.63\n },\n {\n \"date\": \"2011-09-19\",\n \"close\": 413.45\n },\n {\n \"date\": \"2011-09-20\",\n \"close\": 412.14\n },\n {\n \"date\": \"2011-09-21\",\n \"close\": 401.82\n },\n {\n \"date\": \"2011-09-22\",\n \"close\": 404.3\n },\n {\n \"date\": \"2011-09-25\",\n \"close\": 403.17\n },\n {\n \"date\": \"2011-09-26\",\n \"close\": 399.26\n },\n {\n \"date\": \"2011-09-27\",\n \"close\": 397.01\n },\n {\n \"date\": \"2011-09-28\",\n \"close\": 390.57\n },\n {\n \"date\": \"2011-09-29\",\n \"close\": 381.32\n },\n {\n \"date\": \"2011-10-03\",\n \"close\": 374.6\n },\n {\n \"date\": \"2011-10-04\",\n \"close\": 372.5\n },\n {\n \"date\": \"2011-10-05\",\n \"close\": 378.25\n },\n {\n \"date\": \"2011-10-06\",\n \"close\": 377.37\n },\n {\n \"date\": \"2011-10-07\",\n \"close\": 369.8\n },\n {\n \"date\": \"2011-10-09\",\n \"close\": 388.81\n },\n {\n \"date\": \"2011-10-10\",\n \"close\": 400.29\n },\n {\n \"date\": \"2011-10-11\",\n \"close\": 402.19\n },\n {\n \"date\": \"2011-10-12\",\n \"close\": 408.43\n },\n {\n \"date\": \"2011-10-13\",\n \"close\": 422\n },\n {\n \"date\": \"2011-10-16\",\n \"close\": 419.99\n },\n {\n \"date\": \"2011-10-17\",\n \"close\": 422.24\n },\n {\n \"date\": \"2011-10-18\",\n \"close\": 398.62\n },\n {\n \"date\": \"2011-10-19\",\n \"close\": 395.31\n },\n {\n \"date\": \"2011-10-20\",\n \"close\": 392.87\n },\n {\n \"date\": \"2011-10-23\",\n \"close\": 405.77\n },\n {\n \"date\": \"2011-10-24\",\n \"close\": 397.77\n },\n {\n \"date\": \"2011-10-25\",\n \"close\": 400.6\n },\n {\n \"date\": \"2011-10-26\",\n \"close\": 404.69\n },\n {\n \"date\": \"2011-10-27\",\n \"close\": 404.95\n },\n {\n \"date\": \"2011-10-30\",\n \"close\": 404.78\n },\n {\n \"date\": \"2011-11-01\",\n \"close\": 396.51\n },\n {\n \"date\": \"2011-11-02\",\n \"close\": 397.41\n },\n {\n \"date\": \"2011-11-03\",\n \"close\": 403.07\n },\n {\n \"date\": \"2011-11-04\",\n \"close\": 400.24\n },\n {\n \"date\": \"2011-11-07\",\n \"close\": 399.73\n },\n {\n \"date\": \"2011-11-08\",\n \"close\": 406.23\n },\n {\n \"date\": \"2011-11-09\",\n \"close\": 395.28\n },\n {\n \"date\": \"2011-11-09\",\n \"close\": 385.22\n },\n {\n \"date\": \"2011-11-10\",\n \"close\": 384.62\n },\n {\n \"date\": \"2011-11-13\",\n \"close\": 379.26\n },\n {\n \"date\": \"2011-11-14\",\n \"close\": 388.83\n },\n {\n \"date\": \"2011-11-15\",\n \"close\": 384.77\n },\n {\n \"date\": \"2011-11-16\",\n \"close\": 377.41\n },\n {\n \"date\": \"2011-11-17\",\n \"close\": 374.94\n },\n {\n \"date\": \"2011-11-20\",\n \"close\": 369.01\n },\n {\n \"date\": \"2011-11-21\",\n \"close\": 376.51\n },\n {\n \"date\": \"2011-11-22\",\n \"close\": 366.99\n },\n {\n \"date\": \"2011-11-24\",\n \"close\": 363.57\n },\n {\n \"date\": \"2011-11-27\",\n \"close\": 376.12\n },\n {\n \"date\": \"2011-11-28\",\n \"close\": 373.2\n },\n {\n \"date\": \"2011-11-29\",\n \"close\": 382.2\n },\n {\n \"date\": \"2011-12-01\",\n \"close\": 387.93\n },\n {\n \"date\": \"2011-12-02\",\n \"close\": 389.7\n },\n {\n \"date\": \"2011-12-05\",\n \"close\": 393.01\n },\n {\n \"date\": \"2011-12-06\",\n \"close\": 390.95\n },\n {\n \"date\": \"2011-12-07\",\n \"close\": 389.09\n },\n {\n \"date\": \"2011-12-08\",\n \"close\": 390.66\n },\n {\n \"date\": \"2011-12-09\",\n \"close\": 393.62\n },\n {\n \"date\": \"2011-12-11\",\n \"close\": 391.84\n },\n {\n \"date\": \"2011-12-12\",\n \"close\": 388.81\n },\n {\n \"date\": \"2011-12-13\",\n \"close\": 380.19\n },\n {\n \"date\": \"2011-12-14\",\n \"close\": 378.94\n },\n {\n \"date\": \"2011-12-15\",\n \"close\": 381.02\n },\n {\n \"date\": \"2011-12-18\",\n \"close\": 382.21\n },\n {\n \"date\": \"2011-12-19\",\n \"close\": 395.95\n },\n {\n \"date\": \"2011-12-20\",\n \"close\": 396.44\n },\n {\n \"date\": \"2011-12-21\",\n \"close\": 398.55\n },\n {\n \"date\": \"2011-12-22\",\n \"close\": 403.43\n },\n {\n \"date\": \"2011-12-26\",\n \"close\": 406.53\n },\n {\n \"date\": \"2011-12-27\",\n \"close\": 402.64\n },\n {\n \"date\": \"2011-12-28\",\n \"close\": 405.12\n },\n {\n \"date\": \"2011-12-29\",\n \"close\": 405\n },\n {\n \"date\": \"2012-01-03\",\n \"close\": 411.23\n },\n {\n \"date\": \"2012-01-04\",\n \"close\": 413.44\n },\n {\n \"date\": \"2012-01-05\",\n \"close\": 418.03\n },\n {\n \"date\": \"2012-01-06\",\n \"close\": 422.4\n },\n {\n \"date\": \"2012-01-09\",\n \"close\": 421.73\n },\n {\n \"date\": \"2012-01-09\",\n \"close\": 423.24\n },\n {\n \"date\": \"2012-01-10\",\n \"close\": 422.55\n },\n {\n \"date\": \"2012-01-11\",\n \"close\": 421.39\n },\n {\n \"date\": \"2012-01-12\",\n \"close\": 419.81\n },\n {\n \"date\": \"2012-01-16\",\n \"close\": 424.7\n },\n {\n \"date\": \"2012-01-17\",\n \"close\": 429.11\n },\n {\n \"date\": \"2012-01-18\",\n \"close\": 427.75\n },\n {\n \"date\": \"2012-01-19\",\n \"close\": 420.3\n },\n {\n \"date\": \"2012-01-22\",\n \"close\": 427.41\n },\n {\n \"date\": \"2012-01-23\",\n \"close\": 420.41\n },\n {\n \"date\": \"2012-01-24\",\n \"close\": 446.66\n },\n {\n \"date\": \"2012-01-25\",\n \"close\": 444.63\n },\n {\n \"date\": \"2012-01-26\",\n \"close\": 447.28\n },\n {\n \"date\": \"2012-01-29\",\n \"close\": 453.01\n },\n {\n \"date\": \"2012-01-30\",\n \"close\": 456.48\n },\n {\n \"date\": \"2012-02-01\",\n \"close\": 456.19\n },\n {\n \"date\": \"2012-02-02\",\n \"close\": 455.12\n },\n {\n \"date\": \"2012-02-03\",\n \"close\": 459.68\n },\n {\n \"date\": \"2012-02-06\",\n \"close\": 463.97\n },\n {\n \"date\": \"2012-02-07\",\n \"close\": 468.83\n },\n {\n \"date\": \"2012-02-08\",\n \"close\": 476.68\n },\n {\n \"date\": \"2012-02-09\",\n \"close\": 493.17\n },\n {\n \"date\": \"2012-02-09\",\n \"close\": 493.42\n },\n {\n \"date\": \"2012-02-12\",\n \"close\": 502.6\n },\n {\n \"date\": \"2012-02-13\",\n \"close\": 509.46\n },\n {\n \"date\": \"2012-02-14\",\n \"close\": 497.67\n },\n {\n \"date\": \"2012-02-15\",\n \"close\": 502.21\n },\n {\n \"date\": \"2012-02-16\",\n \"close\": 502.12\n },\n {\n \"date\": \"2012-02-20\",\n \"close\": 514.85\n },\n {\n \"date\": \"2012-02-21\",\n \"close\": 513.04\n },\n {\n \"date\": \"2012-02-22\",\n \"close\": 516.39\n },\n {\n \"date\": \"2012-02-23\",\n \"close\": 522.41\n },\n {\n \"date\": \"2012-02-26\",\n \"close\": 525.76\n },\n {\n \"date\": \"2012-02-27\",\n \"close\": 535.41\n },\n {\n \"date\": \"2012-02-28\",\n \"close\": 542.44\n },\n {\n \"date\": \"2012-03-01\",\n \"close\": 544.47\n },\n {\n \"date\": \"2012-03-02\",\n \"close\": 545.18\n },\n {\n \"date\": \"2012-03-05\",\n \"close\": 533.16\n },\n {\n \"date\": \"2012-03-06\",\n \"close\": 530.26\n },\n {\n \"date\": \"2012-03-07\",\n \"close\": 530.69\n },\n {\n \"date\": \"2012-03-08\",\n \"close\": 541.99\n },\n {\n \"date\": \"2012-03-09\",\n \"close\": 545.17\n },\n {\n \"date\": \"2012-03-11\",\n \"close\": 552\n },\n {\n \"date\": \"2012-03-12\",\n \"close\": 568.1\n },\n {\n \"date\": \"2012-03-13\",\n \"close\": 589.58\n },\n {\n \"date\": \"2012-03-14\",\n \"close\": 585.56\n },\n {\n \"date\": \"2012-03-15\",\n \"close\": 585.57\n },\n {\n \"date\": \"2012-03-18\",\n \"close\": 601.1\n },\n {\n \"date\": \"2012-03-19\",\n \"close\": 605.96\n },\n {\n \"date\": \"2012-03-20\",\n \"close\": 602.5\n },\n {\n \"date\": \"2012-03-21\",\n \"close\": 599.34\n },\n {\n \"date\": \"2012-03-22\",\n \"close\": 596.05\n },\n {\n \"date\": \"2012-03-25\",\n \"close\": 606.98\n },\n {\n \"date\": \"2012-03-26\",\n \"close\": 614.48\n },\n {\n \"date\": \"2012-03-27\",\n \"close\": 617.62\n },\n {\n \"date\": \"2012-03-28\",\n \"close\": 609.86\n },\n {\n \"date\": \"2012-03-29\",\n \"close\": 599.55\n },\n {\n \"date\": \"2012-04-02\",\n \"close\": 618.63\n },\n {\n \"date\": \"2012-04-03\",\n \"close\": 629.32\n },\n {\n \"date\": \"2012-04-04\",\n \"close\": 624.31\n },\n {\n \"date\": \"2012-04-05\",\n \"close\": 633.68\n },\n {\n \"date\": \"2012-04-09\",\n \"close\": 636.23\n },\n {\n \"date\": \"2012-04-09\",\n \"close\": 628.44\n },\n {\n \"date\": \"2012-04-10\",\n \"close\": 626.2\n },\n {\n \"date\": \"2012-04-11\",\n \"close\": 622.77\n },\n {\n \"date\": \"2012-04-12\",\n \"close\": 605.23\n },\n {\n \"date\": \"2012-04-15\",\n \"close\": 580.13\n },\n {\n \"date\": \"2012-04-16\",\n \"close\": 609.7\n },\n {\n \"date\": \"2012-04-17\",\n \"close\": 608.34\n },\n {\n \"date\": \"2012-04-18\",\n \"close\": 587.44\n },\n {\n \"date\": \"2012-04-19\",\n \"close\": 572.98\n },\n {\n \"date\": \"2012-04-22\",\n \"close\": 571.7\n },\n {\n \"date\": \"2012-04-23\",\n \"close\": 560.28\n },\n {\n \"date\": \"2012-04-24\",\n \"close\": 610\n },\n {\n \"date\": \"2012-04-25\",\n \"close\": 607.7\n },\n {\n \"date\": \"2012-04-26\",\n \"close\": 603\n },\n {\n \"date\": \"2012-04-29\",\n \"close\": 583.98\n },\n {\n \"date\": \"2012-05-01\",\n \"close\": 582.13\n }\n ],\n },\n encode: {\n x: 'date',\n y: 'close',\n },\n },\n ],\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { date: '2007-04-23', close: 93.24 },\n { date: '2007-04-24', close: 95.35 },\n { date: '2007-04-25', close: 98.84 },\n { date: '2007-04-26', close: 99.92 },\n { date: '2007-04-29', close: 99.8 },\n { date: '2007-05-01', close: 99.47 },\n { date: '2007-05-02', close: 100.39 },\n { date: '2007-05-03', close: 100.4 },\n { date: '2007-05-04', close: 100.81 },\n { date: '2007-05-07', close: 103.92 },\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 400,\n});\n\nchart.options({\n type: 'view',\n children: [\n {\n type: 'line',\n data: {\n type: 'inline',\n value: data,\n transform: [\n {\n type: 'ema',\n field: 'close',\n alpha: 0.6,\n as: 'emaClose',\n },\n ],\n },\n encode: {\n x: 'date',\n y: 'emaClose',\n color: () => 'EMA',\n },\n style: {\n lineWidth: 3,\n stroke: '#1890ff',\n },\n },\n {\n type: 'line',\n data: {\n type: 'inline',\n value: data,\n },\n encode: {\n x: 'date',\n y: 'close',\n color: () => '收盘价',\n },\n style: {\n lineWidth: 1.5,\n lineDash: [4, 2],\n stroke: '#999',\n },\n },\n ],\n scale: {\n x: {\n type: 'time',\n tickCount: 5,\n },\n y: {\n nice: true,\n },\n },\n axis: {\n x: {\n title: '日期',\n },\n y: {\n title: '价格',\n },\n },\n legend: {\n color: {\n position: 'top',\n },\n },\n});\n\nchart.render();", + "duration": 12523, + "retrievedSkillIds": [ + "g2-mark-line-multi", + "g2-mark-line-basic", + "g2-mark-k-chart", + "g2-mark-link", + "g2-data-ema" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1586, + "expectedLength": 151054, + "similarity": 0.5409740124798508, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { date: '2007-04-23', close: 93.24 },\n { date: '2007-04-24', close: 95.35 },\n { date: '2007-04-25', close: 98.84 },\n { date: '2007-04-26', close: 99.92 },\n { date: '2007-04-29', close: 99.8 },\n { date: '2007-05-01', close: 99.47 },\n { date: '2007-05-02', close: 100.39 },\n { date: '2007-05-03', close: 100.4 },\n { date: '2007-05-04', close: 100.81 },\n { date: '2007-05-07', close: 103.92 },\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 400,\n});\n\nchart.options({\n type: 'view',\n children: [\n {\n type: 'line',\n data: {\n type: 'inline',\n value: data,\n transform: [\n {\n type: 'ema',\n field: 'close',\n alpha: 0.6,\n as: 'emaClose',\n },\n ],\n },\n encode: {\n x: 'date',\n y: 'emaClose',\n color: () => 'EMA',\n },\n style: {\n lineWidth: 3,\n stroke: '#1890ff',\n },\n },\n {\n type: 'line',\n data: {\n type: 'inline',\n value: data,\n },\n encode: {\n x: 'date',\n y: 'close',\n color: () => '收盘价',\n },\n style: {\n lineWidth: 1.5,\n lineDash: [4, 2],\n stroke: '#999',\n },\n },\n ],\n scale: {\n x: {\n type: 'time',\n tickCount: 5,\n },\n y: {\n nice: true,\n },\n },\n axis: {\n x: {\n title: '日期',\n },\n y: {\n title: '价格',\n },\n },\n legend: {\n color: {\n position: 'top',\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "date", + "close", + "date", + "close", + "date", + "close", + "date", + "close", + "date", + "close", + "date", + "close", + "date", + "close", + "date", + "close", + "date", + "close", + "date", + "close", + "container", + "width", + "height", + "type", + "children", + "type", + "data", + "type", + "value", + "transform", + "type", + "field", + "alpha", + "as", + "encode", + "x", + "y", + "color", + "style", + "lineWidth", + "stroke", + "type", + "data", + "type", + "value", + "encode", + "x", + "y", + "color", + "style", + "lineWidth", + "lineDash", + "stroke", + "scale", + "x", + "type", + "tickCount", + "y", + "nice", + "axis", + "x", + "title", + "y", + "title", + "legend", + "color", + "position" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "view.children", + "type.view", + "type.line" + ] + } + } + }, + { + "id": "case-68", + "query": "根据描述绘制图表,使用打包图展示生物分类的层级结构,通过不同颜色区分门级分类,圆形面积表示物种数量,具备交互提示信息。参考数据:[{\"name\":\"生物分类\",\"children\":[{\"name\":\"脊索动物门\",\"value\":67000,\"children\":[{\"name\":\"哺乳纲\",\"value\":5500,\"children\":[{\"name\":\"灵长目\",\"value\":500}]},{\"name\":\"鸟纲\",\"value\":10000}]},{\"name\":\"节肢动物门\",\"value\":1250000,\"children\":[{\"name\":\"昆虫纲\",\"value\":1000000},{\"name\":\"蛛形纲\",\"value\":100000}]},{\"name\":\"软体动物门\",\"value\":85000}]}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({ container: 'container', autoFit: true });\nchart.options({\n type: 'pack',\n data: {\n value: {\n name: '生物分类',\n children: [\n { name: '脊索动物门', value: 67000, children: [\n { name: '哺乳纲', value: 5500, children: [{ name: '灵长目', value: 500 }] },\n { name: '鸟纲', value: 10000 }\n ]},\n { name: '节肢动物门', value: 1250000, children: [\n { name: '昆虫纲', value: 1000000 },\n { name: '蛛形纲', value: 100000 }\n ]},\n { name: '软体动物门', value: 85000 }\n ]\n }\n },\n encode: { value: 'value', color: d => d.depth === 1 ? d.data.name : '#ddd' },\n scale: { color: { range: ['#ffd6a5', '#fdffb6', '#9bf6ff', '#bdb2ff'] } },\n layout: { padding: 4, sort: () => Math.random() - 0.5 },\n style: {\n labelText: d => d.depth >= 1 && d.r > 18 ? d.data.name : '',\n labelFontSize: 12,\n labelFill: '#000',\n stroke: '#333',\n lineWidth: 0.3\n },\n legend: false,\n tooltip: { title: d => d.data.name, items: [{ field: 'value', name: '物种数', formatter: '.3s' }] },\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst rawData = [\n {\n name: '生物分类',\n children: [\n {\n name: '脊索动物门',\n value: 67000,\n children: [\n {\n name: '哺乳纲',\n value: 5500,\n children: [{ name: '灵长目', value: 500 }],\n },\n { name: '鸟纲', value: 10000 },\n ],\n },\n {\n name: '节肢动物门',\n value: 1250000,\n children: [\n { name: '昆虫纲', value: 1000000 },\n { name: '蛛形纲', value: 100000 },\n ],\n },\n { name: '软体动物门', value: 85000 },\n ],\n },\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 640,\n});\n\nchart.options({\n type: 'pack',\n data: { value: rawData[0] },\n encode: {\n value: 'value',\n color: (d) => d.path?.[1] || d.data?.name,\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16'],\n },\n },\n style: {\n fillOpacity: 0.85,\n stroke: '#fff',\n lineWidth: 2,\n },\n labels: [\n {\n text: (d) => {\n if (d.height > 0) return '';\n return `${d.data?.name}\\n${d.value?.toLocaleString()}`;\n },\n position: 'inside',\n fontSize: 11,\n fill: '#fff',\n transform: [{ type: 'contrastReverse' }],\n },\n ],\n tooltip: {\n title: (d) => d.data?.name,\n items: [\n { field: 'value', name: '物种数量', valueFormatter: (v) => v?.toLocaleString() },\n { field: (d) => d.path?.slice(1).join(' > '), name: '分类层级' },\n ],\n },\n legend: {\n color: {\n title: '门级分类',\n position: 'right',\n rowPadding: 5,\n },\n },\n});\n\nchart.render();", + "duration": 16663, + "retrievedSkillIds": [ + "g2-mark-pack", + "g2-mark-interval-basic", + "g2-concept-chart-selection", + "g2-mark-area-stacked", + "g2-comp-facet-rect" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1602, + "expectedLength": 1070, + "similarity": 0.5666251668762429, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst rawData = [\n {\n name: '生物分类',\n children: [\n {\n name: '脊索动物门',\n value: 67000,\n children: [\n {\n name: '哺乳纲',\n value: 5500,\n children: [{ name: '灵长目', value: 500 }],\n },\n { name: '鸟纲', value: 10000 },\n ],\n },\n {\n name: '节肢动物门',\n value: 1250000,\n children: [\n { name: '昆虫纲', value: 1000000 },\n { name: '蛛形纲', value: 100000 },\n ],\n },\n { name: '软体动物门', value: 85000 },\n ],\n },\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 640,\n});\n\nchart.options({\n type: 'pack',\n data: { value: rawData[0] },\n encode: {\n value: 'value',\n color: (d) => d.path?.[1] || d.data?.name,\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16'],\n },\n },\n style: {\n fillOpacity: 0.85,\n stroke: '#fff',\n lineWidth: 2,\n },\n labels: [\n {\n text: (d) => {\n if (d.height > 0) return '';\n return `${d.data?.name}\\n${d.value?.toLocaleString()}`;\n },\n position: 'inside',\n fontSize: 11,\n fill: '#fff',\n transform: [{ type: 'contrastReverse' }],\n },\n ],\n tooltip: {\n title: (d) => d.data?.name,\n items: [\n { field: 'value', name: '物种数量', valueFormatter: (v) => v?.toLocaleString() },\n { field: (d) => d.path?.slice(1).join(' > '), name: '分类层级' },\n ],\n },\n legend: {\n color: {\n title: '门级分类',\n position: 'right',\n rowPadding: 5,\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toLocaleString", + "toLocaleString", + "slice", + "join", + "render" + ], + "objectKeys": [ + "name", + "children", + "name", + "value", + "children", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "container", + "width", + "height", + "type", + "data", + "value", + "encode", + "value", + "color", + "scale", + "color", + "range", + "style", + "fillOpacity", + "stroke", + "lineWidth", + "labels", + "text", + "position", + "fontSize", + "fill", + "transform", + "type", + "tooltip", + "title", + "items", + "field", + "name", + "valueFormatter", + "field", + "name", + "legend", + "color", + "title", + "position", + "rowPadding" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "view.children", + "x6.labels" + ] + } + } + }, + { + "id": "case-69", + "query": "根据描述绘制图表,使用 G2 绘制一个包含三条数据线的图表,分别表示每月的蒸发量、降水量和温度变化。其中温度使用平滑折线表示,蒸发量用柱状图表示,降水量用虚线表示,且各自拥有独立的 Y 轴配置。参考数据:[{\"Month\":\"Jan\",\"Evaporation\":2,\"Precipitation\":2.6,\"Temperature\":2},{\"Month\":\"Feb\",\"Evaporation\":4.9,\"Precipitation\":5.9,\"Temperature\":2.2},{\"Month\":\"Mar\",\"Evaporation\":7,\"Precipitation\":9,\"Temperature\":3.3},{\"Month\":\"Apr\",\"Evaporation\":23.2,\"Precipitation\":26.4,\"Temperature\":4.5},{\"Month\":\"May\",\"Evaporation\":25.6,\"Precipitation\":28.7,\"Temperature\":6.3},{\"Month\":\"Jun\",\"Evaporation\":76.7,\"Precipitation\":70.7,\"Temperature\":10.2},{\"Month\":\"Jul\",\"Evaporation\":135.6,\"Precipitation\":175.6,\"Temperature\":20.3},{\"Month\":\"Aug\",\"Evaporation\":162.2,\"Precipitation\":182.2,\"Temperature\":23.4},{\"Month\":\"Sep\",\"Evaporation\":32.6,\"Precipitation\":48.7,\"Temperature\":23},{\"Month\":\"Oct\",\"Evaporation\":20,\"Precipitation\":18.8,\"Temperature\":16.5}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"data\": [\n {\n \"Month\": \"Jan\",\n \"Evaporation\": 2,\n \"Precipitation\": 2.6,\n \"Temperature\": 2\n },\n {\n \"Month\": \"Feb\",\n \"Evaporation\": 4.9,\n \"Precipitation\": 5.9,\n \"Temperature\": 2.2\n },\n {\n \"Month\": \"Mar\",\n \"Evaporation\": 7,\n \"Precipitation\": 9,\n \"Temperature\": 3.3\n },\n {\n \"Month\": \"Apr\",\n \"Evaporation\": 23.2,\n \"Precipitation\": 26.4,\n \"Temperature\": 4.5\n },\n {\n \"Month\": \"May\",\n \"Evaporation\": 25.6,\n \"Precipitation\": 28.7,\n \"Temperature\": 6.3\n },\n {\n \"Month\": \"Jun\",\n \"Evaporation\": 76.7,\n \"Precipitation\": 70.7,\n \"Temperature\": 10.2\n },\n {\n \"Month\": \"Jul\",\n \"Evaporation\": 135.6,\n \"Precipitation\": 175.6,\n \"Temperature\": 20.3\n },\n {\n \"Month\": \"Aug\",\n \"Evaporation\": 162.2,\n \"Precipitation\": 182.2,\n \"Temperature\": 23.4\n },\n {\n \"Month\": \"Sep\",\n \"Evaporation\": 32.6,\n \"Precipitation\": 48.7,\n \"Temperature\": 23\n },\n {\n \"Month\": \"Oct\",\n \"Evaporation\": 20,\n \"Precipitation\": 18.8,\n \"Temperature\": 16.5\n },\n {\n \"Month\": \"Nov\",\n \"Evaporation\": 6.4,\n \"Precipitation\": 6,\n \"Temperature\": 12\n },\n {\n \"Month\": \"Dec\",\n \"Evaporation\": 3.3,\n \"Precipitation\": 2.3,\n \"Temperature\": 6.2\n }\n ],\n \"type\": \"view\",\n \"children\": [\n {\n \"encode\": {\n \"x\": \"Month\",\n \"y\": \"Temperature\",\n \"color\": \"#EE6666\",\n \"shape\": \"smooth\"\n },\n \"scale\": {\n \"y\": {\n \"independent\": true,\n \"domainMax\": 30\n }\n },\n \"axis\": {\n \"y\": {\n \"title\": \"Temperature (°C)\",\n \"grid\": null,\n \"titleFill\": \"#EE6666\"\n }\n },\n \"type\": \"line\"\n },\n {\n \"encode\": {\n \"x\": \"Month\",\n \"y\": \"Evaporation\",\n \"color\": \"#5470C6\"\n },\n \"scale\": {\n \"y\": {\n \"independent\": true,\n \"domainMax\": 200\n }\n },\n \"style\": {\n \"fillOpacity\": 0.8\n },\n \"axis\": {\n \"y\": {\n \"position\": \"right\",\n \"title\": \"Evaporation (ml)\",\n \"titleFill\": \"#5470C6\"\n }\n },\n \"type\": \"interval\"\n },\n {\n \"encode\": {\n \"x\": \"Month\",\n \"y\": \"Precipitation\",\n \"color\": \"#91CC75\"\n },\n \"scale\": {\n \"y\": {\n \"independent\": true\n }\n },\n \"style\": {\n \"lineWidth\": 2,\n \"lineDash\": [\n 2,\n 2\n ]\n },\n \"axis\": {\n \"y\": {\n \"position\": \"right\",\n \"title\": \"Precipitation (ml)\",\n \"grid\": null,\n \"titleFill\": \"#91CC75\"\n }\n },\n \"type\": \"line\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"Month\":\"Jan\",\"Evaporation\":2,\"Precipitation\":2.6,\"Temperature\":2},\n {\"Month\":\"Feb\",\"Evaporation\":4.9,\"Precipitation\":5.9,\"Temperature\":2.2},\n {\"Month\":\"Mar\",\"Evaporation\":7,\"Precipitation\":9,\"Temperature\":3.3},\n {\"Month\":\"Apr\",\"Evaporation\":23.2,\"Precipitation\":26.4,\"Temperature\":4.5},\n {\"Month\":\"May\",\"Evaporation\":25.6,\"Precipitation\":28.7,\"Temperature\":6.3},\n {\"Month\":\"Jun\",\"Evaporation\":76.7,\"Precipitation\":70.7,\"Temperature\":10.2},\n {\"Month\":\"Jul\",\"Evaporation\":135.6,\"Precipitation\":", + "duration": 65603, + "retrievedSkillIds": [ + "g2-mark-line-basic", + "g2-mark-area-basic", + "g2-scale-linear", + "g2-mark-line-multi", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": true, + "issues": [ + "缺少 Chart/Graph 实例化", + "缺少 render() 调用" + ], + "warnings": [], + "codeLength": 552, + "expectedLength": 2956, + "similarity": 0.323026874115983, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"Month\":\"Jan\",\"Evaporation\":2,\"Precipitation\":2.6,\"Temperature\":2},\n {\"Month\":\"Feb\",\"Evaporation\":4.9,\"Precipitation\":5.9,\"Temperature\":2.2},\n {\"Month\":\"Mar\",\"Evaporation\":7,\"Precipitation\":9,\"Temperature\":3.3},\n {\"Month\":\"Apr\",\"Evaporation\":23.2,\"Precipitation\":26.4,\"Temperature\":4.5},\n {\"Month\":\"May\",\"Evaporation\":25.6,\"Precipitation\":28.7,\"Temperature\":6.3},\n {\"Month\":\"Jun\",\"Evaporation\":76.7,\"Precipitation\":70.7,\"Temperature\":10.2},\n {\"Month\":\"Jul\",\"Evaporation\":135.6,\"Precipitation\":", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [], + "objectKeys": [], + "stringLiterals": [ + "Month", + "Evaporation", + "Precipitation", + "Temperature", + "Month", + "Evaporation", + "Precipitation", + "Temperature", + "Month", + "Evaporation", + "Precipitation", + "Temperature", + "Month", + "Evaporation", + "Precipitation", + "Temperature", + "Month", + "Evaporation", + "Precipitation", + "Temperature", + "Month", + "Evaporation", + "Precipitation", + "Temperature", + "Month", + "Evaporation", + "Precipitation" + ], + "apiPatterns": [] + } + } + }, + { + "id": "case-70", + "query": "根据描述绘制图表,使用 G2 创建一个折线图,以月份为横轴、数值为纵轴,展示一年中各个月份的数据变化趋势。参考数据:\n[{\"month\":\"Jan\",\"value\":51},{\"month\":\"Feb\",\"value\":91},{\"month\":\"Mar\",\"value\":34},{\"month\":\"Apr\",\"value\":47},{\"month\":\"May\",\"value\":63},{\"month\":\"June\",\"value\":58},{\"month\":\"July\",\"value\":56},{\"month\":\"Aug\",\"value\":77},{\"month\":\"Sep\",\"value\":99},{\"month\":\"Oct\",\"value\":106}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": [\n {\n \"month\": \"Jan\",\n \"value\": 51\n },\n {\n \"month\": \"Feb\",\n \"value\": 91\n },\n {\n \"month\": \"Mar\",\n \"value\": 34\n },\n {\n \"month\": \"Apr\",\n \"value\": 47\n },\n {\n \"month\": \"May\",\n \"value\": 63\n },\n {\n \"month\": \"June\",\n \"value\": 58\n },\n {\n \"month\": \"July\",\n \"value\": 56\n },\n {\n \"month\": \"Aug\",\n \"value\": 77\n },\n {\n \"month\": \"Sep\",\n \"value\": 99\n },\n {\n \"month\": \"Oct\",\n \"value\": 106\n },\n {\n \"month\": \"Nov\",\n \"value\": 88\n },\n {\n \"month\": \"Dec\",\n \"value\": 56\n }\n ],\n \"encode\": {\n \"x\": \"month\",\n \"y\": \"value\",\n \"shape\": \"hv\"\n },\n \"scale\": {\n \"x\": {\n \"range\": [\n 0,\n 1\n ]\n },\n \"y\": {\n \"nice\": true\n }\n },\n \"type\": \"line\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'line',\n data: [\n {\"month\":\"Jan\",\"value\":51},\n {\"month\":\"Feb\",\"value\":91},\n {\"month\":\"Mar\",\"value\":34},\n {\"month\":\"Apr\",\"value\":47},\n {\"month\":\"May\",\"value\":63},\n {\"month\":\"June\",\"value\":58},\n {\"month\":\"July\",\"value\":56},\n {\"month\":\"Aug\",\"value\":77},\n {\"month\":\"Sep\",\"value\":99},\n {\"month\":\"Oct\",\"value\":106}\n ],\n encode: {\n x: 'month',\n y: 'value',\n },\n});\n\nchart.render();", + "duration": 7107, + "retrievedSkillIds": [ + "g2-mark-line-basic", + "g2-mark-line-multi", + "g2-comp-facet-circle", + "g2-mark-area-stacked", + "g2-concept-chart-selection" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 559, + "expectedLength": 1325, + "similarity": 0.6669478340451495, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'line',\n data: [\n {\"month\":\"Jan\",\"value\":51},\n {\"month\":\"Feb\",\"value\":91},\n {\"month\":\"Mar\",\"value\":34},\n {\"month\":\"Apr\",\"value\":47},\n {\"month\":\"May\",\"value\":63},\n {\"month\":\"June\",\"value\":58},\n {\"month\":\"July\",\"value\":56},\n {\"month\":\"Aug\",\"value\":77},\n {\"month\":\"Sep\",\"value\":99},\n {\"month\":\"Oct\",\"value\":106}\n ],\n encode: {\n x: 'month',\n y: 'value',\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "encode", + "x", + "y" + ], + "stringLiterals": [ + "month", + "value", + "month", + "value", + "month", + "value", + "month", + "value", + "month", + "value", + "month", + "value", + "month", + "value", + "month", + "value", + "month", + "value", + "month", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "type.line" + ] + } + } + }, + { + "id": "case-71", + "query": "根据描述绘制图表,使用 G2 创建一个径向坐标(极坐标)柱状图,以城市为 x 轴、PM2.5 值为 y 轴、按季节颜色分组,展示不同城市在不同季节的 PM2.5 数据。参考数据:\n[{\"city\":\"北京\",\"pm25\":42,\"season\":\"春\"},{\"city\":\"上海\",\"pm25\":38,\"season\":\"夏\"},{\"city\":\"广州\",\"pm25\":53,\"season\":\"秋\"},{\"city\":\"成都\",\"pm25\":61,\"season\":\"冬\"},{\"city\":\"西安\",\"pm25\":57,\"season\":\"春\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n width: 800,\n height: 600\n});\n\nchart.options({\n type: 'interval',\n data: [\n { city: '北京', pm25: 42, season: '春' },\n { city: '上海', pm25: 38, season: '夏' },\n { city: '广州', pm25: 53, season: '秋' },\n { city: '成都', pm25: 61, season: '冬' },\n { city: '西安', pm25: 57, season: '春' }\n ],\n coordinate: { type: 'radial', innerRadius: 0.25 },\n encode: { x: 'city', y: 'pm25', color: 'season' },\n scale: { color: { range: ['#ff7a45','#ffd666','#73d13d','#36cfc9'] }, y: { domain: [0, 70] } },\n style: {\n radius: 6,\n stroke: '#fff',\n lineWidth: 1.2\n },\n axis: { y: { label: false }, x: { label: { fontSize: 10 } } }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"city\":\"北京\",\"pm25\":42,\"season\":\"春\"},\n {\"city\":\"上海\",\"pm25\":38,\"season\":\"夏\"},\n {\"city\":\"广州\",\"pm25\":53,\"season\":\"秋\"},\n {\"city\":\"成都\",\"pm25\":61,\"season\":\"冬\"},\n {\"city\":\"西安\",\"pm25\":57,\"season\":\"春\"}\n ],\n encode: {\n x: 'city',\n y: 'pm25',\n color: 'season',\n },\n coordinate: {\n type: 'polar',\n },\n transform: [\n { type: 'dodgeX' }\n ],\n axis: {\n x: { title: '城市' },\n y: { title: 'PM2.5 浓度' },\n },\n legend: {\n color: { position: 'right' },\n },\n});\n\nchart.render();", + "duration": 10798, + "retrievedSkillIds": [ + "g2-mark-interval-basic", + "g2-mark-arc-pie", + "g2-mark-interval-grouped", + "g2-mark-rose", + "g2-mark-line-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 660, + "expectedLength": 763, + "similarity": 0.6360665447260692, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"city\":\"北京\",\"pm25\":42,\"season\":\"春\"},\n {\"city\":\"上海\",\"pm25\":38,\"season\":\"夏\"},\n {\"city\":\"广州\",\"pm25\":53,\"season\":\"秋\"},\n {\"city\":\"成都\",\"pm25\":61,\"season\":\"冬\"},\n {\"city\":\"西安\",\"pm25\":57,\"season\":\"春\"}\n ],\n encode: {\n x: 'city',\n y: 'pm25',\n color: 'season',\n },\n coordinate: {\n type: 'polar',\n },\n transform: [\n { type: 'dodgeX' }\n ],\n axis: {\n x: { title: '城市' },\n y: { title: 'PM2.5 浓度' },\n },\n legend: {\n color: { position: 'right' },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "encode", + "x", + "y", + "color", + "coordinate", + "type", + "transform", + "type", + "axis", + "x", + "title", + "y", + "title", + "legend", + "color", + "position" + ], + "stringLiterals": [ + "city", + "pm25", + "season", + "city", + "pm25", + "season", + "city", + "pm25", + "season", + "city", + "pm25", + "season", + "city", + "pm25", + "season" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval" + ] + } + } + }, + { + "id": "case-72", + "query": "根据描述绘制图表,使用 G2 绘制一个 130 度扩展玫瑰图,展示一周内每天的人均工作时长,通过不同颜色区分每一天,同时在图表上显示具体数值标签和坐标轴信息。参考数据:[{\"week\":\"周一\",\"hours\":9.2},{\"week\":\"周二\",\"hours\":8.7},{\"week\":\"周三\",\"hours\":9.8},{\"week\":\"周四\",\"hours\":7.2},{\"week\":\"周五\",\"hours\":6.8},{\"week\":\"周六\",\"hours\":3.5},{\"week\":\"周日\",\"hours\":2.1}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'interval',\n autoFit: true,\n coordinate: { type: 'polar', startAngle: -Math.PI/6, endAngle: Math.PI * 7/6 },\n data: [\n { week: '周一', hours: 9.2 },\n { week: '周二', hours: 8.7 },\n { week: '周三', hours: 9.8 },\n { week: '周四', hours: 7.2 },\n { week: '周五', hours: 6.8 },\n { week: '周六', hours: 3.5 },\n { week: '周日', hours: 2.1 }\n ],\n encode: {\n x: 'week',\n y: 'hours',\n color: 'week'\n },\n scale: {\n y: { nice: true, formatter: v => v + 'h' },\n color: { range: ['#3b82f6','#60a5fa','#93c5fd','#bfdbfe','#dbeafe','#f3e8ff','#e9d5ff'] }\n },\n labels: [{ text: 'hours', formatter: v => v + 'h', style: { fontSize: 11 } }],\n axis: { y: { tickCount: 5 } },\n title: '周人均工作时长(130°扩展玫瑰图)'\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"week\":\"周一\",\"hours\":9.2},\n {\"week\":\"周二\",\"hours\":8.7},\n {\"week\":\"周三\",\"hours\":9.8},\n {\"week\":\"周四\",\"hours\":7.2},\n {\"week\":\"周五\",\"hours\":6.8},\n {\"week\":\"周六\",\"hours\":3.5},\n {\"week\":\"周日\",\"hours\":2.1}\n ],\n coordinate: {\n type: 'polar',\n startAngle: (-90 - 65) * Math.PI / 180,\n endAngle: (-90 + 65) * Math.PI / 180,\n },\n encode: {\n x: 'week',\n y: 'hours',\n color: 'week',\n },\n labels: [\n {\n text: 'hours',\n position: 'outside',\n formatter: (d) => `${d.hours}h`,\n style: { fontSize: 12, fontWeight: 'bold' },\n },\n ],\n axis: {\n x: {\n title: '星期',\n grid: true,\n tick: true,\n },\n y: {\n title: '工作时长(小时)',\n grid: true,\n tick: true,\n label: true,\n },\n },\n legend: {\n color: {\n position: 'bottom',\n layout: { justifyContent: 'center' },\n },\n },\n style: {\n lineWidth: 1,\n stroke: '#fff',\n },\n});\n\nchart.render();", + "duration": 16808, + "retrievedSkillIds": [ + "g2-mark-interval-basic", + "g2-mark-rose", + "g2-mark-arc-donut", + "g2-comp-facet-circle", + "g2-mark-arc-pie" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1112, + "expectedLength": 873, + "similarity": 0.644388210853988, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"week\":\"周一\",\"hours\":9.2},\n {\"week\":\"周二\",\"hours\":8.7},\n {\"week\":\"周三\",\"hours\":9.8},\n {\"week\":\"周四\",\"hours\":7.2},\n {\"week\":\"周五\",\"hours\":6.8},\n {\"week\":\"周六\",\"hours\":3.5},\n {\"week\":\"周日\",\"hours\":2.1}\n ],\n coordinate: {\n type: 'polar',\n startAngle: (-90 - 65) * Math.PI / 180,\n endAngle: (-90 + 65) * Math.PI / 180,\n },\n encode: {\n x: 'week',\n y: 'hours',\n color: 'week',\n },\n labels: [\n {\n text: 'hours',\n position: 'outside',\n formatter: (d) => `${d.hours}h`,\n style: { fontSize: 12, fontWeight: 'bold' },\n },\n ],\n axis: {\n x: {\n title: '星期',\n grid: true,\n tick: true,\n },\n y: {\n title: '工作时长(小时)',\n grid: true,\n tick: true,\n label: true,\n },\n },\n legend: {\n color: {\n position: 'bottom',\n layout: { justifyContent: 'center' },\n },\n },\n style: {\n lineWidth: 1,\n stroke: '#fff',\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "coordinate", + "type", + "startAngle", + "endAngle", + "encode", + "x", + "y", + "color", + "labels", + "text", + "position", + "formatter", + "style", + "fontSize", + "fontWeight", + "axis", + "x", + "title", + "grid", + "tick", + "y", + "title", + "grid", + "tick", + "label", + "legend", + "color", + "position", + "layout", + "justifyContent", + "style", + "lineWidth", + "stroke" + ], + "stringLiterals": [ + "week", + "hours", + "week", + "hours", + "week", + "hours", + "week", + "hours", + "week", + "hours", + "week", + "hours", + "week", + "hours" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "type.interval", + "x6.labels", + "x6.label" + ] + } + } + }, + { + "id": "case-73", + "query": "根据描述绘制图表,渲染一个极坐标下的弦图(chord diagram),用于展示离子之间的共现关系及结合强度,数据结构包含源节点、目标节点和对应的数值权重。参考数据:{\"value\":{\"links\":[{\"source\":\"Cl\",\"target\":\"Na\",\"value\":0.7},{\"source\":\"Cl\",\"target\":\"K\",\"value\":1.2},{\"source\":\"Na\",\"target\":\"Mg\",\"value\":0.4},{\"source\":\"K\",\"target\":\"Ca\",\"value\":0.9},{\"source\":\"Mg\",\"target\":\"Cl\",\"value\":0.6},{\"source\":\"Ca\",\"target\":\"Na\",\"value\":0.3}]}}", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'chord',\n autoFit: true,\n data: {\n value: {\n links: [\n { source: 'Cl', target: 'Na', value: 0.7 },\n { source: 'Cl', target: 'K', value: 1.2 },\n { source: 'Na', target: 'Mg', value: 0.4 },\n { source: 'K', target: 'Ca', value: 0.9 },\n { source: 'Mg', target: 'Cl', value: 0.6 },\n { source: 'Ca', target: 'Na', value: 0.3 },\n ],\n },\n },\n layout: { nodeWidthRatio: 0.07 },\n scale: {\n value: { type: 'linear', nice: true, min: 0, max: 1.5 },\n color: { range: ['#2a9d8f', '#264653', '#e9c46a', '#f4a261', '#e76f51'] },\n },\n style: {\n labelFontSize: 12,\n labelFill: '#111',\n linkFillOpacity: 0.75,\n },\n coordinate: { type: 'polar' },\n tooltip: {\n items: [\n { field: 'source', name: '阳离子' },\n { field: 'target', name: '阴离子' },\n { field: 'value', name: '共现指数', formatter: '.2f' },\n ],\n },\n axis: { value: { title: '离子结合强度' } },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst links = [\n { source: \"Cl\", target: \"Na\", value: 0.7 },\n { source: \"Cl\", target: \"K\", value: 1.2 },\n { source: \"Na\", target: \"Mg\", value: 0.4 },\n { source: \"K\", target: \"Ca\", value: 0.9 },\n { source: \"Mg\", target: \"Cl\", value: 0.6 },\n { source: \"Ca\", target: \"Na\", value: 0.3 }\n];\n\nconst nodeKeys = [...new Set([...links.map(d => d.source), ...links.map(d => d.target)])];\nconst nodes = nodeKeys.map(key => ({ key, name: key }));\n\nchart.options({\n type: 'chord',\n data: {\n value: { nodes, links }\n },\n coordinate: {\n type: 'polar'\n },\n encode: {\n source: 'source',\n target: 'target',\n value: 'value',\n nodeKey: 'key',\n nodeColor: 'key',\n linkColor: 'source'\n },\n style: {\n node: {\n opacity: 1,\n lineWidth: 1\n },\n link: {\n opacity: 0.6,\n lineWidth: 1\n }\n },\n nodeLabels: [\n {\n text: 'name',\n position: 'outside',\n fontSize: 12\n }\n ]\n});\n\nchart.render();", + "duration": 10099, + "retrievedSkillIds": [ + "g2-mark-chord", + "g2-mark-bullet", + "g2-mark-arc-diagram", + "g2-mark-interval-basic", + "g2-mark-partition" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1075, + "expectedLength": 1081, + "similarity": 0.6618571428571429, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst links = [\n { source: \"Cl\", target: \"Na\", value: 0.7 },\n { source: \"Cl\", target: \"K\", value: 1.2 },\n { source: \"Na\", target: \"Mg\", value: 0.4 },\n { source: \"K\", target: \"Ca\", value: 0.9 },\n { source: \"Mg\", target: \"Cl\", value: 0.6 },\n { source: \"Ca\", target: \"Na\", value: 0.3 }\n];\n\nconst nodeKeys = [...new Set([...links.map(d => d.source), ...links.map(d => d.target)])];\nconst nodes = nodeKeys.map(key => ({ key, name: key }));\n\nchart.options({\n type: 'chord',\n data: {\n value: { nodes, links }\n },\n coordinate: {\n type: 'polar'\n },\n encode: {\n source: 'source',\n target: 'target',\n value: 'value',\n nodeKey: 'key',\n nodeColor: 'key',\n linkColor: 'source'\n },\n style: {\n node: {\n opacity: 1,\n lineWidth: 1\n },\n link: {\n opacity: 0.6,\n lineWidth: 1\n }\n },\n nodeLabels: [\n {\n text: 'name',\n position: 'outside',\n fontSize: 12\n }\n ]\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "Set", + "map", + "map", + "map", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "name", + "type", + "data", + "value", + "coordinate", + "type", + "encode", + "source", + "target", + "value", + "nodeKey", + "nodeColor", + "linkColor", + "style", + "node", + "opacity", + "lineWidth", + "link", + "opacity", + "lineWidth", + "nodeLabels", + "text", + "position", + "fontSize" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-74", + "query": "根据描述绘制图表,使用 G2 渲染一个堆叠柱状图,对比 London 和 Berlin 两个城市各个月份的月均降雨量,数据按城市分组并进行 Y 轴堆叠,坐标系被转置(横向条形图形式)。参考数据:\n[{\"name\":\"London\",\"月份\":\"Jan.\",\"月均降雨量\":18.9},{\"name\":\"London\",\"月份\":\"Feb.\",\"月均降雨量\":28.8},{\"name\":\"London\",\"月份\":\"Mar.\",\"月均降雨量\":39.3},{\"name\":\"London\",\"月份\":\"Apr.\",\"月均降雨量\":81.4},{\"name\":\"London\",\"月份\":\"May\",\"月均降雨量\":47},{\"name\":\"London\",\"月份\":\"Jun.\",\"月均降雨量\":20.3},{\"name\":\"London\",\"月份\":\"Jul.\",\"月均降雨量\":24},{\"name\":\"London\",\"月份\":\"Aug.\",\"月均降雨量\":35.6},{\"name\":\"Berlin\",\"月份\":\"Jan.\",\"月均降雨量\":12.4},{\"name\":\"Berlin\",\"月份\":\"Feb.\",\"月均降雨量\":23.2}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": [\n {\n \"name\": \"London\",\n \"月份\": \"Jan.\",\n \"月均降雨量\": 18.9\n },\n {\n \"name\": \"London\",\n \"月份\": \"Feb.\",\n \"月均降雨量\": 28.8\n },\n {\n \"name\": \"London\",\n \"月份\": \"Mar.\",\n \"月均降雨量\": 39.3\n },\n {\n \"name\": \"London\",\n \"月份\": \"Apr.\",\n \"月均降雨量\": 81.4\n },\n {\n \"name\": \"London\",\n \"月份\": \"May\",\n \"月均降雨量\": 47\n },\n {\n \"name\": \"London\",\n \"月份\": \"Jun.\",\n \"月均降雨量\": 20.3\n },\n {\n \"name\": \"London\",\n \"月份\": \"Jul.\",\n \"月均降雨量\": 24\n },\n {\n \"name\": \"London\",\n \"月份\": \"Aug.\",\n \"月均降雨量\": 35.6\n },\n {\n \"name\": \"Berlin\",\n \"月份\": \"Jan.\",\n \"月均降雨量\": 12.4\n },\n {\n \"name\": \"Berlin\",\n \"月份\": \"Feb.\",\n \"月均降雨量\": 23.2\n },\n {\n \"name\": \"Berlin\",\n \"月份\": \"Mar.\",\n \"月均降雨量\": 34.5\n },\n {\n \"name\": \"Berlin\",\n \"月份\": \"Apr.\",\n \"月均降雨量\": 99.7\n },\n {\n \"name\": \"Berlin\",\n \"月份\": \"May\",\n \"月均降雨量\": 52.6\n },\n {\n \"name\": \"Berlin\",\n \"月份\": \"Jun.\",\n \"月均降雨量\": 35.5\n },\n {\n \"name\": \"Berlin\",\n \"月份\": \"Jul.\",\n \"月均降雨量\": 37.4\n },\n {\n \"name\": \"Berlin\",\n \"月份\": \"Aug.\",\n \"月均降雨量\": 42.4\n }\n ],\n \"encode\": {\n \"x\": \"月份\",\n \"y\": \"月均降雨量\",\n \"color\": \"name\",\n \"key\": (d) => d['name'] + d['月份']\n },\n \"interaction\": {\n \"legendFilter\": false,\n \"elementPointMove\": {\n \"precision\": 3\n }\n },\n \"transform\": [\n {\n \"type\": \"stackY\"\n }\n ],\n \"coordinate\": {\n \"transform\": [\n {\n \"type\": \"transpose\"\n }\n ]\n },\n \"type\": \"interval\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"name\":\"London\",\"月份\":\"Jan.\",\"月均降雨量\":18.9},\n {\"name\":\"London\",\"月份\":\"Feb.\",\"月均降雨量\":28.8},\n {\"name\":\"London\",\"月份\":\"Mar.\",\"月均降雨量\":39.3},\n {\"name\":\"London\",\"月份\":\"Apr.\",\"月均降雨量\":81.4},\n {\"name\":\"London\",\"月份\":\"May\",\"月均降雨量\":47},\n {\"name\":\"London\",\"月份\":\"Jun.\",\"月均降雨量\":20.3},\n {\"name\":\"London\",\"月份\":\"Jul.\",\"月均降雨量\":24},\n {\"name\":\"London\",\"月份\":\"Aug.\",\"月均降雨量\":35.6},\n {\"name\":\"Berlin\",\"月份\":\"Jan.\",\"月均降雨量\":12.4},\n {\"name\":\"Berlin\",\"月份\":\"Feb.\",\"月均降雨量\":23.2}\n ],\n encode: {\n x: '月份',\n y: '月均降雨量',\n color: 'name',\n },\n transform: [\n { type: 'stackY' }\n ],\n coordinate: {\n transform: [{ type: 'transpose' }]\n }\n});\n\nchart.render();", + "duration": 22475, + "retrievedSkillIds": [ + "g2-mark-interval-stacked", + "g2-mark-area-stacked", + "g2-transform-sorty", + "g2-transform-stacky", + "g2-mark-interval-grouped" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 836, + "expectedLength": 2249, + "similarity": 0.6593967322999581, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"name\":\"London\",\"月份\":\"Jan.\",\"月均降雨量\":18.9},\n {\"name\":\"London\",\"月份\":\"Feb.\",\"月均降雨量\":28.8},\n {\"name\":\"London\",\"月份\":\"Mar.\",\"月均降雨量\":39.3},\n {\"name\":\"London\",\"月份\":\"Apr.\",\"月均降雨量\":81.4},\n {\"name\":\"London\",\"月份\":\"May\",\"月均降雨量\":47},\n {\"name\":\"London\",\"月份\":\"Jun.\",\"月均降雨量\":20.3},\n {\"name\":\"London\",\"月份\":\"Jul.\",\"月均降雨量\":24},\n {\"name\":\"London\",\"月份\":\"Aug.\",\"月均降雨量\":35.6},\n {\"name\":\"Berlin\",\"月份\":\"Jan.\",\"月均降雨量\":12.4},\n {\"name\":\"Berlin\",\"月份\":\"Feb.\",\"月均降雨量\":23.2}\n ],\n encode: {\n x: '月份',\n y: '月均降雨量',\n color: 'name',\n },\n transform: [\n { type: 'stackY' }\n ],\n coordinate: {\n transform: [{ type: 'transpose' }]\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "encode", + "x", + "y", + "color", + "transform", + "type", + "coordinate", + "transform", + "type" + ], + "stringLiterals": [ + "name", + "name", + "name", + "name", + "name", + "name", + "name", + "name", + "name", + "name" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval" + ] + } + } + }, + { + "id": "case-75", + "query": "根据描述绘制图表,使用G2渲染一个堆叠柱状图,展示美国各州不同年龄组(<10, 10-19, 20-29, 30-39, 40-49, 50-59, 60-69, 70-79, ≥80)的人口分布,数据按州分组、各年龄组堆叠,并应用排序和选择交互功能。参考数据:\n[{\"state\":\"AL\",\"age\":\"<10\",\"population\":598478},{\"state\":\"AK\",\"age\":\"<10\",\"population\":106741},{\"state\":\"AZ\",\"age\":\"<10\",\"population\":892083},{\"state\":\"AR\",\"age\":\"<10\",\"population\":392177},{\"state\":\"CA\",\"age\":\"<10\",\"population\":5038433},{\"state\":\"CO\",\"age\":\"<10\",\"population\":690830},{\"state\":\"CT\",\"age\":\"<10\",\"population\":399369},{\"state\":\"DE\",\"age\":\"<10\",\"population\":112177},{\"state\":\"DC\",\"age\":\"<10\",\"population\":74377},{\"state\":\"FL\",\"age\":\"<10\",\"population\":2211012}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\nchart.options({\n type: 'interval',\n autoFit: true,\n data: {\n type: 'inline',\n value: [\n {\n \"state\": \"AL\",\n \"age\": \"<10\",\n \"population\": 598478\n },\n {\n \"state\": \"AK\",\n \"age\": \"<10\",\n \"population\": 106741\n },\n {\n \"state\": \"AZ\",\n \"age\": \"<10\",\n \"population\": 892083\n },\n {\n \"state\": \"AR\",\n \"age\": \"<10\",\n \"population\": 392177\n },\n {\n \"state\": \"CA\",\n \"age\": \"<10\",\n \"population\": 5038433\n },\n {\n \"state\": \"CO\",\n \"age\": \"<10\",\n \"population\": 690830\n },\n {\n \"state\": \"CT\",\n \"age\": \"<10\",\n \"population\": 399369\n },\n {\n \"state\": \"DE\",\n \"age\": \"<10\",\n \"population\": 112177\n },\n {\n \"state\": \"DC\",\n \"age\": \"<10\",\n \"population\": 74377\n },\n {\n \"state\": \"FL\",\n \"age\": \"<10\",\n \"population\": 2211012\n },\n {\n \"state\": \"GA\",\n \"age\": \"<10\",\n \"population\": 1363631\n },\n {\n \"state\": \"HI\",\n \"age\": \"<10\",\n \"population\": 176484\n },\n {\n \"state\": \"ID\",\n \"age\": \"<10\",\n \"population\": 236658\n },\n {\n \"state\": \"IL\",\n \"age\": \"<10\",\n \"population\": 1619682\n },\n {\n \"state\": \"IN\",\n \"age\": \"<10\",\n \"population\": 863029\n },\n {\n \"state\": \"IA\",\n \"age\": \"<10\",\n \"population\": 401712\n },\n {\n \"state\": \"KS\",\n \"age\": \"<10\",\n \"population\": 401751\n },\n {\n \"state\": \"KY\",\n \"age\": \"<10\",\n \"population\": 555615\n },\n {\n \"state\": \"LA\",\n \"age\": \"<10\",\n \"population\": 622061\n },\n {\n \"state\": \"ME\",\n \"age\": \"<10\",\n \"population\": 137954\n },\n {\n \"state\": \"MD\",\n \"age\": \"<10\",\n \"population\": 741952\n },\n {\n \"state\": \"MA\",\n \"age\": \"<10\",\n \"population\": 737748\n },\n {\n \"state\": \"MI\",\n \"age\": \"<10\",\n \"population\": 1181424\n },\n {\n \"state\": \"MN\",\n \"age\": \"<10\",\n \"population\": 711604\n },\n {\n \"state\": \"MS\",\n \"age\": \"<10\",\n \"population\": 400288\n },\n {\n \"state\": \"MO\",\n \"age\": \"<10\",\n \"population\": 763948\n },\n {\n \"state\": \"MT\",\n \"age\": \"<10\",\n \"population\": 126020\n },\n {\n \"state\": \"NE\",\n \"age\": \"<10\",\n \"population\": 263518\n },\n {\n \"state\": \"NV\",\n \"age\": \"<10\",\n \"population\": 369362\n },\n {\n \"state\": \"NH\",\n \"age\": \"<10\",\n \"population\": 138762\n },\n {\n \"state\": \"NJ\",\n \"age\": \"<10\",\n \"population\": 1079136\n },\n {\n \"state\": \"NM\",\n \"age\": \"<10\",\n \"population\": 276468\n },\n {\n \"state\": \"NY\",\n \"age\": \"<10\",\n \"population\": 2319945\n },\n {\n \"state\": \"NC\",\n \"age\": \"<10\",\n \"population\": 1250298\n },\n {\n \"state\": \"ND\",\n \"age\": \"<10\",\n \"population\": 99477\n },\n {\n \"state\": \"OH\",\n \"age\": \"<10\",\n \"population\": 1422838\n },\n {\n \"state\": \"OK\",\n \"age\": \"<10\",\n \"population\": 534481\n },\n {\n \"state\": \"OR\",\n \"age\": \"<10\",\n \"population\": 474456\n },\n {\n \"state\": \"PA\",\n \"age\": \"<10\",\n \"population\": 1458931\n },\n {\n \"state\": \"RI\",\n \"age\": \"<10\",\n \"population\": 111377\n },\n {\n \"state\": \"SC\",\n \"age\": \"<10\",\n \"population\": 599591\n },\n {\n \"state\": \"SD\",\n \"age\": \"<10\",\n \"population\": 120366\n },\n {\n \"state\": \"TN\",\n \"age\": \"<10\",\n \"population\": 818404\n },\n {\n \"state\": \"TX\",\n \"age\": \"<10\",\n \"population\": 3983091\n },\n {\n \"state\": \"UT\",\n \"age\": \"<10\",\n \"population\": 513515\n },\n {\n \"state\": \"VT\",\n \"age\": \"<10\",\n \"population\": 63768\n },\n {\n \"state\": \"VA\",\n \"age\": \"<10\",\n \"population\": 1033629\n },\n {\n \"state\": \"WA\",\n \"age\": \"<10\",\n \"population\": 895790\n },\n {\n \"state\": \"WV\",\n \"age\": \"<10\",\n \"population\": 207017\n },\n {\n \"state\": \"WI\",\n \"age\": \"<10\",\n \"population\": 705648\n },\n {\n \"state\": \"WY\",\n \"age\": \"<10\",\n \"population\": 78217\n },\n {\n \"state\": \"PR\",\n \"age\": \"<10\",\n \"population\": 389428\n },\n {\n \"state\": \"AL\",\n \"age\": \"10-19\",\n \"population\": 638789\n },\n {\n \"state\": \"AK\",\n \"age\": \"10-19\",\n \"population\": 99926\n },\n {\n \"state\": \"AZ\",\n \"age\": \"10-19\",\n \"population\": 912735\n },\n {\n \"state\": \"AR\",\n \"age\": \"10-19\",\n \"population\": 397185\n },\n {\n \"state\": \"CA\",\n \"age\": \"10-19\",\n \"population\": 5170341\n },\n {\n \"state\": \"CO\",\n \"age\": \"10-19\",\n \"population\": 697447\n },\n {\n \"state\": \"CT\",\n \"age\": \"10-19\",\n \"population\": 481065\n },\n {\n \"state\": \"DE\",\n \"age\": \"10-19\",\n \"population\": 117854\n },\n {\n \"state\": \"DC\",\n \"age\": \"10-19\",\n \"population\": 62783\n },\n {\n \"state\": \"FL\",\n \"age\": \"10-19\",\n \"population\": 2331102\n },\n {\n \"state\": \"GA\",\n \"age\": \"10-19\",\n \"population\": 1421557\n },\n {\n \"state\": \"HI\",\n \"age\": \"10-19\",\n \"population\": 163559\n },\n {\n \"state\": \"ID\",\n \"age\": \"10-19\",\n \"population\": 239509\n },\n {\n \"state\": \"IL\",\n \"age\": \"10-19\",\n \"population\": 1715984\n },\n {\n \"state\": \"IN\",\n \"age\": \"10-19\",\n \"population\": 905594\n },\n {\n \"state\": \"IA\",\n \"age\": \"10-19\",\n \"population\": 418667\n },\n {\n \"state\": \"KS\",\n \"age\": \"10-19\",\n \"population\": 402092\n },\n {\n \"state\": \"KY\",\n \"age\": \"10-19\",\n \"population\": 575866\n },\n {\n \"state\": \"LA\",\n \"age\": \"10-19\",\n \"population\": 613633\n },\n {\n \"state\": \"ME\",\n \"age\": \"10-19\",\n \"population\": 155774\n },\n {\n \"state\": \"MD\",\n \"age\": \"10-19\",\n \"population\": 764730\n },\n {\n \"state\": \"MA\",\n \"age\": \"10-19\",\n \"population\": 862371\n },\n {\n \"state\": \"MI\",\n \"age\": \"10-19\",\n \"population\": 1324071\n },\n {\n \"state\": \"MN\",\n \"age\": \"10-19\",\n \"population\": 714399\n },\n {\n \"state\": \"MS\",\n \"age\": \"10-19\",\n \"population\": 421329\n },\n {\n \"state\": \"MO\",\n \"age\": \"10-19\",\n \"population\": 792935\n },\n {\n \"state\": \"MT\",\n \"age\": \"10-19\",\n \"population\": 126294\n },\n {\n \"state\": \"NE\",\n \"age\": \"10-19\",\n \"population\": 257610\n },\n {\n \"state\": \"NV\",\n \"age\": \"10-19\",\n \"population\": 360263\n },\n {\n \"state\": \"NH\",\n \"age\": \"10-19\",\n \"population\": 167495\n },\n {\n \"state\": \"NJ\",\n \"age\": \"10-19\",\n \"population\": 1153625\n },\n {\n \"state\": \"NM\",\n \"age\": \"10-19\",\n \"population\": 282662\n },\n {\n \"state\": \"NY\",\n \"age\": \"10-19\",\n \"population\": 2445591\n },\n {\n \"state\": \"NC\",\n \"age\": \"10-19\",\n \"population\": 1310398\n },\n {\n \"state\": \"ND\",\n \"age\": \"10-19\",\n \"population\": 91069\n },\n {\n \"state\": \"OH\",\n \"age\": \"10-19\",\n \"population\": 1530264\n },\n {\n \"state\": \"OK\",\n \"age\": \"10-19\",\n \"population\": 522282\n },\n {\n \"state\": \"OR\",\n \"age\": \"10-19\",\n \"population\": 485345\n },\n {\n \"state\": \"PA\",\n \"age\": \"10-19\",\n \"population\": 1608018\n },\n {\n \"state\": \"RI\",\n \"age\": \"10-19\",\n \"population\": 136885\n },\n {\n \"state\": \"SC\",\n \"age\": \"10-19\",\n \"population\": 619144\n },\n {\n \"state\": \"SD\",\n \"age\": \"10-19\",\n \"population\": 113383\n },\n {\n \"state\": \"TN\",\n \"age\": \"10-19\",\n \"population\": 842873\n },\n {\n \"state\": \"TX\",\n \"age\": \"10-19\",\n \"population\": 3910528\n },\n {\n \"state\": \"UT\",\n \"age\": \"10-19\",\n \"population\": 479126\n },\n {\n \"state\": \"VT\",\n \"age\": \"10-19\",\n \"population\": 79351\n },\n {\n \"state\": \"VA\",\n \"age\": \"10-19\",\n \"population\": 1065461\n },\n {\n \"state\": \"WA\",\n \"age\": \"10-19\",\n \"population\": 882812\n },\n {\n \"state\": \"WV\",\n \"age\": \"10-19\",\n \"population\": 218547\n },\n {\n \"state\": \"WI\",\n \"age\": \"10-19\",\n \"population\": 755224\n },\n {\n \"state\": \"WY\",\n \"age\": \"10-19\",\n \"population\": 75535\n },\n {\n \"state\": \"PR\",\n \"age\": \"10-19\",\n \"population\": 479749\n },\n {\n \"state\": \"AL\",\n \"age\": \"20-29\",\n \"population\": 661666\n },\n {\n \"state\": \"AK\",\n \"age\": \"20-29\",\n \"population\": 120674\n },\n {\n \"state\": \"AZ\",\n \"age\": \"20-29\",\n \"population\": 939804\n },\n {\n \"state\": \"AR\",\n \"age\": \"20-29\",\n \"population\": 399698\n },\n {\n \"state\": \"CA\",\n \"age\": \"20-29\",\n \"population\": 5809455\n },\n {\n \"state\": \"CO\",\n \"age\": \"20-29\",\n \"population\": 780508\n },\n {\n \"state\": \"CT\",\n \"age\": \"20-29\",\n \"population\": 462323\n },\n {\n \"state\": \"DE\",\n \"age\": \"20-29\",\n \"population\": 127554\n },\n {\n \"state\": \"DC\",\n \"age\": \"20-29\",\n \"population\": 136976\n },\n {\n \"state\": \"FL\",\n \"age\": \"20-29\",\n \"population\": 2597830\n },\n {\n \"state\": \"GA\",\n \"age\": \"20-29\",\n \"population\": 1418696\n },\n {\n \"state\": \"HI\",\n \"age\": \"20-29\",\n \"population\": 204336\n },\n {\n \"state\": \"ID\",\n \"age\": \"20-29\",\n \"population\": 218684\n },\n {\n \"state\": \"IL\",\n \"age\": \"20-29\",\n \"population\": 1789739\n },\n {\n \"state\": \"IN\",\n \"age\": \"20-29\",\n \"population\": 905590\n },\n {\n \"state\": \"IA\",\n \"age\": \"20-29\",\n \"population\": 419456\n },\n {\n \"state\": \"KS\",\n \"age\": \"20-29\",\n \"population\": 406956\n },\n {\n \"state\": \"KY\",\n \"age\": \"20-29\",\n \"population\": 593819\n },\n {\n \"state\": \"LA\",\n \"age\": \"20-29\",\n \"population\": 683606\n },\n {\n \"state\": \"ME\",\n \"age\": \"20-29\",\n \"population\": 156359\n },\n {\n \"state\": \"MD\",\n \"age\": \"20-29\",\n \"population\": 815346\n },\n {\n \"state\": \"MA\",\n \"age\": \"20-29\",\n \"population\": 971340\n },\n {\n \"state\": \"MI\",\n \"age\": \"20-29\",\n \"population\": 1338179\n },\n {\n \"state\": \"MN\",\n \"age\": \"20-29\",\n \"population\": 728222\n },\n {\n \"state\": \"MS\",\n \"age\": \"20-29\",\n \"population\": 414195\n },\n {\n \"state\": \"MO\",\n \"age\": \"20-29\",\n \"population\": 831725\n },\n {\n \"state\": \"MT\",\n \"age\": \"20-29\",\n \"population\": 136346\n },\n {\n \"state\": \"NE\",\n \"age\": \"20-29\",\n \"population\": 260646\n },\n {\n \"state\": \"NV\",\n \"age\": \"20-29\",\n \"population\": 392834\n },\n {\n \"state\": \"NH\",\n \"age\": \"20-29\",\n \"population\": 167554\n },\n {\n \"state\": \"NJ\",\n \"age\": \"20-29\",\n \"population\": 1139927\n },\n {\n \"state\": \"NM\",\n \"age\": \"20-29\",\n \"population\": 289801\n },\n {\n \"state\": \"NY\",\n \"age\": \"20-29\",\n \"population\": 2894266\n },\n {\n \"state\": \"NC\",\n \"age\": \"20-29\",\n \"population\": 1350242\n },\n {\n \"state\": \"ND\",\n \"age\": \"20-29\",\n \"population\": 124509\n },\n {\n \"state\": \"OH\",\n \"age\": \"20-29\",\n \"population\": 1535538\n },\n {\n \"state\": \"OK\",\n \"age\": \"20-29\",\n \"population\": 552528\n },\n {\n \"state\": \"OR\",\n \"age\": \"20-29\",\n \"population\": 538596\n },\n {\n \"state\": \"PA\",\n \"age\": \"20-29\",\n \"population\": 1712448\n },\n {\n \"state\": \"RI\",\n \"age\": \"20-29\",\n \"population\": 153674\n },\n {\n \"state\": \"SC\",\n \"age\": \"20-29\",\n \"population\": 667523\n },\n {\n \"state\": \"SD\",\n \"age\": \"20-29\",\n \"population\": 116748\n },\n {\n \"state\": \"TN\",\n \"age\": \"20-29\",\n \"population\": 895337\n },\n {\n \"state\": \"TX\",\n \"age\": \"20-29\",\n \"population\": 3946447\n },\n {\n \"state\": \"UT\",\n \"age\": \"20-29\",\n \"population\": 465219\n },\n {\n \"state\": \"VT\",\n \"age\": \"20-29\",\n \"population\": 81765\n },\n {\n \"state\": \"VA\",\n \"age\": \"20-29\",\n \"population\": 1170634\n },\n {\n \"state\": \"WA\",\n \"age\": \"20-29\",\n \"population\": 1004428\n },\n {\n \"state\": \"WV\",\n \"age\": \"20-29\",\n \"population\": 232027\n },\n {\n \"state\": \"WI\",\n \"age\": \"20-29\",\n \"population\": 760961\n },\n {\n \"state\": \"WY\",\n \"age\": \"20-29\",\n \"population\": 82898\n },\n {\n \"state\": \"PR\",\n \"age\": \"20-29\",\n \"population\": 480184\n },\n {\n \"state\": \"AL\",\n \"age\": \"30-39\",\n \"population\": 603013\n },\n {\n \"state\": \"AK\",\n \"age\": \"30-39\",\n \"population\": 102008\n },\n {\n \"state\": \"AZ\",\n \"age\": \"30-39\",\n \"population\": 857054\n },\n {\n \"state\": \"AR\",\n \"age\": \"30-39\",\n \"population\": 372998\n },\n {\n \"state\": \"CA\",\n \"age\": \"30-39\",\n \"population\": 5354112\n },\n {\n \"state\": \"CO\",\n \"age\": \"30-39\",\n \"population\": 766382\n },\n {\n \"state\": \"CT\",\n \"age\": \"30-39\",\n \"population\": 424890\n },\n {\n \"state\": \"DE\",\n \"age\": \"30-39\",\n \"population\": 114063\n },\n {\n \"state\": \"DC\",\n \"age\": \"30-39\",\n \"population\": 121520\n },\n {\n \"state\": \"FL\",\n \"age\": \"30-39\",\n \"population\": 2416176\n },\n {\n \"state\": \"GA\",\n \"age\": \"30-39\",\n \"population\": 1357210\n },\n {\n \"state\": \"HI\",\n \"age\": \"30-39\",\n \"population\": 187590\n },\n {\n \"state\": \"ID\",\n \"age\": \"30-39\",\n \"population\": 209500\n },\n {\n \"state\": \"IL\",\n \"age\": \"30-39\",\n \"population\": 1721954\n },\n {\n \"state\": \"IN\",\n \"age\": \"30-39\",\n \"population\": 827086\n },\n {\n \"state\": \"IA\",\n \"age\": \"30-39\",\n \"population\": 383638\n },\n {\n \"state\": \"KS\",\n \"age\": \"30-39\",\n \"population\": 368732\n },\n {\n \"state\": \"KY\",\n \"age\": \"30-39\",\n \"population\": 558201\n },\n {\n \"state\": \"LA\",\n \"age\": \"30-39\",\n \"population\": 615411\n },\n {\n \"state\": \"ME\",\n \"age\": \"30-39\",\n \"population\": 147695\n },\n {\n \"state\": \"MD\",\n \"age\": \"30-39\",\n \"population\": 784097\n },\n {\n \"state\": \"MA\",\n \"age\": \"30-39\",\n \"population\": 847306\n },\n {\n \"state\": \"MI\",\n \"age\": \"30-39\",\n \"population\": 1162186\n },\n {\n \"state\": \"MN\",\n \"age\": \"30-39\",\n \"population\": 715583\n },\n {\n \"state\": \"MS\",\n \"age\": \"30-39\",\n \"population\": 374724\n },\n {\n \"state\": \"MO\",\n \"age\": \"30-39\",\n \"population\": 763002\n },\n {\n \"state\": \"MT\",\n \"age\": \"30-39\",\n \"population\": 125004\n },\n {\n \"state\": \"NE\",\n \"age\": \"30-39\",\n \"population\": 244236\n },\n {\n \"state\": \"NV\",\n \"age\": \"30-39\",\n \"population\": 390261\n },\n {\n \"state\": \"NH\",\n \"age\": \"30-39\",\n \"population\": 151409\n },\n {\n \"state\": \"NJ\",\n \"age\": \"30-39\",\n \"population\": 1143452\n },\n {\n \"state\": \"NM\",\n \"age\": \"30-39\",\n \"population\": 260579\n },\n {\n \"state\": \"NY\",\n \"age\": \"30-39\",\n \"population\": 2605355\n },\n {\n \"state\": \"NC\",\n \"age\": \"30-39\",\n \"population\": 1268976\n },\n {\n \"state\": \"ND\",\n \"age\": \"30-39\",\n \"population\": 94713\n },\n {\n \"state\": \"OH\",\n \"age\": \"30-39\",\n \"population\": 1398724\n },\n {\n \"state\": \"OK\",\n \"age\": \"30-39\",\n \"population\": 501392\n },\n {\n \"state\": \"OR\",\n \"age\": \"30-39\",\n \"population\": 537767\n },\n {\n \"state\": \"PA\",\n \"age\": \"30-39\",\n \"population\": 1520409\n },\n {\n \"state\": \"RI\",\n \"age\": \"30-39\",\n \"population\": 126503\n },\n {\n \"state\": \"SC\",\n \"age\": \"30-39\",\n \"population\": 596491\n },\n {\n \"state\": \"SD\",\n \"age\": \"30-39\",\n \"population\": 105499\n },\n {\n \"state\": \"TN\",\n \"age\": \"30-39\",\n \"population\": 837313\n },\n {\n \"state\": \"TX\",\n \"age\": \"30-39\",\n \"population\": 3770534\n },\n {\n \"state\": \"UT\",\n \"age\": \"30-39\",\n \"population\": 436010\n },\n {\n \"state\": \"VT\",\n \"age\": \"30-39\",\n \"population\": 70092\n },\n {\n \"state\": \"VA\",\n \"age\": \"30-39\",\n \"population\": 1112111\n },\n {\n \"state\": \"WA\",\n \"age\": \"30-39\",\n \"population\": 970613\n },\n {\n \"state\": \"WV\",\n \"age\": \"30-39\",\n \"population\": 220494\n },\n {\n \"state\": \"WI\",\n \"age\": \"30-39\",\n \"population\": 714479\n },\n {\n \"state\": \"WY\",\n \"age\": \"30-39\",\n \"population\": 76912\n },\n {\n \"state\": \"PR\",\n \"age\": \"30-39\",\n \"population\": 441842\n },\n {\n \"state\": \"AL\",\n \"age\": \"40-49\",\n \"population\": 625599\n },\n {\n \"state\": \"AK\",\n \"age\": \"40-49\",\n \"population\": 91539\n },\n {\n \"state\": \"AZ\",\n \"age\": \"40-49\",\n \"population\": 833290\n },\n {\n \"state\": \"AR\",\n \"age\": \"40-49\",\n \"population\": 370157\n },\n {\n \"state\": \"CA\",\n \"age\": \"40-49\",\n \"population\": 5179258\n },\n {\n \"state\": \"CO\",\n \"age\": \"40-49\",\n \"population\": 705450\n },\n {\n \"state\": \"CT\",\n \"age\": \"40-49\",\n \"population\": 496265\n },\n {\n \"state\": \"DE\",\n \"age\": \"40-49\",\n \"population\": 117588\n },\n {\n \"state\": \"DC\",\n \"age\": \"40-49\",\n \"population\": 80570\n },\n {\n \"state\": \"FL\",\n \"age\": \"40-49\",\n \"population\": 2575576\n },\n {\n \"state\": \"GA\",\n \"age\": \"40-49\",\n \"population\": 1404698\n },\n {\n \"state\": \"HI\",\n \"age\": \"40-49\",\n \"population\": 176904\n },\n {\n \"state\": \"ID\",\n \"age\": \"40-49\",\n \"population\": 194678\n },\n {\n \"state\": \"IL\",\n \"age\": \"40-49\",\n \"population\": 1697069\n },\n {\n \"state\": \"IN\",\n \"age\": \"40-49\",\n \"population\": 844059\n },\n {\n \"state\": \"IA\",\n \"age\": \"40-49\",\n \"population\": 370719\n },\n {\n \"state\": \"KS\",\n \"age\": \"40-49\",\n \"population\": 344427\n },\n {\n \"state\": \"KY\",\n \"age\": \"40-49\",\n \"population\": 580553\n },\n {\n \"state\": \"LA\",\n \"age\": \"40-49\",\n \"population\": 571991\n },\n {\n \"state\": \"ME\",\n \"age\": \"40-49\",\n \"population\": 176908\n },\n {\n \"state\": \"MD\",\n \"age\": \"40-49\",\n \"population\": 815875\n },\n {\n \"state\": \"MA\",\n \"age\": \"40-49\",\n \"population\": 916106\n },\n {\n \"state\": \"MI\",\n \"age\": \"40-49\",\n \"population\": 1283122\n },\n {\n \"state\": \"MN\",\n \"age\": \"40-49\",\n \"population\": 692201\n },\n {\n \"state\": \"MS\",\n \"age\": \"40-49\",\n \"population\": 377165\n },\n {\n \"state\": \"MO\",\n \"age\": \"40-49\",\n \"population\": 750989\n },\n {\n \"state\": \"MT\",\n \"age\": \"40-49\",\n \"population\": 116502\n },\n {\n \"state\": \"NE\",\n \"age\": \"40-49\",\n \"population\": 222479\n },\n {\n \"state\": \"NV\",\n \"age\": \"40-49\",\n \"population\": 387272\n },\n {\n \"state\": \"NH\",\n \"age\": \"40-49\",\n \"population\": 182703\n },\n {\n \"state\": \"NJ\",\n \"age\": \"40-49\",\n \"population\": 1254602\n },\n {\n \"state\": \"NM\",\n \"age\": \"40-49\",\n \"population\": 244346\n },\n {\n \"state\": \"NY\",\n \"age\": \"40-49\",\n \"population\": 2617327\n },\n {\n \"state\": \"NC\",\n \"age\": \"40-49\",\n \"population\": 1357746\n },\n {\n \"state\": \"ND\",\n \"age\": \"40-49\",\n \"population\": 80327\n },\n {\n \"state\": \"OH\",\n \"age\": \"40-49\",\n \"population\": 1490959\n },\n {\n \"state\": \"OK\",\n \"age\": \"40-49\",\n \"population\": 469410\n },\n {\n \"state\": \"OR\",\n \"age\": \"40-49\",\n \"population\": 507826\n },\n {\n \"state\": \"PA\",\n \"age\": \"40-49\",\n \"population\": 1645291\n },\n {\n \"state\": \"RI\",\n \"age\": \"40-49\",\n \"population\": 137892\n },\n {\n \"state\": \"SC\",\n \"age\": \"40-49\",\n \"population\": 619792\n },\n {\n \"state\": \"SD\",\n \"age\": \"40-49\",\n \"population\": 96288\n },\n {\n \"state\": \"TN\",\n \"age\": \"40-49\",\n \"population\": 866343\n },\n {\n \"state\": \"TX\",\n \"age\": \"40-49\",\n \"population\": 3545746\n },\n {\n \"state\": \"UT\",\n \"age\": \"40-49\",\n \"population\": 328569\n },\n {\n \"state\": \"VT\",\n \"age\": \"40-49\",\n \"population\": 79982\n },\n {\n \"state\": \"VA\",\n \"age\": \"40-49\",\n \"population\": 1134928\n },\n {\n \"state\": \"WA\",\n \"age\": \"40-49\",\n \"population\": 921205\n },\n {\n \"state\": \"WV\",\n \"age\": \"40-49\",\n \"population\": 238218\n },\n {\n \"state\": \"WI\",\n \"age\": \"40-49\",\n \"population\": 732280\n },\n {\n \"state\": \"WY\",\n \"age\": \"40-49\",\n \"population\": 68464\n },\n {\n \"state\": \"PR\",\n \"age\": \"40-49\",\n \"population\": 456009\n },\n {\n \"state\": \"AL\",\n \"age\": \"50-59\",\n \"population\": 673864\n },\n {\n \"state\": \"AK\",\n \"age\": \"50-59\",\n \"population\": 104569\n },\n {\n \"state\": \"AZ\",\n \"age\": \"50-59\",\n \"population\": 834858\n },\n {\n \"state\": \"AR\",\n \"age\": \"50-59\",\n \"population\": 395070\n },\n {\n \"state\": \"CA\",\n \"age\": \"50-59\",\n \"population\": 5042094\n },\n {\n \"state\": \"CO\",\n \"age\": \"50-59\",\n \"population\": 725661\n },\n {\n \"state\": \"CT\",\n \"age\": \"50-59\",\n \"population\": 546361\n },\n {\n \"state\": \"DE\",\n \"age\": \"50-59\",\n \"population\": 133331\n },\n {\n \"state\": \"DC\",\n \"age\": \"50-59\",\n \"population\": 74779\n },\n {\n \"state\": \"FL\",\n \"age\": \"50-59\",\n \"population\": 2762983\n },\n {\n \"state\": \"GA\",\n \"age\": \"50-59\",\n \"population\": 1337985\n },\n {\n \"state\": \"HI\",\n \"age\": \"50-59\",\n \"population\": 188438\n },\n {\n \"state\": \"ID\",\n \"age\": \"50-59\",\n \"population\": 205170\n },\n {\n \"state\": \"IL\",\n \"age\": \"50-59\",\n \"population\": 1773366\n },\n {\n \"state\": \"IN\",\n \"age\": \"50-59\",\n \"population\": 911778\n },\n {\n \"state\": \"IA\",\n \"age\": \"50-59\",\n \"population\": 427554\n },\n {\n \"state\": \"KS\",\n \"age\": \"50-59\",\n \"population\": 389834\n },\n {\n \"state\": \"KY\",\n \"age\": \"50-59\",\n \"population\": 623164\n },\n {\n \"state\": \"LA\",\n \"age\": \"50-59\",\n \"population\": 631936\n },\n {\n \"state\": \"ME\",\n \"age\": \"50-59\",\n \"population\": 215787\n },\n {\n \"state\": \"MD\",\n \"age\": \"50-59\",\n \"population\": 862778\n },\n {\n \"state\": \"MA\",\n \"age\": \"50-59\",\n \"population\": 979128\n },\n {\n \"state\": \"MI\",\n \"age\": \"50-59\",\n \"population\": 1454462\n },\n {\n \"state\": \"MN\",\n \"age\": \"50-59\",\n \"population\": 782655\n },\n {\n \"state\": \"MS\",\n \"age\": \"50-59\",\n \"population\": 400164\n },\n {\n \"state\": \"MO\",\n \"age\": \"50-59\",\n \"population\": 857534\n },\n {\n \"state\": \"MT\",\n \"age\": \"50-59\",\n \"population\": 149800\n },\n {\n \"state\": \"NE\",\n \"age\": \"50-59\",\n \"population\": 250911\n },\n {\n \"state\": \"NV\",\n \"age\": \"50-59\",\n \"population\": 373757\n },\n {\n \"state\": \"NH\",\n \"age\": \"50-59\",\n \"population\": 217950\n },\n {\n \"state\": \"NJ\",\n \"age\": \"50-59\",\n \"population\": 1307263\n },\n {\n \"state\": \"NM\",\n \"age\": \"50-59\",\n \"population\": 280363\n },\n {\n \"state\": \"NY\",\n \"age\": \"50-59\",\n \"population\": 2755620\n },\n {\n \"state\": \"NC\",\n \"age\": \"50-59\",\n \"population\": 1356117\n },\n {\n \"state\": \"ND\",\n \"age\": \"50-59\",\n \"population\": 98688\n },\n {\n \"state\": \"OH\",\n \"age\": \"50-59\",\n \"population\": 1677794\n },\n {\n \"state\": \"OK\",\n \"age\": \"50-59\",\n \"population\": 512850\n },\n {\n \"state\": \"OR\",\n \"age\": \"50-59\",\n \"population\": 534421\n },\n {\n \"state\": \"PA\",\n \"age\": \"50-59\",\n \"population\": 1881378\n },\n {\n \"state\": \"RI\",\n \"age\": \"50-59\",\n \"population\": 156127\n },\n {\n \"state\": \"SC\",\n \"age\": \"50-59\",\n \"population\": 663408\n },\n {\n \"state\": \"SD\",\n \"age\": \"50-59\",\n \"population\": 117012\n },\n {\n \"state\": \"TN\",\n \"age\": \"50-59\",\n \"population\": 904272\n },\n {\n \"state\": \"TX\",\n \"age\": \"50-59\",\n \"population\": 3344930\n },\n {\n \"state\": \"UT\",\n \"age\": \"50-59\",\n \"population\": 301596\n },\n {\n \"state\": \"VT\",\n \"age\": \"50-59\",\n \"population\": 99521\n },\n {\n \"state\": \"VA\",\n \"age\": \"50-59\",\n \"population\": 1162028\n },\n {\n \"state\": \"WA\",\n \"age\": \"50-59\",\n \"population\": 970407\n },\n {\n \"state\": \"WV\",\n \"age\": \"50-59\",\n \"population\": 269346\n },\n {\n \"state\": \"WI\",\n \"age\": \"50-59\",\n \"population\": 848672\n },\n {\n \"state\": \"WY\",\n \"age\": \"50-59\",\n \"population\": 81018\n },\n {\n \"state\": \"PR\",\n \"age\": \"50-59\",\n \"population\": 452503\n },\n {\n \"state\": \"AL\",\n \"age\": \"60-69\",\n \"population\": 548376\n },\n {\n \"state\": \"AK\",\n \"age\": \"60-69\",\n \"population\": 70473\n },\n {\n \"state\": \"AZ\",\n \"age\": \"60-69\",\n \"population\": 737884\n },\n {\n \"state\": \"AR\",\n \"age\": \"60-69\",\n \"population\": 329734\n },\n {\n \"state\": \"CA\",\n \"age\": \"60-69\",\n \"population\": 3737461\n },\n {\n \"state\": \"CO\",\n \"age\": \"60-69\",\n \"population\": 563376\n },\n {\n \"state\": \"CT\",\n \"age\": \"60-69\",\n \"population\": 400995\n },\n {\n \"state\": \"DE\",\n \"age\": \"60-69\",\n \"population\": 110822\n },\n {\n \"state\": \"DC\",\n \"age\": \"60-69\",\n \"population\": 56984\n },\n {\n \"state\": \"FL\",\n \"age\": \"60-69\",\n \"population\": 2404659\n },\n {\n \"state\": \"GA\",\n \"age\": \"60-69\",\n \"population\": 998253\n },\n {\n \"state\": \"HI\",\n \"age\": \"60-69\",\n \"population\": 164957\n },\n {\n \"state\": \"ID\",\n \"age\": \"60-69\",\n \"population\": 179429\n },\n {\n \"state\": \"IL\",\n \"age\": \"60-69\",\n \"population\": 1326121\n },\n {\n \"state\": \"IN\",\n \"age\": \"60-69\",\n \"population\": 704523\n },\n {\n \"state\": \"IA\",\n \"age\": \"60-69\",\n \"population\": 344037\n },\n {\n \"state\": \"KS\",\n \"age\": \"60-69\",\n \"population\": 300759\n },\n {\n \"state\": \"KY\",\n \"age\": \"60-69\",\n \"population\": 495736\n },\n {\n \"state\": \"LA\",\n \"age\": \"60-69\",\n \"population\": 488846\n },\n {\n \"state\": \"ME\",\n \"age\": \"60-69\",\n \"population\": 179540\n },\n {\n \"state\": \"MD\",\n \"age\": \"60-69\",\n \"population\": 636309\n },\n {\n \"state\": \"MA\",\n \"age\": \"60-69\",\n \"population\": 737805\n },\n {\n \"state\": \"MI\",\n \"age\": \"60-69\",\n \"population\": 1148131\n },\n {\n \"state\": \"MN\",\n \"age\": \"60-69\",\n \"population\": 577313\n },\n {\n \"state\": \"MS\",\n \"age\": \"60-69\",\n \"population\": 319443\n },\n {\n \"state\": \"MO\",\n \"age\": \"60-69\",\n \"population\": 668878\n },\n {\n \"state\": \"MT\",\n \"age\": \"60-69\",\n \"population\": 130977\n },\n {\n \"state\": \"NE\",\n \"age\": \"60-69\",\n \"population\": 195705\n },\n {\n \"state\": \"NV\",\n \"age\": \"60-69\",\n \"population\": 309651\n },\n {\n \"state\": \"NH\",\n \"age\": \"60-69\",\n \"population\": 164287\n },\n {\n \"state\": \"NJ\",\n \"age\": \"60-69\",\n \"population\": 946399\n },\n {\n \"state\": \"NM\",\n \"age\": \"60-69\",\n \"population\": 239044\n },\n {\n \"state\": \"NY\",\n \"age\": \"60-69\",\n \"population\": 2095207\n },\n {\n \"state\": \"NC\",\n \"age\": \"60-69\",\n \"population\": 1095320\n },\n {\n \"state\": \"ND\",\n \"age\": \"60-69\",\n \"population\": 73825\n },\n {\n \"state\": \"OH\",\n \"age\": \"60-69\",\n \"population\": 1320776\n },\n {\n \"state\": \"OK\",\n \"age\": \"60-69\",\n \"population\": 404704\n },\n {\n \"state\": \"OR\",\n \"age\": \"60-69\",\n \"population\": 490894\n },\n {\n \"state\": \"PA\",\n \"age\": \"60-69\",\n \"population\": 1491536\n },\n {\n \"state\": \"RI\",\n \"age\": \"60-69\",\n \"population\": 117653\n },\n {\n \"state\": \"SC\",\n \"age\": \"60-69\",\n \"population\": 579856\n },\n {\n \"state\": \"SD\",\n \"age\": \"60-69\",\n \"population\": 92824\n },\n {\n \"state\": \"TN\",\n \"age\": \"60-69\",\n \"population\": 741045\n },\n {\n \"state\": \"TX\",\n \"age\": \"60-69\",\n \"population\": 2431494\n },\n {\n \"state\": \"UT\",\n \"age\": \"60-69\",\n \"population\": 230007\n },\n {\n \"state\": \"VT\",\n \"age\": \"60-69\",\n \"population\": 82136\n },\n {\n \"state\": \"VA\",\n \"age\": \"60-69\",\n \"population\": 881763\n },\n {\n \"state\": \"WA\",\n \"age\": \"60-69\",\n \"population\": 784208\n },\n {\n \"state\": \"WV\",\n \"age\": \"60-69\",\n \"population\": 243108\n },\n {\n \"state\": \"WI\",\n \"age\": \"60-69\",\n \"population\": 645015\n },\n {\n \"state\": \"WY\",\n \"age\": \"60-69\",\n \"population\": 67484\n },\n {\n \"state\": \"PR\",\n \"age\": \"60-69\",\n \"population\": 411924\n },\n {\n \"state\": \"AL\",\n \"age\": \"70-79\",\n \"population\": 316598\n },\n {\n \"state\": \"AK\",\n \"age\": \"70-79\",\n \"population\": 28422\n },\n {\n \"state\": \"AZ\",\n \"age\": \"70-79\",\n \"population\": 466153\n },\n {\n \"state\": \"AR\",\n \"age\": \"70-79\",\n \"population\": 197985\n },\n {\n \"state\": \"CA\",\n \"age\": \"70-79\",\n \"population\": 2011678\n },\n {\n \"state\": \"CO\",\n \"age\": \"70-79\",\n \"population\": 274466\n },\n {\n \"state\": \"CT\",\n \"age\": \"70-79\",\n \"population\": 217827\n },\n {\n \"state\": \"DE\",\n \"age\": \"70-79\",\n \"population\": 65369\n },\n {\n \"state\": \"DC\",\n \"age\": \"70-79\",\n \"population\": 31362\n },\n {\n \"state\": \"FL\",\n \"age\": \"70-79\",\n \"population\": 1615547\n },\n {\n \"state\": \"GA\",\n \"age\": \"70-79\",\n \"population\": 528108\n },\n {\n \"state\": \"HI\",\n \"age\": \"70-79\",\n \"population\": 85345\n },\n {\n \"state\": \"ID\",\n \"age\": \"70-79\",\n \"population\": 97621\n },\n {\n \"state\": \"IL\",\n \"age\": \"70-79\",\n \"population\": 728821\n },\n {\n \"state\": \"IN\",\n \"age\": \"70-79\",\n \"population\": 384788\n },\n {\n \"state\": \"IA\",\n \"age\": \"70-79\",\n \"population\": 197223\n },\n {\n \"state\": \"KS\",\n \"age\": \"70-79\",\n \"population\": 166104\n },\n {\n \"state\": \"KY\",\n \"age\": \"70-79\",\n \"population\": 273961\n },\n {\n \"state\": \"LA\",\n \"age\": \"70-79\",\n \"population\": 266123\n },\n {\n \"state\": \"ME\",\n \"age\": \"70-79\",\n \"population\": 97899\n },\n {\n \"state\": \"MD\",\n \"age\": \"70-79\",\n \"population\": 330736\n },\n {\n \"state\": \"MA\",\n \"age\": \"70-79\",\n \"population\": 401931\n },\n {\n \"state\": \"MI\",\n \"age\": \"70-79\",\n \"population\": 619722\n },\n {\n \"state\": \"MN\",\n \"age\": \"70-79\",\n \"population\": 312906\n },\n {\n \"state\": \"MS\",\n \"age\": \"70-79\",\n \"population\": 181195\n },\n {\n \"state\": \"MO\",\n \"age\": \"70-79\",\n \"population\": 388086\n },\n {\n \"state\": \"MT\",\n \"age\": \"70-79\",\n \"population\": 70528\n },\n {\n \"state\": \"NE\",\n \"age\": \"70-79\",\n \"population\": 107650\n },\n {\n \"state\": \"NV\",\n \"age\": \"70-79\",\n \"population\": 173499\n },\n {\n \"state\": \"NH\",\n \"age\": \"70-79\",\n \"population\": 84791\n },\n {\n \"state\": \"NJ\",\n \"age\": \"70-79\",\n \"population\": 523620\n },\n {\n \"state\": \"NM\",\n \"age\": \"70-79\",\n \"population\": 135013\n },\n {\n \"state\": \"NY\",\n \"age\": \"70-79\",\n \"population\": 1160055\n },\n {\n \"state\": \"NC\",\n \"age\": \"70-79\",\n \"population\": 609234\n },\n {\n \"state\": \"ND\",\n \"age\": \"70-79\",\n \"population\": 41348\n },\n {\n \"state\": \"OH\",\n \"age\": \"70-79\",\n \"population\": 728158\n },\n {\n \"state\": \"OK\",\n \"age\": \"70-79\",\n \"population\": 239887\n },\n {\n \"state\": \"OR\",\n \"age\": \"70-79\",\n \"population\": 255809\n },\n {\n \"state\": \"PA\",\n \"age\": \"70-79\",\n \"population\": 850897\n },\n {\n \"state\": \"RI\",\n \"age\": \"70-79\",\n \"population\": 63359\n },\n {\n \"state\": \"SC\",\n \"age\": \"70-79\",\n \"population\": 322073\n },\n {\n \"state\": \"SD\",\n \"age\": \"70-79\",\n \"population\": 50398\n },\n {\n \"state\": \"TN\",\n \"age\": \"70-79\",\n \"population\": 414939\n },\n {\n \"state\": \"TX\",\n \"age\": \"70-79\",\n \"population\": 1291486\n },\n {\n \"state\": \"UT\",\n \"age\": \"70-79\",\n \"population\": 123674\n },\n {\n \"state\": \"VT\",\n \"age\": \"70-79\",\n \"population\": 42978\n },\n {\n \"state\": \"VA\",\n \"age\": \"70-79\",\n \"population\": 475141\n },\n {\n \"state\": \"WA\",\n \"age\": \"70-79\",\n \"population\": 401094\n },\n {\n \"state\": \"WV\",\n \"age\": \"70-79\",\n \"population\": 138134\n },\n {\n \"state\": \"WI\",\n \"age\": \"70-79\",\n \"population\": 350772\n },\n {\n \"state\": \"WY\",\n \"age\": \"70-79\",\n \"population\": 32819\n },\n {\n \"state\": \"PR\",\n \"age\": \"70-79\",\n \"population\": 268783\n },\n {\n \"state\": \"AL\",\n \"age\": \"≥80\",\n \"population\": 174781\n },\n {\n \"state\": \"AK\",\n \"age\": \"≥80\",\n \"population\": 12503\n },\n {\n \"state\": \"AZ\",\n \"age\": \"≥80\",\n \"population\": 254716\n },\n {\n \"state\": \"AR\",\n \"age\": \"≥80\",\n \"population\": 113468\n },\n {\n \"state\": \"CA\",\n \"age\": \"≥80\",\n \"population\": 1311374\n },\n {\n \"state\": \"CO\",\n \"age\": \"≥80\",\n \"population\": 155175\n },\n {\n \"state\": \"CT\",\n \"age\": \"≥80\",\n \"population\": 159475\n },\n {\n \"state\": \"DE\",\n \"age\": \"≥80\",\n \"population\": 35937\n },\n {\n \"state\": \"DC\",\n \"age\": \"≥80\",\n \"population\": 19658\n },\n {\n \"state\": \"FL\",\n \"age\": \"≥80\",\n \"population\": 1019566\n },\n {\n \"state\": \"GA\",\n \"age\": \"≥80\",\n \"population\": 269182\n },\n {\n \"state\": \"HI\",\n \"age\": \"≥80\",\n \"population\": 66060\n },\n {\n \"state\": \"ID\",\n \"age\": \"≥80\",\n \"population\": 54234\n },\n {\n \"state\": \"IL\",\n \"age\": \"≥80\",\n \"population\": 478948\n },\n {\n \"state\": \"IN\",\n \"age\": \"≥80\",\n \"population\": 243131\n },\n {\n \"state\": \"IA\",\n \"age\": \"≥80\",\n \"population\": 143583\n },\n {\n \"state\": \"KS\",\n \"age\": \"≥80\",\n \"population\": 117637\n },\n {\n \"state\": \"KY\",\n \"age\": \"≥80\",\n \"population\": 155074\n },\n {\n \"state\": \"LA\",\n \"age\": \"≥80\",\n \"population\": 152063\n },\n {\n \"state\": \"ME\",\n \"age\": \"≥80\",\n \"population\": 62007\n },\n {\n \"state\": \"MD\",\n \"age\": \"≥80\",\n \"population\": 208079\n },\n {\n \"state\": \"MA\",\n \"age\": \"≥80\",\n \"population\": 288408\n },\n {\n \"state\": \"MI\",\n \"age\": \"≥80\",\n \"population\": 398303\n },\n {\n \"state\": \"MN\",\n \"age\": \"≥80\",\n \"population\": 215985\n },\n {\n \"state\": \"MS\",\n \"age\": \"≥80\",\n \"population\": 100689\n },\n {\n \"state\": \"MO\",\n \"age\": \"≥80\",\n \"population\": 242554\n },\n {\n \"state\": \"MT\",\n \"age\": \"≥80\",\n \"population\": 41920\n },\n {\n \"state\": \"NE\",\n \"age\": \"≥80\",\n \"population\": 78504\n },\n {\n \"state\": \"NV\",\n \"age\": \"≥80\",\n \"population\": 82273\n },\n {\n \"state\": \"NH\",\n \"age\": \"≥80\",\n \"population\": 52552\n },\n {\n \"state\": \"NJ\",\n \"age\": \"≥80\",\n \"population\": 367432\n },\n {\n \"state\": \"NM\",\n \"age\": \"≥80\",\n \"population\": 74393\n },\n {\n \"state\": \"NY\",\n \"age\": \"≥80\",\n \"population\": 804091\n },\n {\n \"state\": \"NC\",\n \"age\": \"≥80\",\n \"population\": 342497\n },\n {\n \"state\": \"ND\",\n \"age\": \"≥80\",\n \"population\": 32206\n },\n {\n \"state\": \"OH\",\n \"age\": \"≥80\",\n \"population\": 481890\n },\n {\n \"state\": \"OK\",\n \"age\": \"≥80\",\n \"population\": 138055\n },\n {\n \"state\": \"OR\",\n \"age\": \"≥80\",\n \"population\": 157153\n },\n {\n \"state\": \"PA\",\n \"age\": \"≥80\",\n \"population\": 615069\n },\n {\n \"state\": \"RI\",\n \"age\": \"≥80\",\n \"population\": 51021\n },\n {\n \"state\": \"SC\",\n \"age\": \"≥80\",\n \"population\": 166727\n },\n {\n \"state\": \"SD\",\n \"age\": \"≥80\",\n \"population\": 38540\n },\n {\n \"state\": \"TN\",\n \"age\": \"≥80\",\n \"population\": 227483\n },\n {\n \"state\": \"TX\",\n \"age\": \"≥80\",\n \"population\": 732179\n },\n {\n \"state\": \"UT\",\n \"age\": \"≥80\",\n \"population\": 70711\n },\n {\n \"state\": \"VT\",\n \"age\": \"≥80\",\n \"population\": 26656\n },\n {\n \"state\": \"VA\",\n \"age\": \"≥80\",\n \"population\": 274606\n },\n {\n \"state\": \"WA\",\n \"age\": \"≥80\",\n \"population\": 242589\n },\n {\n \"state\": \"WV\",\n \"age\": \"≥80\",\n \"population\": 79201\n },\n {\n \"state\": \"WI\",\n \"age\": \"≥80\",\n \"population\": 241747\n },\n {\n \"state\": \"WY\",\n \"age\": \"≥80\",\n \"population\": 19682\n },\n {\n \"state\": \"PR\",\n \"age\": \"≥80\",\n \"population\": 148963\n }\n ]\n },\n transform: [\n { type: 'stackY' },\n { type: 'sortX', by: 'y', reverse: true, slice: 5 },\n ],\n encode: {\n x: 'state',\n y: 'population',\n color: 'age',\n },\n axis: { y: { labelFormatter: '~s' } },\n interaction: {\n elementSelectByColor: {\n single: true, // 设置为单选模式\n background: true,\n link: true,\n },\n },\n});\n\nchart.render();", + "generatedCode": "", + "duration": 35274, + "retrievedSkillIds": [ + "g2-mark-interval-stacked", + "g2-mark-interval-normalized", + "g2-transform-sorty", + "g2-mark-interval-grouped", + "g2-interaction-brushx-filter" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": true, + "issues": [ + "缺少 import/require 语句", + "缺少 Chart/Graph 实例化", + "缺少 render() 调用" + ], + "warnings": [], + "codeLength": 0, + "expectedLength": 36881, + "similarity": 0, + "extractedCode": "", + "structuralFeatures": { + "imports": [], + "functionCalls": [], + "objectKeys": [], + "stringLiterals": [], + "apiPatterns": [] + } + } + }, + { + "id": "case-76", + "query": "根据描述绘制图表,使用 G2 渲染一个折线图,展示1875年至2014年某地区人口随时间变化的趋势,并在图表下方叠加两个时间范围区域(纳粹统治时期和东德时期)作为背景标注,包含折线、数据点以及彩色时间区间标记。\n参考数据:\n[{\"year\":\"1875\",\"population\":1309},{\"year\":\"1890\",\"population\":1558},{\"year\":\"1910\",\"population\":4512},{\"year\":\"1925\",\"population\":8180},{\"year\":\"1933\",\"population\":15915},{\"year\":\"1939\",\"population\":24824},{\"year\":\"1946\",\"population\":28275},{\"year\":\"1950\",\"population\":29189},{\"year\":\"1964\",\"population\":29881},{\"year\":\"1971\",\"population\":26007}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\n/**\n * A recreation of this demo: https://vega.github.io/vega-lite/examples/layer_falkensee.html\n */\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'view',\n width: 600,\n height: 360,\n paddingLeft: 60,\n data: {\n type: 'inline',\n value: [\n {\n \"year\": \"1875\",\n \"population\": 1309\n },\n {\n \"year\": \"1890\",\n \"population\": 1558\n },\n {\n \"year\": \"1910\",\n \"population\": 4512\n },\n {\n \"year\": \"1925\",\n \"population\": 8180\n },\n {\n \"year\": \"1933\",\n \"population\": 15915\n },\n {\n \"year\": \"1939\",\n \"population\": 24824\n },\n {\n \"year\": \"1946\",\n \"population\": 28275\n },\n {\n \"year\": \"1950\",\n \"population\": 29189\n },\n {\n \"year\": \"1964\",\n \"population\": 29881\n },\n {\n \"year\": \"1971\",\n \"population\": 26007\n },\n {\n \"year\": \"1981\",\n \"population\": 24029\n },\n {\n \"year\": \"1985\",\n \"population\": 23340\n },\n {\n \"year\": \"1989\",\n \"population\": 22307\n },\n {\n \"year\": \"1990\",\n \"population\": 22087\n },\n {\n \"year\": \"1991\",\n \"population\": 22139\n },\n {\n \"year\": \"1992\",\n \"population\": 22105\n },\n {\n \"year\": \"1993\",\n \"population\": 22242\n },\n {\n \"year\": \"1994\",\n \"population\": 22801\n },\n {\n \"year\": \"1995\",\n \"population\": 24273\n },\n {\n \"year\": \"1996\",\n \"population\": 25640\n },\n {\n \"year\": \"1997\",\n \"population\": 27393\n },\n {\n \"year\": \"1998\",\n \"population\": 29505\n },\n {\n \"year\": \"1999\",\n \"population\": 32124\n },\n {\n \"year\": \"2000\",\n \"population\": 33791\n },\n {\n \"year\": \"2001\",\n \"population\": 35297\n },\n {\n \"year\": \"2002\",\n \"population\": 36179\n },\n {\n \"year\": \"2003\",\n \"population\": 36829\n },\n {\n \"year\": \"2004\",\n \"population\": 37493\n },\n {\n \"year\": \"2005\",\n \"population\": 38376\n },\n {\n \"year\": \"2006\",\n \"population\": 39008\n },\n {\n \"year\": \"2007\",\n \"population\": 39366\n },\n {\n \"year\": \"2008\",\n \"population\": 39821\n },\n {\n \"year\": \"2009\",\n \"population\": 40179\n },\n {\n \"year\": \"2010\",\n \"population\": 40511\n },\n {\n \"year\": \"2011\",\n \"population\": 40465\n },\n {\n \"year\": \"2012\",\n \"population\": 40905\n },\n {\n \"year\": \"2013\",\n \"population\": 41258\n },\n {\n \"year\": \"2014\",\n \"population\": 41777\n }\n ],\n },\n children: [\n {\n type: 'rangeX',\n data: [\n { year: [new Date('1933'), new Date('1945')], event: 'Nazi Rule' },\n {\n year: [new Date('1948'), new Date('1989')],\n event: 'GDR (East Germany)',\n },\n ],\n encode: { x: 'year', color: 'event' },\n scale: { color: { independent: true, range: ['#FAAD14', '#30BF78'] } },\n style: { fillOpacity: 0.75 },\n },\n {\n type: 'line',\n encode: { x: (d) => new Date(d.year), y: 'population', color: '#333' },\n },\n {\n type: 'point',\n encode: { x: (d) => new Date(d.year), y: 'population', color: '#333' },\n style: { lineWidth: 1.5 },\n },\n ],\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst populationData = [\n { year: '1875', population: 1309 },\n { year: '1890', population: 1558 },\n { year: '1910', population: 4512 },\n { year: '1925', population: 8180 },\n { year: '1933', population: 15915 },\n { year: '1939', population: 24824 },\n { year: '1946', population: 28275 },\n { year: '1950', population: 29189 },\n { year: '1964', population: 29881 },\n { year: '1971', population: 26007 },\n];\n\nchart.options({\n type: 'view',\n autoFit: true,\n children: [\n {\n type: 'rangeX',\n data: [\n { year: [new Date('1933'), new Date('1945')], event: '纳粹统治时期' },\n { year: [new Date('1948'), new Date('1989')], event: '东德时期' },\n ],\n encode: { x: 'year', color: 'event' },\n scale: {\n color: {\n independent: true,\n range: ['#FAAD14', '#30BF78'],\n },\n },\n style: { fillOpacity: 0.75 },\n tooltip: false,\n },\n {\n type: 'line',\n data: populationData,\n encode: {\n x: (d) => new Date(d.year),\n y: 'population',\n },\n style: { stroke: '#333', lineWidth: 2 },\n },\n {\n type: 'point',\n data: populationData,\n encode: {\n x: (d) => new Date(d.year),\n y: 'population',\n },\n style: { fill: '#333', r: 3 },\n },\n ],\n});\n\nchart.render();", + "duration": 13992, + "retrievedSkillIds": [ + "g2-mark-line-basic", + "g2-mark-line-multi", + "g2-mark-rangex", + "g2-mark-link", + "g2-scale-linear" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1433, + "expectedLength": 3189, + "similarity": 0.8388123449986222, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst populationData = [\n { year: '1875', population: 1309 },\n { year: '1890', population: 1558 },\n { year: '1910', population: 4512 },\n { year: '1925', population: 8180 },\n { year: '1933', population: 15915 },\n { year: '1939', population: 24824 },\n { year: '1946', population: 28275 },\n { year: '1950', population: 29189 },\n { year: '1964', population: 29881 },\n { year: '1971', population: 26007 },\n];\n\nchart.options({\n type: 'view',\n autoFit: true,\n children: [\n {\n type: 'rangeX',\n data: [\n { year: [new Date('1933'), new Date('1945')], event: '纳粹统治时期' },\n { year: [new Date('1948'), new Date('1989')], event: '东德时期' },\n ],\n encode: { x: 'year', color: 'event' },\n scale: {\n color: {\n independent: true,\n range: ['#FAAD14', '#30BF78'],\n },\n },\n style: { fillOpacity: 0.75 },\n tooltip: false,\n },\n {\n type: 'line',\n data: populationData,\n encode: {\n x: (d) => new Date(d.year),\n y: 'population',\n },\n style: { stroke: '#333', lineWidth: 2 },\n },\n {\n type: 'point',\n data: populationData,\n encode: {\n x: (d) => new Date(d.year),\n y: 'population',\n },\n style: { fill: '#333', r: 3 },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "Date", + "Date", + "Date", + "Date", + "Date", + "Date", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "year", + "population", + "year", + "population", + "year", + "population", + "year", + "population", + "year", + "population", + "year", + "population", + "year", + "population", + "year", + "population", + "year", + "population", + "year", + "population", + "type", + "autoFit", + "children", + "type", + "data", + "year", + "event", + "year", + "event", + "encode", + "x", + "color", + "scale", + "color", + "independent", + "range", + "style", + "fillOpacity", + "tooltip", + "type", + "data", + "encode", + "x", + "y", + "style", + "stroke", + "lineWidth", + "type", + "data", + "encode", + "x", + "y", + "style", + "fill", + "r" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "view.children", + "type.view", + "type.line", + "type.point" + ] + } + } + }, + { + "id": "case-77", + "query": "根据描述绘制图表,使用 G2 绘制一个韦恩图,展示不同用户群体之间的交集关系。数据包含多个集合及其交集的大小,通过路径形状、颜色编码和标签显示各部分的用户数量。支持交互高亮和提示信息。参考数据:[{\"sets\":[\"营销活动\"],\"size\":8000,\"label\":\"营销\"},{\"sets\":[\"付费转化\"],\"size\":3000,\"label\":\"付费\"},{\"sets\":[\"高留存\"],\"size\":4500,\"label\":\"留存\"},{\"sets\":[\"营销活动\",\"付费转化\"],\"size\":1800,\"label\":\"转化用户\"},{\"sets\":[\"营销活动\",\"高留存\"],\"size\":2200,\"label\":\"活跃用户\"},{\"sets\":[\"付费转化\",\"高留存\"],\"size\":900,\"label\":\"高价值用户\"},{\"sets\":[\"营销活动\",\"付费转化\",\"高留存\"],\"size\":600,\"label\":\"忠诚用户\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['营销活动'], size: 8000, label: '营销' },\n { sets: ['付费转化'], size: 3000, label: '付费' },\n { sets: ['高留存'], size: 4500, label: '留存' },\n { sets: ['营销活动', '付费转化'], size: 1800, label: '转化用户' },\n { sets: ['营销活动', '高留存'], size: 2200, label: '活跃用户' },\n { sets: ['付费转化', '高留存'], size: 900, label: '高价值用户' },\n { sets: ['营销活动', '付费转化', '高留存'], size: 600, label: '忠诚用户' },\n ],\n transform: [\n {\n type: 'venn',\n padding: 20,\n },\n ],\n },\n encode: {\n d: 'path',\n color: (d) => `level-${d.sets.length}` ,\n },\n labels: [\n {\n position: 'inside',\n text: (d) => `${d.label}\\n${d.size}人`,\n style: {\n fontSize: 12,\n fontWeight: '600',\n textBaseline: 'middle',\n },\n transform: [{ type: 'overlapDodgeY' }],\n },\n ],\n style: {\n fillOpacity: (d) => 0.8 - d.sets.length * 0.15,\n stroke: '#fff',\n lineWidth: 2,\n },\n interaction: { elementHighlight: true },\n state: { inactive: { opacity: 0.2 }, active: { opacity: 0.8 } },\n legend: {\n color: {\n position: 'right',\n title: false,\n itemLabelFontSize: 12 \n }\n },\n tooltip: {\n items: [\n { name: '用户群体', field: 'label' },\n { name: '数量', field: 'size' },\n { name: '集合', field: 'key' },\n ],\n },\n axis: false,\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['营销活动'], size: 8000, label: '营销' },\n { sets: ['付费转化'], size: 3000, label: '付费' },\n { sets: ['高留存'], size: 4500, label: '留存' },\n { sets: ['营销活动', '付费转化'], size: 1800, label: '转化用户' },\n { sets: ['营销活动', '高留存'], size: 2200, label: '活跃用户' },\n { sets: ['付费转化', '高留存'], size: 900, label: '高价值用户' },\n { sets: ['营销活动', '付费转化', '高留存'], size: 600, label: '忠诚用户' },\n ],\n transform: [{ type: 'venn' }],\n },\n encode: {\n d: 'path',\n color: 'key',\n },\n labels: [\n {\n position: 'inside',\n text: (d) => `${d.label}\\n${d.size}`,\n style: {\n fontSize: 12,\n textAlign: 'center',\n fill: '#fff',\n },\n },\n ],\n style: {\n opacity: (d) => (d.sets.length > 1 ? 0.4 : 0.8),\n lineWidth: 2,\n stroke: '#fff',\n },\n interaction: {\n elementHighlight: true,\n },\n tooltip: {\n title: (d) => d.label,\n items: [\n { field: 'size', name: '用户数量' },\n { field: 'sets', name: '所属集合', formatter: (v) => v.join(' + ') },\n ],\n },\n});\n\nchart.render();", + "duration": 11097, + "retrievedSkillIds": [ + "g2-mark-venn", + "g2-mark-arc-donut", + "g2-mark-interval-basic", + "g2-mark-histogram", + "g2-interaction-legend-highlight" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1231, + "expectedLength": 1521, + "similarity": 0.9437254130605823, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['营销活动'], size: 8000, label: '营销' },\n { sets: ['付费转化'], size: 3000, label: '付费' },\n { sets: ['高留存'], size: 4500, label: '留存' },\n { sets: ['营销活动', '付费转化'], size: 1800, label: '转化用户' },\n { sets: ['营销活动', '高留存'], size: 2200, label: '活跃用户' },\n { sets: ['付费转化', '高留存'], size: 900, label: '高价值用户' },\n { sets: ['营销活动', '付费转化', '高留存'], size: 600, label: '忠诚用户' },\n ],\n transform: [{ type: 'venn' }],\n },\n encode: {\n d: 'path',\n color: 'key',\n },\n labels: [\n {\n position: 'inside',\n text: (d) => `${d.label}\\n${d.size}`,\n style: {\n fontSize: 12,\n textAlign: 'center',\n fill: '#fff',\n },\n },\n ],\n style: {\n opacity: (d) => (d.sets.length > 1 ? 0.4 : 0.8),\n lineWidth: 2,\n stroke: '#fff',\n },\n interaction: {\n elementHighlight: true,\n },\n tooltip: {\n title: (d) => d.label,\n items: [\n { field: 'size', name: '用户数量' },\n { field: 'sets', name: '所属集合', formatter: (v) => v.join(' + ') },\n ],\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "join", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "type", + "value", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "transform", + "type", + "encode", + "d", + "color", + "labels", + "position", + "text", + "style", + "fontSize", + "textAlign", + "fill", + "style", + "opacity", + "4", + "lineWidth", + "stroke", + "interaction", + "elementHighlight", + "tooltip", + "title", + "items", + "field", + "name", + "field", + "name", + "formatter" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "interaction", + "x6.labels", + "x6.label" + ] + } + } + }, + { + "id": "case-78", + "query": "根据描述绘制图表,使用 treemap 类型的图表展示全球各国 GDP 数据,通过颜色区分不同国家的经济增长率等级,并在每个区块上显示国家名称和对应的 GDP 值。支持鼠标悬停提示框,展示详细数值和增长率信息,同时配有图例说明颜色所代表的增长等级。参考数据:[{\"name\":\"美国\",\"value\":25460,\"growth\":2.1},{\"name\":\"中国\",\"value\":17960,\"growth\":5.2},{\"name\":\"日本\",\"value\":4230,\"growth\":1.3},{\"name\":\"德国\",\"value\":4070,\"growth\":0.7},{\"name\":\"印度\",\"value\":3730,\"growth\":6.8},{\"name\":\"其他\",\"value\":32400}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n autoFit: true,\n});\n\nchart.options({\n type: 'treemap',\n data: {\n value: {\n name: '全球GDP',\n children: [\n { name: '美国', value: 25460, growth: 2.1 },\n { name: '中国', value: 17960, growth: 5.2 },\n { name: '日本', value: 4230, growth: 1.3 },\n { name: '德国', value: 4070, growth: 0.7 },\n { name: '印度', value: 3730, growth: 6.8 },\n { name: '其他', value: 32400 }\n ]\n }\n },\n encode: {\n value: 'value',\n color: (d) => d.data.growth ? (d.data.growth > 3 ? 'high' : d.data.growth > 2 ? 'medium' : 'low') : 'default'\n },\n scale: {\n color: {\n domain: ['high', 'medium', 'low', 'default'],\n range: ['#34a853', '#fbbc05', '#ea4335', '#e8e8e8']\n }\n },\n style: {\n labelText: (d) => `${d.data.name}\\n$${d.value}B`,\n labelFill: '#fff',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n stroke: '#f5f5f5',\n lineWidth: 2,\n radius: 4\n },\n tooltip: {\n title: (d) => d.data.name,\n items: [\n { field: 'value', name: 'GDP(亿美元)', valueFormatter: '$.2s' },\n { value: (d) => d.data.growth ? `${d.data.growth}%` : 'N/A', name: '年增长率' }\n ]\n },\n legend: {\n color: {\n position: 'right',\n title: '增长等级'\n }\n }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = {\n name: '全球GDP',\n children: [\n { name: '美国', value: 25460, growth: 2.1 },\n { name: '中国', value: 17960, growth: 5.2 },\n { name: '日本', value: 4230, growth: 1.3 },\n { name: '德国', value: 4070, growth: 0.7 },\n { name: '印度', value: 3730, growth: 6.8 },\n { name: '其他', value: 32400, growth: 0 }\n ]\n};\n\nchart.options({\n type: 'treemap',\n data: {\n value: data\n },\n encode: {\n value: 'value',\n color: (d) => d.data?.growth ?? 0,\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'ylGn',\n domain: [0, 7],\n },\n },\n layout: {\n tile: 'treemapSquarify',\n paddingInner: 2,\n },\n style: {\n labelText: (d) => {\n const name = d.data?.name || '';\n const value = d.data?.value;\n return value ? `${name}\\n${value}` : name;\n },\n labelFill: '#fff',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n fillOpacity: 0.9,\n stroke: '#fff',\n lineWidth: 2,\n },\n tooltip: {\n title: (d) => d.data?.name,\n items: [\n (d) => ({ name: 'GDP (十亿美元)', value: d.data?.value }),\n (d) => ({ name: '增长率 (%)', value: d.data?.growth ?? '-' })\n ],\n },\n legend: {\n color: {\n position: 'top',\n title: '经济增长率 (%)',\n },\n },\n});\n\nchart.render();", + "duration": 27560, + "retrievedSkillIds": [ + "g2-mark-treemap", + "g2-mark-tree", + "g2-concept-chart-selection", + "g2-mark-linex-liney", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1377, + "expectedLength": 1348, + "similarity": 0.8828160809778457, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = {\n name: '全球GDP',\n children: [\n { name: '美国', value: 25460, growth: 2.1 },\n { name: '中国', value: 17960, growth: 5.2 },\n { name: '日本', value: 4230, growth: 1.3 },\n { name: '德国', value: 4070, growth: 0.7 },\n { name: '印度', value: 3730, growth: 6.8 },\n { name: '其他', value: 32400, growth: 0 }\n ]\n};\n\nchart.options({\n type: 'treemap',\n data: {\n value: data\n },\n encode: {\n value: 'value',\n color: (d) => d.data?.growth ?? 0,\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'ylGn',\n domain: [0, 7],\n },\n },\n layout: {\n tile: 'treemapSquarify',\n paddingInner: 2,\n },\n style: {\n labelText: (d) => {\n const name = d.data?.name || '';\n const value = d.data?.value;\n return value ? `${name}\\n${value}` : name;\n },\n labelFill: '#fff',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n fillOpacity: 0.9,\n stroke: '#fff',\n lineWidth: 2,\n },\n tooltip: {\n title: (d) => d.data?.name,\n items: [\n (d) => ({ name: 'GDP (十亿美元)', value: d.data?.value }),\n (d) => ({ name: '增长率 (%)', value: d.data?.growth ?? '-' })\n ],\n },\n legend: {\n color: {\n position: 'top',\n title: '经济增长率 (%)',\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "GDP", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "name", + "children", + "name", + "value", + "growth", + "name", + "value", + "growth", + "name", + "value", + "growth", + "name", + "value", + "growth", + "name", + "value", + "growth", + "name", + "value", + "growth", + "type", + "data", + "value", + "encode", + "value", + "color", + "scale", + "color", + "type", + "palette", + "domain", + "layout", + "tile", + "paddingInner", + "style", + "labelText", + "labelFill", + "labelFontSize", + "labelFontWeight", + "fillOpacity", + "stroke", + "lineWidth", + "tooltip", + "title", + "items", + "name", + "value", + "name", + "value", + "legend", + "color", + "position", + "title" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "view.children" + ] + } + } + }, + { + "id": "case-79", + "query": "根据描述绘制图表,使用 G2 创建一个横向的视图,渲染多个部门的绩效指标数据,包含区间柱状图(ranges)、实际达成柱状图(measures)和目标线(target),通过颜色区分部门,用于对比不同部门关键指标的目标值与实际完成情况。参考数据:\n[{\"department\":\"销售部\",\"indicator\":\"销售额\",\"ranges\":100,\"measures\":85,\"target\":90},{\"department\":\"销售部\",\"indicator\":\"客户数\",\"ranges\":100,\"measures\":92,\"target\":85},{\"department\":\"市场部\",\"indicator\":\"品牌知名度\",\"ranges\":100,\"measures\":78,\"target\":80},{\"department\":\"市场部\",\"indicator\":\"营销投入ROI\",\"ranges\":100,\"measures\":88,\"target\":85}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nconst multiData = [\n {\n department: '销售部',\n indicator: '销售额',\n ranges: 100,\n measures: 85,\n target: 90,\n },\n {\n department: '销售部',\n indicator: '客户数',\n ranges: 100,\n measures: 92,\n target: 85,\n },\n {\n department: '市场部',\n indicator: '品牌知名度',\n ranges: 100,\n measures: 78,\n target: 80,\n },\n {\n department: '市场部',\n indicator: '营销投入ROI',\n ranges: 100,\n measures: 88,\n target: 85,\n },\n];\n\nchart.options({\n type: 'view',\n coordinate: { transform: [{ type: 'transpose' }] },\n children: [\n {\n type: 'interval',\n data: multiData,\n encode: { x: 'indicator', y: 'ranges', color: '#f0f0f0' },\n style: { maxWidth: 30 },\n },\n {\n type: 'interval',\n data: multiData,\n encode: { x: 'indicator', y: 'measures', color: 'department' },\n style: { maxWidth: 20 },\n label: {\n text: 'measures',\n position: 'right',\n textAlign: 'left',\n dx: 5,\n },\n },\n {\n type: 'point',\n data: multiData,\n encode: {\n x: 'indicator',\n y: 'target',\n shape: 'line',\n color: '#666',\n size: 6,\n },\n axis: {\n y: {\n grid: true,\n title: '完成度',\n },\n x: {\n title: '关键指标',\n },\n },\n },\n ],\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"department\":\"销售部\",\"indicator\":\"销售额\",\"ranges\":100,\"measures\":85,\"target\":90},\n {\"department\":\"销售部\",\"indicator\":\"客户数\",\"ranges\":100,\"measures\":92,\"target\":85},\n {\"department\":\"市场部\",\"indicator\":\"品牌知名度\",\"ranges\":100,\"measures\":78,\"target\":80},\n {\"department\":\"市场部\",\"indicator\":\"营销投入ROI\",\"ranges\":100,\"measures\":88,\"target\":85}\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 400,\n});\n\nchart.options({\n type: 'view',\n coordinate: { transform: [{ type: 'transpose' }] },\n children: [\n {\n type: 'interval',\n data,\n encode: { \n x: 'indicator', \n y: 'ranges'\n },\n style: { fill: '#f5f5f5', maxWidth: 35 }\n },\n {\n type: 'interval',\n data,\n encode: { \n x: 'indicator', \n y: 'measures',\n color: 'department'\n },\n style: { maxWidth: 25 },\n labels: [\n {\n text: 'measures',\n position: 'outside',\n style: { fill: '#666', fontSize: 11 }\n }\n ]\n },\n {\n type: 'point',\n data,\n encode: {\n x: 'indicator',\n y: 'target',\n shape: 'line'\n },\n style: { stroke: '#262626', lineWidth: 3, size: 12 }\n }\n ]\n});\n\nchart.render();", + "duration": 28738, + "retrievedSkillIds": [ + "g2-mark-interval-basic", + "g2-mark-bullet", + "g2-mark-arc-pie", + "g2-interaction-element-point-move", + "g2-mark-tree" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1289, + "expectedLength": 1455, + "similarity": 0.6914106545628285, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"department\":\"销售部\",\"indicator\":\"销售额\",\"ranges\":100,\"measures\":85,\"target\":90},\n {\"department\":\"销售部\",\"indicator\":\"客户数\",\"ranges\":100,\"measures\":92,\"target\":85},\n {\"department\":\"市场部\",\"indicator\":\"品牌知名度\",\"ranges\":100,\"measures\":78,\"target\":80},\n {\"department\":\"市场部\",\"indicator\":\"营销投入ROI\",\"ranges\":100,\"measures\":88,\"target\":85}\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 400,\n});\n\nchart.options({\n type: 'view',\n coordinate: { transform: [{ type: 'transpose' }] },\n children: [\n {\n type: 'interval',\n data,\n encode: { \n x: 'indicator', \n y: 'ranges'\n },\n style: { fill: '#f5f5f5', maxWidth: 35 }\n },\n {\n type: 'interval',\n data,\n encode: { \n x: 'indicator', \n y: 'measures',\n color: 'department'\n },\n style: { maxWidth: 25 },\n labels: [\n {\n text: 'measures',\n position: 'outside',\n style: { fill: '#666', fontSize: 11 }\n }\n ]\n },\n {\n type: 'point',\n data,\n encode: {\n x: 'indicator',\n y: 'target',\n shape: 'line'\n },\n style: { stroke: '#262626', lineWidth: 3, size: 12 }\n }\n ]\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "coordinate", + "transform", + "type", + "children", + "type", + "encode", + "x", + "y", + "style", + "fill", + "maxWidth", + "type", + "encode", + "x", + "y", + "color", + "style", + "maxWidth", + "labels", + "text", + "position", + "style", + "fill", + "fontSize", + "type", + "encode", + "x", + "y", + "shape", + "style", + "stroke", + "lineWidth", + "size" + ], + "stringLiterals": [ + "department", + "indicator", + "ranges", + "measures", + "target", + "department", + "indicator", + "ranges", + "measures", + "target", + "department", + "indicator", + "ranges", + "measures", + "target", + "department", + "indicator", + "ranges", + "measures", + "target" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "view.children", + "type.view", + "type.interval", + "type.point", + "x6.labels" + ] + } + } + }, + { + "id": "case-80", + "query": "根据描述绘制图表,使用 G2 渲染一个股价蜡烛图(K 线图),其中包含 Link 图元表示最高到最低价,Interval 图元表示开盘到收盘价,通过 change 字段计算涨跌幅度并根据阈值设置颜色编码(飙升、常规、暴跌),支持 brushX 交互用于 X 轴范围选择,并配置坐标轴标题和图例位置。参考数据:\n[{\"date\":\"2024-01\",\"open\":180,\"close\":192,\"high\":195,\"low\":178,\"amt\":12000,\"change\":0.06666666666666667},{\"date\":\"2024-02\",\"open\":192,\"close\":185,\"high\":197,\"low\":182,\"amt\":9800,\"change\":-0.03645833333333333},{\"date\":\"2024-03\",\"open\":185,\"close\":201,\"high\":203,\"low\":184,\"amt\":15600,\"change\":0.08648648648648649}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n { date: '2024-01', open: 180, close: 192, high: 195, low: 178, amt: 12000, change: (192-180)/180 },\n { date: '2024-02', open: 192, close: 185, high: 197, low: 182, amt: 9800, change: (185-192)/192 },\n { date: '2024-03', open: 185, close: 201, high: 203, low: 184, amt: 15600, change: (201-185)/185 }\n];\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'date',\n color: (d) => d.change > 0.02 ? '飙升'\n : d.change < -0.02 ? '暴跌'\n : '常规',\n },\n scale: {\n color: {\n domain: ['飙升', '常规', '暴跌'],\n range: ['#e41a1c', '#999999', '#4daf4a'],\n }\n },\n children: [\n {\n type: 'link',\n encode: { y: ['low', 'high'] },\n style: { lineWidth: 1.5 },\n tooltip: false\n },\n {\n type: 'interval',\n encode: { y: ['open', 'close'] },\n style: {\n fillOpacity: 1,\n stroke: '#333',\n lineWidth: (d) => Math.abs(d.change) > 0.03 ? 2 : 1\n }\n }\n ],\n interaction: [{ type: 'brushXFilter' }],\n axis: {\n y: { title: '股价', nice: true },\n x: { title: '月份', labelSpacing: 8 }\n },\n legend: { color: { position: 'bottom' } }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"date\":\"2024-01\",\"open\":180,\"close\":192,\"high\":195,\"low\":178,\"amt\":12000,\"change\":0.06666666666666667},\n {\"date\":\"2024-02\",\"open\":192,\"close\":185,\"high\":197,\"low\":182,\"amt\":9800,\"change\":-0.03645833333333333},\n {\"date\":\"2024-03\",\"open\":185,\"close\":201,\"high\":203,\"low\":184,\"amt\":15600,\"change\":0.08648648648648649}\n];\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'date',\n color: (d) => {\n if (d.change > 0.05) return '飙升';\n if (d.change < -0.05) return '暴跌';\n return '常规';\n },\n },\n scale: {\n color: {\n domain: ['飙升', '常规', '暴跌'],\n range: ['#e41a1c', '#999999', '#4daf4a'],\n },\n },\n children: [\n {\n type: 'link',\n encode: {\n y: 'low',\n y1: 'high',\n },\n },\n {\n type: 'interval',\n encode: {\n y: 'open',\n y1: 'close',\n },\n style: {\n fillOpacity: 1,\n },\n },\n ],\n axis: {\n x: { title: '日期' },\n y: { title: '价格' },\n },\n legend: {\n color: { position: 'right' },\n },\n interaction: {\n brushX: true,\n },\n});\n\nchart.render();", + "duration": 115970, + "retrievedSkillIds": [ + "g2-mark-k-chart", + "g2-mark-interval-basic", + "g2-mark-line-basic", + "g2-mark-arc-pie", + "g2-mark-linex-liney" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1204, + "expectedLength": 1287, + "similarity": 0.7521568627450981, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"date\":\"2024-01\",\"open\":180,\"close\":192,\"high\":195,\"low\":178,\"amt\":12000,\"change\":0.06666666666666667},\n {\"date\":\"2024-02\",\"open\":192,\"close\":185,\"high\":197,\"low\":182,\"amt\":9800,\"change\":-0.03645833333333333},\n {\"date\":\"2024-03\",\"open\":185,\"close\":201,\"high\":203,\"low\":184,\"amt\":15600,\"change\":0.08648648648648649}\n];\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'date',\n color: (d) => {\n if (d.change > 0.05) return '飙升';\n if (d.change < -0.05) return '暴跌';\n return '常规';\n },\n },\n scale: {\n color: {\n domain: ['飙升', '常规', '暴跌'],\n range: ['#e41a1c', '#999999', '#4daf4a'],\n },\n },\n children: [\n {\n type: 'link',\n encode: {\n y: 'low',\n y1: 'high',\n },\n },\n {\n type: 'interval',\n encode: {\n y: 'open',\n y1: 'close',\n },\n style: {\n fillOpacity: 1,\n },\n },\n ],\n axis: {\n x: { title: '日期' },\n y: { title: '价格' },\n },\n legend: {\n color: { position: 'right' },\n },\n interaction: {\n brushX: true,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "encode", + "x", + "color", + "scale", + "color", + "domain", + "range", + "children", + "type", + "encode", + "y", + "y1", + "type", + "encode", + "y", + "y1", + "style", + "fillOpacity", + "axis", + "x", + "title", + "y", + "title", + "legend", + "color", + "position", + "interaction", + "brushX" + ], + "stringLiterals": [ + "date", + "open", + "close", + "high", + "low", + "amt", + "change", + "date", + "open", + "close", + "high", + "low", + "amt", + "change", + "date", + "open", + "close", + "high", + "low", + "amt", + "change" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "view.children", + "type.view", + "type.interval", + "interaction" + ] + } + } + }, + { + "id": "case-81", + "query": "根据描述绘制图表,使用 G2 绘制年龄分布的直方图(矩形柱状图),按 group 分组统计人数,将年龄划分为 10 个区间,x 轴为年龄区间,y 轴为人数,color 区分不同组别(A、B、C),并设置图例位置、配色和样式。参考数据:\n[{\"age\":23,\"group\":\"A\"},{\"age\":25,\"group\":\"B\"},{\"age\":30,\"group\":\"A\"},{\"age\":35,\"group\":\"C\"},{\"age\":40,\"group\":\"B\"},{\"age\":34,\"group\":\"A\"},{\"age\":21,\"group\":\"C\"},{\"age\":50,\"group\":\"B\"},{\"age\":29,\"group\":\"A\"},{\"age\":60,\"group\":\"C\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { age: 23, group: 'A' },\n { age: 25, group: 'B' },\n { age: 30, group: 'A' },\n { age: 35, group: 'C' },\n { age: 40, group: 'B' },\n].concat(Array.from({ length: 200 }, () => ({\n age: 18 + Math.floor(Math.random() * 60),\n group: ['A','B','C'][Math.floor(Math.random()*3)]\n})));\n\nconst chart = new Chart({ container: 'container', autoFit: true });\nchart.options({\n type: 'rect',\n data: data,\n encode: { x: 'age', color: 'group' },\n transform: [{ type: 'binX', y: 'count', thresholds: 10, groupBy: ['group'] }],\n scale: { y: { nice: true }, color: { range: ['#5B8FF9','#5AD8A6','#F6BD16'] } },\n axis: { x: { title: '年龄' }, y: { title: '人数' } },\n style: { fillOpacity: 0.6, stroke: '#fff' },\n legend: { color:{position: 'top' }}\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 480,\n});\n\nconst data = [\n {\"age\":23,\"group\":\"A\"},\n {\"age\":25,\"group\":\"B\"},\n {\"age\":30,\"group\":\"A\"},\n {\"age\":35,\"group\":\"C\"},\n {\"age\":40,\"group\":\"B\"},\n {\"age\":34,\"group\":\"A\"},\n {\"age\":21,\"group\":\"C\"},\n {\"age\":50,\"group\":\"B\"},\n {\"age\":29,\"group\":\"A\"},\n {\"age\":60,\"group\":\"C\"}\n];\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'age',\n color: 'group',\n },\n transform: [\n { type: 'binX', y: 'count', thresholds: 10 },\n { type: 'stackY' },\n ],\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16'],\n },\n },\n legend: {\n color: {\n position: 'bottom',\n layout: { justifyContent: 'center' },\n },\n },\n axis: {\n x: { title: '年龄区间' },\n y: { title: '人数' },\n },\n style: {\n inset: 0.5,\n },\n});\n\nchart.render();", + "duration": 26163, + "retrievedSkillIds": [ + "g2-transform-binx", + "g2-mark-arc-pie", + "g2-mark-interval-grouped", + "g2-mark-partition", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 899, + "expectedLength": 809, + "similarity": 0.6123261455525606, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 480,\n});\n\nconst data = [\n {\"age\":23,\"group\":\"A\"},\n {\"age\":25,\"group\":\"B\"},\n {\"age\":30,\"group\":\"A\"},\n {\"age\":35,\"group\":\"C\"},\n {\"age\":40,\"group\":\"B\"},\n {\"age\":34,\"group\":\"A\"},\n {\"age\":21,\"group\":\"C\"},\n {\"age\":50,\"group\":\"B\"},\n {\"age\":29,\"group\":\"A\"},\n {\"age\":60,\"group\":\"C\"}\n];\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'age',\n color: 'group',\n },\n transform: [\n { type: 'binX', y: 'count', thresholds: 10 },\n { type: 'stackY' },\n ],\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16'],\n },\n },\n legend: {\n color: {\n position: 'bottom',\n layout: { justifyContent: 'center' },\n },\n },\n axis: {\n x: { title: '年龄区间' },\n y: { title: '人数' },\n },\n style: {\n inset: 0.5,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "color", + "transform", + "type", + "y", + "thresholds", + "type", + "scale", + "color", + "range", + "legend", + "color", + "position", + "layout", + "justifyContent", + "axis", + "x", + "title", + "y", + "title", + "style", + "inset" + ], + "stringLiterals": [ + "age", + "group", + "age", + "group", + "age", + "group", + "age", + "group", + "age", + "group", + "age", + "group", + "age", + "group", + "age", + "group", + "age", + "group", + "age", + "group" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "type.interval" + ] + } + } + }, + { + "id": "case-82", + "query": "根据描述绘制图表,使用 G2 渲染一个桑基图,展示资金流向:收入如何分配到房贷、车贷、日常消费和储蓄,以及日常消费进一步拆分到餐饮、交通、娱乐和医疗的层级流动数据。\n参考数据:{\"value\":{\"links\":[{\"source\":\"收入\",\"target\":\"房贷\",\"value\":4200},{\"source\":\"收入\",\"target\":\"车贷\",\"value\":1500},{\"source\":\"收入\",\"target\":\"日常消费\",\"value\":3000},{\"source\":\"收入\",\"target\":\"储蓄\",\"value\":2000},{\"source\":\"日常消费\",\"target\":\"餐饮\",\"value\":1200},{\"source\":\"日常消费\",\"target\":\"交通\",\"value\":800},{\"source\":\"日常消费\",\"target\":\"娱乐\",\"value\":600},{\"source\":\"日常消费\",\"target\":\"医疗\",\"value\":400}]}}", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({ container: 'container', theme: 'classic' });\nchart.options({\n type: 'sankey',\n autoFit: true,\n data: {\n value: {\n links: [\n { source: '收入', target: '房贷', value: 4200 },\n { source: '收入', target: '车贷', value: 1500 },\n { source: '收入', target: '日常消费', value: 3000 },\n { source: '收入', target: '储蓄', value: 2000 },\n { source: '日常消费', target: '餐饮', value: 1200 },\n { source: '日常消费', target: '交通', value: 800 },\n { source: '日常消费', target: '娱乐', value: 600 },\n { source: '日常消费', target: '医疗', value: 400 }\n ]\n }\n },\n layout: { nodeAlign: 'left', nodePadding: 0.05, nodeWidth: 0.04 },\n encode: { color: 'source' },\n style: { linkFillOpacity: 0.5, labelFontWeight: 'bold' },\n axis: { y: { labelFormatter: (name) => name.length > 6 ? name.slice(0,5)+'…' : name } }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 500,\n});\n\nchart.options({\n type: 'sankey',\n data: {\n value: {\n links: [\n { source: '收入', target: '房贷', value: 4200 },\n { source: '收入', target: '车贷', value: 1500 },\n { source: '收入', target: '日常消费', value: 3000 },\n { source: '收入', target: '储蓄', value: 2000 },\n { source: '日常消费', target: '餐饮', value: 1200 },\n { source: '日常消费', target: '交通', value: 800 },\n { source: '日常消费', target: '娱乐', value: 600 },\n { source: '日常消费', target: '医疗', value: 400 }\n ]\n }\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.02,\n nodeWidth: 0.02\n },\n style: {\n labelSpacing: 4,\n labelFontSize: 12,\n nodeLineWidth: 1,\n linkFillOpacity: 0.4\n },\n legend: false\n});\n\nchart.render();", + "duration": 6717, + "retrievedSkillIds": [ + "g2-mark-sankey", + "g2-mark-chord", + "g2-mark-bi-directional-bar", + "g2-mark-line-basic", + "g2-mark-sunburst" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 871, + "expectedLength": 878, + "similarity": 0.7592846152899326, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 500,\n});\n\nchart.options({\n type: 'sankey',\n data: {\n value: {\n links: [\n { source: '收入', target: '房贷', value: 4200 },\n { source: '收入', target: '车贷', value: 1500 },\n { source: '收入', target: '日常消费', value: 3000 },\n { source: '收入', target: '储蓄', value: 2000 },\n { source: '日常消费', target: '餐饮', value: 1200 },\n { source: '日常消费', target: '交通', value: 800 },\n { source: '日常消费', target: '娱乐', value: 600 },\n { source: '日常消费', target: '医疗', value: 400 }\n ]\n }\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.02,\n nodeWidth: 0.02\n },\n style: {\n labelSpacing: 4,\n labelFontSize: 12,\n nodeLineWidth: 1,\n linkFillOpacity: 0.4\n },\n legend: false\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "value", + "links", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "layout", + "nodeAlign", + "nodePadding", + "nodeWidth", + "style", + "labelSpacing", + "labelFontSize", + "nodeLineWidth", + "linkFillOpacity", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-83", + "query": "根据描述绘制图表,使用 G2 创建一个词云图,可视化关键词的提及频次和主题分类关系,通过文本大小和颜色展示数据差异。\n参考数据:\n[{\"text\":\"创新\",\"value\":320,\"category\":\"科技\"},{\"text\":\"可持续发展\",\"value\":280,\"category\":\"环境\"},{\"text\":\"用户增长\",\"value\":260,\"category\":\"商业\"},{\"text\":\"AI\",\"value\":245,\"category\":\"技术\"},{\"text\":\"隐私保护\",\"value\":210,\"category\":\"合规\"},{\"text\":\"区块链\",\"value\":190,\"category\":\"金融\"},{\"text\":\"元宇宙\",\"value\":170,\"category\":\"趋势\"},{\"text\":\"远程办公\",\"value\":155,\"category\":\"工作模式\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container', width: 600, height: 400 });\n\nchart.options({\n type: 'wordCloud',\n data: [\n { text: '创新', value: 320, category: '科技' },\n { text: '可持续发展', value: 280, category: '环境' },\n { text: '用户增长', value: 260, category: '商业' },\n { text: 'AI', value: 245, category: '技术' },\n { text: '隐私保护', value: 210, category: '合规' },\n { text: '区块链', value: 190, category: '金融' },\n { text: '元宇宙', value: 170, category: '趋势' },\n { text: '远程办公', value: 155, category: '工作模式' }\n ],\n layout: { fontSize: [16, 60], spiral: 'archimedean' },\n encode: { text: 'text', color: 'text' },\n scale: {\n color: {\n palette: ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b']\n }\n },\n style:{\n fontFamily:(d)=>d.category==='科技'?'STSong':'KaiTi'\n },\n legend: { position: 'right' },\n tooltip: { items: [{ field: 'text', name: '关键词' }, { field: 'value', name: '提及频次' }, { field: 'category', name: '主题分类' }] }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { text: '创新', value: 320, category: '科技' },\n { text: '可持续发展', value: 280, category: '环境' },\n { text: '用户增长', value: 260, category: '商业' },\n { text: 'AI', value: 245, category: '技术' },\n { text: '隐私保护', value: 210, category: '合规' },\n { text: '区块链', value: 190, category: '金融' },\n { text: '元宇宙', value: 170, category: '趋势' },\n { text: '远程办公', value: 155, category: '工作模式' },\n];\n\nconst chart = new Chart({ container: 'container', width: 640, height: 480 });\n\nchart.options({\n type: 'wordCloud',\n data,\n encode: {\n text: 'text',\n color: 'category',\n fontSize: { field: 'value', range: [16, 56] },\n },\n scale: {\n color: { type: 'ordinal', palette: 'category10' },\n },\n layout: {\n spiral: 'archimedean',\n padding: 4,\n },\n style: {\n fontFamily: 'Microsoft YaHei, sans-serif',\n fontWeight: 'bold',\n },\n});\n\nchart.render();", + "duration": 8099, + "retrievedSkillIds": [ + "g2-mark-wordcloud", + "g2-concept-chart-selection", + "g2-animation-keyframe", + "g2-mark-tree", + "g2-mark-chord" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 906, + "expectedLength": 1028, + "similarity": 0.8152985716744106, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { text: '创新', value: 320, category: '科技' },\n { text: '可持续发展', value: 280, category: '环境' },\n { text: '用户增长', value: 260, category: '商业' },\n { text: 'AI', value: 245, category: '技术' },\n { text: '隐私保护', value: 210, category: '合规' },\n { text: '区块链', value: 190, category: '金融' },\n { text: '元宇宙', value: 170, category: '趋势' },\n { text: '远程办公', value: 155, category: '工作模式' },\n];\n\nconst chart = new Chart({ container: 'container', width: 640, height: 480 });\n\nchart.options({\n type: 'wordCloud',\n data,\n encode: {\n text: 'text',\n color: 'category',\n fontSize: { field: 'value', range: [16, 56] },\n },\n scale: {\n color: { type: 'ordinal', palette: 'category10' },\n },\n layout: {\n spiral: 'archimedean',\n padding: 4,\n },\n style: {\n fontFamily: 'Microsoft YaHei, sans-serif',\n fontWeight: 'bold',\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "text", + "value", + "category", + "text", + "value", + "category", + "text", + "value", + "category", + "text", + "value", + "category", + "text", + "value", + "category", + "text", + "value", + "category", + "text", + "value", + "category", + "text", + "value", + "category", + "container", + "width", + "height", + "type", + "encode", + "text", + "color", + "fontSize", + "field", + "range", + "scale", + "color", + "type", + "palette", + "layout", + "spiral", + "padding", + "style", + "fontFamily", + "fontWeight" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale" + ] + } + } + }, + { + "id": "case-84", + "query": "根据描述绘制图表,使用 G2 创建一个极坐标折线图,对比前端和后端团队在多个指标上的评分,数据包含三个指标:响应速度、代码质量、UI还原(前端)和稳定性(后端),折线样式为虚线且线宽加粗,坐标轴隐藏刻度并显示网格线,图例位于右侧,Y 轴范围固定为 0 到 100。参考数据:\n[{\"metric\":\"响应速度\",\"team\":\"前端\",\"score\":88},{\"metric\":\"代码质量\",\"team\":\"前端\",\"score\":76},{\"metric\":\"UI还原\",\"team\":\"前端\",\"score\":92},{\"metric\":\"响应速度\",\"team\":\"后端\",\"score\":94},{\"metric\":\"代码质量\",\"team\":\"后端\",\"score\":85},{\"metric\":\"稳定性\",\"team\":\"后端\",\"score\":90}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'line',\n coordinate: { type: 'polar', innerRadius: 0.2 },\n autoFit: true,\n data: [\n { metric: '响应速度', team: '前端', score: 88 },\n { metric: '代码质量', team: '前端', score: 76 },\n { metric: '稳定性', team: '前端', score: 92 },\n { metric: '响应速度', team: '后端', score: 94 },\n { metric: '代码质量', team: '后端', score: 85 },\n { metric: '稳定性', team: '后端', score: 90 }\n ],\n encode: { x: 'metric', y: 'score', color: 'team' },\n scale: { y: { domainMin: 0, domainMax: 100 } },\n style: { lineWidth: 3, lineDash: [6, 3] },\n legend: { color:{position: 'right' }},\n axis: {\n x: { tick: false, grid: true },\n y: { tick: false, grid: true, title: false }\n }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"metric\":\"响应速度\",\"team\":\"前端\",\"score\":88},\n {\"metric\":\"代码质量\",\"team\":\"前端\",\"score\":76},\n {\"metric\":\"UI还原\",\"team\":\"前端\",\"score\":92},\n {\"metric\":\"响应速度\",\"team\":\"后端\",\"score\":94},\n {\"metric\":\"代码质量\",\"team\":\"后端\",\"score\":85},\n {\"metric\":\"稳定性\",\"team\":\"后端\",\"score\":90}\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'line',\n data,\n coordinate: {\n type: 'polar',\n },\n encode: {\n x: 'metric',\n y: 'score',\n color: 'team',\n },\n scale: {\n y: {\n domain: [0, 100],\n nice: false,\n },\n },\n style: {\n lineWidth: 3,\n lineDash: [4, 4],\n },\n axis: {\n x: {\n tick: false,\n grid: true,\n },\n y: {\n tick: false,\n grid: true,\n },\n },\n legend: {\n color: {\n position: 'right',\n },\n },\n});\n\nchart.render();", + "duration": 14170, + "retrievedSkillIds": [ + "g2-scale-linear", + "g2-mark-line-basic", + "g2-mark-line-multi", + "g2-mark-partition", + "g2-transform-select" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 885, + "expectedLength": 815, + "similarity": 0.7211699331681309, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"metric\":\"响应速度\",\"team\":\"前端\",\"score\":88},\n {\"metric\":\"代码质量\",\"team\":\"前端\",\"score\":76},\n {\"metric\":\"UI还原\",\"team\":\"前端\",\"score\":92},\n {\"metric\":\"响应速度\",\"team\":\"后端\",\"score\":94},\n {\"metric\":\"代码质量\",\"team\":\"后端\",\"score\":85},\n {\"metric\":\"稳定性\",\"team\":\"后端\",\"score\":90}\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'line',\n data,\n coordinate: {\n type: 'polar',\n },\n encode: {\n x: 'metric',\n y: 'score',\n color: 'team',\n },\n scale: {\n y: {\n domain: [0, 100],\n nice: false,\n },\n },\n style: {\n lineWidth: 3,\n lineDash: [4, 4],\n },\n axis: {\n x: {\n tick: false,\n grid: true,\n },\n y: {\n tick: false,\n grid: true,\n },\n },\n legend: {\n color: {\n position: 'right',\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "coordinate", + "type", + "encode", + "x", + "y", + "color", + "scale", + "y", + "domain", + "nice", + "style", + "lineWidth", + "lineDash", + "axis", + "x", + "tick", + "grid", + "y", + "tick", + "grid", + "legend", + "color", + "position" + ], + "stringLiterals": [ + "metric", + "team", + "score", + "metric", + "team", + "score", + "metric", + "team", + "score", + "metric", + "team", + "score", + "metric", + "team", + "score", + "metric", + "team", + "score" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale", + "type.line" + ] + } + } + }, + { + "id": "case-85", + "query": "根据描述绘制图表,使用 G2 渲染一个金融时段图(类似 K 线或 OHLC 图),展示每 15 分钟的开盘、收盘、最高、最低价及涨跌情况。通过三个子图层:link 绘制高低价线段,interval 绘制开盘-收盘区间柱,point 标记收盘价钻石点,并基于涨跌值设置颜色编码。支持 X 轴方向刷选交互。参考数据:\n[{\"time\":\"09:30\",\"open\":23.4,\"close\":23.8,\"high\":24.1,\"low\":23.2,\"change\":1.2},{\"time\":\"09:45\",\"open\":23.8,\"close\":23.5,\"high\":23.9,\"low\":23.4,\"change\":-0.8},{\"time\":\"10:00\",\"open\":23.5,\"close\":23.5,\"high\":23.7,\"low\":23.3,\"change\":0},{\"time\":\"10:15\",\"open\":23.5,\"close\":24,\"high\":24.2,\"low\":23.4,\"change\":2.1},{\"time\":\"10:30\",\"open\":24,\"close\":23.6,\"high\":24.3,\"low\":23.5,\"change\":-1.7}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'view',\n data: [\n { time: '09:30', open: 23.4, close: 23.8, high: 24.1, low: 23.2, change: 1.2 },\n { time: '09:45', open: 23.8, close: 23.5, high: 23.9, low: 23.4, change: -0.8 },\n { time: '10:00', open: 23.5, close: 23.5, high: 23.7, low: 23.3, change: 0 },\n { time: '10:15', open: 23.5, close: 24.0, high: 24.2, low: 23.4, change: 2.1 },\n { time: '10:30', open: 24.0, close: 23.6, high: 24.3, low: 23.5, change: -1.7 }\n ],\n encode: {\n x: 'time',\n y: ['low', 'high'],\n color: (d) => d.change > 0 ? '上涨' : d.change < 0 ? '下跌' : '平盘'\n },\n scale: {\n color: {\n domain: ['上涨', '平盘', '下跌'],\n range: ['#e34234', '#a0a0a0', '#228b22']\n },\n x: { padding: 0.2 }\n },\n children: [\n {\n type: 'link',\n encode: { y: ['low', 'high'] },\n style: { stroke: '#666', lineWidth: 1 }\n },\n {\n type: 'interval',\n encode: { y: ['open', 'close'] },\n style: { fillOpacity: 1, strokeWidth: 1.5 },\n axis: { y: { title: '价格 (点)' } }\n },\n {\n type: 'point',\n encode: { y: 'close', color: 'time', shape: 'diamond', size: 4 },\n style: { fillOpacity: 0.8, stroke: '#fff' },\n legend: false,\n tooltip: { title: 'time', items: [{ field: 'close', name: '现价' }] }\n }\n ],\n axis: {\n x: { labelFormatter: (d) => d.split(':').slice(0,2).join(':') },\n y: { grid: true }\n }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"time\":\"09:30\",\"open\":23.4,\"close\":23.8,\"high\":24.1,\"low\":23.2,\"change\":1.2},\n {\"time\":\"09:45\",\"open\":23.8,\"close\":23.5,\"high\":23.9,\"low\":23.4,\"change\":-0.8},\n {\"time\":\"10:00\",\"open\":23.5,\"close\":23.5,\"high\":23.7,\"low\":23.3,\"change\":0},\n {\"time\":\"10:15\",\"open\":23.5,\"close\":24,\"high\":24.2,\"low\":23.4,\"change\":2.1},\n {\"time\":\"10:30\",\"open\":24,\"close\":23.6,\"high\":24.3,\"low\":23.5,\"change\":-1.7}\n];\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'time',\n color: (d) => d.change > 0 ? '上涨' : d.change < 0 ? '下跌' : '平盘',\n },\n scale: {\n color: {\n domain: ['上涨', '下跌', '平盘'],\n range: ['#ef5350', '#26a69a', '#999999'],\n },\n },\n children: [\n {\n type: 'link',\n encode: {\n y: ['low', 'high'],\n },\n style: {\n lineWidth: 1.5,\n },\n },\n {\n type: 'interval',\n encode: {\n y: 'open',\n y1: 'close',\n },\n style: {\n fillOpacity: 1,\n },\n },\n {\n type: 'point',\n encode: {\n y: 'close',\n shape: 'diamond',\n },\n style: {\n r: 4,\n },\n },\n ],\n interaction: {\n brushX: true,\n },\n});\n\nchart.render();", + "duration": 28373, + "retrievedSkillIds": [ + "g2-mark-k-chart", + "g2-mark-line-basic", + "g2-mark-interval-basic", + "g2-mark-link", + "g2-interaction-element-point-move" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1292, + "expectedLength": 1518, + "similarity": 0.6739907629625497, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"time\":\"09:30\",\"open\":23.4,\"close\":23.8,\"high\":24.1,\"low\":23.2,\"change\":1.2},\n {\"time\":\"09:45\",\"open\":23.8,\"close\":23.5,\"high\":23.9,\"low\":23.4,\"change\":-0.8},\n {\"time\":\"10:00\",\"open\":23.5,\"close\":23.5,\"high\":23.7,\"low\":23.3,\"change\":0},\n {\"time\":\"10:15\",\"open\":23.5,\"close\":24,\"high\":24.2,\"low\":23.4,\"change\":2.1},\n {\"time\":\"10:30\",\"open\":24,\"close\":23.6,\"high\":24.3,\"low\":23.5,\"change\":-1.7}\n];\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'time',\n color: (d) => d.change > 0 ? '上涨' : d.change < 0 ? '下跌' : '平盘',\n },\n scale: {\n color: {\n domain: ['上涨', '下跌', '平盘'],\n range: ['#ef5350', '#26a69a', '#999999'],\n },\n },\n children: [\n {\n type: 'link',\n encode: {\n y: ['low', 'high'],\n },\n style: {\n lineWidth: 1.5,\n },\n },\n {\n type: 'interval',\n encode: {\n y: 'open',\n y1: 'close',\n },\n style: {\n fillOpacity: 1,\n },\n },\n {\n type: 'point',\n encode: {\n y: 'close',\n shape: 'diamond',\n },\n style: {\n r: 4,\n },\n },\n ],\n interaction: {\n brushX: true,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "09", + "09", + "10", + "10", + "10", + "type", + "encode", + "x", + "color", + "scale", + "color", + "domain", + "range", + "children", + "type", + "encode", + "y", + "style", + "lineWidth", + "type", + "encode", + "y", + "y1", + "style", + "fillOpacity", + "type", + "encode", + "y", + "shape", + "style", + "r", + "interaction", + "brushX" + ], + "stringLiterals": [ + "time", + "open", + "close", + "high", + "low", + "change", + "time", + "open", + "close", + "high", + "low", + "change", + "time", + "open", + "close", + "high", + "low", + "change", + "time", + "open", + "close", + "high", + "low", + "change", + "time", + "open", + "close", + "high", + "low", + "change" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "view.children", + "type.view", + "type.interval", + "type.point", + "interaction" + ] + } + } + }, + { + "id": "case-86", + "query": "根据描述绘制图表,使用 G2 创建一个堆叠区域图,展示亚洲、非洲和欧洲在多个年份的人口数值变化,数据按国家分组并通过颜色区分,以面积形式渲染趋势。参考数据:\n[{\"country\":\"Asia\",\"year\":\"1750\",\"value\":502},{\"country\":\"Asia\",\"year\":\"1800\",\"value\":635},{\"country\":\"Asia\",\"year\":\"1850\",\"value\":809},{\"country\":\"Asia\",\"year\":\"1900\",\"value\":947},{\"country\":\"Asia\",\"year\":\"1950\",\"value\":1402},{\"country\":\"Asia\",\"year\":\"1999\",\"value\":3634},{\"country\":\"Asia\",\"year\":\"2050\",\"value\":5268},{\"country\":\"Africa\",\"year\":\"1750\",\"value\":106},{\"country\":\"Africa\",\"year\":\"1800\",\"value\":107},{\"country\":\"Africa\",\"year\":\"1850\",\"value\":111}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'area',\n data: [\n { country: 'Asia', year: '1750', value: 502 },\n { country: 'Asia', year: '1800', value: 635 },\n { country: 'Asia', year: '1850', value: 809 },\n { country: 'Asia', year: '1900', value: 947 },\n { country: 'Asia', year: '1950', value: 1402 },\n { country: 'Asia', year: '1999', value: 3634 },\n { country: 'Asia', year: '2050', value: 5268 },\n { country: 'Africa', year: '1750', value: 106 },\n { country: 'Africa', year: '1800', value: 107 },\n { country: 'Africa', year: '1850', value: 111 },\n { country: 'Africa', year: '1900', value: 133 },\n { country: 'Africa', year: '1950', value: 221 },\n { country: 'Africa', year: '1999', value: 767 },\n { country: 'Africa', year: '2050', value: 1766 },\n { country: 'Europe', year: '1750', value: 163 },\n { country: 'Europe', year: '1800', value: 203 },\n { country: 'Europe', year: '1850', value: 276 },\n { country: 'Europe', year: '1900', value: 408 },\n { country: 'Europe', year: '1950', value: 547 },\n { country: 'Europe', year: '1999', value: 729 },\n { country: 'Europe', year: '2050', value: 628 },\n ],\n encode: {\n x: 'year', // 配置x通道\n y: 'value', // 配置y通道\n color: 'country', // 配置color通道\n },\n style: { fillOpacity: 0.3 }, // 配置area标记的填充透明度为 0.3\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 500,\n});\n\nchart.options({\n type: 'area',\n data: [\n { country: 'Asia', year: '1750', value: 502 },\n { country: 'Asia', year: '1800', value: 635 },\n { country: 'Asia', year: '1850', value: 809 },\n { country: 'Asia', year: '1900', value: 947 },\n { country: 'Asia', year: '1950', value: 1402 },\n { country: 'Asia', year: '1999', value: 3634 },\n { country: 'Asia', year: '2050', value: 5268 },\n { country: 'Africa', year: '1750', value: 106 },\n { country: 'Africa', year: '1800', value: 107 },\n { country: 'Africa', year: '1850', value: 111 },\n { country: 'Africa', year: '1900', value: 133 },\n { country: 'Africa', year: '1950', value: 221 },\n { country: 'Africa', year: '1999', value: 767 },\n { country: 'Africa', year: '2050', value: 1766 },\n { country: 'Europe', year: '1750', value: 163 },\n { country: 'Europe', year: '1800', value: 203 },\n { country: 'Europe', year: '1850', value: 276 },\n { country: 'Europe', year: '1900', value: 408 },\n { country: 'Europe', year: '1950', value: 547 },\n { country: 'Europe', year: '1999', value: 729 },\n { country: 'Europe', year: '2050', value: 628 },\n ],\n encode: {\n x: 'year',\n y: 'value',\n color: 'country',\n },\n transform: [{ type: 'stackY' }],\n scale: {\n y: { nice: true },\n },\n axis: {\n y: { labelFormatter: (v) => `${v}M` },\n },\n});\n\nchart.render();", + "duration": 18950, + "retrievedSkillIds": [ + "g2-mark-area-stacked", + "g2-mark-area-basic", + "g2-mark-arc-donut", + "g2-mark-line-basic", + "g2-mark-interval-stacked" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1493, + "expectedLength": 1417, + "similarity": 1, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 500,\n});\n\nchart.options({\n type: 'area',\n data: [\n { country: 'Asia', year: '1750', value: 502 },\n { country: 'Asia', year: '1800', value: 635 },\n { country: 'Asia', year: '1850', value: 809 },\n { country: 'Asia', year: '1900', value: 947 },\n { country: 'Asia', year: '1950', value: 1402 },\n { country: 'Asia', year: '1999', value: 3634 },\n { country: 'Asia', year: '2050', value: 5268 },\n { country: 'Africa', year: '1750', value: 106 },\n { country: 'Africa', year: '1800', value: 107 },\n { country: 'Africa', year: '1850', value: 111 },\n { country: 'Africa', year: '1900', value: 133 },\n { country: 'Africa', year: '1950', value: 221 },\n { country: 'Africa', year: '1999', value: 767 },\n { country: 'Africa', year: '2050', value: 1766 },\n { country: 'Europe', year: '1750', value: 163 },\n { country: 'Europe', year: '1800', value: 203 },\n { country: 'Europe', year: '1850', value: 276 },\n { country: 'Europe', year: '1900', value: 408 },\n { country: 'Europe', year: '1950', value: 547 },\n { country: 'Europe', year: '1999', value: 729 },\n { country: 'Europe', year: '2050', value: 628 },\n ],\n encode: {\n x: 'year',\n y: 'value',\n color: 'country',\n },\n transform: [{ type: 'stackY' }],\n scale: {\n y: { nice: true },\n },\n axis: {\n y: { labelFormatter: (v) => `${v}M` },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "country", + "year", + "value", + "encode", + "x", + "y", + "color", + "transform", + "type", + "scale", + "y", + "nice", + "axis", + "y", + "labelFormatter" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale" + ] + } + } + }, + { + "id": "case-87", + "query": "根据描述绘制图表,使用 G2 渲染一个漏斗图,展示用户转化流程中各环节的 UV 数值,并通过 highlight 字段高亮特定环节(加入购物车、结算页),同时在数据标签中显示高亮项的百分比转化率及警告符号,非高亮项显示原始 UV 值。参考数据:\n[{\"level\":\"浏览商品\",\"uv\":20000},{\"level\":\"加入购物车\",\"uv\":8000,\"highlight\":true},{\"level\":\"结算页\",\"uv\":3000,\"highlight\":true},{\"level\":\"支付成功\",\"uv\":1200},{\"level\":\"复购\",\"uv\":400}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container', theme: 'classic' });\n\nchart.options({\n type: 'interval',\n data: [\n { level: '浏览商品', uv: 20000 },\n { level: '加入购物车', uv: 8000, highlight: true },\n { level: '结算页', uv: 3000, highlight: true },\n { level: '支付成功', uv: 1200 },\n { level: '复购', uv: 400 },\n ],\n encode: { x: 'level', y: 'uv', color: 'highlight', shape: 'funnel' },\n coordinate: { transform: [{ type: 'transpose' }] },\n transform: [{ type: 'symmetryY' }],\n scale: { color: { domain: [false, true], range: ['#E6F4FF', '#2A6EBB'] } },\n labels: [{ text: (d) => d.highlight ? `⚠️ ${(d.uv / 20000 * 100).toFixed(1)}%` : `${d.uv}`, position: 'inside', transform: [{ type: 'contrastReverse' }] }],\n axis: false,\n legend: false,\n tooltip: { fields: ['level', 'uv'] }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst rawData = [\n { level: \"浏览商品\", uv: 20000 },\n { level: \"加入购物车\", uv: 8000, highlight: true },\n { level: \"结算页\", uv: 3000, highlight: true },\n { level: \"支付成功\", uv: 1200 },\n { level: \"复购\", uv: 400 }\n];\n\nconst data = rawData.map((d, i, arr) => {\n if (i === 0) return { ...d, conversionRate: '100%' };\n const prevUv = arr[i - 1].uv;\n const rate = ((d.uv / prevUv) * 100).toFixed(1) + '%';\n return { ...d, conversionRate: rate };\n});\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'level',\n y: 'uv',\n color: 'highlight',\n shape: 'funnel',\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n transform: [{ type: 'symmetryY' }],\n scale: {\n color: {\n domain: [undefined, true],\n range: ['#5B8FF9', '#FF4D4F'],\n },\n },\n style: {\n stroke: '#fff',\n lineWidth: 2,\n },\n labels: [\n {\n text: (d) => d.highlight ? `⚠️ ${d.conversionRate}` : `${d.uv}`,\n position: 'inside',\n style: {\n fontSize: 14,\n fontWeight: 'bold',\n },\n transform: [{ type: 'contrastReverse' }],\n },\n {\n text: 'level',\n position: 'right',\n style: {\n fill: '#333',\n fontSize: 13,\n },\n dx: 10,\n },\n ],\n axis: false,\n legend: false,\n});\n\nchart.render();", + "duration": 35632, + "retrievedSkillIds": [ + "g2-interaction-brushy-highlight", + "g2-interaction-brushx-highlight", + "g2-mark-funnel", + "g2-interaction-legend-highlight", + "g2-scale-sequential" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1401, + "expectedLength": 846, + "similarity": 0.7489848197343453, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst rawData = [\n { level: \"浏览商品\", uv: 20000 },\n { level: \"加入购物车\", uv: 8000, highlight: true },\n { level: \"结算页\", uv: 3000, highlight: true },\n { level: \"支付成功\", uv: 1200 },\n { level: \"复购\", uv: 400 }\n];\n\nconst data = rawData.map((d, i, arr) => {\n if (i === 0) return { ...d, conversionRate: '100%' };\n const prevUv = arr[i - 1].uv;\n const rate = ((d.uv / prevUv) * 100).toFixed(1) + '%';\n return { ...d, conversionRate: rate };\n});\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'level',\n y: 'uv',\n color: 'highlight',\n shape: 'funnel',\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n transform: [{ type: 'symmetryY' }],\n scale: {\n color: {\n domain: [undefined, true],\n range: ['#5B8FF9', '#FF4D4F'],\n },\n },\n style: {\n stroke: '#fff',\n lineWidth: 2,\n },\n labels: [\n {\n text: (d) => d.highlight ? `⚠️ ${d.conversionRate}` : `${d.uv}`,\n position: 'inside',\n style: {\n fontSize: 14,\n fontWeight: 'bold',\n },\n transform: [{ type: 'contrastReverse' }],\n },\n {\n text: 'level',\n position: 'right',\n style: {\n fill: '#333',\n fontSize: 13,\n },\n dx: 10,\n },\n ],\n axis: false,\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "map", + "toFixed", + "Chart", + "options", + "render" + ], + "objectKeys": [ + "level", + "uv", + "level", + "uv", + "highlight", + "level", + "uv", + "highlight", + "level", + "uv", + "level", + "uv", + "conversionRate", + "conversionRate", + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "color", + "shape", + "coordinate", + "transform", + "type", + "transform", + "type", + "scale", + "color", + "domain", + "range", + "style", + "stroke", + "lineWidth", + "labels", + "text", + "position", + "style", + "fontSize", + "fontWeight", + "transform", + "type", + "text", + "position", + "style", + "fill", + "fontSize", + "dx", + "axis", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-88", + "query": "根据描述绘制图表,使用 G2 创建一个仪表盘(gauge)图表,配置目标值、总量和名称,设置颜色范围从黄色到绿色渐变。\n参考数据:\n[{\"value\":{\"target\":120,\"total\":400,\"name\":\"score\"}}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'gauge',\n data: {\n value: {\n target: 120,\n total: 400,\n name: 'score',\n },\n },\n legend: false,\n scale: {\n color: { range: ['#FAAD14', 'green'] },\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 400,\n height: 300,\n});\n\nchart.options({\n type: 'gauge',\n data: {\n value: {\n target: 120,\n total: 400,\n name: 'score',\n },\n },\n scale: {\n color: {\n range: ['#FAAD14', '#30BF78'],\n },\n },\n style: {\n textContent: (target, total) => `${target}\\nscore`,\n },\n legend: false,\n});\n\nchart.render();", + "duration": 19310, + "retrievedSkillIds": [ + "g2-mark-gauge", + "g2-mark-arc-donut", + "g2-scale-sequential", + "g2-palette-category10", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 429, + "expectedLength": 315, + "similarity": 0.8707664884135472, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 400,\n height: 300,\n});\n\nchart.options({\n type: 'gauge',\n data: {\n value: {\n target: 120,\n total: 400,\n name: 'score',\n },\n },\n scale: {\n color: {\n range: ['#FAAD14', '#30BF78'],\n },\n },\n style: {\n textContent: (target, total) => `${target}\\nscore`,\n },\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "value", + "target", + "total", + "name", + "scale", + "color", + "range", + "style", + "textContent", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "scale", + "x6.target" + ] + } + } + }, + { + "id": "case-89", + "query": "根据描述绘制图表,使用散点图展示不同国家的 GDP 与预期寿命之间的关系,同时通过点的大小表示人口数量,颜色区分大洲。应用了鱼眼变换来突出局部区域的数据细节,增强了可视化的聚焦效果。参考数据:[{\"continent\":\"Americas\",\"Country\":\"Argentina\",\"LifeExpectancy\":75.32,\"GDP\":12779.37964,\"Population\":40301927},{\"continent\":\"Americas\",\"Country\":\"Brazil\",\"LifeExpectancy\":72.39,\"GDP\":9065.800825,\"Population\":190010647},{\"continent\":\"Americas\",\"Country\":\"Canada\",\"LifeExpectancy\":80.653,\"GDP\":36319.23501,\"Population\":33390141},{\"continent\":\"Americas\",\"Country\":\"Chile\",\"LifeExpectancy\":78.553,\"GDP\":13171.63885,\"Population\":16284741},{\"continent\":\"Americas\",\"Country\":\"Colombia\",\"LifeExpectancy\":72.889,\"GDP\":7006.580419,\"Population\":44227550},{\"continent\":\"Americas\",\"Country\":\"Costa Rica\",\"LifeExpectancy\":78.782,\"GDP\":9645.06142,\"Population\":4133884},{\"continent\":\"Americas\",\"Country\":\"Cuba\",\"LifeExpectancy\":78.273,\"GDP\":8948.102923,\"Population\":11416987},{\"continent\":\"Americas\",\"Country\":\"Dominican Republic\",\"LifeExpectancy\":72.235,\"GDP\":6025.374752,\"Population\":9319622},{\"continent\":\"Americas\",\"Country\":\"Ecuador\",\"LifeExpectancy\":74.994,\"GDP\":6873.262326,\"Population\":13755680},{\"continent\":\"Americas\",\"Country\":\"El Salvador\",\"LifeExpectancy\":71.878,\"GDP\":5728.353514,\"Population\":6939688}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n width: 800,\n height: 500,\n padding: [40, 60, 60, 80],\n coordinate: {\n transform: [\n {\n type: 'fisheye',\n focusX: 0.6,\n focusY: 0.4,\n distortionX: 2.5,\n distortionY: 2.5,\n },\n ],\n },\n type: 'point',\n data: {\n type: 'inline',\n value: [\n {\n \"continent\": \"Americas\",\n \"Country\": \"Argentina\",\n \"LifeExpectancy\": 75.32,\n \"GDP\": 12779.37964,\n \"Population\": 40301927\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Brazil\",\n \"LifeExpectancy\": 72.39,\n \"GDP\": 9065.800825,\n \"Population\": 190010647\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Canada\",\n \"LifeExpectancy\": 80.653,\n \"GDP\": 36319.23501,\n \"Population\": 33390141\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Chile\",\n \"LifeExpectancy\": 78.553,\n \"GDP\": 13171.63885,\n \"Population\": 16284741\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Colombia\",\n \"LifeExpectancy\": 72.889,\n \"GDP\": 7006.580419,\n \"Population\": 44227550\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Costa Rica\",\n \"LifeExpectancy\": 78.782,\n \"GDP\": 9645.06142,\n \"Population\": 4133884\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Cuba\",\n \"LifeExpectancy\": 78.273,\n \"GDP\": 8948.102923,\n \"Population\": 11416987\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Dominican Republic\",\n \"LifeExpectancy\": 72.235,\n \"GDP\": 6025.374752,\n \"Population\": 9319622\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Ecuador\",\n \"LifeExpectancy\": 74.994,\n \"GDP\": 6873.262326,\n \"Population\": 13755680\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"El Salvador\",\n \"LifeExpectancy\": 71.878,\n \"GDP\": 5728.353514,\n \"Population\": 6939688\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Guatemala\",\n \"LifeExpectancy\": 70.259,\n \"GDP\": 5186.050003,\n \"Population\": 12572928\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Honduras\",\n \"LifeExpectancy\": 70.198,\n \"GDP\": 3548.330846,\n \"Population\": 7483763\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Jamaica\",\n \"LifeExpectancy\": 72.567,\n \"GDP\": 7320.880262,\n \"Population\": 2780132\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Mexico\",\n \"LifeExpectancy\": 76.195,\n \"GDP\": 11977.57496,\n \"Population\": 108700891\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Nicaragua\",\n \"LifeExpectancy\": 72.899,\n \"GDP\": 2749.320965,\n \"Population\": 5675356\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Panama\",\n \"LifeExpectancy\": 75.537,\n \"GDP\": 9809.185636,\n \"Population\": 3242173\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Paraguay\",\n \"LifeExpectancy\": 71.752,\n \"GDP\": 4172.838464,\n \"Population\": 6667147\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Peru\",\n \"LifeExpectancy\": 71.421,\n \"GDP\": 7408.905561,\n \"Population\": 28674757\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Puerto Rico\",\n \"LifeExpectancy\": 78.746,\n \"GDP\": 19328.70901,\n \"Population\": 3942491\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Trinidad and Tobago\",\n \"LifeExpectancy\": 69.819,\n \"GDP\": 18008.50924,\n \"Population\": 1056608\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"United States\",\n \"LifeExpectancy\": 78.242,\n \"GDP\": 42951.65309,\n \"Population\": 301139947\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Uruguay\",\n \"LifeExpectancy\": 76.384,\n \"GDP\": 10611.46299,\n \"Population\": 3447496\n },\n {\n \"continent\": \"Americas\",\n \"Country\": \"Venezuela\",\n \"LifeExpectancy\": 73.747,\n \"GDP\": 11415.80569,\n \"Population\": 26084662\n },\n {\n \"continent\": \"Asia\",\n \"Country\": \"China\",\n \"LifeExpectancy\": 72.961,\n \"GDP\": 4959.114854,\n \"Population\": 1318683096\n },\n {\n \"continent\": \"Asia\",\n \"Country\": \"Hong Kong, China\",\n \"LifeExpectancy\": 82.208,\n \"GDP\": 39724.97867,\n \"Population\": 6980412\n },\n {\n \"continent\": \"Asia\",\n \"Country\": \"Japan\",\n \"LifeExpectancy\": 82.603,\n \"GDP\": 31656.06806,\n \"Population\": 127467972\n },\n {\n \"continent\": \"Asia\",\n \"Country\": \"Korea, Dem. Rep.\",\n \"LifeExpectancy\": 67.297,\n \"GDP\": 1593.06548,\n \"Population\": 23301725\n },\n {\n \"continent\": \"Asia\",\n \"Country\": \"Korea, Rep.\",\n \"LifeExpectancy\": 78.623,\n \"GDP\": 23348.13973,\n \"Population\": 49044790\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Albania\",\n \"LifeExpectancy\": 76.423,\n \"GDP\": 5937.029526,\n \"Population\": 3600523\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Austria\",\n \"LifeExpectancy\": 79.829,\n \"GDP\": 36126.4927,\n \"Population\": 8199783\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Belgium\",\n \"LifeExpectancy\": 79.441,\n \"GDP\": 33692.60508,\n \"Population\": 10392226\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Bosnia and Herzegovina\",\n \"LifeExpectancy\": 74.852,\n \"GDP\": 7446.298803,\n \"Population\": 4552198\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Bulgaria\",\n \"LifeExpectancy\": 73.005,\n \"GDP\": 10680.79282,\n \"Population\": 7322858\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Croatia\",\n \"LifeExpectancy\": 75.748,\n \"GDP\": 14619.22272,\n \"Population\": 4493312\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Czech Republic\",\n \"LifeExpectancy\": 76.486,\n \"GDP\": 22833.30851,\n \"Population\": 10228744\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Denmark\",\n \"LifeExpectancy\": 78.332,\n \"GDP\": 35278.41874,\n \"Population\": 5468120\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Finland\",\n \"LifeExpectancy\": 79.313,\n \"GDP\": 33207.0844,\n \"Population\": 5238460\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"France\",\n \"LifeExpectancy\": 80.657,\n \"GDP\": 30470.0167,\n \"Population\": 61083916\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Germany\",\n \"LifeExpectancy\": 79.406,\n \"GDP\": 32170.37442,\n \"Population\": 82400996\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Greece\",\n \"LifeExpectancy\": 79.483,\n \"GDP\": 27538.41188,\n \"Population\": 10706290\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Hungary\",\n \"LifeExpectancy\": 73.338,\n \"GDP\": 18008.94444,\n \"Population\": 9956108\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Iceland\",\n \"LifeExpectancy\": 81.757,\n \"GDP\": 36180.78919,\n \"Population\": 301931\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Ireland\",\n \"LifeExpectancy\": 78.885,\n \"GDP\": 40675.99635,\n \"Population\": 4109086\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Italy\",\n \"LifeExpectancy\": 80.546,\n \"GDP\": 28569.7197,\n \"Population\": 58147733\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Montenegro\",\n \"LifeExpectancy\": 74.543,\n \"GDP\": 9253.896111,\n \"Population\": 684736\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Netherlands\",\n \"LifeExpectancy\": 79.762,\n \"GDP\": 36797.93332,\n \"Population\": 16570613\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Norway\",\n \"LifeExpectancy\": 80.196,\n \"GDP\": 49357.19017,\n \"Population\": 4627926\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Poland\",\n \"LifeExpectancy\": 75.563,\n \"GDP\": 15389.92468,\n \"Population\": 38518241\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Portugal\",\n \"LifeExpectancy\": 78.098,\n \"GDP\": 20509.64777,\n \"Population\": 10642836\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Romania\",\n \"LifeExpectancy\": 72.476,\n \"GDP\": 10808.47561,\n \"Population\": 22276056\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Serbia\",\n \"LifeExpectancy\": 74.002,\n \"GDP\": 9786.534714,\n \"Population\": 10150265\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Slovak Republic\",\n \"LifeExpectancy\": 74.663,\n \"GDP\": 18678.31435,\n \"Population\": 5447502\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Slovenia\",\n \"LifeExpectancy\": 77.926,\n \"GDP\": 25768.25759,\n \"Population\": 2009245\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Spain\",\n \"LifeExpectancy\": 80.941,\n \"GDP\": 28821.0637,\n \"Population\": 40448191\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Sweden\",\n \"LifeExpectancy\": 80.884,\n \"GDP\": 33859.74835,\n \"Population\": 9031088\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Switzerland\",\n \"LifeExpectancy\": 81.701,\n \"GDP\": 37506.41907,\n \"Population\": 7554661\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"Turkey\",\n \"LifeExpectancy\": 71.777,\n \"GDP\": 8458.276384,\n \"Population\": 71158647\n },\n {\n \"continent\": \"Europe\",\n \"Country\": \"United Kingdom\",\n \"LifeExpectancy\": 79.425,\n \"GDP\": 33203.26128,\n \"Population\": 60776238\n },\n {\n \"continent\": \"Oceania\",\n \"Country\": \"Australia\",\n \"LifeExpectancy\": 81.235,\n \"GDP\": 34435.36744,\n \"Population\": 20434176\n },\n {\n \"continent\": \"Oceania\",\n \"Country\": \"New Zealand\",\n \"LifeExpectancy\": 80.204,\n \"GDP\": 25185.00911,\n \"Population\": 4115771\n }\n ],\n },\n encode: {\n x: 'GDP',\n y: 'LifeExpectancy',\n size: 'Population',\n color: 'continent',\n shape: 'point',\n },\n scale: {\n size: {\n type: 'log',\n range: [4, 20],\n },\n x: {\n nice: true,\n },\n y: {\n nice: true,\n },\n },\n style: {\n fillOpacity: 0.6,\n lineWidth: 1,\n stroke: '#fff',\n },\n legend: {\n color: {\n position: 'bottom',\n layout: 'horizontal',\n },\n size: false,\n },\n axis: {\n x: {\n title: 'GDP',\n titleFill: '#333',\n labelFontSize: 12,\n },\n y: {\n title: '预期寿命',\n titleFill: '#333',\n labelFontSize: 12,\n },\n },\n tooltip: {\n title: (d) => d.Country,\n items: [\n (d) => ({ name: 'GDP', value: d.GDP }),\n (d) => ({ name: '预期寿命', value: d.LifeExpectancy }),\n (d) => ({ name: '人口', value: d.Population }),\n ],\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"continent\":\"Americas\",\"Country\":\"Argentina\",\"LifeExpectancy\":75.32,\"GDP\":12779.37964,\"Population\":40301927},\n {\"continent\":\"Americas\",\"Country\":\"Brazil\",\"LifeExpectancy\":72.39,\"GDP\":9065.800825,\"Population\":190010647},\n {\"continent\":\"Americas\",\"Country\":\"Canada\",\"LifeExpectancy\":80.653,\"GDP\":36319.23501,\"Population\":33390141},\n {\"continent\":\"Americas\",\"Country\":\"Chile\",\"LifeExpectancy\":78.553,\"GDP\":13171.63885,\"Population\":16284741},\n {\"continent\":\"Americas\",\"Country\":\"Colombia\",\"LifeExpectancy\":72.889,\"GDP\":7006.580419,\"Population\":44227550},\n {\"continent\":\"Americas\",\"Country\":\"Costa Rica\",\"LifeExpectancy\":78.782,\"GDP\":9645.06142,\"Population\":4133884},\n {\"continent\":\"Americas\",\"Country\":\"Cuba\",\"LifeExpectancy\":78.273,\"GDP\":8948.102923,\"Population\":11416987},\n {\"continent\":\"Americas\",\"Country\":\"Dominican Republic\",\"LifeExpectancy\":72.235,\"GDP\":6025.374752,\"Population\":9319622},\n {\"continent\":\"Americas\",\"Country\":\"Ecuador\",\"LifeExpectancy\":74.994,\"GDP\":6873.262326,\"Population\":13755680},\n {\"continent\":\"Americas\",\"Country\":\"El Salvador\",\"LifeExpectancy\":71.878,\"GDP\":5728.353514,\"Population\":6939688}\n];\n\nchart.options({\n type: 'point',\n data: data,\n encode: {\n x: 'GDP',\n y: 'LifeExpectancy',\n size: 'Population',\n color: 'continent',\n shape: 'point',\n },\n scale: {\n x: { type: 'linear', nice: true },\n y: { type: 'linear', nice: true },\n size: { range: [10, 50] },\n color: { type: 'ordinal' },\n },\n coordinate: {\n transform: [\n { type: 'fisheye' }\n ]\n },\n interaction: {\n fisheye: true\n },\n tooltip: {\n title: 'Country',\n items: [\n { field: 'GDP', name: 'GDP' },\n { field: 'LifeExpectancy', name: '预期寿命' },\n { field: 'Population', name: '人口' },\n { field: 'continent', name: '大洲' }\n ]\n }\n});\n\nchart.render();", + "duration": 13011, + "retrievedSkillIds": [ + "g2-mark-point-scatter", + "g2-interaction-fisheye", + "g2-coord-fisheye", + "g2-scale-point", + "g2-mark-chord" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1957, + "expectedLength": 10405, + "similarity": 0.5824726664255652, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"continent\":\"Americas\",\"Country\":\"Argentina\",\"LifeExpectancy\":75.32,\"GDP\":12779.37964,\"Population\":40301927},\n {\"continent\":\"Americas\",\"Country\":\"Brazil\",\"LifeExpectancy\":72.39,\"GDP\":9065.800825,\"Population\":190010647},\n {\"continent\":\"Americas\",\"Country\":\"Canada\",\"LifeExpectancy\":80.653,\"GDP\":36319.23501,\"Population\":33390141},\n {\"continent\":\"Americas\",\"Country\":\"Chile\",\"LifeExpectancy\":78.553,\"GDP\":13171.63885,\"Population\":16284741},\n {\"continent\":\"Americas\",\"Country\":\"Colombia\",\"LifeExpectancy\":72.889,\"GDP\":7006.580419,\"Population\":44227550},\n {\"continent\":\"Americas\",\"Country\":\"Costa Rica\",\"LifeExpectancy\":78.782,\"GDP\":9645.06142,\"Population\":4133884},\n {\"continent\":\"Americas\",\"Country\":\"Cuba\",\"LifeExpectancy\":78.273,\"GDP\":8948.102923,\"Population\":11416987},\n {\"continent\":\"Americas\",\"Country\":\"Dominican Republic\",\"LifeExpectancy\":72.235,\"GDP\":6025.374752,\"Population\":9319622},\n {\"continent\":\"Americas\",\"Country\":\"Ecuador\",\"LifeExpectancy\":74.994,\"GDP\":6873.262326,\"Population\":13755680},\n {\"continent\":\"Americas\",\"Country\":\"El Salvador\",\"LifeExpectancy\":71.878,\"GDP\":5728.353514,\"Population\":6939688}\n];\n\nchart.options({\n type: 'point',\n data: data,\n encode: {\n x: 'GDP',\n y: 'LifeExpectancy',\n size: 'Population',\n color: 'continent',\n shape: 'point',\n },\n scale: {\n x: { type: 'linear', nice: true },\n y: { type: 'linear', nice: true },\n size: { range: [10, 50] },\n color: { type: 'ordinal' },\n },\n coordinate: {\n transform: [\n { type: 'fisheye' }\n ]\n },\n interaction: {\n fisheye: true\n },\n tooltip: {\n title: 'Country',\n items: [\n { field: 'GDP', name: 'GDP' },\n { field: 'LifeExpectancy', name: '预期寿命' },\n { field: 'Population', name: '人口' },\n { field: 'continent', name: '大洲' }\n ]\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "encode", + "x", + "y", + "size", + "color", + "shape", + "scale", + "x", + "type", + "nice", + "y", + "type", + "nice", + "size", + "range", + "color", + "type", + "coordinate", + "transform", + "type", + "interaction", + "fisheye", + "tooltip", + "title", + "items", + "field", + "name", + "field", + "name", + "field", + "name", + "field", + "name" + ], + "stringLiterals": [ + "continent", + "Country", + "LifeExpectancy", + "GDP", + "Population", + "continent", + "Country", + "LifeExpectancy", + "GDP", + "Population", + "continent", + "Country", + "LifeExpectancy", + "GDP", + "Population", + "continent", + "Country", + "LifeExpectancy", + "GDP", + "Population", + "continent", + "Country", + "LifeExpectancy", + "GDP", + "Population", + "continent", + "Country", + "LifeExpectancy", + "GDP", + "Population", + "continent", + "Country", + "LifeExpectancy", + "GDP", + "Population", + "continent", + "Country", + "LifeExpectancy", + "GDP", + "Population", + "continent", + "Country", + "LifeExpectancy", + "GDP", + "Population", + "continent", + "Country", + "LifeExpectancy", + "GDP", + "Population" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.point", + "interaction" + ] + } + } + }, + { + "id": "case-90", + "query": "根据描述绘制图表,使用 G2 渲染一个桑基图,展示企业的财务流动路径,包括营业收入流向总成本和净利润,净利润进一步流向股东分红和再投资,各成本构成项也通过链接展示其数值。参考数据:{\"links\":[{\"source\":\"营业收入\",\"target\":\"总成本\",\"value\":12000},{\"source\":\"总成本\",\"target\":\"人工成本\",\"value\":4500},{\"source\":\"总成本\",\"target\":\"原材料\",\"value\":5000},{\"source\":\"总成本\",\"target\":\"折旧摊销\",\"value\":2500},{\"source\":\"营业收入\",\"target\":\"净利润\",\"value\":4200},{\"source\":\"净利润\",\"target\":\"股东分红\",\"value\":1200},{\"source\":\"净利润\",\"target\":\"再投资\",\"value\":3000}]}", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst financialFlow = {\n links: [\n { source: '营业收入', target: '总成本', value: 12000 },\n { source: '总成本', target: '人工成本', value: 4500 },\n { source: '总成本', target: '原材料', value: 5000 },\n { source: '总成本', target: '折旧摊销', value: 2500 },\n { source: '营业收入', target: '净利润', value: 4200 },\n { source: '净利润', target: '股东分红', value: 1200 },\n { source: '净利润', target: '再投资', value: 3000 }\n ],\n};\n\nconst chart = new Chart({ container: 'container', theme: 'classic', autoFit: true });\nchart.options({\n type: 'sankey',\n data: { value: financialFlow },\n layout: { nodeAlign: 'center', nodePadding: 0.1 },\n encode: {\n color: (d) => (['营业收入','净利润'].includes(d.key) ? '#1890ff' : (d.key === '总成本' ? '#ff7a45' : '#52c41a'))\n },\n style: {\n labelFontWeight: 'bold',\n labelFill: '#333',\n linkStroke: '#e8e8e8',\n linkStrokeWidth: 0.5,\n nodeWidth: 0.03\n }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 600,\n});\n\nconst links = [\n { source: '营业收入', target: '总成本', value: 12000 },\n { source: '总成本', target: '人工成本', value: 4500 },\n { source: '总成本', target: '原材料', value: 5000 },\n { source: '总成本', target: '折旧摊销', value: 2500 },\n { source: '营业收入', target: '净利润', value: 4200 },\n { source: '净利润', target: '股东分红', value: 1200 },\n { source: '净利润', target: '再投资', value: 3000 }\n];\n\nchart.options({\n type: 'sankey',\n data: {\n value: {\n links\n }\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.02,\n nodeWidth: 0.02\n },\n style: {\n labelSpacing: 4,\n labelFontSize: 12,\n linkFillOpacity: 0.4,\n nodeLineWidth: 1,\n nodeStroke: '#fff'\n },\n legend: false\n});\n\nchart.render();", + "duration": 7409, + "retrievedSkillIds": [ + "g2-mark-sankey", + "g2-mark-bullet", + "g2-mark-k-chart", + "g2-mark-chord", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 822, + "expectedLength": 931, + "similarity": 0.6904474383197787, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 600,\n});\n\nconst links = [\n { source: '营业收入', target: '总成本', value: 12000 },\n { source: '总成本', target: '人工成本', value: 4500 },\n { source: '总成本', target: '原材料', value: 5000 },\n { source: '总成本', target: '折旧摊销', value: 2500 },\n { source: '营业收入', target: '净利润', value: 4200 },\n { source: '净利润', target: '股东分红', value: 1200 },\n { source: '净利润', target: '再投资', value: 3000 }\n];\n\nchart.options({\n type: 'sankey',\n data: {\n value: {\n links\n }\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.02,\n nodeWidth: 0.02\n },\n style: {\n labelSpacing: 4,\n labelFontSize: 12,\n linkFillOpacity: 0.4,\n nodeLineWidth: 1,\n nodeStroke: '#fff'\n },\n legend: false\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "type", + "data", + "value", + "layout", + "nodeAlign", + "nodePadding", + "nodeWidth", + "style", + "labelSpacing", + "labelFontSize", + "linkFillOpacity", + "nodeLineWidth", + "nodeStroke", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-91", + "query": "根据描述绘制图表,渲染一个液体填充形状(水球图),展示任务进度为65%,使用极坐标容器,启用波浪交互和进入/更新动画效果。参考数据:0.65", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n height: 300,\n});\n\nchart.options({\n type: 'liquid',\n data: 0.65,\n style: {\n shape: 'pin',\n fill: 'l(0) 0:#61DDAA 1:#2172FF',\n stroke: '#2172FF',\n outlineBorder: 6,\n outlineDistance: 12,\n waveLength: 160,\n waveCount: 4,\n backgroundFill: '#f0f9ff',\n contentText: '任务进度',\n contentFill: '#1d395c',\n contentFontSize: 24,\n contentStroke: 'rgba(255,255,255,0.8)',\n contentLineWidth: 2,\n },\n coordinate: { type: 'polar', innerRadius: 0.2 },\n animate: {\n enter: { duration: 1200, easing: 'easeOutCubic' },\n update: { type: 'waveMotion', duration: 3000, loop: true },\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ \n container: 'container', \n width: 400, \n height: 400 \n});\n\nchart.options({\n type: 'liquid',\n data: 0.65,\n style: {\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n fill: '#5B8FF9',\n fillOpacity: 0.85,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 28,\n fontWeight: 'bold',\n fill: '#fff',\n formatter: (v) => `${(v * 100).toFixed(0)}%`,\n },\n },\n },\n animate: {\n enter: { type: 'fadeIn', duration: 1000, easing: 'ease-in-out' },\n update: { type: 'morphing', duration: 800, easing: 'ease-in-out' },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "duration": 9875, + "retrievedSkillIds": [ + "g2-mark-liquid", + "g2-animation-types", + "g2-mark-gantt", + "g2-animation-keyframe", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 746, + "expectedLength": 722, + "similarity": 0.6485297839275148, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ \n container: 'container', \n width: 400, \n height: 400 \n});\n\nchart.options({\n type: 'liquid',\n data: 0.65,\n style: {\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n fill: '#5B8FF9',\n fillOpacity: 0.85,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 28,\n fontWeight: 'bold',\n fill: '#fff',\n formatter: (v) => `${(v * 100).toFixed(0)}%`,\n },\n },\n },\n animate: {\n enter: { type: 'fadeIn', duration: 1000, easing: 'ease-in-out' },\n update: { type: 'morphing', duration: 800, easing: 'ease-in-out' },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "style", + "outlineBorder", + "outlineDistance", + "waveLength", + "fill", + "fillOpacity", + "background", + "fill", + "text", + "style", + "fontSize", + "fontWeight", + "fill", + "formatter", + "animate", + "enter", + "type", + "duration", + "easing", + "update", + "type", + "duration", + "easing", + "axis", + "legend", + "tooltip" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "animate", + "x6.background" + ] + } + } + }, + { + "id": "case-92", + "query": "根据描述绘制图表,使用G2库渲染一个漏斗图,展示用户转化流程中各阶段(访问、咨询、报价、议价、成交)的数值分布,数据通过条形区间形式横向排列,应用对称变换和颜色编码,并添加内部数据标签和淡入动画效果。参考数据:\n[{\"stage\":\"访问\",\"value\":8043},{\"stage\":\"咨询\",\"value\":2136},{\"stage\":\"报价\",\"value\":908},{\"stage\":\"议价\",\"value\":691},{\"stage\":\"成交\",\"value\":527}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'interval',\n data: [\n { stage: '访问', value: 8043 },\n { stage: '咨询', value: 2136 },\n { stage: '报价', value: 908 },\n { stage: '议价', value: 691 },\n { stage: '成交', value: 527 },\n ],\n encode: {\n x: 'stage',\n y: 'value',\n color: 'stage',\n shape: 'funnel',\n },\n coordinate: { transform: [{ type: 'transpose' }] },\n transform: [\n {\n type: 'symmetryY',\n },\n ],\n scale: {\n color: {\n palette: 'spectral',\n },\n },\n style: {\n labelText: (d) => `${d.stage}: ${d.value}`,\n },\n animate: { enter: { type: 'fadeIn' } },\n axis: false,\n labels: [\n {\n text: (d) => `${d.stage}\\n${d.value}`,\n position: 'inside',\n transform: [{ type: 'contrastReverse' }],\n },\n ],\n legend: false,\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n {\"stage\":\"访问\",\"value\":8043},\n {\"stage\":\"咨询\",\"value\":2136},\n {\"stage\":\"报价\",\"value\":908},\n {\"stage\":\"议价\",\"value\":691},\n {\"stage\":\"成交\",\"value\":527}\n];\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'stage',\n y: 'value',\n color: 'stage',\n },\n transform: [\n { type: 'symmetryY' }\n ],\n coordinate: {\n transform: [{ type: 'transpose' }]\n },\n labels: [\n {\n text: 'value',\n position: 'inside',\n style: {\n fill: '#fff',\n fontSize: 12\n },\n transform: [\n { type: 'contrastReverse' }\n ]\n }\n ],\n animate: {\n enter: {\n type: 'fadeIn',\n duration: 1000,\n easing: 'easeOut'\n }\n }\n});\n\nchart.render();", + "duration": 15144, + "retrievedSkillIds": [ + "g2-mark-interval-basic", + "g2-animation-keyframe", + "g2-scale-sequential", + "g2-mark-line-basic", + "g2-data-fold" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 843, + "expectedLength": 902, + "similarity": 0.7210696095076401, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n {\"stage\":\"访问\",\"value\":8043},\n {\"stage\":\"咨询\",\"value\":2136},\n {\"stage\":\"报价\",\"value\":908},\n {\"stage\":\"议价\",\"value\":691},\n {\"stage\":\"成交\",\"value\":527}\n];\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'stage',\n y: 'value',\n color: 'stage',\n },\n transform: [\n { type: 'symmetryY' }\n ],\n coordinate: {\n transform: [{ type: 'transpose' }]\n },\n labels: [\n {\n text: 'value',\n position: 'inside',\n style: {\n fill: '#fff',\n fontSize: 12\n },\n transform: [\n { type: 'contrastReverse' }\n ]\n }\n ],\n animate: {\n enter: {\n type: 'fadeIn',\n duration: 1000,\n easing: 'easeOut'\n }\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "color", + "transform", + "type", + "coordinate", + "transform", + "type", + "labels", + "text", + "position", + "style", + "fill", + "fontSize", + "transform", + "type", + "animate", + "enter", + "type", + "duration", + "easing" + ], + "stringLiterals": [ + "stage", + "value", + "stage", + "value", + "stage", + "value", + "stage", + "value", + "stage", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval", + "animate", + "x6.labels" + ] + } + } + }, + { + "id": "case-93", + "query": "根据描述绘制图表,使用 beeswarm 图表类型,根据分组(group)、数值(value)和类别(color)对数据进行可视化渲染,展示不同组内各分类数据点的分布情况,并配置了坐标轴、图例、工具提示和元素高亮交互功能。参考数据:\n[{\"group\":\"A\",\"value\":12,\"category\":\"Low\"},{\"group\":\"A\",\"value\":18,\"category\":\"Medium\"},{\"group\":\"A\",\"value\":25,\"category\":\"High\"},{\"group\":\"A\",\"value\":14,\"category\":\"Low\"},{\"group\":\"B\",\"value\":8,\"category\":\"Low\"},{\"group\":\"B\",\"value\":22,\"category\":\"Medium\"},{\"group\":\"B\",\"value\":30,\"category\":\"High\"},{\"group\":\"B\",\"value\":19,\"category\":\"Medium\"},{\"group\":\"C\",\"value\":5,\"category\":\"Low\"},{\"group\":\"C\",\"value\":27,\"category\":\"High\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const data = [\n { group: 'A', value: 12, category: 'Low' },\n { group: 'A', value: 18, category: 'Medium' },\n { group: 'A', value: 25, category: 'High' },\n { group: 'A', value: 14, category: 'Low' },\n { group: 'B', value: 8, category: 'Low' },\n { group: 'B', value: 22, category: 'Medium' },\n { group: 'B', value: 30, category: 'High' },\n { group: 'B', value: 19, category: 'Medium' },\n { group: 'C', value: 5, category: 'Low' },\n { group: 'C', value: 27, category: 'High' },\n { group: 'C', value: 15, category: 'Low' },\n { group: 'C', value: 24, category: 'High' }\n];\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n type: 'beeswarm',\n data,\n encode: {\n x: 'group',\n y: 'value',\n color: 'category',\n shape: 'square',\n size: 12\n },\n scale: {\n color: { palette: ['#90dbf9', '#ffd166', '#ef476f'] },\n y: { nice: true, domainMin: 0 }\n },\n style: {\n stroke: '#333',\n lineWidth: 1,\n opacity: 0.85\n },\n legend: {\n color: {\n position: 'right',\n layout: { justifyContent: 'center' },\n itemName: { spacing: 8 }\n }\n },\n axis: {\n x: { labelSpacing: 8, tickFilter: d => d.replace('group', '') },\n y: { title: 'Value' }\n },\n interaction: {\n tooltip: { shared: true, showCrosshairs: true }\n }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"group\":\"A\",\"value\":12,\"category\":\"Low\"},\n {\"group\":\"A\",\"value\":18,\"category\":\"Medium\"},\n {\"group\":\"A\",\"value\":25,\"category\":\"High\"},\n {\"group\":\"A\",\"value\":14,\"category\":\"Low\"},\n {\"group\":\"B\",\"value\":8,\"category\":\"Low\"},\n {\"group\":\"B\",\"value\":22,\"category\":\"Medium\"},\n {\"group\":\"B\",\"value\":30,\"category\":\"High\"},\n {\"group\":\"B\",\"value\":19,\"category\":\"Medium\"},\n {\"group\":\"C\",\"value\":5,\"category\":\"Low\"},\n {\"group\":\"C\",\"value\":27,\"category\":\"High\"}\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nchart.options({\n type: 'point',\n data,\n encode: {\n x: 'group',\n y: 'value',\n color: 'category',\n },\n layout: {\n type: 'beeswarm',\n padding: 1.5,\n },\n style: {\n r: 6,\n fillOpacity: 0.85,\n },\n axis: {\n x: { \n title: '分组',\n grid: false,\n },\n y: { \n title: '数值',\n grid: true,\n },\n },\n legend: {\n color: {\n position: 'top',\n title: '类别',\n layout: {\n justifyContent: 'center',\n },\n },\n },\n tooltip: {\n items: [\n { field: 'group', name: '分组' },\n { field: 'value', name: '数值' },\n { field: 'category', name: '类别' },\n ],\n },\n interaction: {\n elementHighlight: true,\n },\n});\n\nchart.render();", + "duration": 83306, + "retrievedSkillIds": [ + "g2-comp-legend-category", + "g2-concept-chart-selection", + "g2-mark-tree", + "g2-mark-beeswarm", + "g2-mark-partition" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1308, + "expectedLength": 1307, + "similarity": 0.5007091540783202, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"group\":\"A\",\"value\":12,\"category\":\"Low\"},\n {\"group\":\"A\",\"value\":18,\"category\":\"Medium\"},\n {\"group\":\"A\",\"value\":25,\"category\":\"High\"},\n {\"group\":\"A\",\"value\":14,\"category\":\"Low\"},\n {\"group\":\"B\",\"value\":8,\"category\":\"Low\"},\n {\"group\":\"B\",\"value\":22,\"category\":\"Medium\"},\n {\"group\":\"B\",\"value\":30,\"category\":\"High\"},\n {\"group\":\"B\",\"value\":19,\"category\":\"Medium\"},\n {\"group\":\"C\",\"value\":5,\"category\":\"Low\"},\n {\"group\":\"C\",\"value\":27,\"category\":\"High\"}\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nchart.options({\n type: 'point',\n data,\n encode: {\n x: 'group',\n y: 'value',\n color: 'category',\n },\n layout: {\n type: 'beeswarm',\n padding: 1.5,\n },\n style: {\n r: 6,\n fillOpacity: 0.85,\n },\n axis: {\n x: { \n title: '分组',\n grid: false,\n },\n y: { \n title: '数值',\n grid: true,\n },\n },\n legend: {\n color: {\n position: 'top',\n title: '类别',\n layout: {\n justifyContent: 'center',\n },\n },\n },\n tooltip: {\n items: [\n { field: 'group', name: '分组' },\n { field: 'value', name: '数值' },\n { field: 'category', name: '类别' },\n ],\n },\n interaction: {\n elementHighlight: true,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "color", + "layout", + "type", + "padding", + "style", + "r", + "fillOpacity", + "axis", + "x", + "title", + "grid", + "y", + "title", + "grid", + "legend", + "color", + "position", + "title", + "layout", + "justifyContent", + "tooltip", + "items", + "field", + "name", + "field", + "name", + "field", + "name", + "interaction", + "elementHighlight" + ], + "stringLiterals": [ + "group", + "value", + "category", + "group", + "value", + "category", + "group", + "value", + "category", + "group", + "value", + "category", + "group", + "value", + "category", + "group", + "value", + "category", + "group", + "value", + "category", + "group", + "value", + "category", + "group", + "value", + "category", + "group", + "value", + "category" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "type.point", + "interaction" + ] + } + } + }, + { + "id": "case-94", + "query": "根据描述绘制图表,使用 G2 渲染一个横向区间图(甘特图风格),展示各阶段任务的起止时间。每个数据项包含阶段名、任务名、开始时间和结束时间,通过 x 轴显示组合标签,y 轴映射时间范围,颜色按阶段区分,并应用了坐标轴转置。参考数据:\n[{\"stage\":\"Phase 1\",\"task\":\"原型\",\"start\":1,\"end\":3},{\"stage\":\"Phase 1\",\"task\":\"验证\",\"start\":3,\"end\":5},{\"stage\":\"Phase 2\",\"task\":\"开发\",\"start\":4,\"end\":10},{\"stage\":\"Phase 2\",\"task\":\"单元测试\",\"start\":8,\"end\":11},{\"stage\":\"Phase 3\",\"task\":\"集成\",\"start\":10,\"end\":13},{\"stage\":\"Phase 3\",\"task\":\"压测\",\"start\":12,\"end\":15}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container', theme: 'classic' });\n\nchart.options({\n type: 'interval',\n autoFit: true,\n data: [\n { stage: 'Phase 1', task: '原型', start: 1, end: 3 },\n { stage: 'Phase 1', task: '验证', start: 3, end: 5 },\n { stage: 'Phase 2', task: '开发', start: 4, end: 10 },\n { stage: 'Phase 2', task: '单元测试', start: 8, end: 11 },\n { stage: 'Phase 3', task: '集成', start: 10, end: 13 },\n { stage: 'Phase 3', task: '压测', start: 12, end: 15 }\n ],\n encode: {\n x: (d) => `${d.stage} - ${d.task}`,\n y: 'start',\n y1: 'end',\n color: 'stage'\n },\n coordinate: { transform: [{ type: 'transpose' }] },\n axis: {\n x: {\n title: '阶段与任务',\n labelTransform: 'rotate(30)'\n },\n y: { title: '时间(周)' }\n }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"stage\":\"Phase 1\",\"task\":\"原型\",\"start\":1,\"end\":3},\n {\"stage\":\"Phase 1\",\"task\":\"验证\",\"start\":3,\"end\":5},\n {\"stage\":\"Phase 2\",\"task\":\"开发\",\"start\":4,\"end\":10},\n {\"stage\":\"Phase 2\",\"task\":\"单元测试\",\"start\":8,\"end\":11},\n {\"stage\":\"Phase 3\",\"task\":\"集成\",\"start\":10,\"end\":13},\n {\"stage\":\"Phase 3\",\"task\":\"压测\",\"start\":12,\"end\":15}\n ],\n encode: {\n x: 'task',\n y: 'start',\n y1: 'end',\n color: 'stage'\n },\n coordinate: {\n transform: [{ type: 'transpose' }]\n },\n style: {\n radius: 4\n },\n axis: {\n x: { title: '任务名称' },\n y: { title: '时间周期' }\n },\n legend: {\n color: { title: '阶段' }\n }\n});\n\nchart.render();", + "duration": 8833, + "retrievedSkillIds": [ + "g2-scale-time", + "g2-mark-gantt", + "g2-mark-interval-basic", + "g2-mark-rangex", + "g2-comp-slider" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 798, + "expectedLength": 812, + "similarity": 0.8121647368653357, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"stage\":\"Phase 1\",\"task\":\"原型\",\"start\":1,\"end\":3},\n {\"stage\":\"Phase 1\",\"task\":\"验证\",\"start\":3,\"end\":5},\n {\"stage\":\"Phase 2\",\"task\":\"开发\",\"start\":4,\"end\":10},\n {\"stage\":\"Phase 2\",\"task\":\"单元测试\",\"start\":8,\"end\":11},\n {\"stage\":\"Phase 3\",\"task\":\"集成\",\"start\":10,\"end\":13},\n {\"stage\":\"Phase 3\",\"task\":\"压测\",\"start\":12,\"end\":15}\n ],\n encode: {\n x: 'task',\n y: 'start',\n y1: 'end',\n color: 'stage'\n },\n coordinate: {\n transform: [{ type: 'transpose' }]\n },\n style: {\n radius: 4\n },\n axis: {\n x: { title: '任务名称' },\n y: { title: '时间周期' }\n },\n legend: {\n color: { title: '阶段' }\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "encode", + "x", + "y", + "y1", + "color", + "coordinate", + "transform", + "type", + "style", + "radius", + "axis", + "x", + "title", + "y", + "title", + "legend", + "color", + "title" + ], + "stringLiterals": [ + "stage", + "task", + "start", + "end", + "stage", + "task", + "start", + "end", + "stage", + "task", + "start", + "end", + "stage", + "task", + "start", + "end", + "stage", + "task", + "start", + "end", + "stage", + "task", + "start", + "end" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval" + ] + } + } + }, + { + "id": "case-95", + "query": "根据描述绘制图表,使用 G2 ,基于数值型数据生成直方图(矩形条形图),将 'value' 字段按指定阈值分箱统计频数,展示数值分布情况。参考数据:\n[{\"value\":2.5},{\"value\":3.1},{\"value\":4},{\"value\":4.7},{\"value\":5.2},{\"value\":5.8},{\"value\":6.3},{\"value\":6.9},{\"value\":7.5},{\"value\":8}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { value: 2.5 },\n { value: 3.1 },\n { value: 4.0 },\n { value: 4.7 },\n { value: 5.2 },\n { value: 5.8 },\n { value: 6.3 },\n { value: 6.9 },\n { value: 7.5 },\n { value: 8.0 },\n { value: 8.2 },\n { value: 8.8 },\n { value: 9.3 },\n { value: 9.7 }\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'rect',\n data: data,\n encode: {\n x: 'value',\n y: 'count'\n },\n transform: [\n { type: 'binX', y: 'count', thresholds: 5 }\n ],\n scale: {\n x: { nice: true, tickCount: 6 },\n y: { nice: true }\n },\n axis: {\n x: { title: '数值区间' },\n y: { title: '频数' }\n },\n style: {\n fill: '#5B8FF9',\n fillOpacity: 0.8,\n stroke: '#fff',\n lineWidth: 1\n },\n legend: false\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'rect',\n data: [\n {\"value\":2.5},{\"value\":3.1},{\"value\":4},{\"value\":4.7},{\"value\":5.2},\n {\"value\":5.8},{\"value\":6.3},{\"value\":6.9},{\"value\":7.5},{\"value\":8}\n ],\n encode: {\n x: 'value',\n y: 'count',\n },\n transform: [\n {\n type: 'binX',\n y: 'count',\n thresholds: 5,\n },\n ],\n style: {\n fill: '#1890FF',\n fillOpacity: 0.9,\n },\n axis: {\n x: { title: 'Value' },\n y: { title: '频数' },\n },\n});\n\nchart.render();", + "duration": 9563, + "retrievedSkillIds": [ + "g2-transform-binx", + "g2-mark-histogram", + "g2-transform-bin", + "g2-mark-distribution-curve", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 587, + "expectedLength": 812, + "similarity": 0.6946531962660994, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'rect',\n data: [\n {\"value\":2.5},{\"value\":3.1},{\"value\":4},{\"value\":4.7},{\"value\":5.2},\n {\"value\":5.8},{\"value\":6.3},{\"value\":6.9},{\"value\":7.5},{\"value\":8}\n ],\n encode: {\n x: 'value',\n y: 'count',\n },\n transform: [\n {\n type: 'binX',\n y: 'count',\n thresholds: 5,\n },\n ],\n style: {\n fill: '#1890FF',\n fillOpacity: 0.9,\n },\n axis: {\n x: { title: 'Value' },\n y: { title: '频数' },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "encode", + "x", + "y", + "transform", + "type", + "y", + "thresholds", + "style", + "fill", + "fillOpacity", + "axis", + "x", + "title", + "y", + "title" + ], + "stringLiterals": [ + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform" + ] + } + } + }, + { + "id": "case-96", + "query": "根据描述绘制图表,渲染一个词云图,根据提供的词语及其影响力分和情感倾向进行可视化。词语大小映射影响力分数,颜色映射情感类别(正/中/负),支持图例和 tooltip 信息展示,使用矩形螺旋布局。参考数据:\n[{\"word\":\"增长\",\"influence\":92,\"sentiment\":\"positive\"},{\"word\":\"风险\",\"influence\":85,\"sentiment\":\"negative\"},{\"word\":\"机会\",\"influence\":78,\"sentiment\":\"positive\"},{\"word\":\"调整\",\"influence\":70,\"sentiment\":\"neutral\"},{\"word\":\"波动\",\"influence\":66,\"sentiment\":\"negative\"},{\"word\":\"创新\",\"influence\":63,\"sentiment\":\"positive\"},{\"word\":\"政策\",\"influence\":60,\"sentiment\":\"neutral\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({ container: 'container', height: 400, padding: 20 });\nchart.options({\n type: 'wordCloud',\n data: [\n { word: '增长', influence: 92, sentiment: 'positive' },\n { word: '风险', influence: 85, sentiment: 'negative' },\n { word: '机会', influence: 78, sentiment: 'positive' },\n { word: '调整', influence: 70, sentiment: 'neutral' },\n { word: '波动', influence: 66, sentiment: 'negative' },\n { word: '创新', influence: 63, sentiment: 'positive' },\n { word: '政策', influence: 60, sentiment: 'neutral' }\n ],\n layout: { spiral: 'rectangular', randomMotion: 0.3 },\n encode: { text: 'word', color: 'sentiment', size: 'influence' },\n scale: { color: { domain: ['positive', 'neutral', 'negative'], range: ['#52c41a', '#faad14', '#f5222d'] } },\n legend: false,\n tooltip: { items: [{ field: 'word' }, { field: 'influence', name: '影响力分' }, { field: 'sentiment' }] }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { word: '增长', influence: 92, sentiment: 'positive' },\n { word: '风险', influence: 85, sentiment: 'negative' },\n { word: '机会', influence: 78, sentiment: 'positive' },\n { word: '调整', influence: 70, sentiment: 'neutral' },\n { word: '波动', influence: 66, sentiment: 'negative' },\n { word: '创新', influence: 63, sentiment: 'positive' },\n { word: '政策', influence: 60, sentiment: 'neutral' },\n];\n\nconst chart = new Chart({ container: 'container', width: 640, height: 480 });\n\nchart.options({\n type: 'wordCloud',\n data,\n encode: {\n text: 'word',\n fontSize: { field: 'influence', range: [16, 48] },\n color: 'sentiment',\n },\n scale: {\n color: {\n domain: ['positive', 'neutral', 'negative'],\n range: ['#2fc25b', '#facc14', '#f5222d'],\n },\n },\n layout: {\n spiral: 'rectangular',\n padding: 4,\n },\n style: {\n fontFamily: 'sans-serif',\n fontWeight: 'bold',\n },\n legend: {\n color: { title: '情感倾向' },\n },\n tooltip: {\n title: 'word',\n items: [\n { field: 'influence', name: '影响力分数' },\n { field: 'sentiment', name: '情感类别' },\n ],\n },\n});\n\nchart.render();", + "duration": 8978, + "retrievedSkillIds": [ + "g2-mark-wordcloud", + "g2-mark-tree", + "g2-concept-chart-selection", + "g2-mark-interval-basic", + "g2-mark-bullet" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1160, + "expectedLength": 908, + "similarity": 0.797811671087533, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { word: '增长', influence: 92, sentiment: 'positive' },\n { word: '风险', influence: 85, sentiment: 'negative' },\n { word: '机会', influence: 78, sentiment: 'positive' },\n { word: '调整', influence: 70, sentiment: 'neutral' },\n { word: '波动', influence: 66, sentiment: 'negative' },\n { word: '创新', influence: 63, sentiment: 'positive' },\n { word: '政策', influence: 60, sentiment: 'neutral' },\n];\n\nconst chart = new Chart({ container: 'container', width: 640, height: 480 });\n\nchart.options({\n type: 'wordCloud',\n data,\n encode: {\n text: 'word',\n fontSize: { field: 'influence', range: [16, 48] },\n color: 'sentiment',\n },\n scale: {\n color: {\n domain: ['positive', 'neutral', 'negative'],\n range: ['#2fc25b', '#facc14', '#f5222d'],\n },\n },\n layout: {\n spiral: 'rectangular',\n padding: 4,\n },\n style: {\n fontFamily: 'sans-serif',\n fontWeight: 'bold',\n },\n legend: {\n color: { title: '情感倾向' },\n },\n tooltip: {\n title: 'word',\n items: [\n { field: 'influence', name: '影响力分数' },\n { field: 'sentiment', name: '情感类别' },\n ],\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "word", + "influence", + "sentiment", + "word", + "influence", + "sentiment", + "word", + "influence", + "sentiment", + "word", + "influence", + "sentiment", + "word", + "influence", + "sentiment", + "word", + "influence", + "sentiment", + "word", + "influence", + "sentiment", + "container", + "width", + "height", + "type", + "encode", + "text", + "fontSize", + "field", + "range", + "color", + "scale", + "color", + "domain", + "range", + "layout", + "spiral", + "padding", + "style", + "fontFamily", + "fontWeight", + "legend", + "color", + "title", + "tooltip", + "title", + "items", + "field", + "name", + "field", + "name" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale" + ] + } + } + }, + { + "id": "case-97", + "query": "根据描述绘制图表,使用词云图展示一组关键词及其出现频次,通过不同字体大小和颜色编码来反映数值差异,关闭了图例显示并配置了提示框内容。参考数据:[{\"text\":\"数据\",\"value\":88},{\"text\":\"可视化\",\"value\":76},{\"text\":\"分析\",\"value\":65},{\"text\":\"洞察\",\"value\":60},{\"text\":\"G2\",\"value\":58},{\"text\":\"图表\",\"value\":55},{\"text\":\"设计\",\"value\":44},{\"text\":\"交互\",\"value\":40},{\"text\":\"用户\",\"value\":38},{\"text\":\"体验\",\"value\":35}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({ container: 'container', autoFit: true });\nchart.options({\n type: 'wordCloud',\n data: [\n { text: '数据', value: 88 },\n { text: '可视化', value: 76 },\n { text: '分析', value: 65 },\n { text: '洞察', value: 60 },\n { text: 'G2', value: 58 },\n { text: '图表', value: 55 },\n { text: '设计', value: 44 },\n { text: '交互', value: 40 },\n { text: '用户', value: 38 },\n { text: '体验', value: 35 }\n ],\n layout: { spiral: 'archimedean', fontSize: [18, 60], padding: 6 },\n encode: { color: 'text' },\n scale: { color: { palette: 'spectral' } },\n style: { fontFamily: 'Microsoft YaHei' },\n legend: false,\n tooltip: { items: [{ field: 'text', name: '关键词' }, { field: 'value', name: '出现频次' }] }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { text: '数据', value: 88 },\n { text: '可视化', value: 76 },\n { text: '分析', value: 65 },\n { text: '洞察', value: 60 },\n { text: 'G2', value: 58 },\n { text: '图表', value: 55 },\n { text: '设计', value: 44 },\n { text: '交互', value: 40 },\n { text: '用户', value: 38 },\n { text: '体验', value: 35 }\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480\n});\n\nchart.options({\n type: 'wordCloud',\n data,\n encode: {\n text: 'text',\n color: 'value',\n fontSize: {\n field: 'value',\n range: [16, 56]\n }\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'blues'\n }\n },\n layout: {\n padding: 3\n },\n style: {\n fontFamily: 'sans-serif',\n fontWeight: 'bold'\n },\n legend: false,\n tooltip: {\n items: [\n { field: 'text', name: '关键词' },\n { field: 'value', name: '出现频次' }\n ]\n }\n});\n\nchart.render();", + "duration": 7725, + "retrievedSkillIds": [ + "g2-mark-wordcloud", + "g2-mark-cell-heatmap", + "g2-interaction-brush", + "g2-concept-chart-selection", + "g2-concept-rendering-troubleshoot" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 930, + "expectedLength": 742, + "similarity": 0.7990154607297464, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { text: '数据', value: 88 },\n { text: '可视化', value: 76 },\n { text: '分析', value: 65 },\n { text: '洞察', value: 60 },\n { text: 'G2', value: 58 },\n { text: '图表', value: 55 },\n { text: '设计', value: 44 },\n { text: '交互', value: 40 },\n { text: '用户', value: 38 },\n { text: '体验', value: 35 }\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480\n});\n\nchart.options({\n type: 'wordCloud',\n data,\n encode: {\n text: 'text',\n color: 'value',\n fontSize: {\n field: 'value',\n range: [16, 56]\n }\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'blues'\n }\n },\n layout: {\n padding: 3\n },\n style: {\n fontFamily: 'sans-serif',\n fontWeight: 'bold'\n },\n legend: false,\n tooltip: {\n items: [\n { field: 'text', name: '关键词' },\n { field: 'value', name: '出现频次' }\n ]\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "container", + "width", + "height", + "type", + "encode", + "text", + "color", + "fontSize", + "field", + "range", + "scale", + "color", + "type", + "palette", + "layout", + "padding", + "style", + "fontFamily", + "fontWeight", + "legend", + "tooltip", + "items", + "field", + "name", + "field", + "name" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale" + ] + } + } + }, + { + "id": "case-98", + "query": "根据描述绘制图表,使用 G2 渲染一个树图(treemap),展示图表类型和数据分析类别的层级分布及对应数值,通过自定义数据回调提供结构化数据,并配置了平铺布局、二进制分割方式、内边距及标签样式。参考数据:{\"name\":\"图表类型\",\"children\":[{\"name\":\"基础图表\",\"children\":[{\"name\":\"条形图\",\"value\":300},{\"name\":\"折线图\",\"value\":600},{\"name\":\"散点图\",\"value\":160},{\"name\":\"面积图\",\"value\":160},{\"name\":\"其他\",\"value\":180}]},{\"name\":\"数据分析\",\"children\":[{\"name\":\"分箱\",\"value\":280},{\"name\":\"分组\",\"value\":150},{\"name\":\"回归线\",\"value\":210},{\"name\":\"其他\",\"value\":40}]}]}", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\nchart.options({\n type: 'treemap',\n data: {\n type: 'custom',\n callback: (data) => ({\n name: '图表类型',\n children: [\n {\n name: '基础图表',\n children: [\n { name: '条形图', value: 300 },\n { name: '折线图', value: 600 },\n { name: '散点图', value: 160 },\n { name: '面积图', value: 160 },\n { name: '其他', value: 180 },\n ],\n },\n {\n name: '数据分析',\n children: [\n { name: '分箱', value: 280 },\n { name: '分组', value: 150 },\n { name: '回归线', value: 210 },\n { name: '其他', value: 40 },\n ],\n },\n ],\n }),\n },\n layout: {\n tile: 'treemapBinary',\n paddingInner: 1,\n },\n encode: { value: 'value' },\n style: {\n labelFill: '#000',\n labelStroke: '#fff',\n labelLineWidth: 1.5,\n labelFontSize: 14,\n labelPosition: 'top-left',\n labelDx: 5,\n labelDy: 5,\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n \"name\": \"图表类型\",\n \"children\": [\n {\n \"name\": \"基础图表\",\n \"children\": [\n { \"name\": \"条形图\", \"value\": 300 },\n { \"name\": \"折线图\", \"value\": 600 },\n { \"name\": \"散点图\", \"value\": 160 },\n { \"name\": \"面积图\", \"value\": 160 },\n { \"name\": \"其他\", \"value\": 180 }\n ]\n },\n {\n \"name\": \"数据分析\",\n \"children\": [\n { \"name\": \"分箱\", \"value\": 280 },\n { \"name\": \"分组\", \"value\": 150 },\n { \"name\": \"回归线\", \"value\": 210 },\n { \"name\": \"其他\", \"value\": 40 }\n ]\n }\n ]\n};\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 500\n});\n\nchart.options({\n type: 'treemap',\n data: {\n value: data\n },\n encode: {\n value: 'value'\n },\n layout: {\n tile: 'treemapBinary',\n paddingInner: 4,\n paddingOuter: 4\n },\n style: {\n labelText: (d) => d.data?.name || '',\n labelFill: '#fff',\n labelFontSize: 12,\n fillOpacity: 0.85,\n stroke: '#fff',\n lineWidth: 1\n },\n legend: false\n});\n\nchart.render();", + "duration": 13137, + "retrievedSkillIds": [ + "g2-mark-tree", + "g2-mark-treemap", + "g2-interaction-treemap-drilldown", + "g2-concept-chart-selection", + "g2-comp-legend-category" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1051, + "expectedLength": 1057, + "similarity": 0.6117171717171718, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n \"name\": \"图表类型\",\n \"children\": [\n {\n \"name\": \"基础图表\",\n \"children\": [\n { \"name\": \"条形图\", \"value\": 300 },\n { \"name\": \"折线图\", \"value\": 600 },\n { \"name\": \"散点图\", \"value\": 160 },\n { \"name\": \"面积图\", \"value\": 160 },\n { \"name\": \"其他\", \"value\": 180 }\n ]\n },\n {\n \"name\": \"数据分析\",\n \"children\": [\n { \"name\": \"分箱\", \"value\": 280 },\n { \"name\": \"分组\", \"value\": 150 },\n { \"name\": \"回归线\", \"value\": 210 },\n { \"name\": \"其他\", \"value\": 40 }\n ]\n }\n ]\n};\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 500\n});\n\nchart.options({\n type: 'treemap',\n data: {\n value: data\n },\n encode: {\n value: 'value'\n },\n layout: {\n tile: 'treemapBinary',\n paddingInner: 4,\n paddingOuter: 4\n },\n style: {\n labelText: (d) => d.data?.name || '',\n labelFill: '#fff',\n labelFontSize: 12,\n fillOpacity: 0.85,\n stroke: '#fff',\n lineWidth: 1\n },\n legend: false\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "value", + "encode", + "value", + "layout", + "tile", + "paddingInner", + "paddingOuter", + "style", + "labelText", + "labelFill", + "labelFontSize", + "fillOpacity", + "stroke", + "lineWidth", + "legend" + ], + "stringLiterals": [ + "name", + "children", + "name", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode" + ] + } + } + }, + { + "id": "case-99", + "query": "根据描述绘制图表,使用 G2 创建一个弦图(chord diagram),展示不同岗位(如前端、后端、数据库、运维、测试、产品)之间的协作关系及协作次数,配置主题、节点宽度比例、颜色映射、标签样式和元素高亮交互功能。\n参考数据:{\"value\":{\"links\":[{\"source\":\"前端\",\"target\":\"后端\",\"value\":320},{\"source\":\"前端\",\"target\":\"数据库\",\"value\":180},{\"source\":\"后端\",\"target\":\"数据库\",\"value\":410},{\"source\":\"后端\",\"target\":\"运维\",\"value\":260},{\"source\":\"运维\",\"target\":\"数据库\",\"value\":220},{\"source\":\"测试\",\"target\":\"前端\",\"value\":150},{\"source\":\"测试\",\"target\":\"后端\",\"value\":200},{\"source\":\"产品\",\"target\":\"前端\",\"value\":280},{\"source\":\"产品\",\"target\":\"后端\",\"value\":310}]}}", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'chord',\n autoFit: true,\n data: {\n value: {\n links: [\n { source: '前端', target: '后端', value: 320 },\n { source: '前端', target: '数据库', value: 180 },\n { source: '后端', target: '数据库', value: 410 },\n { source: '后端', target: '运维', value: 260 },\n { source: '运维', target: '数据库', value: 220 },\n { source: '测试', target: '前端', value: 150 },\n { source: '测试', target: '后端', value: 200 },\n { source: '产品', target: '前端', value: 280 },\n { source: '产品', target: '后端', value: 310 },\n ],\n },\n },\n layout: { nodeWidthRatio: 0.06 },\n scale: {\n color: {\n type: 'ordinal',\n range: ['#3498DB', '#9B59B6', '#E74C3C', '#F39C12', '#1ABC9C'],\n },\n },\n style: {\n labelFontSize: 11,\n labelFill: '#34495E',\n linkFillOpacity: 0.5,\n nodePadding: 3,\n },\n tooltip: {\n items: [\n { field: 'source', name: '协作发起' },\n { field: 'target', name: '协作对象' },\n { field: 'value', name: '协作次数' },\n ],\n },\n interaction: [\n {\n type: 'elementHighlight',\n background: false,\n },\n ],\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 640,\n theme: 'classic',\n});\n\nconst rawLinks = [\n {\"source\":\"前端\",\"target\":\"后端\",\"value\":320},\n {\"source\":\"前端\",\"target\":\"数据库\",\"value\":180},\n {\"source\":\"后端\",\"target\":\"数据库\",\"value\":410},\n {\"source\":\"后端\",\"target\":\"运维\",\"value\":260},\n {\"source\":\"运维\",\"target\":\"数据库\",\"value\":220},\n {\"source\":\"测试\",\"target\":\"前端\",\"value\":150},\n {\"source\":\"测试\",\"target\":\"后端\",\"value\":200},\n {\"source\":\"产品\",\"target\":\"前端\",\"value\":280},\n {\"source\":\"产品\",\"target\":\"后端\",\"value\":310}\n];\n\nconst nodeKeys = new Set();\nrawLinks.forEach(link => {\n nodeKeys.add(link.source);\n nodeKeys.add(link.target);\n});\n\nconst nodes = Array.from(nodeKeys).map(key => ({ key, name: key }));\n\nchart.options({\n type: 'chord',\n data: {\n value: {\n nodes,\n links: rawLinks\n }\n },\n encode: {\n source: 'source',\n target: 'target',\n value: 'value',\n nodeKey: 'key',\n nodeColor: 'key',\n linkColor: 'source',\n },\n layout: {\n nodeWidthRatio: 0.05,\n nodePaddingRatio: 0.08,\n sortBy: 'weight',\n },\n style: {\n node: {\n opacity: 1,\n lineWidth: 1,\n stroke: '#fff',\n },\n link: {\n opacity: 0.5,\n lineWidth: 1,\n },\n },\n nodeLabels: [\n {\n text: 'name',\n position: 'outside',\n style: {\n fontSize: 12,\n fontWeight: 'bold',\n },\n },\n ],\n interaction: {\n elementHighlight: true,\n },\n tooltip: {\n node: {\n title: '岗位',\n items: [(d) => ({ name: d.key, value: d.value })],\n },\n link: {\n title: '协作关系',\n items: [(d) => ({ name: `${d.source} → ${d.target}`, value: d.value })],\n },\n },\n});\n\nchart.render();", + "duration": 15328, + "retrievedSkillIds": [ + "g2-mark-chord", + "g2-mark-tree", + "g2-mark-interval-basic", + "g2-mark-cell-heatmap", + "g2-mark-arc-diagram" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1713, + "expectedLength": 1240, + "similarity": 0.5460579760831017, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 640,\n theme: 'classic',\n});\n\nconst rawLinks = [\n {\"source\":\"前端\",\"target\":\"后端\",\"value\":320},\n {\"source\":\"前端\",\"target\":\"数据库\",\"value\":180},\n {\"source\":\"后端\",\"target\":\"数据库\",\"value\":410},\n {\"source\":\"后端\",\"target\":\"运维\",\"value\":260},\n {\"source\":\"运维\",\"target\":\"数据库\",\"value\":220},\n {\"source\":\"测试\",\"target\":\"前端\",\"value\":150},\n {\"source\":\"测试\",\"target\":\"后端\",\"value\":200},\n {\"source\":\"产品\",\"target\":\"前端\",\"value\":280},\n {\"source\":\"产品\",\"target\":\"后端\",\"value\":310}\n];\n\nconst nodeKeys = new Set();\nrawLinks.forEach(link => {\n nodeKeys.add(link.source);\n nodeKeys.add(link.target);\n});\n\nconst nodes = Array.from(nodeKeys).map(key => ({ key, name: key }));\n\nchart.options({\n type: 'chord',\n data: {\n value: {\n nodes,\n links: rawLinks\n }\n },\n encode: {\n source: 'source',\n target: 'target',\n value: 'value',\n nodeKey: 'key',\n nodeColor: 'key',\n linkColor: 'source',\n },\n layout: {\n nodeWidthRatio: 0.05,\n nodePaddingRatio: 0.08,\n sortBy: 'weight',\n },\n style: {\n node: {\n opacity: 1,\n lineWidth: 1,\n stroke: '#fff',\n },\n link: {\n opacity: 0.5,\n lineWidth: 1,\n },\n },\n nodeLabels: [\n {\n text: 'name',\n position: 'outside',\n style: {\n fontSize: 12,\n fontWeight: 'bold',\n },\n },\n ],\n interaction: {\n elementHighlight: true,\n },\n tooltip: {\n node: {\n title: '岗位',\n items: [(d) => ({ name: d.key, value: d.value })],\n },\n link: {\n title: '协作关系',\n items: [(d) => ({ name: `${d.source} → ${d.target}`, value: d.value })],\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "Set", + "forEach", + "add", + "add", + "map", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "theme", + "name", + "type", + "data", + "value", + "links", + "encode", + "source", + "target", + "value", + "nodeKey", + "nodeColor", + "linkColor", + "layout", + "nodeWidthRatio", + "nodePaddingRatio", + "sortBy", + "style", + "node", + "opacity", + "lineWidth", + "stroke", + "link", + "opacity", + "lineWidth", + "nodeLabels", + "text", + "position", + "style", + "fontSize", + "fontWeight", + "interaction", + "elementHighlight", + "tooltip", + "node", + "title", + "items", + "name", + "value", + "link", + "title", + "items", + "name", + "value" + ], + "stringLiterals": [ + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "interaction", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-100", + "query": "根据描述绘制图表,使用 G2 渲染一个液态填充(水波图)图表,展示 68% 的进度状态,采用 'pin' 形状样式,极坐标布局,并配置了进入和持续循环的动画效果。参考数据:0.68", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n });\n\nchart.options({\n type: 'liquid',\n data: 0.68,\n style: {\n shape: 'pin',\n fill: 'l(0) 0:#1890FF 1:#E6F7FF',\n stroke: '#85D5FF',\n waveLength: 160,\n waveCount: 2,\n outlineBorder: 12,\n outlineDistance: 6,\n contentText: '68%',\n contentFill: '#1D39C4',\n contentFontSize: 40,\n contentLineWidth: 2,\n contentStroke: '#FFFFFF',\n backgroundFill: '#F0F9FF'\n },\n coordinate: { type: 'polar', innerRadius: 0.2, outerRadius: 1 },\n animate: {\n enter: { duration: 1000, easing: 'easeCubicOut' },\n update: { duration: 3000, easing: 'linear', loop: true }\n }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ \n container: 'container', \n width: 400, \n height: 400 \n});\n\nchart.options({\n type: 'liquid',\n data: 0.68,\n coordinate: { type: 'polar' },\n style: {\n shape: 'pin',\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n fill: '#5B8FF9',\n fillOpacity: 0.85,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 28,\n fontWeight: 'bold',\n fill: '#fff',\n formatter: (v) => `${(v * 100).toFixed(0)}%`,\n },\n },\n },\n animate: {\n enter: {\n type: 'zoomIn',\n duration: 800,\n easing: 'ease-out',\n },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "duration": 21462, + "retrievedSkillIds": [ + "g2-mark-liquid", + "g2-mark-interval-basic", + "g2-animation-types", + "g2-animation-keyframe", + "g2-mark-shape" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 744, + "expectedLength": 721, + "similarity": 0.6084323855908034, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ \n container: 'container', \n width: 400, \n height: 400 \n});\n\nchart.options({\n type: 'liquid',\n data: 0.68,\n coordinate: { type: 'polar' },\n style: {\n shape: 'pin',\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n fill: '#5B8FF9',\n fillOpacity: 0.85,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 28,\n fontWeight: 'bold',\n fill: '#fff',\n formatter: (v) => `${(v * 100).toFixed(0)}%`,\n },\n },\n },\n animate: {\n enter: {\n type: 'zoomIn',\n duration: 800,\n easing: 'ease-out',\n },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "coordinate", + "type", + "style", + "shape", + "outlineBorder", + "outlineDistance", + "waveLength", + "fill", + "fillOpacity", + "background", + "fill", + "text", + "style", + "fontSize", + "fontWeight", + "fill", + "formatter", + "animate", + "enter", + "type", + "duration", + "easing", + "axis", + "legend", + "tooltip" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "coordinate", + "animate", + "x6.background" + ] + } + } + }, + { + "id": "case-101", + "query": "根据描述绘制图表,使用词云图展示一组关键词及其提及频次,每个词的大小和颜色映射其数值大小,提供鼠标悬停提示信息。参考数据:[{\"text\":\"创新\",\"value\":320},{\"text\":\"增长\",\"value\":280},{\"text\":\"风险\",\"value\":190},{\"text\":\"用户\",\"value\":170},{\"text\":\"技术\",\"value\":150},{\"text\":\"市场\",\"value\":130},{\"text\":\"数据\",\"value\":110},{\"text\":\"合作\",\"value\":90},{\"text\":\"成本\",\"value\":75},{\"text\":\"合规\",\"value\":60}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container', width: 600, height: 400 });\n\nchart.options({\n type: 'wordCloud',\n data: [\n { text: '创新', value: 320 },\n { text: '增长', value: 280 },\n { text: '风险', value: 190 },\n { text: '用户', value: 170 },\n { text: '技术', value: 150 },\n { text: '市场', value: 130 },\n { text: '数据', value: 110 },\n { text: '合作', value: 90 },\n { text: '成本', value: 75 },\n { text: '合规', value: 60 }\n ],\n layout: { spiral: 'archimedean', fontSize: [18, 48], padding: 4 },\n encode: { text: 'text', color: 'text' },\n legend: false,\n tooltip: { items: [{ field: 'text', name: '关键词' }, { field: 'value', name: '提及频次' }] },\nstyle:{\nstroke:'blue',\nlineWidth:2\n}\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { text: '创新', value: 320 },\n { text: '增长', value: 280 },\n { text: '风险', value: 190 },\n { text: '用户', value: 170 },\n { text: '技术', value: 150 },\n { text: '市场', value: 130 },\n { text: '数据', value: 110 },\n { text: '合作', value: 90 },\n { text: '成本', value: 75 },\n { text: '合规', value: 60 },\n];\n\nconst chart = new Chart({ container: 'container', width: 640, height: 480 });\n\nchart.options({\n type: 'wordCloud',\n data,\n encode: {\n text: 'text',\n color: 'value',\n fontSize: {\n field: 'value',\n range: [16, 56],\n },\n },\n scale: {\n color: { type: 'sequential', palette: 'blues' },\n },\n interaction: [{ type: 'tooltip' }],\n layout: {\n spiral: 'archimedean',\n padding: 4,\n },\n style: {\n fontFamily: 'sans-serif',\n fontWeight: 'bold',\n },\n});\n\nchart.render();", + "duration": 19683, + "retrievedSkillIds": [ + "g2-mark-wordcloud", + "g2-concept-chart-selection", + "g2-interaction-brush", + "g2-mark-linex-liney", + "g2-animation-keyframe" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 855, + "expectedLength": 758, + "similarity": 0.747735294117647, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { text: '创新', value: 320 },\n { text: '增长', value: 280 },\n { text: '风险', value: 190 },\n { text: '用户', value: 170 },\n { text: '技术', value: 150 },\n { text: '市场', value: 130 },\n { text: '数据', value: 110 },\n { text: '合作', value: 90 },\n { text: '成本', value: 75 },\n { text: '合规', value: 60 },\n];\n\nconst chart = new Chart({ container: 'container', width: 640, height: 480 });\n\nchart.options({\n type: 'wordCloud',\n data,\n encode: {\n text: 'text',\n color: 'value',\n fontSize: {\n field: 'value',\n range: [16, 56],\n },\n },\n scale: {\n color: { type: 'sequential', palette: 'blues' },\n },\n interaction: [{ type: 'tooltip' }],\n layout: {\n spiral: 'archimedean',\n padding: 4,\n },\n style: {\n fontFamily: 'sans-serif',\n fontWeight: 'bold',\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "container", + "width", + "height", + "type", + "encode", + "text", + "color", + "fontSize", + "field", + "range", + "scale", + "color", + "type", + "palette", + "interaction", + "type", + "layout", + "spiral", + "padding", + "style", + "fontFamily", + "fontWeight" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "interaction" + ] + } + } + }, + { + "id": "case-102", + "query": "根据描述绘制图表,使用 G2 创建一个分组柱状图,对比 London 和 Berlin 两个城市各个月份的月均降雨量,数据按城市分组并通过颜色区分,x轴为月份,y轴为降雨量数值。参考数据:\n[{\"name\":\"London\",\"月份\":\"Jan.\",\"月均降雨量\":18.9},{\"name\":\"London\",\"月份\":\"Feb.\",\"月均降雨量\":28.8},{\"name\":\"London\",\"月份\":\"Mar.\",\"月均降雨量\":39.3},{\"name\":\"London\",\"月份\":\"Apr.\",\"月均降雨量\":81.4},{\"name\":\"London\",\"月份\":\"May\",\"月均降雨量\":47},{\"name\":\"London\",\"月份\":\"Jun.\",\"月均降雨量\":20.3},{\"name\":\"London\",\"月份\":\"Jul.\",\"月均降雨量\":24},{\"name\":\"London\",\"月份\":\"Aug.\",\"月均降雨量\":35.6},{\"name\":\"Berlin\",\"月份\":\"Jan.\",\"月均降雨量\":12.4},{\"name\":\"Berlin\",\"月份\":\"Feb.\",\"月均降雨量\":23.2}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'interval',\n data: [\n { name: 'London', 月份: 'Jan.', 月均降雨量: 18.9 },\n { name: 'London', 月份: 'Feb.', 月均降雨量: 28.8 },\n { name: 'London', 月份: 'Mar.', 月均降雨量: 39.3 },\n { name: 'London', 月份: 'Apr.', 月均降雨量: 81.4 },\n { name: 'London', 月份: 'May', 月均降雨量: 47 },\n { name: 'London', 月份: 'Jun.', 月均降雨量: 20.3 },\n { name: 'London', 月份: 'Jul.', 月均降雨量: 24 },\n { name: 'London', 月份: 'Aug.', 月均降雨量: 35.6 },\n { name: 'Berlin', 月份: 'Jan.', 月均降雨量: 12.4 },\n { name: 'Berlin', 月份: 'Feb.', 月均降雨量: 23.2 },\n { name: 'Berlin', 月份: 'Mar.', 月均降雨量: 34.5 },\n { name: 'Berlin', 月份: 'Apr.', 月均降雨量: 99.7 },\n { name: 'Berlin', 月份: 'May', 月均降雨量: 52.6 },\n { name: 'Berlin', 月份: 'Jun.', 月均降雨量: 35.5 },\n { name: 'Berlin', 月份: 'Jul.', 月均降雨量: 37.4 },\n { name: 'Berlin', 月份: 'Aug.', 月均降雨量: 42.4 },\n ],\n // 配置视觉通道\n encode: {\n x: '月份',\n y: '月均降雨量',\n color: 'name', // 配置color通道,对数据进行分组\n series: 'name', // 配置series通道,将数据分成不同系列\n },\n // transform: [{ type: 'dodgeX' }], // 生成 series 通道值为 color 通道的值,根据 series 通道实现分组效果\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 480,\n});\n\nconst data = [\n {\"name\":\"London\",\"月份\":\"Jan.\",\"月均降雨量\":18.9},\n {\"name\":\"London\",\"月份\":\"Feb.\",\"月均降雨量\":28.8},\n {\"name\":\"London\",\"月份\":\"Mar.\",\"月均降雨量\":39.3},\n {\"name\":\"London\",\"月份\":\"Apr.\",\"月均降雨量\":81.4},\n {\"name\":\"London\",\"月份\":\"May\",\"月均降雨量\":47},\n {\"name\":\"London\",\"月份\":\"Jun.\",\"月均降雨量\":20.3},\n {\"name\":\"London\",\"月份\":\"Jul.\",\"月均降雨量\":24},\n {\"name\":\"London\",\"月份\":\"Aug.\",\"月均降雨量\":35.6},\n {\"name\":\"Berlin\",\"月份\":\"Jan.\",\"月均降雨量\":12.4},\n {\"name\":\"Berlin\",\"月份\":\"Feb.\",\"月均降雨量\":23.2}\n];\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: '月份',\n y: '月均降雨量',\n color: 'name',\n },\n transform: [\n { type: 'dodgeX' },\n ],\n axis: {\n y: {\n title: '月均降雨量 (mm)',\n },\n x: {\n title: '月份',\n },\n },\n legend: {\n color: {\n title: '城市',\n },\n },\n});\n\nchart.render();", + "duration": 10066, + "retrievedSkillIds": [ + "g2-mark-interval-grouped", + "g2-comp-facet-circle", + "g2-transform-group", + "g2-mark-bi-directional-bar", + "g2-mark-arc-pie" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 919, + "expectedLength": 1169, + "similarity": 0.7344505293902884, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 480,\n});\n\nconst data = [\n {\"name\":\"London\",\"月份\":\"Jan.\",\"月均降雨量\":18.9},\n {\"name\":\"London\",\"月份\":\"Feb.\",\"月均降雨量\":28.8},\n {\"name\":\"London\",\"月份\":\"Mar.\",\"月均降雨量\":39.3},\n {\"name\":\"London\",\"月份\":\"Apr.\",\"月均降雨量\":81.4},\n {\"name\":\"London\",\"月份\":\"May\",\"月均降雨量\":47},\n {\"name\":\"London\",\"月份\":\"Jun.\",\"月均降雨量\":20.3},\n {\"name\":\"London\",\"月份\":\"Jul.\",\"月均降雨量\":24},\n {\"name\":\"London\",\"月份\":\"Aug.\",\"月均降雨量\":35.6},\n {\"name\":\"Berlin\",\"月份\":\"Jan.\",\"月均降雨量\":12.4},\n {\"name\":\"Berlin\",\"月份\":\"Feb.\",\"月均降雨量\":23.2}\n];\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: '月份',\n y: '月均降雨量',\n color: 'name',\n },\n transform: [\n { type: 'dodgeX' },\n ],\n axis: {\n y: {\n title: '月均降雨量 (mm)',\n },\n x: {\n title: '月份',\n },\n },\n legend: {\n color: {\n title: '城市',\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "color", + "transform", + "type", + "axis", + "y", + "title", + "x", + "title", + "legend", + "color", + "title" + ], + "stringLiterals": [ + "name", + "name", + "name", + "name", + "name", + "name", + "name", + "name", + "name", + "name" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "type.interval" + ] + } + } + }, + { + "id": "case-103", + "query": "根据描述绘制图表,使用 G2 渲染一个横向甘特图,展示各活动事项的起止时间分布,通过 transpose 坐标变换实现时间轴为 Y 轴、事项为 X 轴的布局,并应用基于持续时间与开始时间的进入动画。参考数据:\n[{\"name\":\"活动策划\",\"startTime\":1,\"endTime\":4},{\"name\":\"场地物流规划\",\"startTime\":3,\"endTime\":13},{\"name\":\"选择供应商\",\"startTime\":5,\"endTime\":8},{\"name\":\"租赁场地\",\"startTime\":9,\"endTime\":13},{\"name\":\"预定餐饮服务商\",\"startTime\":10,\"endTime\":14},{\"name\":\"租赁活动装饰团队\",\"startTime\":12,\"endTime\":17},{\"name\":\"彩排\",\"startTime\":14,\"endTime\":16},{\"name\":\"活动庆典\",\"startTime\":17,\"endTime\":18}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'interval',\n autoFit: true,\n data: [\n { name: '活动策划', startTime: 1, endTime: 4 },\n { name: '场地物流规划', startTime: 3, endTime: 13 },\n { name: '选择供应商', startTime: 5, endTime: 8 },\n { name: '租赁场地', startTime: 9, endTime: 13 },\n { name: '预定餐饮服务商', startTime: 10, endTime: 14 },\n { name: '租赁活动装饰团队', startTime: 12, endTime: 17 },\n { name: '彩排', startTime: 14, endTime: 16 },\n { name: '活动庆典', startTime: 17, endTime: 18 },\n ],\n encode: {\n x: 'name', // 事项名称字段映射X轴位置\n y: 'startTime', // 事项开始时间字段映射y位置\n y1: 'endTime', // 事项结束时间字段映射y1轴位置\n color: 'name', // 事项名称字段映射颜色\n enterDuration: (datum) => datum.endTime - datum.startTime, // 事项结束时间减去开始时间映射进入动画持续时间\n enterDelay: 'startTime', // 事项开始时间映射进入动画延迟时间\n },\n scale: { enterDuration: { zero: true, range: [0, 3000] } },\n coordinate: { transform: [{ type: 'transpose' }] },\n axis: {\n x: {\n title: '事项',\n },\n y: {\n title: '时间',\n },\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"name\":\"活动策划\",\"startTime\":1,\"endTime\":4},\n {\"name\":\"场地物流规划\",\"startTime\":3,\"endTime\":13},\n {\"name\":\"选择供应商\",\"startTime\":5,\"endTime\":8},\n {\"name\":\"租赁场地\",\"startTime\":9,\"endTime\":13},\n {\"name\":\"预定餐饮服务商\",\"startTime\":10,\"endTime\":14},\n {\"name\":\"租赁活动装饰团队\",\"startTime\":12,\"endTime\":17},\n {\"name\":\"彩排\",\"startTime\":14,\"endTime\":16},\n {\"name\":\"活动庆典\",\"startTime\":17,\"endTime\":18}\n];\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'name',\n y: 'startTime',\n y1: 'endTime',\n color: 'name',\n enterDuration: (d) => (d.endTime - d.startTime) * 200,\n enterDelay: (d) => d.startTime * 100,\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n});\n\nchart.render();", + "duration": 9090, + "retrievedSkillIds": [ + "g2-mark-gantt", + "g2-scale-time", + "g2-animation-keyframe", + "g2-mark-interval-basic", + "g2-comp-timing-keyframe" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 821, + "expectedLength": 1077, + "similarity": 0.7606097308488614, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"name\":\"活动策划\",\"startTime\":1,\"endTime\":4},\n {\"name\":\"场地物流规划\",\"startTime\":3,\"endTime\":13},\n {\"name\":\"选择供应商\",\"startTime\":5,\"endTime\":8},\n {\"name\":\"租赁场地\",\"startTime\":9,\"endTime\":13},\n {\"name\":\"预定餐饮服务商\",\"startTime\":10,\"endTime\":14},\n {\"name\":\"租赁活动装饰团队\",\"startTime\":12,\"endTime\":17},\n {\"name\":\"彩排\",\"startTime\":14,\"endTime\":16},\n {\"name\":\"活动庆典\",\"startTime\":17,\"endTime\":18}\n];\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'name',\n y: 'startTime',\n y1: 'endTime',\n color: 'name',\n enterDuration: (d) => (d.endTime - d.startTime) * 200,\n enterDelay: (d) => d.startTime * 100,\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "encode", + "x", + "y", + "y1", + "color", + "enterDuration", + "enterDelay", + "coordinate", + "transform", + "type" + ], + "stringLiterals": [ + "name", + "startTime", + "endTime", + "name", + "startTime", + "endTime", + "name", + "startTime", + "endTime", + "name", + "startTime", + "endTime", + "name", + "startTime", + "endTime", + "name", + "startTime", + "endTime", + "name", + "startTime", + "endTime", + "name", + "startTime", + "endTime" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval" + ] + } + } + }, + { + "id": "case-104", + "query": "根据描述绘制图表,使用箱型图展示不同企鹅物种的鳍肢长度分布情况,并按性别进行分组比较。参考数据:[{\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":39.1,\"culmen_depth_mm\":18.7,\"flipper_length_mm\":181,\"body_mass_g\":3750,\"sex\":\"MALE\"},{\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":39.5,\"culmen_depth_mm\":17.4,\"flipper_length_mm\":186,\"body_mass_g\":3800,\"sex\":\"FEMALE\"},{\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":40.3,\"culmen_depth_mm\":18,\"flipper_length_mm\":195,\"body_mass_g\":3250,\"sex\":\"FEMALE\"},{\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":\"NaN\",\"culmen_depth_mm\":\"NaN\",\"flipper_length_mm\":\"NaN\",\"body_mass_g\":\"NaN\",\"sex\":\"\"},{\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":36.7,\"culmen_depth_mm\":19.3,\"flipper_length_mm\":193,\"body_mass_g\":3450,\"sex\":\"FEMALE\"},{\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":39.3,\"culmen_depth_mm\":20.6,\"flipper_length_mm\":190,\"body_mass_g\":3650,\"sex\":\"MALE\"},{\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":38.9,\"culmen_depth_mm\":17.8,\"flipper_length_mm\":181,\"body_mass_g\":3625,\"sex\":\"FEMALE\"},{\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":39.2,\"culmen_depth_mm\":19.6,\"flipper_length_mm\":195,\"body_mass_g\":4675,\"sex\":\"MALE\"},{\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":34.1,\"culmen_depth_mm\":18.1,\"flipper_length_mm\":193,\"body_mass_g\":3475,\"sex\":\"\"},{\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":42,\"culmen_depth_mm\":20.2,\"flipper_length_mm\":190,\"body_mass_g\":4250,\"sex\":\"\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'boxplot',\n data: {\n type: 'inline',\n value: [\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 39.1,\n \"culmen_depth_mm\": 18.7,\n \"flipper_length_mm\": 181,\n \"body_mass_g\": 3750,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 39.5,\n \"culmen_depth_mm\": 17.4,\n \"flipper_length_mm\": 186,\n \"body_mass_g\": 3800,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 40.3,\n \"culmen_depth_mm\": 18,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 3250,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": \"NaN\",\n \"culmen_depth_mm\": \"NaN\",\n \"flipper_length_mm\": \"NaN\",\n \"body_mass_g\": \"NaN\",\n \"sex\": \"\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 36.7,\n \"culmen_depth_mm\": 19.3,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 3450,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 39.3,\n \"culmen_depth_mm\": 20.6,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3650,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 38.9,\n \"culmen_depth_mm\": 17.8,\n \"flipper_length_mm\": 181,\n \"body_mass_g\": 3625,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 39.2,\n \"culmen_depth_mm\": 19.6,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 4675,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 34.1,\n \"culmen_depth_mm\": 18.1,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 3475,\n \"sex\": \"\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 42,\n \"culmen_depth_mm\": 20.2,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 4250,\n \"sex\": \"\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 37.8,\n \"culmen_depth_mm\": 17.1,\n \"flipper_length_mm\": 186,\n \"body_mass_g\": 3300,\n \"sex\": \"\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 37.8,\n \"culmen_depth_mm\": 17.3,\n \"flipper_length_mm\": 180,\n \"body_mass_g\": 3700,\n \"sex\": \"\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 41.1,\n \"culmen_depth_mm\": 17.6,\n \"flipper_length_mm\": 182,\n \"body_mass_g\": 3200,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 38.6,\n \"culmen_depth_mm\": 21.2,\n \"flipper_length_mm\": 191,\n \"body_mass_g\": 3800,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 34.6,\n \"culmen_depth_mm\": 21.1,\n \"flipper_length_mm\": 198,\n \"body_mass_g\": 4400,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 36.6,\n \"culmen_depth_mm\": 17.8,\n \"flipper_length_mm\": 185,\n \"body_mass_g\": 3700,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 38.7,\n \"culmen_depth_mm\": 19,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 3450,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 42.5,\n \"culmen_depth_mm\": 20.7,\n \"flipper_length_mm\": 197,\n \"body_mass_g\": 4500,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 34.4,\n \"culmen_depth_mm\": 18.4,\n \"flipper_length_mm\": 184,\n \"body_mass_g\": 3325,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 46,\n \"culmen_depth_mm\": 21.5,\n \"flipper_length_mm\": 194,\n \"body_mass_g\": 4200,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 37.8,\n \"culmen_depth_mm\": 18.3,\n \"flipper_length_mm\": 174,\n \"body_mass_g\": 3400,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 37.7,\n \"culmen_depth_mm\": 18.7,\n \"flipper_length_mm\": 180,\n \"body_mass_g\": 3600,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 35.9,\n \"culmen_depth_mm\": 19.2,\n \"flipper_length_mm\": 189,\n \"body_mass_g\": 3800,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 38.2,\n \"culmen_depth_mm\": 18.1,\n \"flipper_length_mm\": 185,\n \"body_mass_g\": 3950,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 38.8,\n \"culmen_depth_mm\": 17.2,\n \"flipper_length_mm\": 180,\n \"body_mass_g\": 3800,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 35.3,\n \"culmen_depth_mm\": 18.9,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 3800,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 40.6,\n \"culmen_depth_mm\": 18.6,\n \"flipper_length_mm\": 183,\n \"body_mass_g\": 3550,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 40.5,\n \"culmen_depth_mm\": 17.9,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 3200,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 37.9,\n \"culmen_depth_mm\": 18.6,\n \"flipper_length_mm\": 172,\n \"body_mass_g\": 3150,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 40.5,\n \"culmen_depth_mm\": 18.9,\n \"flipper_length_mm\": 180,\n \"body_mass_g\": 3950,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 39.5,\n \"culmen_depth_mm\": 16.7,\n \"flipper_length_mm\": 178,\n \"body_mass_g\": 3250,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 37.2,\n \"culmen_depth_mm\": 18.1,\n \"flipper_length_mm\": 178,\n \"body_mass_g\": 3900,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 39.5,\n \"culmen_depth_mm\": 17.8,\n \"flipper_length_mm\": 188,\n \"body_mass_g\": 3300,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 40.9,\n \"culmen_depth_mm\": 18.9,\n \"flipper_length_mm\": 184,\n \"body_mass_g\": 3900,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 36.4,\n \"culmen_depth_mm\": 17,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 3325,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 39.2,\n \"culmen_depth_mm\": 21.1,\n \"flipper_length_mm\": 196,\n \"body_mass_g\": 4150,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 38.8,\n \"culmen_depth_mm\": 20,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3950,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 42.2,\n \"culmen_depth_mm\": 18.5,\n \"flipper_length_mm\": 180,\n \"body_mass_g\": 3550,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 37.6,\n \"culmen_depth_mm\": 19.3,\n \"flipper_length_mm\": 181,\n \"body_mass_g\": 3300,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 39.8,\n \"culmen_depth_mm\": 19.1,\n \"flipper_length_mm\": 184,\n \"body_mass_g\": 4650,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 36.5,\n \"culmen_depth_mm\": 18,\n \"flipper_length_mm\": 182,\n \"body_mass_g\": 3150,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 40.8,\n \"culmen_depth_mm\": 18.4,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 3900,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 36,\n \"culmen_depth_mm\": 18.5,\n \"flipper_length_mm\": 186,\n \"body_mass_g\": 3100,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 44.1,\n \"culmen_depth_mm\": 19.7,\n \"flipper_length_mm\": 196,\n \"body_mass_g\": 4400,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 37,\n \"culmen_depth_mm\": 16.9,\n \"flipper_length_mm\": 185,\n \"body_mass_g\": 3000,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 39.6,\n \"culmen_depth_mm\": 18.8,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 4600,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 41.1,\n \"culmen_depth_mm\": 19,\n \"flipper_length_mm\": 182,\n \"body_mass_g\": 3425,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 37.5,\n \"culmen_depth_mm\": 18.9,\n \"flipper_length_mm\": 179,\n \"body_mass_g\": 2975,\n \"sex\": \"\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 36,\n \"culmen_depth_mm\": 17.9,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3450,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 42.3,\n \"culmen_depth_mm\": 21.2,\n \"flipper_length_mm\": 191,\n \"body_mass_g\": 4150,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 39.6,\n \"culmen_depth_mm\": 17.7,\n \"flipper_length_mm\": 186,\n \"body_mass_g\": 3500,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 40.1,\n \"culmen_depth_mm\": 18.9,\n \"flipper_length_mm\": 188,\n \"body_mass_g\": 4300,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 35,\n \"culmen_depth_mm\": 17.9,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3450,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 42,\n \"culmen_depth_mm\": 19.5,\n \"flipper_length_mm\": 200,\n \"body_mass_g\": 4050,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 34.5,\n \"culmen_depth_mm\": 18.1,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 2900,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 41.4,\n \"culmen_depth_mm\": 18.6,\n \"flipper_length_mm\": 191,\n \"body_mass_g\": 3700,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 39,\n \"culmen_depth_mm\": 17.5,\n \"flipper_length_mm\": 186,\n \"body_mass_g\": 3550,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 40.6,\n \"culmen_depth_mm\": 18.8,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 3800,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 36.5,\n \"culmen_depth_mm\": 16.6,\n \"flipper_length_mm\": 181,\n \"body_mass_g\": 2850,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 37.6,\n \"culmen_depth_mm\": 19.1,\n \"flipper_length_mm\": 194,\n \"body_mass_g\": 3750,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 35.7,\n \"culmen_depth_mm\": 16.9,\n \"flipper_length_mm\": 185,\n \"body_mass_g\": 3150,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 41.3,\n \"culmen_depth_mm\": 21.1,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 4400,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 37.6,\n \"culmen_depth_mm\": 17,\n \"flipper_length_mm\": 185,\n \"body_mass_g\": 3600,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 41.1,\n \"culmen_depth_mm\": 18.2,\n \"flipper_length_mm\": 192,\n \"body_mass_g\": 4050,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 36.4,\n \"culmen_depth_mm\": 17.1,\n \"flipper_length_mm\": 184,\n \"body_mass_g\": 2850,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 41.6,\n \"culmen_depth_mm\": 18,\n \"flipper_length_mm\": 192,\n \"body_mass_g\": 3950,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 35.5,\n \"culmen_depth_mm\": 16.2,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 3350,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 41.1,\n \"culmen_depth_mm\": 19.1,\n \"flipper_length_mm\": 188,\n \"body_mass_g\": 4100,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 35.9,\n \"culmen_depth_mm\": 16.6,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3050,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 41.8,\n \"culmen_depth_mm\": 19.4,\n \"flipper_length_mm\": 198,\n \"body_mass_g\": 4450,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 33.5,\n \"culmen_depth_mm\": 19,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3600,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 39.7,\n \"culmen_depth_mm\": 18.4,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3900,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 39.6,\n \"culmen_depth_mm\": 17.2,\n \"flipper_length_mm\": 196,\n \"body_mass_g\": 3550,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 45.8,\n \"culmen_depth_mm\": 18.9,\n \"flipper_length_mm\": 197,\n \"body_mass_g\": 4150,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 35.5,\n \"culmen_depth_mm\": 17.5,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3700,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 42.8,\n \"culmen_depth_mm\": 18.5,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 4250,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 40.9,\n \"culmen_depth_mm\": 16.8,\n \"flipper_length_mm\": 191,\n \"body_mass_g\": 3700,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 37.2,\n \"culmen_depth_mm\": 19.4,\n \"flipper_length_mm\": 184,\n \"body_mass_g\": 3900,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 36.2,\n \"culmen_depth_mm\": 16.1,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 3550,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 42.1,\n \"culmen_depth_mm\": 19.1,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 4000,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 34.6,\n \"culmen_depth_mm\": 17.2,\n \"flipper_length_mm\": 189,\n \"body_mass_g\": 3200,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 42.9,\n \"culmen_depth_mm\": 17.6,\n \"flipper_length_mm\": 196,\n \"body_mass_g\": 4700,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 36.7,\n \"culmen_depth_mm\": 18.8,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 3800,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 35.1,\n \"culmen_depth_mm\": 19.4,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 4200,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 37.3,\n \"culmen_depth_mm\": 17.8,\n \"flipper_length_mm\": 191,\n \"body_mass_g\": 3350,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 41.3,\n \"culmen_depth_mm\": 20.3,\n \"flipper_length_mm\": 194,\n \"body_mass_g\": 3550,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 36.3,\n \"culmen_depth_mm\": 19.5,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3800,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 36.9,\n \"culmen_depth_mm\": 18.6,\n \"flipper_length_mm\": 189,\n \"body_mass_g\": 3500,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 38.3,\n \"culmen_depth_mm\": 19.2,\n \"flipper_length_mm\": 189,\n \"body_mass_g\": 3950,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 38.9,\n \"culmen_depth_mm\": 18.8,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3600,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 35.7,\n \"culmen_depth_mm\": 18,\n \"flipper_length_mm\": 202,\n \"body_mass_g\": 3550,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 41.1,\n \"culmen_depth_mm\": 18.1,\n \"flipper_length_mm\": 205,\n \"body_mass_g\": 4300,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 34,\n \"culmen_depth_mm\": 17.1,\n \"flipper_length_mm\": 185,\n \"body_mass_g\": 3400,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 39.6,\n \"culmen_depth_mm\": 18.1,\n \"flipper_length_mm\": 186,\n \"body_mass_g\": 4450,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 36.2,\n \"culmen_depth_mm\": 17.3,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 3300,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 40.8,\n \"culmen_depth_mm\": 18.9,\n \"flipper_length_mm\": 208,\n \"body_mass_g\": 4300,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 38.1,\n \"culmen_depth_mm\": 18.6,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3700,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 40.3,\n \"culmen_depth_mm\": 18.5,\n \"flipper_length_mm\": 196,\n \"body_mass_g\": 4350,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 33.1,\n \"culmen_depth_mm\": 16.1,\n \"flipper_length_mm\": 178,\n \"body_mass_g\": 2900,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 43.2,\n \"culmen_depth_mm\": 18.5,\n \"flipper_length_mm\": 192,\n \"body_mass_g\": 4100,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 35,\n \"culmen_depth_mm\": 17.9,\n \"flipper_length_mm\": 192,\n \"body_mass_g\": 3725,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 41,\n \"culmen_depth_mm\": 20,\n \"flipper_length_mm\": 203,\n \"body_mass_g\": 4725,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 37.7,\n \"culmen_depth_mm\": 16,\n \"flipper_length_mm\": 183,\n \"body_mass_g\": 3075,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 37.8,\n \"culmen_depth_mm\": 20,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 4250,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 37.9,\n \"culmen_depth_mm\": 18.6,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 2925,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 39.7,\n \"culmen_depth_mm\": 18.9,\n \"flipper_length_mm\": 184,\n \"body_mass_g\": 3550,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 38.6,\n \"culmen_depth_mm\": 17.2,\n \"flipper_length_mm\": 199,\n \"body_mass_g\": 3750,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 38.2,\n \"culmen_depth_mm\": 20,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3900,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 38.1,\n \"culmen_depth_mm\": 17,\n \"flipper_length_mm\": 181,\n \"body_mass_g\": 3175,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 43.2,\n \"culmen_depth_mm\": 19,\n \"flipper_length_mm\": 197,\n \"body_mass_g\": 4775,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 38.1,\n \"culmen_depth_mm\": 16.5,\n \"flipper_length_mm\": 198,\n \"body_mass_g\": 3825,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.6,\n \"culmen_depth_mm\": 20.3,\n \"flipper_length_mm\": 191,\n \"body_mass_g\": 4600,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 39.7,\n \"culmen_depth_mm\": 17.7,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 3200,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 42.2,\n \"culmen_depth_mm\": 19.5,\n \"flipper_length_mm\": 197,\n \"body_mass_g\": 4275,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 39.6,\n \"culmen_depth_mm\": 20.7,\n \"flipper_length_mm\": 191,\n \"body_mass_g\": 3900,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 42.7,\n \"culmen_depth_mm\": 18.3,\n \"flipper_length_mm\": 196,\n \"body_mass_g\": 4075,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 38.6,\n \"culmen_depth_mm\": 17,\n \"flipper_length_mm\": 188,\n \"body_mass_g\": 2900,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 37.3,\n \"culmen_depth_mm\": 20.5,\n \"flipper_length_mm\": 199,\n \"body_mass_g\": 3775,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 35.7,\n \"culmen_depth_mm\": 17,\n \"flipper_length_mm\": 189,\n \"body_mass_g\": 3350,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 41.1,\n \"culmen_depth_mm\": 18.6,\n \"flipper_length_mm\": 189,\n \"body_mass_g\": 3325,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 36.2,\n \"culmen_depth_mm\": 17.2,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 3150,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 37.7,\n \"culmen_depth_mm\": 19.8,\n \"flipper_length_mm\": 198,\n \"body_mass_g\": 3500,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 40.2,\n \"culmen_depth_mm\": 17,\n \"flipper_length_mm\": 176,\n \"body_mass_g\": 3450,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 41.4,\n \"culmen_depth_mm\": 18.5,\n \"flipper_length_mm\": 202,\n \"body_mass_g\": 3875,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 35.2,\n \"culmen_depth_mm\": 15.9,\n \"flipper_length_mm\": 186,\n \"body_mass_g\": 3050,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 40.6,\n \"culmen_depth_mm\": 19,\n \"flipper_length_mm\": 199,\n \"body_mass_g\": 4000,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 38.8,\n \"culmen_depth_mm\": 17.6,\n \"flipper_length_mm\": 191,\n \"body_mass_g\": 3275,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 41.5,\n \"culmen_depth_mm\": 18.3,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 4300,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 39,\n \"culmen_depth_mm\": 17.1,\n \"flipper_length_mm\": 191,\n \"body_mass_g\": 3050,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 44.1,\n \"culmen_depth_mm\": 18,\n \"flipper_length_mm\": 210,\n \"body_mass_g\": 4000,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 38.5,\n \"culmen_depth_mm\": 17.9,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3325,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Torgersen\",\n \"culmen_length_mm\": 43.1,\n \"culmen_depth_mm\": 19.2,\n \"flipper_length_mm\": 197,\n \"body_mass_g\": 3500,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 36.8,\n \"culmen_depth_mm\": 18.5,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 3500,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 37.5,\n \"culmen_depth_mm\": 18.5,\n \"flipper_length_mm\": 199,\n \"body_mass_g\": 4475,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 38.1,\n \"culmen_depth_mm\": 17.6,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 3425,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 41.1,\n \"culmen_depth_mm\": 17.5,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3900,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 35.6,\n \"culmen_depth_mm\": 17.5,\n \"flipper_length_mm\": 191,\n \"body_mass_g\": 3175,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 40.2,\n \"culmen_depth_mm\": 20.1,\n \"flipper_length_mm\": 200,\n \"body_mass_g\": 3975,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 37,\n \"culmen_depth_mm\": 16.5,\n \"flipper_length_mm\": 185,\n \"body_mass_g\": 3400,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 39.7,\n \"culmen_depth_mm\": 17.9,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 4250,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 40.2,\n \"culmen_depth_mm\": 17.1,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 3400,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 40.6,\n \"culmen_depth_mm\": 17.2,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 3475,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 32.1,\n \"culmen_depth_mm\": 15.5,\n \"flipper_length_mm\": 188,\n \"body_mass_g\": 3050,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 40.7,\n \"culmen_depth_mm\": 17,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3725,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 37.3,\n \"culmen_depth_mm\": 16.8,\n \"flipper_length_mm\": 192,\n \"body_mass_g\": 3000,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 39,\n \"culmen_depth_mm\": 18.7,\n \"flipper_length_mm\": 185,\n \"body_mass_g\": 3650,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 39.2,\n \"culmen_depth_mm\": 18.6,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 4250,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 36.6,\n \"culmen_depth_mm\": 18.4,\n \"flipper_length_mm\": 184,\n \"body_mass_g\": 3475,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 36,\n \"culmen_depth_mm\": 17.8,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 3450,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 37.8,\n \"culmen_depth_mm\": 18.1,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 3750,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 36,\n \"culmen_depth_mm\": 17.1,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 3700,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Adelie\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 41.5,\n \"culmen_depth_mm\": 18.5,\n \"flipper_length_mm\": 201,\n \"body_mass_g\": 4000,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 46.5,\n \"culmen_depth_mm\": 17.9,\n \"flipper_length_mm\": 192,\n \"body_mass_g\": 3500,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 50,\n \"culmen_depth_mm\": 19.5,\n \"flipper_length_mm\": 196,\n \"body_mass_g\": 3900,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 51.3,\n \"culmen_depth_mm\": 19.2,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 3650,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 45.4,\n \"culmen_depth_mm\": 18.7,\n \"flipper_length_mm\": 188,\n \"body_mass_g\": 3525,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 52.7,\n \"culmen_depth_mm\": 19.8,\n \"flipper_length_mm\": 197,\n \"body_mass_g\": 3725,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 45.2,\n \"culmen_depth_mm\": 17.8,\n \"flipper_length_mm\": 198,\n \"body_mass_g\": 3950,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 46.1,\n \"culmen_depth_mm\": 18.2,\n \"flipper_length_mm\": 178,\n \"body_mass_g\": 3250,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 51.3,\n \"culmen_depth_mm\": 18.2,\n \"flipper_length_mm\": 197,\n \"body_mass_g\": 3750,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 46,\n \"culmen_depth_mm\": 18.9,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 4150,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 51.3,\n \"culmen_depth_mm\": 19.9,\n \"flipper_length_mm\": 198,\n \"body_mass_g\": 3700,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 46.6,\n \"culmen_depth_mm\": 17.8,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 3800,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 51.7,\n \"culmen_depth_mm\": 20.3,\n \"flipper_length_mm\": 194,\n \"body_mass_g\": 3775,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 47,\n \"culmen_depth_mm\": 17.3,\n \"flipper_length_mm\": 185,\n \"body_mass_g\": 3700,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 52,\n \"culmen_depth_mm\": 18.1,\n \"flipper_length_mm\": 201,\n \"body_mass_g\": 4050,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 45.9,\n \"culmen_depth_mm\": 17.1,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3575,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 50.5,\n \"culmen_depth_mm\": 19.6,\n \"flipper_length_mm\": 201,\n \"body_mass_g\": 4050,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 50.3,\n \"culmen_depth_mm\": 20,\n \"flipper_length_mm\": 197,\n \"body_mass_g\": 3300,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 58,\n \"culmen_depth_mm\": 17.8,\n \"flipper_length_mm\": 181,\n \"body_mass_g\": 3700,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 46.4,\n \"culmen_depth_mm\": 18.6,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3450,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 49.2,\n \"culmen_depth_mm\": 18.2,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 4400,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 42.4,\n \"culmen_depth_mm\": 17.3,\n \"flipper_length_mm\": 181,\n \"body_mass_g\": 3600,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 48.5,\n \"culmen_depth_mm\": 17.5,\n \"flipper_length_mm\": 191,\n \"body_mass_g\": 3400,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 43.2,\n \"culmen_depth_mm\": 16.6,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 2900,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 50.6,\n \"culmen_depth_mm\": 19.4,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 3800,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 46.7,\n \"culmen_depth_mm\": 17.9,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 3300,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 52,\n \"culmen_depth_mm\": 19,\n \"flipper_length_mm\": 197,\n \"body_mass_g\": 4150,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 50.5,\n \"culmen_depth_mm\": 18.4,\n \"flipper_length_mm\": 200,\n \"body_mass_g\": 3400,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 49.5,\n \"culmen_depth_mm\": 19,\n \"flipper_length_mm\": 200,\n \"body_mass_g\": 3800,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 46.4,\n \"culmen_depth_mm\": 17.8,\n \"flipper_length_mm\": 191,\n \"body_mass_g\": 3700,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 52.8,\n \"culmen_depth_mm\": 20,\n \"flipper_length_mm\": 205,\n \"body_mass_g\": 4550,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 40.9,\n \"culmen_depth_mm\": 16.6,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 3200,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 54.2,\n \"culmen_depth_mm\": 20.8,\n \"flipper_length_mm\": 201,\n \"body_mass_g\": 4300,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 42.5,\n \"culmen_depth_mm\": 16.7,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 3350,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 51,\n \"culmen_depth_mm\": 18.8,\n \"flipper_length_mm\": 203,\n \"body_mass_g\": 4100,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 49.7,\n \"culmen_depth_mm\": 18.6,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 3600,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 47.5,\n \"culmen_depth_mm\": 16.8,\n \"flipper_length_mm\": 199,\n \"body_mass_g\": 3900,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 47.6,\n \"culmen_depth_mm\": 18.3,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 3850,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 52,\n \"culmen_depth_mm\": 20.7,\n \"flipper_length_mm\": 210,\n \"body_mass_g\": 4800,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 46.9,\n \"culmen_depth_mm\": 16.6,\n \"flipper_length_mm\": 192,\n \"body_mass_g\": 2700,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 53.5,\n \"culmen_depth_mm\": 19.9,\n \"flipper_length_mm\": 205,\n \"body_mass_g\": 4500,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 49,\n \"culmen_depth_mm\": 19.5,\n \"flipper_length_mm\": 210,\n \"body_mass_g\": 3950,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 46.2,\n \"culmen_depth_mm\": 17.5,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 3650,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 50.9,\n \"culmen_depth_mm\": 19.1,\n \"flipper_length_mm\": 196,\n \"body_mass_g\": 3550,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 45.5,\n \"culmen_depth_mm\": 17,\n \"flipper_length_mm\": 196,\n \"body_mass_g\": 3500,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 50.9,\n \"culmen_depth_mm\": 17.9,\n \"flipper_length_mm\": 196,\n \"body_mass_g\": 3675,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 50.8,\n \"culmen_depth_mm\": 18.5,\n \"flipper_length_mm\": 201,\n \"body_mass_g\": 4450,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 50.1,\n \"culmen_depth_mm\": 17.9,\n \"flipper_length_mm\": 190,\n \"body_mass_g\": 3400,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 49,\n \"culmen_depth_mm\": 19.6,\n \"flipper_length_mm\": 212,\n \"body_mass_g\": 4300,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 51.5,\n \"culmen_depth_mm\": 18.7,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 3250,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 49.8,\n \"culmen_depth_mm\": 17.3,\n \"flipper_length_mm\": 198,\n \"body_mass_g\": 3675,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 48.1,\n \"culmen_depth_mm\": 16.4,\n \"flipper_length_mm\": 199,\n \"body_mass_g\": 3325,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 51.4,\n \"culmen_depth_mm\": 19,\n \"flipper_length_mm\": 201,\n \"body_mass_g\": 3950,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 45.7,\n \"culmen_depth_mm\": 17.3,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 3600,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 50.7,\n \"culmen_depth_mm\": 19.7,\n \"flipper_length_mm\": 203,\n \"body_mass_g\": 4050,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 42.5,\n \"culmen_depth_mm\": 17.3,\n \"flipper_length_mm\": 187,\n \"body_mass_g\": 3350,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 52.2,\n \"culmen_depth_mm\": 18.8,\n \"flipper_length_mm\": 197,\n \"body_mass_g\": 3450,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 45.2,\n \"culmen_depth_mm\": 16.6,\n \"flipper_length_mm\": 191,\n \"body_mass_g\": 3250,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 49.3,\n \"culmen_depth_mm\": 19.9,\n \"flipper_length_mm\": 203,\n \"body_mass_g\": 4050,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 50.2,\n \"culmen_depth_mm\": 18.8,\n \"flipper_length_mm\": 202,\n \"body_mass_g\": 3800,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 45.6,\n \"culmen_depth_mm\": 19.4,\n \"flipper_length_mm\": 194,\n \"body_mass_g\": 3525,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 51.9,\n \"culmen_depth_mm\": 19.5,\n \"flipper_length_mm\": 206,\n \"body_mass_g\": 3950,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 46.8,\n \"culmen_depth_mm\": 16.5,\n \"flipper_length_mm\": 189,\n \"body_mass_g\": 3650,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 45.7,\n \"culmen_depth_mm\": 17,\n \"flipper_length_mm\": 195,\n \"body_mass_g\": 3650,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 55.8,\n \"culmen_depth_mm\": 19.8,\n \"flipper_length_mm\": 207,\n \"body_mass_g\": 4000,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 43.5,\n \"culmen_depth_mm\": 18.1,\n \"flipper_length_mm\": 202,\n \"body_mass_g\": 3400,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 49.6,\n \"culmen_depth_mm\": 18.2,\n \"flipper_length_mm\": 193,\n \"body_mass_g\": 3775,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 50.8,\n \"culmen_depth_mm\": 19,\n \"flipper_length_mm\": 210,\n \"body_mass_g\": 4100,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Chinstrap\",\n \"island\": \"Dream\",\n \"culmen_length_mm\": 50.2,\n \"culmen_depth_mm\": 18.7,\n \"flipper_length_mm\": 198,\n \"body_mass_g\": 3775,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.1,\n \"culmen_depth_mm\": 13.2,\n \"flipper_length_mm\": 211,\n \"body_mass_g\": 4500,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 50,\n \"culmen_depth_mm\": 16.3,\n \"flipper_length_mm\": 230,\n \"body_mass_g\": 5700,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 48.7,\n \"culmen_depth_mm\": 14.1,\n \"flipper_length_mm\": 210,\n \"body_mass_g\": 4450,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 50,\n \"culmen_depth_mm\": 15.2,\n \"flipper_length_mm\": 218,\n \"body_mass_g\": 5700,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 47.6,\n \"culmen_depth_mm\": 14.5,\n \"flipper_length_mm\": 215,\n \"body_mass_g\": 5400,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.5,\n \"culmen_depth_mm\": 13.5,\n \"flipper_length_mm\": 210,\n \"body_mass_g\": 4550,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.4,\n \"culmen_depth_mm\": 14.6,\n \"flipper_length_mm\": 211,\n \"body_mass_g\": 4800,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.7,\n \"culmen_depth_mm\": 15.3,\n \"flipper_length_mm\": 219,\n \"body_mass_g\": 5200,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 43.3,\n \"culmen_depth_mm\": 13.4,\n \"flipper_length_mm\": 209,\n \"body_mass_g\": 4400,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.8,\n \"culmen_depth_mm\": 15.4,\n \"flipper_length_mm\": 215,\n \"body_mass_g\": 5150,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 40.9,\n \"culmen_depth_mm\": 13.7,\n \"flipper_length_mm\": 214,\n \"body_mass_g\": 4650,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 49,\n \"culmen_depth_mm\": 16.1,\n \"flipper_length_mm\": 216,\n \"body_mass_g\": 5550,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.5,\n \"culmen_depth_mm\": 13.7,\n \"flipper_length_mm\": 214,\n \"body_mass_g\": 4650,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 48.4,\n \"culmen_depth_mm\": 14.6,\n \"flipper_length_mm\": 213,\n \"body_mass_g\": 5850,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.8,\n \"culmen_depth_mm\": 14.6,\n \"flipper_length_mm\": 210,\n \"body_mass_g\": 4200,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 49.3,\n \"culmen_depth_mm\": 15.7,\n \"flipper_length_mm\": 217,\n \"body_mass_g\": 5850,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 42,\n \"culmen_depth_mm\": 13.5,\n \"flipper_length_mm\": 210,\n \"body_mass_g\": 4150,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 49.2,\n \"culmen_depth_mm\": 15.2,\n \"flipper_length_mm\": 221,\n \"body_mass_g\": 6300,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.2,\n \"culmen_depth_mm\": 14.5,\n \"flipper_length_mm\": 209,\n \"body_mass_g\": 4800,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 48.7,\n \"culmen_depth_mm\": 15.1,\n \"flipper_length_mm\": 222,\n \"body_mass_g\": 5350,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 50.2,\n \"culmen_depth_mm\": 14.3,\n \"flipper_length_mm\": 218,\n \"body_mass_g\": 5700,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.1,\n \"culmen_depth_mm\": 14.5,\n \"flipper_length_mm\": 215,\n \"body_mass_g\": 5000,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.5,\n \"culmen_depth_mm\": 14.5,\n \"flipper_length_mm\": 213,\n \"body_mass_g\": 4400,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.3,\n \"culmen_depth_mm\": 15.8,\n \"flipper_length_mm\": 215,\n \"body_mass_g\": 5050,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 42.9,\n \"culmen_depth_mm\": 13.1,\n \"flipper_length_mm\": 215,\n \"body_mass_g\": 5000,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.1,\n \"culmen_depth_mm\": 15.1,\n \"flipper_length_mm\": 215,\n \"body_mass_g\": 5100,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 44.5,\n \"culmen_depth_mm\": 14.3,\n \"flipper_length_mm\": 216,\n \"body_mass_g\": 4100,\n \"sex\": \"\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 47.8,\n \"culmen_depth_mm\": 15,\n \"flipper_length_mm\": 215,\n \"body_mass_g\": 5650,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 48.2,\n \"culmen_depth_mm\": 14.3,\n \"flipper_length_mm\": 210,\n \"body_mass_g\": 4600,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 50,\n \"culmen_depth_mm\": 15.3,\n \"flipper_length_mm\": 220,\n \"body_mass_g\": 5550,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 47.3,\n \"culmen_depth_mm\": 15.3,\n \"flipper_length_mm\": 222,\n \"body_mass_g\": 5250,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 42.8,\n \"culmen_depth_mm\": 14.2,\n \"flipper_length_mm\": 209,\n \"body_mass_g\": 4700,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.1,\n \"culmen_depth_mm\": 14.5,\n \"flipper_length_mm\": 207,\n \"body_mass_g\": 5050,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 59.6,\n \"culmen_depth_mm\": 17,\n \"flipper_length_mm\": 230,\n \"body_mass_g\": 6050,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 49.1,\n \"culmen_depth_mm\": 14.8,\n \"flipper_length_mm\": 220,\n \"body_mass_g\": 5150,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 48.4,\n \"culmen_depth_mm\": 16.3,\n \"flipper_length_mm\": 220,\n \"body_mass_g\": 5400,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 42.6,\n \"culmen_depth_mm\": 13.7,\n \"flipper_length_mm\": 213,\n \"body_mass_g\": 4950,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 44.4,\n \"culmen_depth_mm\": 17.3,\n \"flipper_length_mm\": 219,\n \"body_mass_g\": 5250,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 44,\n \"culmen_depth_mm\": 13.6,\n \"flipper_length_mm\": 208,\n \"body_mass_g\": 4350,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 48.7,\n \"culmen_depth_mm\": 15.7,\n \"flipper_length_mm\": 208,\n \"body_mass_g\": 5350,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 42.7,\n \"culmen_depth_mm\": 13.7,\n \"flipper_length_mm\": 208,\n \"body_mass_g\": 3950,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 49.6,\n \"culmen_depth_mm\": 16,\n \"flipper_length_mm\": 225,\n \"body_mass_g\": 5700,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.3,\n \"culmen_depth_mm\": 13.7,\n \"flipper_length_mm\": 210,\n \"body_mass_g\": 4300,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 49.6,\n \"culmen_depth_mm\": 15,\n \"flipper_length_mm\": 216,\n \"body_mass_g\": 4750,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 50.5,\n \"culmen_depth_mm\": 15.9,\n \"flipper_length_mm\": 222,\n \"body_mass_g\": 5550,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 43.6,\n \"culmen_depth_mm\": 13.9,\n \"flipper_length_mm\": 217,\n \"body_mass_g\": 4900,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.5,\n \"culmen_depth_mm\": 13.9,\n \"flipper_length_mm\": 210,\n \"body_mass_g\": 4200,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 50.5,\n \"culmen_depth_mm\": 15.9,\n \"flipper_length_mm\": 225,\n \"body_mass_g\": 5400,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 44.9,\n \"culmen_depth_mm\": 13.3,\n \"flipper_length_mm\": 213,\n \"body_mass_g\": 5100,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.2,\n \"culmen_depth_mm\": 15.8,\n \"flipper_length_mm\": 215,\n \"body_mass_g\": 5300,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.6,\n \"culmen_depth_mm\": 14.2,\n \"flipper_length_mm\": 210,\n \"body_mass_g\": 4850,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 48.5,\n \"culmen_depth_mm\": 14.1,\n \"flipper_length_mm\": 220,\n \"body_mass_g\": 5300,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.1,\n \"culmen_depth_mm\": 14.4,\n \"flipper_length_mm\": 210,\n \"body_mass_g\": 4400,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 50.1,\n \"culmen_depth_mm\": 15,\n \"flipper_length_mm\": 225,\n \"body_mass_g\": 5000,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.5,\n \"culmen_depth_mm\": 14.4,\n \"flipper_length_mm\": 217,\n \"body_mass_g\": 4900,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45,\n \"culmen_depth_mm\": 15.4,\n \"flipper_length_mm\": 220,\n \"body_mass_g\": 5050,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 43.8,\n \"culmen_depth_mm\": 13.9,\n \"flipper_length_mm\": 208,\n \"body_mass_g\": 4300,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.5,\n \"culmen_depth_mm\": 15,\n \"flipper_length_mm\": 220,\n \"body_mass_g\": 5000,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 43.2,\n \"culmen_depth_mm\": 14.5,\n \"flipper_length_mm\": 208,\n \"body_mass_g\": 4450,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 50.4,\n \"culmen_depth_mm\": 15.3,\n \"flipper_length_mm\": 224,\n \"body_mass_g\": 5550,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.3,\n \"culmen_depth_mm\": 13.8,\n \"flipper_length_mm\": 208,\n \"body_mass_g\": 4200,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.2,\n \"culmen_depth_mm\": 14.9,\n \"flipper_length_mm\": 221,\n \"body_mass_g\": 5300,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.7,\n \"culmen_depth_mm\": 13.9,\n \"flipper_length_mm\": 214,\n \"body_mass_g\": 4400,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 54.3,\n \"culmen_depth_mm\": 15.7,\n \"flipper_length_mm\": 231,\n \"body_mass_g\": 5650,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.8,\n \"culmen_depth_mm\": 14.2,\n \"flipper_length_mm\": 219,\n \"body_mass_g\": 4700,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 49.8,\n \"culmen_depth_mm\": 16.8,\n \"flipper_length_mm\": 230,\n \"body_mass_g\": 5700,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.2,\n \"culmen_depth_mm\": 14.4,\n \"flipper_length_mm\": 214,\n \"body_mass_g\": 4650,\n \"sex\": \"\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 49.5,\n \"culmen_depth_mm\": 16.2,\n \"flipper_length_mm\": 229,\n \"body_mass_g\": 5800,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 43.5,\n \"culmen_depth_mm\": 14.2,\n \"flipper_length_mm\": 220,\n \"body_mass_g\": 4700,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 50.7,\n \"culmen_depth_mm\": 15,\n \"flipper_length_mm\": 223,\n \"body_mass_g\": 5550,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 47.7,\n \"culmen_depth_mm\": 15,\n \"flipper_length_mm\": 216,\n \"body_mass_g\": 4750,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.4,\n \"culmen_depth_mm\": 15.6,\n \"flipper_length_mm\": 221,\n \"body_mass_g\": 5000,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 48.2,\n \"culmen_depth_mm\": 15.6,\n \"flipper_length_mm\": 221,\n \"body_mass_g\": 5100,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.5,\n \"culmen_depth_mm\": 14.8,\n \"flipper_length_mm\": 217,\n \"body_mass_g\": 5200,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.4,\n \"culmen_depth_mm\": 15,\n \"flipper_length_mm\": 216,\n \"body_mass_g\": 4700,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 48.6,\n \"culmen_depth_mm\": 16,\n \"flipper_length_mm\": 230,\n \"body_mass_g\": 5800,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 47.5,\n \"culmen_depth_mm\": 14.2,\n \"flipper_length_mm\": 209,\n \"body_mass_g\": 4600,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 51.1,\n \"culmen_depth_mm\": 16.3,\n \"flipper_length_mm\": 220,\n \"body_mass_g\": 6000,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.2,\n \"culmen_depth_mm\": 13.8,\n \"flipper_length_mm\": 215,\n \"body_mass_g\": 4750,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.2,\n \"culmen_depth_mm\": 16.4,\n \"flipper_length_mm\": 223,\n \"body_mass_g\": 5950,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 49.1,\n \"culmen_depth_mm\": 14.5,\n \"flipper_length_mm\": 212,\n \"body_mass_g\": 4625,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 52.5,\n \"culmen_depth_mm\": 15.6,\n \"flipper_length_mm\": 221,\n \"body_mass_g\": 5450,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 47.4,\n \"culmen_depth_mm\": 14.6,\n \"flipper_length_mm\": 212,\n \"body_mass_g\": 4725,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 50,\n \"culmen_depth_mm\": 15.9,\n \"flipper_length_mm\": 224,\n \"body_mass_g\": 5350,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 44.9,\n \"culmen_depth_mm\": 13.8,\n \"flipper_length_mm\": 212,\n \"body_mass_g\": 4750,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 50.8,\n \"culmen_depth_mm\": 17.3,\n \"flipper_length_mm\": 228,\n \"body_mass_g\": 5600,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 43.4,\n \"culmen_depth_mm\": 14.4,\n \"flipper_length_mm\": 218,\n \"body_mass_g\": 4600,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 51.3,\n \"culmen_depth_mm\": 14.2,\n \"flipper_length_mm\": 218,\n \"body_mass_g\": 5300,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 47.5,\n \"culmen_depth_mm\": 14,\n \"flipper_length_mm\": 212,\n \"body_mass_g\": 4875,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 52.1,\n \"culmen_depth_mm\": 17,\n \"flipper_length_mm\": 230,\n \"body_mass_g\": 5550,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 47.5,\n \"culmen_depth_mm\": 15,\n \"flipper_length_mm\": 218,\n \"body_mass_g\": 4950,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 52.2,\n \"culmen_depth_mm\": 17.1,\n \"flipper_length_mm\": 228,\n \"body_mass_g\": 5400,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.5,\n \"culmen_depth_mm\": 14.5,\n \"flipper_length_mm\": 212,\n \"body_mass_g\": 4750,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 49.5,\n \"culmen_depth_mm\": 16.1,\n \"flipper_length_mm\": 224,\n \"body_mass_g\": 5650,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 44.5,\n \"culmen_depth_mm\": 14.7,\n \"flipper_length_mm\": 214,\n \"body_mass_g\": 4850,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 50.8,\n \"culmen_depth_mm\": 15.7,\n \"flipper_length_mm\": 226,\n \"body_mass_g\": 5200,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 49.4,\n \"culmen_depth_mm\": 15.8,\n \"flipper_length_mm\": 216,\n \"body_mass_g\": 4925,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.9,\n \"culmen_depth_mm\": 14.6,\n \"flipper_length_mm\": 222,\n \"body_mass_g\": 4875,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 48.4,\n \"culmen_depth_mm\": 14.4,\n \"flipper_length_mm\": 203,\n \"body_mass_g\": 4625,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 51.1,\n \"culmen_depth_mm\": 16.5,\n \"flipper_length_mm\": 225,\n \"body_mass_g\": 5250,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 48.5,\n \"culmen_depth_mm\": 15,\n \"flipper_length_mm\": 219,\n \"body_mass_g\": 4850,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 55.9,\n \"culmen_depth_mm\": 17,\n \"flipper_length_mm\": 228,\n \"body_mass_g\": 5600,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 47.2,\n \"culmen_depth_mm\": 15.5,\n \"flipper_length_mm\": 215,\n \"body_mass_g\": 4975,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 49.1,\n \"culmen_depth_mm\": 15,\n \"flipper_length_mm\": 228,\n \"body_mass_g\": 5500,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 47.3,\n \"culmen_depth_mm\": 13.8,\n \"flipper_length_mm\": 216,\n \"body_mass_g\": 4725,\n \"sex\": \"\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.8,\n \"culmen_depth_mm\": 16.1,\n \"flipper_length_mm\": 215,\n \"body_mass_g\": 5500,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 41.7,\n \"culmen_depth_mm\": 14.7,\n \"flipper_length_mm\": 210,\n \"body_mass_g\": 4700,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 53.4,\n \"culmen_depth_mm\": 15.8,\n \"flipper_length_mm\": 219,\n \"body_mass_g\": 5500,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 43.3,\n \"culmen_depth_mm\": 14,\n \"flipper_length_mm\": 208,\n \"body_mass_g\": 4575,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 48.1,\n \"culmen_depth_mm\": 15.1,\n \"flipper_length_mm\": 209,\n \"body_mass_g\": 5500,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 50.5,\n \"culmen_depth_mm\": 15.2,\n \"flipper_length_mm\": 216,\n \"body_mass_g\": 5000,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 49.8,\n \"culmen_depth_mm\": 15.9,\n \"flipper_length_mm\": 229,\n \"body_mass_g\": 5950,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 43.5,\n \"culmen_depth_mm\": 15.2,\n \"flipper_length_mm\": 213,\n \"body_mass_g\": 4650,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 51.5,\n \"culmen_depth_mm\": 16.3,\n \"flipper_length_mm\": 230,\n \"body_mass_g\": 5500,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.2,\n \"culmen_depth_mm\": 14.1,\n \"flipper_length_mm\": 217,\n \"body_mass_g\": 4375,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 55.1,\n \"culmen_depth_mm\": 16,\n \"flipper_length_mm\": 230,\n \"body_mass_g\": 5850,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 44.5,\n \"culmen_depth_mm\": 15.7,\n \"flipper_length_mm\": 217,\n \"body_mass_g\": 4875,\n \"sex\": \"\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 48.8,\n \"culmen_depth_mm\": 16.2,\n \"flipper_length_mm\": 222,\n \"body_mass_g\": 6000,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 47.2,\n \"culmen_depth_mm\": 13.7,\n \"flipper_length_mm\": 214,\n \"body_mass_g\": 4925,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": \"NaN\",\n \"culmen_depth_mm\": \"NaN\",\n \"flipper_length_mm\": \"NaN\",\n \"body_mass_g\": \"NaN\",\n \"sex\": \"\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 46.8,\n \"culmen_depth_mm\": 14.3,\n \"flipper_length_mm\": 215,\n \"body_mass_g\": 4850,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 50.4,\n \"culmen_depth_mm\": 15.7,\n \"flipper_length_mm\": 222,\n \"body_mass_g\": 5750,\n \"sex\": \"MALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 45.2,\n \"culmen_depth_mm\": 14.8,\n \"flipper_length_mm\": 212,\n \"body_mass_g\": 5200,\n \"sex\": \"FEMALE\"\n },\n {\n \"species\": \"Gentoo\",\n \"island\": \"Biscoe\",\n \"culmen_length_mm\": 49.9,\n \"culmen_depth_mm\": 16.1,\n \"flipper_length_mm\": 213,\n \"body_mass_g\": 5400,\n \"sex\": \"MALE\"\n }\n ],\n },\n encode: {\n x: 'species',\n y: 'flipper_length_mm',\n color: 'sex',\n series: 'sex',\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":39.1,\"culmen_depth_mm\":18.7,\"flipper_length_mm\":181,\"body_mass_g\":3750,\"sex\":\"MALE\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":39.5,\"culmen_depth_mm\":17.4,\"flipper_length_mm\":186,\"body_mass_g\":3800,\"sex\":\"FEMALE\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":40.3,\"culmen_depth_mm\":18,\"flipper_length_mm\":195,\"body_mass_g\":3250,\"sex\":\"FEMALE\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":\"NaN\",\"culmen_depth_mm\":\"NaN\",\"flipper_length_mm\":\"NaN\",\"body_mass_g\":\"NaN\",\"sex\":\"\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":36.7,\"culmen_depth_mm\":19.3,\"flipper_length_mm\":193,\"body_mass_g\":3450,\"sex\":\"FEMALE\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":39.3,\"culmen_depth_mm\":20.6,\"flipper_length_mm\":190,\"body_mass_g\":3650,\"sex\":\"MALE\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":38.9,\"culmen_depth_mm\":17.8,\"flipper_length_mm\":181,\"body_mass_g\":3625,\"sex\":\"FEMALE\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":39.2,\"culmen_depth_mm\":19.6,\"flipper_length_mm\":195,\"body_mass_g\":4675,\"sex\":\"MALE\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":34.1,\"culmen_depth_mm\":18.1,\"flipper_length_mm\":193,\"body_mass_g\":3475,\"sex\":\"\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":42,\"culmen_depth_mm\":20.2,\"flipper_length_mm\":190,\"body_mass_g\":4250,\"sex\":\"\"}\n].filter(d => d.flipper_length_mm !== 'NaN' && d.sex);\n\nchart.options({\n type: 'boxplot',\n data,\n encode: {\n x: 'species',\n y: 'flipper_length_mm',\n color: 'sex',\n series: 'sex',\n },\n transform: [{ type: 'dodgeX' }],\n scale: {\n y: { zero: false, nice: true },\n },\n axis: {\n y: { \n title: '鳍肢长度 (mm)',\n grid: true,\n },\n x: { \n title: '物种',\n },\n },\n legend: {\n color: { title: '性别' },\n },\n tooltip: {\n items: [\n { name: '最小值', channel: 'y' },\n { name: 'Q1', channel: 'y1' },\n { name: '中位数', channel: 'y2' },\n { name: 'Q3', channel: 'y3' },\n { name: '最大值', channel: 'y4' },\n ],\n },\n});\n\nchart.render();", + "duration": 52592, + "retrievedSkillIds": [ + "g2-comp-space-flex", + "g2-concept-chart-selection", + "g2-mark-rose", + "g2-mark-boxplot", + "g2-mark-interval-grouped" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2303, + "expectedLength": 69122, + "similarity": 0.5154309562138162, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":39.1,\"culmen_depth_mm\":18.7,\"flipper_length_mm\":181,\"body_mass_g\":3750,\"sex\":\"MALE\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":39.5,\"culmen_depth_mm\":17.4,\"flipper_length_mm\":186,\"body_mass_g\":3800,\"sex\":\"FEMALE\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":40.3,\"culmen_depth_mm\":18,\"flipper_length_mm\":195,\"body_mass_g\":3250,\"sex\":\"FEMALE\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":\"NaN\",\"culmen_depth_mm\":\"NaN\",\"flipper_length_mm\":\"NaN\",\"body_mass_g\":\"NaN\",\"sex\":\"\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":36.7,\"culmen_depth_mm\":19.3,\"flipper_length_mm\":193,\"body_mass_g\":3450,\"sex\":\"FEMALE\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":39.3,\"culmen_depth_mm\":20.6,\"flipper_length_mm\":190,\"body_mass_g\":3650,\"sex\":\"MALE\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":38.9,\"culmen_depth_mm\":17.8,\"flipper_length_mm\":181,\"body_mass_g\":3625,\"sex\":\"FEMALE\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":39.2,\"culmen_depth_mm\":19.6,\"flipper_length_mm\":195,\"body_mass_g\":4675,\"sex\":\"MALE\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":34.1,\"culmen_depth_mm\":18.1,\"flipper_length_mm\":193,\"body_mass_g\":3475,\"sex\":\"\"},\n {\"species\":\"Adelie\",\"island\":\"Torgersen\",\"culmen_length_mm\":42,\"culmen_depth_mm\":20.2,\"flipper_length_mm\":190,\"body_mass_g\":4250,\"sex\":\"\"}\n].filter(d => d.flipper_length_mm !== 'NaN' && d.sex);\n\nchart.options({\n type: 'boxplot',\n data,\n encode: {\n x: 'species',\n y: 'flipper_length_mm',\n color: 'sex',\n series: 'sex',\n },\n transform: [{ type: 'dodgeX' }],\n scale: {\n y: { zero: false, nice: true },\n },\n axis: {\n y: { \n title: '鳍肢长度 (mm)',\n grid: true,\n },\n x: { \n title: '物种',\n },\n },\n legend: {\n color: { title: '性别' },\n },\n tooltip: {\n items: [\n { name: '最小值', channel: 'y' },\n { name: 'Q1', channel: 'y1' },\n { name: '中位数', channel: 'y2' },\n { name: 'Q3', channel: 'y3' },\n { name: '最大值', channel: 'y4' },\n ],\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "filter", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "color", + "series", + "transform", + "type", + "scale", + "y", + "zero", + "nice", + "axis", + "y", + "title", + "grid", + "x", + "title", + "legend", + "color", + "title", + "tooltip", + "items", + "name", + "channel", + "name", + "channel", + "name", + "channel", + "name", + "channel", + "name", + "channel" + ], + "stringLiterals": [ + "species", + "island", + "culmen_length_mm", + "culmen_depth_mm", + "flipper_length_mm", + "body_mass_g", + "sex", + "species", + "island", + "culmen_length_mm", + "culmen_depth_mm", + "flipper_length_mm", + "body_mass_g", + "sex", + "species", + "island", + "culmen_length_mm", + "culmen_depth_mm", + "flipper_length_mm", + "body_mass_g", + "sex", + "species", + "island", + "culmen_length_mm", + "culmen_depth_mm", + "flipper_length_mm", + "body_mass_g", + "sex", + "species", + "island", + "culmen_length_mm", + "culmen_depth_mm", + "flipper_length_mm", + "body_mass_g", + "sex", + "species", + "island", + "culmen_length_mm", + "culmen_depth_mm", + "flipper_length_mm", + "body_mass_g", + "sex", + "species", + "island", + "culmen_length_mm", + "culmen_depth_mm", + "flipper_length_mm", + "body_mass_g", + "sex", + "species", + "island", + "culmen_length_mm", + "culmen_depth_mm", + "flipper_length_mm", + "body_mass_g", + "sex", + "species", + "island", + "culmen_length_mm", + "culmen_depth_mm", + "flipper_length_mm", + "body_mass_g", + "sex", + "species", + "island", + "culmen_length_mm", + "culmen_depth_mm", + "flipper_length_mm", + "body_mass_g", + "sex" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale" + ] + } + } + }, + { + "id": "case-105", + "query": "根据描述绘制图表,使用 G2 创建一个桑基图,展示能源和原材料从源头到最终产品的流动情况,包括加工、产品分配及损耗等环节。通过节点和链接宽度表示流量大小,特定节点如废料和库存损耗使用红色标识。\n参考数据:[{\"source\":\"水\",\"target\":\"加工\",\"value\":100},{\"source\":\"电\",\"target\":\"加工\",\"value\":120},{\"source\":\"天然气\",\"target\":\"加工\",\"value\":80},{\"source\":\"原材料\",\"target\":\"加工\",\"value\":200},{\"source\":\"加工\",\"target\":\"产品A\",\"value\":180},{\"source\":\"加工\",\"target\":\"废料\",\"value\":300},{\"source\":\"产品A\",\"target\":\"运输\",\"value\":150},{\"source\":\"产品A\",\"target\":\"库存损耗\",\"value\":30}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({ container: 'container', theme: 'classic' });\nchart.options({\n type: 'sankey',\n autoFit: true,\n data: {\n value: {\n links: [\n { source: '水', target: '加工', value: 100 },\n { source: '电', target: '加工', value: 120 },\n { source: '天然气', target: '加工', value: 80 },\n { source: '原材料', target: '加工', value: 200 },\n { source: '加工', target: '产品A', value: 180 },\n { source: '加工', target: '废料', value: 120 + 80 + 100 + 200 - 180 },\n { source: '产品A', target: '运输', value: 150 },\n { source: '产品A', target: '库存损耗', value: 30 }\n ]\n }\n },\n layout: { nodeAlign: 'center', nodePadding: 0.06 },\n encode: { color: (d) => d.key === '废料' || d.key === '库存损耗' ? '#f5222d' : '#1890ff' },\n style: { linkFillOpacity: 0.6, nodeStroke: '#000', labelFontSize: 11 }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 900,\n height: 600,\n});\n\nconst data = [\n {\"source\":\"水\",\"target\":\"加工\",\"value\":100},\n {\"source\":\"电\",\"target\":\"加工\",\"value\":120},\n {\"source\":\"天然气\",\"target\":\"加工\",\"value\":80},\n {\"source\":\"原材料\",\"target\":\"加工\",\"value\":200},\n {\"source\":\"加工\",\"target\":\"产品A\",\"value\":180},\n {\"source\":\"加工\",\"target\":\"废料\",\"value\":300},\n {\"source\":\"产品A\",\"target\":\"运输\",\"value\":150},\n {\"source\":\"产品A\",\"target\":\"库存损耗\",\"value\":30}\n];\n\nchart.options({\n type: 'sankey',\n data: {\n value: {\n links: data,\n },\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.03,\n nodeWidth: 0.02,\n },\n scale: {\n color: {\n type: 'ordinal',\n domain: ['水', '电', '天然气', '原材料', '加工', '产品A', '废料', '库存损耗', '运输'],\n range: ['#5B8FF9', '#5B8FF9', '#5B8FF9', '#5B8FF9', '#5AD8A6', '#5AD8A6', '#E8684A', '#E8684A', '#5D7092'],\n },\n },\n style: {\n labelSpacing: 4,\n labelFontSize: 12,\n labelFontWeight: 'bold',\n nodeLineWidth: 1,\n linkFillOpacity: 0.4,\n },\n legend: false,\n});\n\nchart.render();", + "duration": 12112, + "retrievedSkillIds": [ + "g2-mark-sankey", + "g2-mark-chord", + "g2-mark-arc-donut", + "g2-mark-treemap", + "g2-mark-arc-diagram" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1097, + "expectedLength": 854, + "similarity": 0.4868666590333702, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 900,\n height: 600,\n});\n\nconst data = [\n {\"source\":\"水\",\"target\":\"加工\",\"value\":100},\n {\"source\":\"电\",\"target\":\"加工\",\"value\":120},\n {\"source\":\"天然气\",\"target\":\"加工\",\"value\":80},\n {\"source\":\"原材料\",\"target\":\"加工\",\"value\":200},\n {\"source\":\"加工\",\"target\":\"产品A\",\"value\":180},\n {\"source\":\"加工\",\"target\":\"废料\",\"value\":300},\n {\"source\":\"产品A\",\"target\":\"运输\",\"value\":150},\n {\"source\":\"产品A\",\"target\":\"库存损耗\",\"value\":30}\n];\n\nchart.options({\n type: 'sankey',\n data: {\n value: {\n links: data,\n },\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.03,\n nodeWidth: 0.02,\n },\n scale: {\n color: {\n type: 'ordinal',\n domain: ['水', '电', '天然气', '原材料', '加工', '产品A', '废料', '库存损耗', '运输'],\n range: ['#5B8FF9', '#5B8FF9', '#5B8FF9', '#5B8FF9', '#5AD8A6', '#5AD8A6', '#E8684A', '#E8684A', '#5D7092'],\n },\n },\n style: {\n labelSpacing: 4,\n labelFontSize: 12,\n labelFontWeight: 'bold',\n nodeLineWidth: 1,\n linkFillOpacity: 0.4,\n },\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "value", + "links", + "layout", + "nodeAlign", + "nodePadding", + "nodeWidth", + "scale", + "color", + "type", + "domain", + "range", + "style", + "labelSpacing", + "labelFontSize", + "labelFontWeight", + "nodeLineWidth", + "linkFillOpacity", + "legend" + ], + "stringLiterals": [ + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "scale" + ] + } + } + }, + { + "id": "case-106", + "query": "根据描述绘制图表,使用 G2 渲染一个单元格热力图,基于模拟地形高程数据展示二维网格上每个点的海拔值,通过颜色深浅表示高程分布,附带图例、坐标轴和工具提示功能。\n参考数据:\n[{\"x\":0,\"y\":0,\"elevation\":10.000203873647742},{\"x\":0,\"y\":2,\"elevation\":10.000201352088794},{\"x\":0,\"y\":4,\"elevation\":10.00019379782702},{\"x\":0,\"y\":6,\"elevation\":10.000181210862447},{\"x\":0,\"y\":8,\"elevation\":10.000163591195072},{\"x\":0,\"y\":10,\"elevation\":10.000140938824893},{\"x\":0,\"y\":12,\"elevation\":10.00011325375192},{\"x\":0,\"y\":14,\"elevation\":10.000080535976187},{\"x\":0,\"y\":16,\"elevation\":10.000042785506649},{\"x\":0,\"y\":18,\"elevation\":10.00000000234335}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\n// 模拟地形高程数据\nconst terrainData = [];\nfor (let x = 0; x <= 50; x += 2) {\n for (let y = 0; y <= 50; y += 2) {\n // 模拟山峰地形:两个山峰的高程分布\n const elevation1 = 100 * Math.exp(-((x - 15) ** 2 + (y - 15) ** 2) / 200);\n const elevation2 = 80 * Math.exp(-((x - 35) ** 2 + (y - 35) ** 2) / 150);\n const elevation = elevation1 + elevation2 + 10; // 基础海拔\n terrainData.push({ x, y, elevation });\n }\n}\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'cell',\n data: terrainData,\n encode: {\n x: 'x',\n y: 'y',\n color: 'elevation',\n },\n style: {\n stroke: '#333',\n strokeWidth: 0.5,\n inset: 0.5,\n },\n scale: {\n color: {\n palette: 'viridis',\n type: 'sequential',\n },\n },\n legend: {\n color: {\n length: 300,\n layout: { justifyContent: 'center' },\n labelFormatter: (value) => `${Math.round(value)}m`,\n },\n },\n tooltip: {\n title: '海拔信息',\n items: [\n { field: 'x', name: '经度' },\n { field: 'y', name: '纬度' },\n {\n field: 'elevation',\n name: '海拔',\n valueFormatter: (value) => `${Math.round(value)}m`,\n },\n ],\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\n// 生成模拟地形高程数据:两个山峰的高程分布\nconst terrainData = [];\nfor (let x = 0; x <= 50; x += 2) {\n for (let y = 0; y <= 50; y += 2) {\n const elevation1 = 100 * Math.exp(-((x - 15) ** 2 + (y - 15) ** 2) / 200);\n const elevation2 = 80 * Math.exp(-((x - 35) ** 2 + (y - 35) ** 2) / 150);\n const elevation = elevation1 + elevation2 + 10;\n terrainData.push({ x, y, elevation });\n }\n}\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'cell',\n data: terrainData,\n encode: {\n x: 'x',\n y: 'y',\n color: 'elevation',\n },\n style: {\n stroke: '#333',\n lineWidth: 0.5,\n inset: 0.5,\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'viridis',\n },\n },\n axis: {\n x: { title: 'X 坐标' },\n y: { title: 'Y 坐标' },\n },\n legend: {\n color: {\n length: 300,\n layout: { justifyContent: 'center' },\n labelFormatter: (value) => `${Math.round(value)}m`,\n },\n },\n tooltip: {\n title: '海拔信息',\n items: [\n { field: 'x', name: 'X 坐标' },\n { field: 'y', name: 'Y 坐标' },\n {\n field: 'elevation',\n name: '海拔',\n valueFormatter: (value) => `${Math.round(value)}m`,\n },\n ],\n },\n});\n\nchart.render();", + "duration": 13024, + "retrievedSkillIds": [ + "g2-mark-contourline", + "g2-mark-heatmap", + "g2-mark-cell-heatmap", + "g2-mark-radar", + "g2-mark-vector" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1265, + "expectedLength": 1216, + "similarity": 1, + "extractedCode": "import { Chart } from '@antv/g2';\n\n// 生成模拟地形高程数据:两个山峰的高程分布\nconst terrainData = [];\nfor (let x = 0; x <= 50; x += 2) {\n for (let y = 0; y <= 50; y += 2) {\n const elevation1 = 100 * Math.exp(-((x - 15) ** 2 + (y - 15) ** 2) / 200);\n const elevation2 = 80 * Math.exp(-((x - 35) ** 2 + (y - 35) ** 2) / 150);\n const elevation = elevation1 + elevation2 + 10;\n terrainData.push({ x, y, elevation });\n }\n}\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'cell',\n data: terrainData,\n encode: {\n x: 'x',\n y: 'y',\n color: 'elevation',\n },\n style: {\n stroke: '#333',\n lineWidth: 0.5,\n inset: 0.5,\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'viridis',\n },\n },\n axis: {\n x: { title: 'X 坐标' },\n y: { title: 'Y 坐标' },\n },\n legend: {\n color: {\n length: 300,\n layout: { justifyContent: 'center' },\n labelFormatter: (value) => `${Math.round(value)}m`,\n },\n },\n tooltip: {\n title: '海拔信息',\n items: [\n { field: 'x', name: 'X 坐标' },\n { field: 'y', name: 'Y 坐标' },\n {\n field: 'elevation',\n name: '海拔',\n valueFormatter: (value) => `${Math.round(value)}m`,\n },\n ],\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "exp", + "exp", + "push", + "Chart", + "options", + "round", + "round", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "encode", + "x", + "y", + "color", + "style", + "stroke", + "lineWidth", + "inset", + "scale", + "color", + "type", + "palette", + "axis", + "x", + "title", + "y", + "title", + "legend", + "color", + "length", + "layout", + "justifyContent", + "labelFormatter", + "tooltip", + "title", + "items", + "field", + "name", + "field", + "name", + "field", + "name", + "valueFormatter" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale" + ] + } + } + }, + { + "id": "case-107", + "query": "根据描述绘制图表,使用 G2 创建一个弦图(chord diagram),展示不同角色(如前端、设计、后端、测试、产品、数据库)之间的协作频率关系,配置颜色映射、标签样式、工具提示和元素高亮交互。\n参考数据:{\"value\":{\"links\":[{\"source\":\"前端\",\"target\":\"设计\",\"value\":65},{\"source\":\"前端\",\"target\":\"后端\",\"value\":120},{\"source\":\"前端\",\"target\":\"测试\",\"value\":40},{\"source\":\"设计\",\"target\":\"前端\",\"value\":80},{\"source\":\"设计\",\"target\":\"产品\",\"value\":95},{\"source\":\"后端\",\"target\":\"前端\",\"value\":50},{\"source\":\"后端\",\"target\":\"数据库\",\"value\":130},{\"source\":\"测试\",\"target\":\"前端\",\"value\":70},{\"source\":\"产品\",\"target\":\"设计\",\"value\":60},{\"source\":\"数据库\",\"target\":\"后端\",\"value\":110}]}}", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'chord',\n autoFit: true,\n data: {\n value: {\n links: [\n { source: '前端', target: '设计', value: 65 },\n { source: '前端', target: '后端', value: 120 },\n { source: '前端', target: '测试', value: 40 },\n { source: '设计', target: '前端', value: 80 },\n { source: '设计', target: '产品', value: 95 },\n { source: '后端', target: '前端', value: 50 },\n { source: '后端', target: '数据库', value: 130 },\n { source: '测试', target: '前端', value: 70 },\n { source: '产品', target: '设计', value: 60 },\n { source: '数据库', target: '后端', value: 110 },\n ],\n },\n },\n layout: { nodeWidthRatio: 0.07 },\n scale: {\n color: {\n type: 'ordinal',\n range: ['#722ED1', '#EB2F96', '#52C41A', '#FA8C16', '#1890FF'],\n },\n },\n style: {\n labelFontSize: 12,\n labelFontWeight: 'bold',\n linkFillOpacity: 0.7,\n },\n tooltip: {\n items: [\n { field: 'source', name: '发送角色' },\n { field: 'target', name: '接收角色' },\n { field: 'value', name: '协作频率' },\n ],\n },\n interaction: [{ type: 'elementHighlight', background: true }],\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 640,\n});\n\nconst data = {\n nodes: [\n { key: '前端', name: '前端' },\n { key: '设计', name: '设计' },\n { key: '后端', name: '后端' },\n { key: '测试', name: '测试' },\n { key: '产品', name: '产品' },\n { key: '数据库', name: '数据库' }\n ],\n links: [\n { source: '前端', target: '设计', value: 65 },\n { source: '前端', target: '后端', value: 120 },\n { source: '前端', target: '测试', value: 40 },\n { source: '设计', target: '前端', value: 80 },\n { source: '设计', target: '产品', value: 95 },\n { source: '后端', target: '前端', value: 50 },\n { source: '后端', target: '数据库', value: 130 },\n { source: '测试', target: '前端', value: 70 },\n { source: '产品', target: '设计', value: 60 },\n { source: '数据库', target: '后端', value: 110 }\n ]\n};\n\nchart.options({\n type: 'chord',\n data: {\n value: data\n },\n encode: {\n source: 'source',\n target: 'target',\n value: 'value',\n nodeKey: 'key',\n nodeColor: 'key',\n linkColor: 'source'\n },\n layout: {\n nodeWidthRatio: 0.05,\n nodePaddingRatio: 0.02\n },\n style: {\n node: {\n opacity: 1,\n lineWidth: 1,\n stroke: '#fff'\n },\n link: {\n opacity: 0.6,\n lineWidth: 1\n }\n },\n nodeLabels: [\n {\n text: 'name',\n position: 'outside',\n fontSize: 12,\n fontWeight: 'bold'\n }\n ],\n tooltip: {\n node: {\n title: '',\n items: [(d) => ({ name: d.key, value: d.value })]\n },\n link: {\n title: '',\n items: [(d) => ({ name: `${d.source} → ${d.target}`, value: d.value })]\n }\n },\n interaction: {\n elementHighlight: true\n }\n});\n\nchart.render();", + "duration": 14663, + "retrievedSkillIds": [ + "g2-mark-chord", + "g2-mark-interval-basic", + "g2-mark-cell-heatmap", + "g2-mark-line-basic", + "g2-scale-sequential" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1680, + "expectedLength": 1240, + "similarity": 0.6942644054321399, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 640,\n});\n\nconst data = {\n nodes: [\n { key: '前端', name: '前端' },\n { key: '设计', name: '设计' },\n { key: '后端', name: '后端' },\n { key: '测试', name: '测试' },\n { key: '产品', name: '产品' },\n { key: '数据库', name: '数据库' }\n ],\n links: [\n { source: '前端', target: '设计', value: 65 },\n { source: '前端', target: '后端', value: 120 },\n { source: '前端', target: '测试', value: 40 },\n { source: '设计', target: '前端', value: 80 },\n { source: '设计', target: '产品', value: 95 },\n { source: '后端', target: '前端', value: 50 },\n { source: '后端', target: '数据库', value: 130 },\n { source: '测试', target: '前端', value: 70 },\n { source: '产品', target: '设计', value: 60 },\n { source: '数据库', target: '后端', value: 110 }\n ]\n};\n\nchart.options({\n type: 'chord',\n data: {\n value: data\n },\n encode: {\n source: 'source',\n target: 'target',\n value: 'value',\n nodeKey: 'key',\n nodeColor: 'key',\n linkColor: 'source'\n },\n layout: {\n nodeWidthRatio: 0.05,\n nodePaddingRatio: 0.02\n },\n style: {\n node: {\n opacity: 1,\n lineWidth: 1,\n stroke: '#fff'\n },\n link: {\n opacity: 0.6,\n lineWidth: 1\n }\n },\n nodeLabels: [\n {\n text: 'name',\n position: 'outside',\n fontSize: 12,\n fontWeight: 'bold'\n }\n ],\n tooltip: {\n node: {\n title: '',\n items: [(d) => ({ name: d.key, value: d.value })]\n },\n link: {\n title: '',\n items: [(d) => ({ name: `${d.source} → ${d.target}`, value: d.value })]\n }\n },\n interaction: {\n elementHighlight: true\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "nodes", + "key", + "name", + "key", + "name", + "key", + "name", + "key", + "name", + "key", + "name", + "key", + "name", + "links", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "type", + "data", + "value", + "encode", + "source", + "target", + "value", + "nodeKey", + "nodeColor", + "linkColor", + "layout", + "nodeWidthRatio", + "nodePaddingRatio", + "style", + "node", + "opacity", + "lineWidth", + "stroke", + "link", + "opacity", + "lineWidth", + "nodeLabels", + "text", + "position", + "fontSize", + "fontWeight", + "tooltip", + "node", + "title", + "items", + "name", + "value", + "link", + "title", + "items", + "name", + "value", + "interaction", + "elementHighlight" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "interaction", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-108", + "query": "根据描述绘制图表,使用词云图展示一组词语及其对应的情感倾向和分数,通过不同颜色区分正向、中性和负向情感,并根据分数调整字体大小。参考数据:[{\"word\":\"创新\",\"score\":420,\"sentiment\":\"正向\"},{\"word\":\"风险\",\"score\":300,\"sentiment\":\"中性\"},{\"word\":\"损失\",\"score\":95,\"sentiment\":\"负向\"},{\"word\":\"增长\",\"score\":390,\"sentiment\":\"正向\"},{\"word\":\"成本\",\"score\":180,\"sentiment\":\"负向\"},{\"word\":\"协同\",\"score\":280,\"sentiment\":\"正向\"},{\"word\":\"滞后\",\"score\":120,\"sentiment\":\"负向\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from \"@antv/g2\";\n\nconst chart = new Chart({ container: 'container', width: 600, height: 400 });\nconst colorMap = {\n '#52c41a': '正向',\n '#8c8c8c': '中性',\n '#f5222d': '负向'\n}\nchart.options({\n type: 'wordCloud',\n layout: { fontSize: [20, 100] },\n data: [\n { word: '创新', score: 420, sentiment: '正向' },\n { word: '风险', score: 300, sentiment: '中性' },\n { word: '损失', score: 95, sentiment: '负向' },\n { word: '增长', score: 390, sentiment: '正向' },\n { word: '成本', score: 180, sentiment: '负向' },\n { word: '协同', score: 280, sentiment: '正向' },\n { word: '滞后', score: 120, sentiment: '负向' }\n ],\n encode: {\n text: 'word',\n color: (d) =>\n d.sentiment === '正向' ? '#52c41a' : d.sentiment === '负向' ? '#f5222d' : '#8c8c8c'\n },\n legend: {\n color: {\n itemLabelText: (d) => colorMap[d.label]\n }\n }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { word: '创新', score: 420, sentiment: '正向' },\n { word: '风险', score: 300, sentiment: '中性' },\n { word: '损失', score: 95, sentiment: '负向' },\n { word: '增长', score: 390, sentiment: '正向' },\n { word: '成本', score: 180, sentiment: '负向' },\n { word: '协同', score: 280, sentiment: '正向' },\n { word: '滞后', score: 120, sentiment: '负向' },\n];\n\nconst chart = new Chart({ container: 'container', width: 640, height: 480 });\n\nchart.options({\n type: 'wordCloud',\n data,\n encode: {\n text: 'word',\n color: 'sentiment',\n fontSize: { field: 'score', range: [16, 48] },\n },\n scale: {\n color: {\n domain: ['正向', '中性', '负向'],\n range: ['#52c41a', '#faad14', '#ff4d4f'],\n },\n },\n layout: {\n padding: 4,\n },\n});\n\nchart.render();", + "duration": 10950, + "retrievedSkillIds": [ + "g2-mark-wordcloud", + "g2-concept-chart-selection", + "g2-mark-bi-directional-bar", + "g2-mark-rose", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 787, + "expectedLength": 858, + "similarity": 0.7235963855421687, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { word: '创新', score: 420, sentiment: '正向' },\n { word: '风险', score: 300, sentiment: '中性' },\n { word: '损失', score: 95, sentiment: '负向' },\n { word: '增长', score: 390, sentiment: '正向' },\n { word: '成本', score: 180, sentiment: '负向' },\n { word: '协同', score: 280, sentiment: '正向' },\n { word: '滞后', score: 120, sentiment: '负向' },\n];\n\nconst chart = new Chart({ container: 'container', width: 640, height: 480 });\n\nchart.options({\n type: 'wordCloud',\n data,\n encode: {\n text: 'word',\n color: 'sentiment',\n fontSize: { field: 'score', range: [16, 48] },\n },\n scale: {\n color: {\n domain: ['正向', '中性', '负向'],\n range: ['#52c41a', '#faad14', '#ff4d4f'],\n },\n },\n layout: {\n padding: 4,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "word", + "score", + "sentiment", + "word", + "score", + "sentiment", + "word", + "score", + "sentiment", + "word", + "score", + "sentiment", + "word", + "score", + "sentiment", + "word", + "score", + "sentiment", + "word", + "score", + "sentiment", + "container", + "width", + "height", + "type", + "encode", + "text", + "color", + "fontSize", + "field", + "range", + "scale", + "color", + "domain", + "range", + "layout", + "padding" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale" + ] + } + } + }, + { + "id": "case-109", + "query": "根据描述绘制图表,使用 G2 渲染一个圆形填充图(pack layout),展示磁盘目录结构的层级分布,各节点按占用空间大小排序,并通过颜色区分层级深度,支持悬停提示和对应图例。参考数据:{\"name\":\"根目录\",\"value\":500,\"children\":[{\"name\":\"系统文件\",\"value\":200,\"children\":[{\"name\":\"Drivers\",\"value\":70},{\"name\":\"System32\",\"value\":90},{\"name\":\"Temp\",\"value\":40}]},{\"name\":\"用户文档\",\"value\":180,\"children\":[{\"name\":\"Pictures\",\"value\":60},{\"name\":\"Documents\",\"value\":80},{\"name\":\"Downloads\",\"value\":40}]},{\"name\":\"应用程序\",\"value\":90,\"children\":[{\"name\":\"DesignTools\",\"value\":40},{\"name\":\"Development\",\"value\":30},{\"name\":\"Utilities\",\"value\":20}]},{\"name\":\"缓存\",\"value\":30}]}", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst diskData = {\n name: '根目录',\n value: 500,\n children: [\n {\n name: '系统文件',\n value: 200,\n children: [\n { name: 'Drivers', value: 70 },\n { name: 'System32', value: 90 },\n { name: 'Temp', value: 40 },\n ],\n },\n {\n name: '用户文档',\n value: 180,\n children: [\n { name: 'Pictures', value: 60 },\n { name: 'Documents', value: 80 },\n { name: 'Downloads', value: 40 },\n ],\n },\n {\n name: '应用程序',\n value: 90,\n children: [\n { name: 'DesignTools', value: 40 },\n { name: 'Development', value: 30 },\n { name: 'Utilities', value: 20 },\n ],\n },\n { name: '缓存', value: 30 },\n ],\n};\n\nchart.options({\n type: 'pack',\n data: { value: diskData },\n encode: {\n value: 'value',\n color: 'depth',\n },\n scale: {\n color: {\n range: ['#E6F7FF', '#69C0FF', '#096DD9'],\n },\n },\n style: {\n labelText: (d) => (d.r >= 12 && d.height === 0 ? d.data.name : ''),\n labelFontSize: 10,\n labelFill: '#001529',\n stroke: '#D9D9D9',\n strokeWidth: 1.5,\n fillOpacity: 0.7,\n },\n layout: {\n padding: 6,\n sort: (a, b) => b.value - a.value,\n },\n legend: false,\n tooltip: {\n title: (d) => d.data.name,\n items: [{ field: 'value', name: '占用空间 (MB)', valueFormatter: '.0f' }],\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n \"name\": \"根目录\",\n \"value\": 500,\n \"children\": [\n {\n \"name\": \"系统文件\",\n \"value\": 200,\n \"children\": [\n { \"name\": \"Drivers\", \"value\": 70 },\n { \"name\": \"System32\", \"value\": 90 },\n { \"name\": \"Temp\", \"value\": 40 }\n ]\n },\n {\n \"name\": \"用户文档\",\n \"value\": 180,\n \"children\": [\n { \"name\": \"Pictures\", \"value\": 60 },\n { \"name\": \"Documents\", \"value\": 80 },\n { \"name\": \"Downloads\", \"value\": 40 }\n ]\n },\n {\n \"name\": \"应用程序\",\n \"value\": 90,\n \"children\": [\n { \"name\": \"DesignTools\", \"value\": 40 },\n { \"name\": \"Development\", \"value\": 30 },\n { \"name\": \"Utilities\", \"value\": 20 }\n ]\n },\n { \"name\": \"缓存\", \"value\": 30 }\n ]\n};\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'pack',\n data: data,\n layout: {\n padding: 5,\n sort: (a, b) => b.value - a.value,\n },\n encode: {\n value: 'value',\n color: (d) => `层级 ${d.depth}`,\n },\n scale: {\n color: {\n type: 'ordinal',\n domain: ['层级 0', '层级 1', '层级 2'],\n range: ['#1f77b4', '#ff7f0e', '#2ca02c'],\n },\n },\n style: {\n stroke: '#fff',\n lineWidth: 1.5,\n },\n labels: [\n {\n text: (d) => d.data?.name,\n position: 'inside',\n transform: [{ type: 'overflowHide' }],\n style: {\n fontSize: 11,\n fill: '#fff',\n fontWeight: 'bold',\n },\n },\n ],\n tooltip: {\n title: (d) => d.data?.name,\n items: [\n { field: 'value', name: '占用空间 (MB)' },\n { field: 'depth', name: '层级深度' },\n ],\n },\n legend: {\n color: {\n title: '目录层级',\n position: 'right',\n },\n },\n});\n\nchart.render();", + "duration": 41804, + "retrievedSkillIds": [ + "g2-mark-partition", + "g2-interaction-element-point-move", + "g2-mark-interval-basic", + "g2-mark-chord", + "g2-mark-tree" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1765, + "expectedLength": 1456, + "similarity": 0.6696442071442071, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n \"name\": \"根目录\",\n \"value\": 500,\n \"children\": [\n {\n \"name\": \"系统文件\",\n \"value\": 200,\n \"children\": [\n { \"name\": \"Drivers\", \"value\": 70 },\n { \"name\": \"System32\", \"value\": 90 },\n { \"name\": \"Temp\", \"value\": 40 }\n ]\n },\n {\n \"name\": \"用户文档\",\n \"value\": 180,\n \"children\": [\n { \"name\": \"Pictures\", \"value\": 60 },\n { \"name\": \"Documents\", \"value\": 80 },\n { \"name\": \"Downloads\", \"value\": 40 }\n ]\n },\n {\n \"name\": \"应用程序\",\n \"value\": 90,\n \"children\": [\n { \"name\": \"DesignTools\", \"value\": 40 },\n { \"name\": \"Development\", \"value\": 30 },\n { \"name\": \"Utilities\", \"value\": 20 }\n ]\n },\n { \"name\": \"缓存\", \"value\": 30 }\n ]\n};\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'pack',\n data: data,\n layout: {\n padding: 5,\n sort: (a, b) => b.value - a.value,\n },\n encode: {\n value: 'value',\n color: (d) => `层级 ${d.depth}`,\n },\n scale: {\n color: {\n type: 'ordinal',\n domain: ['层级 0', '层级 1', '层级 2'],\n range: ['#1f77b4', '#ff7f0e', '#2ca02c'],\n },\n },\n style: {\n stroke: '#fff',\n lineWidth: 1.5,\n },\n labels: [\n {\n text: (d) => d.data?.name,\n position: 'inside',\n transform: [{ type: 'overflowHide' }],\n style: {\n fontSize: 11,\n fill: '#fff',\n fontWeight: 'bold',\n },\n },\n ],\n tooltip: {\n title: (d) => d.data?.name,\n items: [\n { field: 'value', name: '占用空间 (MB)' },\n { field: 'depth', name: '层级深度' },\n ],\n },\n legend: {\n color: {\n title: '目录层级',\n position: 'right',\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "layout", + "padding", + "sort", + "encode", + "value", + "color", + "scale", + "color", + "type", + "domain", + "range", + "style", + "stroke", + "lineWidth", + "labels", + "text", + "position", + "transform", + "type", + "style", + "fontSize", + "fill", + "fontWeight", + "tooltip", + "title", + "items", + "field", + "name", + "field", + "name", + "legend", + "color", + "title", + "position" + ], + "stringLiterals": [ + "name", + "value", + "children", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "x6.labels" + ] + } + } + }, + { + "id": "case-110", + "query": "根据描述绘制图表,使用 G2 渲染一个包含A股和B股分时价格数据的K线图,通过连线绘制高低价区间,通过柱状段绘制开盘到收盘区间,按时间和股票类型分组,使用颜色区分类型。\n参考数据:\n[{\"ts\":\"09:30\",\"open\":100,\"close\":102,\"high\":103,\"low\":99,\"type\":\"A股\"},{\"ts\":\"09:30\",\"open\":50,\"close\":49,\"high\":51,\"low\":48,\"type\":\"B股\"},{\"ts\":\"10:00\",\"open\":103,\"close\":101,\"high\":104,\"low\":100,\"type\":\"A股\"},{\"ts\":\"10:00\",\"open\":49,\"close\":50,\"high\":51,\"low\":48,\"type\":\"B股\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const data = [\n { ts: '09:30', open: 100, close: 102, high: 103, low: 99, type: 'A股' },\n { ts: '09:30', open: 50, close: 49, high: 51, low: 48, type: 'B股' },\n { ts: '10:00', open: 103, close: 101, high: 104, low: 100, type: 'A股' },\n { ts: '10:00', open: 49, close: 50, high: 51, low: 48, type: 'B股' }\n];\n\nconst chart = new Chart({ container: 'container', autoFit: true });\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'ts',\n color: 'type',\n series: 'type',\n key: 'type'\n },\n scale: { x: { type: 'band', padding: 0.3 }, color: { range: ['#e41a1c','#377eb8'] } },\n children: [\n { type: 'link', encode: { y: ['low','high'] }, style: { strokeOpacity: 0.6 } },\n { type: 'interval', encode: { y: ['open','close'] }, style: { fillOpacity: 0.9, strokeWidth: 1.5 } }\n ],\n axis: { y: { title: '价格' }, x: { labelSpacing: 4 } },\n legend: { color: { position: 'right' } }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"ts\":\"09:30\",\"open\":100,\"close\":102,\"high\":103,\"low\":99,\"type\":\"A股\"},\n {\"ts\":\"09:30\",\"open\":50,\"close\":49,\"high\":51,\"low\":48,\"type\":\"B股\"},\n {\"ts\":\"10:00\",\"open\":103,\"close\":101,\"high\":104,\"low\":100,\"type\":\"A股\"},\n {\"ts\":\"10:00\",\"open\":49,\"close\":50,\"high\":51,\"low\":48,\"type\":\"B股\"}\n];\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'ts',\n color: 'type',\n },\n scale: {\n color: {\n domain: ['A股', 'B股'],\n range: ['#5B8FF9', '#5AD8A6'],\n },\n },\n children: [\n {\n type: 'link',\n encode: {\n y: ['low', 'high'],\n },\n },\n {\n type: 'interval',\n encode: {\n y: 'open',\n y1: 'close',\n },\n style: {\n fillOpacity: 1,\n },\n },\n ],\n});\n\nchart.render();", + "duration": 36805, + "retrievedSkillIds": [ + "g2-mark-k-chart", + "g2-mark-contourline", + "g2-mark-line-basic", + "g2-mark-interval-basic", + "g2-mark-line-multi" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 879, + "expectedLength": 917, + "similarity": 0.6288429541595926, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"ts\":\"09:30\",\"open\":100,\"close\":102,\"high\":103,\"low\":99,\"type\":\"A股\"},\n {\"ts\":\"09:30\",\"open\":50,\"close\":49,\"high\":51,\"low\":48,\"type\":\"B股\"},\n {\"ts\":\"10:00\",\"open\":103,\"close\":101,\"high\":104,\"low\":100,\"type\":\"A股\"},\n {\"ts\":\"10:00\",\"open\":49,\"close\":50,\"high\":51,\"low\":48,\"type\":\"B股\"}\n];\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'ts',\n color: 'type',\n },\n scale: {\n color: {\n domain: ['A股', 'B股'],\n range: ['#5B8FF9', '#5AD8A6'],\n },\n },\n children: [\n {\n type: 'link',\n encode: {\n y: ['low', 'high'],\n },\n },\n {\n type: 'interval',\n encode: {\n y: 'open',\n y1: 'close',\n },\n style: {\n fillOpacity: 1,\n },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "09", + "09", + "10", + "10", + "type", + "encode", + "x", + "color", + "scale", + "color", + "domain", + "range", + "children", + "type", + "encode", + "y", + "type", + "encode", + "y", + "y1", + "style", + "fillOpacity" + ], + "stringLiterals": [ + "ts", + "open", + "close", + "high", + "low", + "type", + "ts", + "open", + "close", + "high", + "low", + "type", + "ts", + "open", + "close", + "high", + "low", + "type", + "ts", + "open", + "close", + "high", + "low", + "type" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "view.children", + "type.view", + "type.interval" + ] + } + } + }, + { + "id": "case-111", + "query": "根据描述绘制图表,使用提供的时间段交通流量数据,渲染一个堆叠的环形图,通过不同的颜色区分一天中不同时段的交通流量占比,并支持鼠标悬停交互效果。参考数据:[{\"hour\":\"0-6\",\"traffic\":5},{\"hour\":\"6-10\",\"traffic\":20},{\"hour\":\"10-14\",\"traffic\":35},{\"hour\":\"14-18\",\"traffic\":25},{\"hour\":\"18-24\",\"traffic\":15}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container', theme: 'classic' });\nchart.options({\n type: 'interval',\n autoFit: true,\n data: [\n { hour: '0-6', traffic: 5, },\n { hour: '6-10', traffic: 20, },\n { hour: '10-14', traffic: 35, },\n { hour: '14-18', traffic: 25, },\n { hour: '18-24', traffic: 15, }\n ],\n scale: {\n color: {\n range: ['#bfbfbf', '#d9f7be', '#95e4ff', '#ffd666', '#ffb3c7'],\n }\n },\n encode: { y: 'traffic', color: 'hour' },\n transform: [{ type: 'stackY' }],\n coordinate: { type: 'theta' },\n interaction: { elementHoverScale: true },\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 480,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { hour: '0-6', traffic: 5 },\n { hour: '6-10', traffic: 20 },\n { hour: '10-14', traffic: 35 },\n { hour: '14-18', traffic: 25 },\n { hour: '18-24', traffic: 15 },\n ],\n encode: {\n y: 'traffic',\n color: 'hour',\n },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n outerRadius: 0.8,\n innerRadius: 0.5,\n },\n interaction: {\n elementHoverScale: true,\n tooltip: true,\n },\n labels: [\n {\n text: (d) => `${d.hour}: ${d.traffic}`,\n position: 'outside',\n connector: true,\n },\n ],\n});\n\nchart.render();", + "duration": 11859, + "retrievedSkillIds": [ + "g2-mark-arc-donut", + "g2-interaction-element-hover-scale", + "g2-interaction-adaptive-filter", + "g2-interaction-brush", + "g2-interaction-element-point-move" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 737, + "expectedLength": 633, + "similarity": 0.8021626077182465, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 480,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { hour: '0-6', traffic: 5 },\n { hour: '6-10', traffic: 20 },\n { hour: '10-14', traffic: 35 },\n { hour: '14-18', traffic: 25 },\n { hour: '18-24', traffic: 15 },\n ],\n encode: {\n y: 'traffic',\n color: 'hour',\n },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n outerRadius: 0.8,\n innerRadius: 0.5,\n },\n interaction: {\n elementHoverScale: true,\n tooltip: true,\n },\n labels: [\n {\n text: (d) => `${d.hour}: ${d.traffic}`,\n position: 'outside',\n connector: true,\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "hour", + "traffic", + "hour", + "traffic", + "hour", + "traffic", + "hour", + "traffic", + "hour", + "traffic", + "encode", + "y", + "color", + "transform", + "type", + "coordinate", + "type", + "outerRadius", + "innerRadius", + "interaction", + "elementHoverScale", + "tooltip", + "labels", + "text", + "position", + "connector" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval", + "interaction", + "x6.labels" + ] + } + } + }, + { + "id": "case-112", + "query": "根据描述绘制图表,使用柱状图展示美国各州不同年龄段的人口分布情况,数据经过排序和分组处理,仅显示人口总数排名前六的州。通过颜色区分不同的年龄组,鼠标悬停时共享提示框会显示详细信息。参考数据:[{\"state\":\"AL\",\"age\":\"<10\",\"population\":598478},{\"state\":\"AK\",\"age\":\"<10\",\"population\":106741},{\"state\":\"AZ\",\"age\":\"<10\",\"population\":892083},{\"state\":\"AR\",\"age\":\"<10\",\"population\":392177},{\"state\":\"CA\",\"age\":\"<10\",\"population\":5038433},{\"state\":\"CO\",\"age\":\"<10\",\"population\":690830},{\"state\":\"CT\",\"age\":\"<10\",\"population\":399369},{\"state\":\"DE\",\"age\":\"<10\",\"population\":112177},{\"state\":\"DC\",\"age\":\"<10\",\"population\":74377},{\"state\":\"FL\",\"age\":\"<10\",\"population\":2211012}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'interval',\n data: {\n type: 'inline',\n value: [\n {\n \"state\": \"AL\",\n \"age\": \"<10\",\n \"population\": 598478\n },\n {\n \"state\": \"AK\",\n \"age\": \"<10\",\n \"population\": 106741\n },\n {\n \"state\": \"AZ\",\n \"age\": \"<10\",\n \"population\": 892083\n },\n {\n \"state\": \"AR\",\n \"age\": \"<10\",\n \"population\": 392177\n },\n {\n \"state\": \"CA\",\n \"age\": \"<10\",\n \"population\": 5038433\n },\n {\n \"state\": \"CO\",\n \"age\": \"<10\",\n \"population\": 690830\n },\n {\n \"state\": \"CT\",\n \"age\": \"<10\",\n \"population\": 399369\n },\n {\n \"state\": \"DE\",\n \"age\": \"<10\",\n \"population\": 112177\n },\n {\n \"state\": \"DC\",\n \"age\": \"<10\",\n \"population\": 74377\n },\n {\n \"state\": \"FL\",\n \"age\": \"<10\",\n \"population\": 2211012\n },\n {\n \"state\": \"GA\",\n \"age\": \"<10\",\n \"population\": 1363631\n },\n {\n \"state\": \"HI\",\n \"age\": \"<10\",\n \"population\": 176484\n },\n {\n \"state\": \"ID\",\n \"age\": \"<10\",\n \"population\": 236658\n },\n {\n \"state\": \"IL\",\n \"age\": \"<10\",\n \"population\": 1619682\n },\n {\n \"state\": \"IN\",\n \"age\": \"<10\",\n \"population\": 863029\n },\n {\n \"state\": \"IA\",\n \"age\": \"<10\",\n \"population\": 401712\n },\n {\n \"state\": \"KS\",\n \"age\": \"<10\",\n \"population\": 401751\n },\n {\n \"state\": \"KY\",\n \"age\": \"<10\",\n \"population\": 555615\n },\n {\n \"state\": \"LA\",\n \"age\": \"<10\",\n \"population\": 622061\n },\n {\n \"state\": \"ME\",\n \"age\": \"<10\",\n \"population\": 137954\n },\n {\n \"state\": \"MD\",\n \"age\": \"<10\",\n \"population\": 741952\n },\n {\n \"state\": \"MA\",\n \"age\": \"<10\",\n \"population\": 737748\n },\n {\n \"state\": \"MI\",\n \"age\": \"<10\",\n \"population\": 1181424\n },\n {\n \"state\": \"MN\",\n \"age\": \"<10\",\n \"population\": 711604\n },\n {\n \"state\": \"MS\",\n \"age\": \"<10\",\n \"population\": 400288\n },\n {\n \"state\": \"MO\",\n \"age\": \"<10\",\n \"population\": 763948\n },\n {\n \"state\": \"MT\",\n \"age\": \"<10\",\n \"population\": 126020\n },\n {\n \"state\": \"NE\",\n \"age\": \"<10\",\n \"population\": 263518\n },\n {\n \"state\": \"NV\",\n \"age\": \"<10\",\n \"population\": 369362\n },\n {\n \"state\": \"NH\",\n \"age\": \"<10\",\n \"population\": 138762\n },\n {\n \"state\": \"NJ\",\n \"age\": \"<10\",\n \"population\": 1079136\n },\n {\n \"state\": \"NM\",\n \"age\": \"<10\",\n \"population\": 276468\n },\n {\n \"state\": \"NY\",\n \"age\": \"<10\",\n \"population\": 2319945\n },\n {\n \"state\": \"NC\",\n \"age\": \"<10\",\n \"population\": 1250298\n },\n {\n \"state\": \"ND\",\n \"age\": \"<10\",\n \"population\": 99477\n },\n {\n \"state\": \"OH\",\n \"age\": \"<10\",\n \"population\": 1422838\n },\n {\n \"state\": \"OK\",\n \"age\": \"<10\",\n \"population\": 534481\n },\n {\n \"state\": \"OR\",\n \"age\": \"<10\",\n \"population\": 474456\n },\n {\n \"state\": \"PA\",\n \"age\": \"<10\",\n \"population\": 1458931\n },\n {\n \"state\": \"RI\",\n \"age\": \"<10\",\n \"population\": 111377\n },\n {\n \"state\": \"SC\",\n \"age\": \"<10\",\n \"population\": 599591\n },\n {\n \"state\": \"SD\",\n \"age\": \"<10\",\n \"population\": 120366\n },\n {\n \"state\": \"TN\",\n \"age\": \"<10\",\n \"population\": 818404\n },\n {\n \"state\": \"TX\",\n \"age\": \"<10\",\n \"population\": 3983091\n },\n {\n \"state\": \"UT\",\n \"age\": \"<10\",\n \"population\": 513515\n },\n {\n \"state\": \"VT\",\n \"age\": \"<10\",\n \"population\": 63768\n },\n {\n \"state\": \"VA\",\n \"age\": \"<10\",\n \"population\": 1033629\n },\n {\n \"state\": \"WA\",\n \"age\": \"<10\",\n \"population\": 895790\n },\n {\n \"state\": \"WV\",\n \"age\": \"<10\",\n \"population\": 207017\n },\n {\n \"state\": \"WI\",\n \"age\": \"<10\",\n \"population\": 705648\n },\n {\n \"state\": \"WY\",\n \"age\": \"<10\",\n \"population\": 78217\n },\n {\n \"state\": \"PR\",\n \"age\": \"<10\",\n \"population\": 389428\n },\n {\n \"state\": \"AL\",\n \"age\": \"10-19\",\n \"population\": 638789\n },\n {\n \"state\": \"AK\",\n \"age\": \"10-19\",\n \"population\": 99926\n },\n {\n \"state\": \"AZ\",\n \"age\": \"10-19\",\n \"population\": 912735\n },\n {\n \"state\": \"AR\",\n \"age\": \"10-19\",\n \"population\": 397185\n },\n {\n \"state\": \"CA\",\n \"age\": \"10-19\",\n \"population\": 5170341\n },\n {\n \"state\": \"CO\",\n \"age\": \"10-19\",\n \"population\": 697447\n },\n {\n \"state\": \"CT\",\n \"age\": \"10-19\",\n \"population\": 481065\n },\n {\n \"state\": \"DE\",\n \"age\": \"10-19\",\n \"population\": 117854\n },\n {\n \"state\": \"DC\",\n \"age\": \"10-19\",\n \"population\": 62783\n },\n {\n \"state\": \"FL\",\n \"age\": \"10-19\",\n \"population\": 2331102\n },\n {\n \"state\": \"GA\",\n \"age\": \"10-19\",\n \"population\": 1421557\n },\n {\n \"state\": \"HI\",\n \"age\": \"10-19\",\n \"population\": 163559\n },\n {\n \"state\": \"ID\",\n \"age\": \"10-19\",\n \"population\": 239509\n },\n {\n \"state\": \"IL\",\n \"age\": \"10-19\",\n \"population\": 1715984\n },\n {\n \"state\": \"IN\",\n \"age\": \"10-19\",\n \"population\": 905594\n },\n {\n \"state\": \"IA\",\n \"age\": \"10-19\",\n \"population\": 418667\n },\n {\n \"state\": \"KS\",\n \"age\": \"10-19\",\n \"population\": 402092\n },\n {\n \"state\": \"KY\",\n \"age\": \"10-19\",\n \"population\": 575866\n },\n {\n \"state\": \"LA\",\n \"age\": \"10-19\",\n \"population\": 613633\n },\n {\n \"state\": \"ME\",\n \"age\": \"10-19\",\n \"population\": 155774\n },\n {\n \"state\": \"MD\",\n \"age\": \"10-19\",\n \"population\": 764730\n },\n {\n \"state\": \"MA\",\n \"age\": \"10-19\",\n \"population\": 862371\n },\n {\n \"state\": \"MI\",\n \"age\": \"10-19\",\n \"population\": 1324071\n },\n {\n \"state\": \"MN\",\n \"age\": \"10-19\",\n \"population\": 714399\n },\n {\n \"state\": \"MS\",\n \"age\": \"10-19\",\n \"population\": 421329\n },\n {\n \"state\": \"MO\",\n \"age\": \"10-19\",\n \"population\": 792935\n },\n {\n \"state\": \"MT\",\n \"age\": \"10-19\",\n \"population\": 126294\n },\n {\n \"state\": \"NE\",\n \"age\": \"10-19\",\n \"population\": 257610\n },\n {\n \"state\": \"NV\",\n \"age\": \"10-19\",\n \"population\": 360263\n },\n {\n \"state\": \"NH\",\n \"age\": \"10-19\",\n \"population\": 167495\n },\n {\n \"state\": \"NJ\",\n \"age\": \"10-19\",\n \"population\": 1153625\n },\n {\n \"state\": \"NM\",\n \"age\": \"10-19\",\n \"population\": 282662\n },\n {\n \"state\": \"NY\",\n \"age\": \"10-19\",\n \"population\": 2445591\n },\n {\n \"state\": \"NC\",\n \"age\": \"10-19\",\n \"population\": 1310398\n },\n {\n \"state\": \"ND\",\n \"age\": \"10-19\",\n \"population\": 91069\n },\n {\n \"state\": \"OH\",\n \"age\": \"10-19\",\n \"population\": 1530264\n },\n {\n \"state\": \"OK\",\n \"age\": \"10-19\",\n \"population\": 522282\n },\n {\n \"state\": \"OR\",\n \"age\": \"10-19\",\n \"population\": 485345\n },\n {\n \"state\": \"PA\",\n \"age\": \"10-19\",\n \"population\": 1608018\n },\n {\n \"state\": \"RI\",\n \"age\": \"10-19\",\n \"population\": 136885\n },\n {\n \"state\": \"SC\",\n \"age\": \"10-19\",\n \"population\": 619144\n },\n {\n \"state\": \"SD\",\n \"age\": \"10-19\",\n \"population\": 113383\n },\n {\n \"state\": \"TN\",\n \"age\": \"10-19\",\n \"population\": 842873\n },\n {\n \"state\": \"TX\",\n \"age\": \"10-19\",\n \"population\": 3910528\n },\n {\n \"state\": \"UT\",\n \"age\": \"10-19\",\n \"population\": 479126\n },\n {\n \"state\": \"VT\",\n \"age\": \"10-19\",\n \"population\": 79351\n },\n {\n \"state\": \"VA\",\n \"age\": \"10-19\",\n \"population\": 1065461\n },\n {\n \"state\": \"WA\",\n \"age\": \"10-19\",\n \"population\": 882812\n },\n {\n \"state\": \"WV\",\n \"age\": \"10-19\",\n \"population\": 218547\n },\n {\n \"state\": \"WI\",\n \"age\": \"10-19\",\n \"population\": 755224\n },\n {\n \"state\": \"WY\",\n \"age\": \"10-19\",\n \"population\": 75535\n },\n {\n \"state\": \"PR\",\n \"age\": \"10-19\",\n \"population\": 479749\n },\n {\n \"state\": \"AL\",\n \"age\": \"20-29\",\n \"population\": 661666\n },\n {\n \"state\": \"AK\",\n \"age\": \"20-29\",\n \"population\": 120674\n },\n {\n \"state\": \"AZ\",\n \"age\": \"20-29\",\n \"population\": 939804\n },\n {\n \"state\": \"AR\",\n \"age\": \"20-29\",\n \"population\": 399698\n },\n {\n \"state\": \"CA\",\n \"age\": \"20-29\",\n \"population\": 5809455\n },\n {\n \"state\": \"CO\",\n \"age\": \"20-29\",\n \"population\": 780508\n },\n {\n \"state\": \"CT\",\n \"age\": \"20-29\",\n \"population\": 462323\n },\n {\n \"state\": \"DE\",\n \"age\": \"20-29\",\n \"population\": 127554\n },\n {\n \"state\": \"DC\",\n \"age\": \"20-29\",\n \"population\": 136976\n },\n {\n \"state\": \"FL\",\n \"age\": \"20-29\",\n \"population\": 2597830\n },\n {\n \"state\": \"GA\",\n \"age\": \"20-29\",\n \"population\": 1418696\n },\n {\n \"state\": \"HI\",\n \"age\": \"20-29\",\n \"population\": 204336\n },\n {\n \"state\": \"ID\",\n \"age\": \"20-29\",\n \"population\": 218684\n },\n {\n \"state\": \"IL\",\n \"age\": \"20-29\",\n \"population\": 1789739\n },\n {\n \"state\": \"IN\",\n \"age\": \"20-29\",\n \"population\": 905590\n },\n {\n \"state\": \"IA\",\n \"age\": \"20-29\",\n \"population\": 419456\n },\n {\n \"state\": \"KS\",\n \"age\": \"20-29\",\n \"population\": 406956\n },\n {\n \"state\": \"KY\",\n \"age\": \"20-29\",\n \"population\": 593819\n },\n {\n \"state\": \"LA\",\n \"age\": \"20-29\",\n \"population\": 683606\n },\n {\n \"state\": \"ME\",\n \"age\": \"20-29\",\n \"population\": 156359\n },\n {\n \"state\": \"MD\",\n \"age\": \"20-29\",\n \"population\": 815346\n },\n {\n \"state\": \"MA\",\n \"age\": \"20-29\",\n \"population\": 971340\n },\n {\n \"state\": \"MI\",\n \"age\": \"20-29\",\n \"population\": 1338179\n },\n {\n \"state\": \"MN\",\n \"age\": \"20-29\",\n \"population\": 728222\n },\n {\n \"state\": \"MS\",\n \"age\": \"20-29\",\n \"population\": 414195\n },\n {\n \"state\": \"MO\",\n \"age\": \"20-29\",\n \"population\": 831725\n },\n {\n \"state\": \"MT\",\n \"age\": \"20-29\",\n \"population\": 136346\n },\n {\n \"state\": \"NE\",\n \"age\": \"20-29\",\n \"population\": 260646\n },\n {\n \"state\": \"NV\",\n \"age\": \"20-29\",\n \"population\": 392834\n },\n {\n \"state\": \"NH\",\n \"age\": \"20-29\",\n \"population\": 167554\n },\n {\n \"state\": \"NJ\",\n \"age\": \"20-29\",\n \"population\": 1139927\n },\n {\n \"state\": \"NM\",\n \"age\": \"20-29\",\n \"population\": 289801\n },\n {\n \"state\": \"NY\",\n \"age\": \"20-29\",\n \"population\": 2894266\n },\n {\n \"state\": \"NC\",\n \"age\": \"20-29\",\n \"population\": 1350242\n },\n {\n \"state\": \"ND\",\n \"age\": \"20-29\",\n \"population\": 124509\n },\n {\n \"state\": \"OH\",\n \"age\": \"20-29\",\n \"population\": 1535538\n },\n {\n \"state\": \"OK\",\n \"age\": \"20-29\",\n \"population\": 552528\n },\n {\n \"state\": \"OR\",\n \"age\": \"20-29\",\n \"population\": 538596\n },\n {\n \"state\": \"PA\",\n \"age\": \"20-29\",\n \"population\": 1712448\n },\n {\n \"state\": \"RI\",\n \"age\": \"20-29\",\n \"population\": 153674\n },\n {\n \"state\": \"SC\",\n \"age\": \"20-29\",\n \"population\": 667523\n },\n {\n \"state\": \"SD\",\n \"age\": \"20-29\",\n \"population\": 116748\n },\n {\n \"state\": \"TN\",\n \"age\": \"20-29\",\n \"population\": 895337\n },\n {\n \"state\": \"TX\",\n \"age\": \"20-29\",\n \"population\": 3946447\n },\n {\n \"state\": \"UT\",\n \"age\": \"20-29\",\n \"population\": 465219\n },\n {\n \"state\": \"VT\",\n \"age\": \"20-29\",\n \"population\": 81765\n },\n {\n \"state\": \"VA\",\n \"age\": \"20-29\",\n \"population\": 1170634\n },\n {\n \"state\": \"WA\",\n \"age\": \"20-29\",\n \"population\": 1004428\n },\n {\n \"state\": \"WV\",\n \"age\": \"20-29\",\n \"population\": 232027\n },\n {\n \"state\": \"WI\",\n \"age\": \"20-29\",\n \"population\": 760961\n },\n {\n \"state\": \"WY\",\n \"age\": \"20-29\",\n \"population\": 82898\n },\n {\n \"state\": \"PR\",\n \"age\": \"20-29\",\n \"population\": 480184\n },\n {\n \"state\": \"AL\",\n \"age\": \"30-39\",\n \"population\": 603013\n },\n {\n \"state\": \"AK\",\n \"age\": \"30-39\",\n \"population\": 102008\n },\n {\n \"state\": \"AZ\",\n \"age\": \"30-39\",\n \"population\": 857054\n },\n {\n \"state\": \"AR\",\n \"age\": \"30-39\",\n \"population\": 372998\n },\n {\n \"state\": \"CA\",\n \"age\": \"30-39\",\n \"population\": 5354112\n },\n {\n \"state\": \"CO\",\n \"age\": \"30-39\",\n \"population\": 766382\n },\n {\n \"state\": \"CT\",\n \"age\": \"30-39\",\n \"population\": 424890\n },\n {\n \"state\": \"DE\",\n \"age\": \"30-39\",\n \"population\": 114063\n },\n {\n \"state\": \"DC\",\n \"age\": \"30-39\",\n \"population\": 121520\n },\n {\n \"state\": \"FL\",\n \"age\": \"30-39\",\n \"population\": 2416176\n },\n {\n \"state\": \"GA\",\n \"age\": \"30-39\",\n \"population\": 1357210\n },\n {\n \"state\": \"HI\",\n \"age\": \"30-39\",\n \"population\": 187590\n },\n {\n \"state\": \"ID\",\n \"age\": \"30-39\",\n \"population\": 209500\n },\n {\n \"state\": \"IL\",\n \"age\": \"30-39\",\n \"population\": 1721954\n },\n {\n \"state\": \"IN\",\n \"age\": \"30-39\",\n \"population\": 827086\n },\n {\n \"state\": \"IA\",\n \"age\": \"30-39\",\n \"population\": 383638\n },\n {\n \"state\": \"KS\",\n \"age\": \"30-39\",\n \"population\": 368732\n },\n {\n \"state\": \"KY\",\n \"age\": \"30-39\",\n \"population\": 558201\n },\n {\n \"state\": \"LA\",\n \"age\": \"30-39\",\n \"population\": 615411\n },\n {\n \"state\": \"ME\",\n \"age\": \"30-39\",\n \"population\": 147695\n },\n {\n \"state\": \"MD\",\n \"age\": \"30-39\",\n \"population\": 784097\n },\n {\n \"state\": \"MA\",\n \"age\": \"30-39\",\n \"population\": 847306\n },\n {\n \"state\": \"MI\",\n \"age\": \"30-39\",\n \"population\": 1162186\n },\n {\n \"state\": \"MN\",\n \"age\": \"30-39\",\n \"population\": 715583\n },\n {\n \"state\": \"MS\",\n \"age\": \"30-39\",\n \"population\": 374724\n },\n {\n \"state\": \"MO\",\n \"age\": \"30-39\",\n \"population\": 763002\n },\n {\n \"state\": \"MT\",\n \"age\": \"30-39\",\n \"population\": 125004\n },\n {\n \"state\": \"NE\",\n \"age\": \"30-39\",\n \"population\": 244236\n },\n {\n \"state\": \"NV\",\n \"age\": \"30-39\",\n \"population\": 390261\n },\n {\n \"state\": \"NH\",\n \"age\": \"30-39\",\n \"population\": 151409\n },\n {\n \"state\": \"NJ\",\n \"age\": \"30-39\",\n \"population\": 1143452\n },\n {\n \"state\": \"NM\",\n \"age\": \"30-39\",\n \"population\": 260579\n },\n {\n \"state\": \"NY\",\n \"age\": \"30-39\",\n \"population\": 2605355\n },\n {\n \"state\": \"NC\",\n \"age\": \"30-39\",\n \"population\": 1268976\n },\n {\n \"state\": \"ND\",\n \"age\": \"30-39\",\n \"population\": 94713\n },\n {\n \"state\": \"OH\",\n \"age\": \"30-39\",\n \"population\": 1398724\n },\n {\n \"state\": \"OK\",\n \"age\": \"30-39\",\n \"population\": 501392\n },\n {\n \"state\": \"OR\",\n \"age\": \"30-39\",\n \"population\": 537767\n },\n {\n \"state\": \"PA\",\n \"age\": \"30-39\",\n \"population\": 1520409\n },\n {\n \"state\": \"RI\",\n \"age\": \"30-39\",\n \"population\": 126503\n },\n {\n \"state\": \"SC\",\n \"age\": \"30-39\",\n \"population\": 596491\n },\n {\n \"state\": \"SD\",\n \"age\": \"30-39\",\n \"population\": 105499\n },\n {\n \"state\": \"TN\",\n \"age\": \"30-39\",\n \"population\": 837313\n },\n {\n \"state\": \"TX\",\n \"age\": \"30-39\",\n \"population\": 3770534\n },\n {\n \"state\": \"UT\",\n \"age\": \"30-39\",\n \"population\": 436010\n },\n {\n \"state\": \"VT\",\n \"age\": \"30-39\",\n \"population\": 70092\n },\n {\n \"state\": \"VA\",\n \"age\": \"30-39\",\n \"population\": 1112111\n },\n {\n \"state\": \"WA\",\n \"age\": \"30-39\",\n \"population\": 970613\n },\n {\n \"state\": \"WV\",\n \"age\": \"30-39\",\n \"population\": 220494\n },\n {\n \"state\": \"WI\",\n \"age\": \"30-39\",\n \"population\": 714479\n },\n {\n \"state\": \"WY\",\n \"age\": \"30-39\",\n \"population\": 76912\n },\n {\n \"state\": \"PR\",\n \"age\": \"30-39\",\n \"population\": 441842\n },\n {\n \"state\": \"AL\",\n \"age\": \"40-49\",\n \"population\": 625599\n },\n {\n \"state\": \"AK\",\n \"age\": \"40-49\",\n \"population\": 91539\n },\n {\n \"state\": \"AZ\",\n \"age\": \"40-49\",\n \"population\": 833290\n },\n {\n \"state\": \"AR\",\n \"age\": \"40-49\",\n \"population\": 370157\n },\n {\n \"state\": \"CA\",\n \"age\": \"40-49\",\n \"population\": 5179258\n },\n {\n \"state\": \"CO\",\n \"age\": \"40-49\",\n \"population\": 705450\n },\n {\n \"state\": \"CT\",\n \"age\": \"40-49\",\n \"population\": 496265\n },\n {\n \"state\": \"DE\",\n \"age\": \"40-49\",\n \"population\": 117588\n },\n {\n \"state\": \"DC\",\n \"age\": \"40-49\",\n \"population\": 80570\n },\n {\n \"state\": \"FL\",\n \"age\": \"40-49\",\n \"population\": 2575576\n },\n {\n \"state\": \"GA\",\n \"age\": \"40-49\",\n \"population\": 1404698\n },\n {\n \"state\": \"HI\",\n \"age\": \"40-49\",\n \"population\": 176904\n },\n {\n \"state\": \"ID\",\n \"age\": \"40-49\",\n \"population\": 194678\n },\n {\n \"state\": \"IL\",\n \"age\": \"40-49\",\n \"population\": 1697069\n },\n {\n \"state\": \"IN\",\n \"age\": \"40-49\",\n \"population\": 844059\n },\n {\n \"state\": \"IA\",\n \"age\": \"40-49\",\n \"population\": 370719\n },\n {\n \"state\": \"KS\",\n \"age\": \"40-49\",\n \"population\": 344427\n },\n {\n \"state\": \"KY\",\n \"age\": \"40-49\",\n \"population\": 580553\n },\n {\n \"state\": \"LA\",\n \"age\": \"40-49\",\n \"population\": 571991\n },\n {\n \"state\": \"ME\",\n \"age\": \"40-49\",\n \"population\": 176908\n },\n {\n \"state\": \"MD\",\n \"age\": \"40-49\",\n \"population\": 815875\n },\n {\n \"state\": \"MA\",\n \"age\": \"40-49\",\n \"population\": 916106\n },\n {\n \"state\": \"MI\",\n \"age\": \"40-49\",\n \"population\": 1283122\n },\n {\n \"state\": \"MN\",\n \"age\": \"40-49\",\n \"population\": 692201\n },\n {\n \"state\": \"MS\",\n \"age\": \"40-49\",\n \"population\": 377165\n },\n {\n \"state\": \"MO\",\n \"age\": \"40-49\",\n \"population\": 750989\n },\n {\n \"state\": \"MT\",\n \"age\": \"40-49\",\n \"population\": 116502\n },\n {\n \"state\": \"NE\",\n \"age\": \"40-49\",\n \"population\": 222479\n },\n {\n \"state\": \"NV\",\n \"age\": \"40-49\",\n \"population\": 387272\n },\n {\n \"state\": \"NH\",\n \"age\": \"40-49\",\n \"population\": 182703\n },\n {\n \"state\": \"NJ\",\n \"age\": \"40-49\",\n \"population\": 1254602\n },\n {\n \"state\": \"NM\",\n \"age\": \"40-49\",\n \"population\": 244346\n },\n {\n \"state\": \"NY\",\n \"age\": \"40-49\",\n \"population\": 2617327\n },\n {\n \"state\": \"NC\",\n \"age\": \"40-49\",\n \"population\": 1357746\n },\n {\n \"state\": \"ND\",\n \"age\": \"40-49\",\n \"population\": 80327\n },\n {\n \"state\": \"OH\",\n \"age\": \"40-49\",\n \"population\": 1490959\n },\n {\n \"state\": \"OK\",\n \"age\": \"40-49\",\n \"population\": 469410\n },\n {\n \"state\": \"OR\",\n \"age\": \"40-49\",\n \"population\": 507826\n },\n {\n \"state\": \"PA\",\n \"age\": \"40-49\",\n \"population\": 1645291\n },\n {\n \"state\": \"RI\",\n \"age\": \"40-49\",\n \"population\": 137892\n },\n {\n \"state\": \"SC\",\n \"age\": \"40-49\",\n \"population\": 619792\n },\n {\n \"state\": \"SD\",\n \"age\": \"40-49\",\n \"population\": 96288\n },\n {\n \"state\": \"TN\",\n \"age\": \"40-49\",\n \"population\": 866343\n },\n {\n \"state\": \"TX\",\n \"age\": \"40-49\",\n \"population\": 3545746\n },\n {\n \"state\": \"UT\",\n \"age\": \"40-49\",\n \"population\": 328569\n },\n {\n \"state\": \"VT\",\n \"age\": \"40-49\",\n \"population\": 79982\n },\n {\n \"state\": \"VA\",\n \"age\": \"40-49\",\n \"population\": 1134928\n },\n {\n \"state\": \"WA\",\n \"age\": \"40-49\",\n \"population\": 921205\n },\n {\n \"state\": \"WV\",\n \"age\": \"40-49\",\n \"population\": 238218\n },\n {\n \"state\": \"WI\",\n \"age\": \"40-49\",\n \"population\": 732280\n },\n {\n \"state\": \"WY\",\n \"age\": \"40-49\",\n \"population\": 68464\n },\n {\n \"state\": \"PR\",\n \"age\": \"40-49\",\n \"population\": 456009\n },\n {\n \"state\": \"AL\",\n \"age\": \"50-59\",\n \"population\": 673864\n },\n {\n \"state\": \"AK\",\n \"age\": \"50-59\",\n \"population\": 104569\n },\n {\n \"state\": \"AZ\",\n \"age\": \"50-59\",\n \"population\": 834858\n },\n {\n \"state\": \"AR\",\n \"age\": \"50-59\",\n \"population\": 395070\n },\n {\n \"state\": \"CA\",\n \"age\": \"50-59\",\n \"population\": 5042094\n },\n {\n \"state\": \"CO\",\n \"age\": \"50-59\",\n \"population\": 725661\n },\n {\n \"state\": \"CT\",\n \"age\": \"50-59\",\n \"population\": 546361\n },\n {\n \"state\": \"DE\",\n \"age\": \"50-59\",\n \"population\": 133331\n },\n {\n \"state\": \"DC\",\n \"age\": \"50-59\",\n \"population\": 74779\n },\n {\n \"state\": \"FL\",\n \"age\": \"50-59\",\n \"population\": 2762983\n },\n {\n \"state\": \"GA\",\n \"age\": \"50-59\",\n \"population\": 1337985\n },\n {\n \"state\": \"HI\",\n \"age\": \"50-59\",\n \"population\": 188438\n },\n {\n \"state\": \"ID\",\n \"age\": \"50-59\",\n \"population\": 205170\n },\n {\n \"state\": \"IL\",\n \"age\": \"50-59\",\n \"population\": 1773366\n },\n {\n \"state\": \"IN\",\n \"age\": \"50-59\",\n \"population\": 911778\n },\n {\n \"state\": \"IA\",\n \"age\": \"50-59\",\n \"population\": 427554\n },\n {\n \"state\": \"KS\",\n \"age\": \"50-59\",\n \"population\": 389834\n },\n {\n \"state\": \"KY\",\n \"age\": \"50-59\",\n \"population\": 623164\n },\n {\n \"state\": \"LA\",\n \"age\": \"50-59\",\n \"population\": 631936\n },\n {\n \"state\": \"ME\",\n \"age\": \"50-59\",\n \"population\": 215787\n },\n {\n \"state\": \"MD\",\n \"age\": \"50-59\",\n \"population\": 862778\n },\n {\n \"state\": \"MA\",\n \"age\": \"50-59\",\n \"population\": 979128\n },\n {\n \"state\": \"MI\",\n \"age\": \"50-59\",\n \"population\": 1454462\n },\n {\n \"state\": \"MN\",\n \"age\": \"50-59\",\n \"population\": 782655\n },\n {\n \"state\": \"MS\",\n \"age\": \"50-59\",\n \"population\": 400164\n },\n {\n \"state\": \"MO\",\n \"age\": \"50-59\",\n \"population\": 857534\n },\n {\n \"state\": \"MT\",\n \"age\": \"50-59\",\n \"population\": 149800\n },\n {\n \"state\": \"NE\",\n \"age\": \"50-59\",\n \"population\": 250911\n },\n {\n \"state\": \"NV\",\n \"age\": \"50-59\",\n \"population\": 373757\n },\n {\n \"state\": \"NH\",\n \"age\": \"50-59\",\n \"population\": 217950\n },\n {\n \"state\": \"NJ\",\n \"age\": \"50-59\",\n \"population\": 1307263\n },\n {\n \"state\": \"NM\",\n \"age\": \"50-59\",\n \"population\": 280363\n },\n {\n \"state\": \"NY\",\n \"age\": \"50-59\",\n \"population\": 2755620\n },\n {\n \"state\": \"NC\",\n \"age\": \"50-59\",\n \"population\": 1356117\n },\n {\n \"state\": \"ND\",\n \"age\": \"50-59\",\n \"population\": 98688\n },\n {\n \"state\": \"OH\",\n \"age\": \"50-59\",\n \"population\": 1677794\n },\n {\n \"state\": \"OK\",\n \"age\": \"50-59\",\n \"population\": 512850\n },\n {\n \"state\": \"OR\",\n \"age\": \"50-59\",\n \"population\": 534421\n },\n {\n \"state\": \"PA\",\n \"age\": \"50-59\",\n \"population\": 1881378\n },\n {\n \"state\": \"RI\",\n \"age\": \"50-59\",\n \"population\": 156127\n },\n {\n \"state\": \"SC\",\n \"age\": \"50-59\",\n \"population\": 663408\n },\n {\n \"state\": \"SD\",\n \"age\": \"50-59\",\n \"population\": 117012\n },\n {\n \"state\": \"TN\",\n \"age\": \"50-59\",\n \"population\": 904272\n },\n {\n \"state\": \"TX\",\n \"age\": \"50-59\",\n \"population\": 3344930\n },\n {\n \"state\": \"UT\",\n \"age\": \"50-59\",\n \"population\": 301596\n },\n {\n \"state\": \"VT\",\n \"age\": \"50-59\",\n \"population\": 99521\n },\n {\n \"state\": \"VA\",\n \"age\": \"50-59\",\n \"population\": 1162028\n },\n {\n \"state\": \"WA\",\n \"age\": \"50-59\",\n \"population\": 970407\n },\n {\n \"state\": \"WV\",\n \"age\": \"50-59\",\n \"population\": 269346\n },\n {\n \"state\": \"WI\",\n \"age\": \"50-59\",\n \"population\": 848672\n },\n {\n \"state\": \"WY\",\n \"age\": \"50-59\",\n \"population\": 81018\n },\n {\n \"state\": \"PR\",\n \"age\": \"50-59\",\n \"population\": 452503\n },\n {\n \"state\": \"AL\",\n \"age\": \"60-69\",\n \"population\": 548376\n },\n {\n \"state\": \"AK\",\n \"age\": \"60-69\",\n \"population\": 70473\n },\n {\n \"state\": \"AZ\",\n \"age\": \"60-69\",\n \"population\": 737884\n },\n {\n \"state\": \"AR\",\n \"age\": \"60-69\",\n \"population\": 329734\n },\n {\n \"state\": \"CA\",\n \"age\": \"60-69\",\n \"population\": 3737461\n },\n {\n \"state\": \"CO\",\n \"age\": \"60-69\",\n \"population\": 563376\n },\n {\n \"state\": \"CT\",\n \"age\": \"60-69\",\n \"population\": 400995\n },\n {\n \"state\": \"DE\",\n \"age\": \"60-69\",\n \"population\": 110822\n },\n {\n \"state\": \"DC\",\n \"age\": \"60-69\",\n \"population\": 56984\n },\n {\n \"state\": \"FL\",\n \"age\": \"60-69\",\n \"population\": 2404659\n },\n {\n \"state\": \"GA\",\n \"age\": \"60-69\",\n \"population\": 998253\n },\n {\n \"state\": \"HI\",\n \"age\": \"60-69\",\n \"population\": 164957\n },\n {\n \"state\": \"ID\",\n \"age\": \"60-69\",\n \"population\": 179429\n },\n {\n \"state\": \"IL\",\n \"age\": \"60-69\",\n \"population\": 1326121\n },\n {\n \"state\": \"IN\",\n \"age\": \"60-69\",\n \"population\": 704523\n },\n {\n \"state\": \"IA\",\n \"age\": \"60-69\",\n \"population\": 344037\n },\n {\n \"state\": \"KS\",\n \"age\": \"60-69\",\n \"population\": 300759\n },\n {\n \"state\": \"KY\",\n \"age\": \"60-69\",\n \"population\": 495736\n },\n {\n \"state\": \"LA\",\n \"age\": \"60-69\",\n \"population\": 488846\n },\n {\n \"state\": \"ME\",\n \"age\": \"60-69\",\n \"population\": 179540\n },\n {\n \"state\": \"MD\",\n \"age\": \"60-69\",\n \"population\": 636309\n },\n {\n \"state\": \"MA\",\n \"age\": \"60-69\",\n \"population\": 737805\n },\n {\n \"state\": \"MI\",\n \"age\": \"60-69\",\n \"population\": 1148131\n },\n {\n \"state\": \"MN\",\n \"age\": \"60-69\",\n \"population\": 577313\n },\n {\n \"state\": \"MS\",\n \"age\": \"60-69\",\n \"population\": 319443\n },\n {\n \"state\": \"MO\",\n \"age\": \"60-69\",\n \"population\": 668878\n },\n {\n \"state\": \"MT\",\n \"age\": \"60-69\",\n \"population\": 130977\n },\n {\n \"state\": \"NE\",\n \"age\": \"60-69\",\n \"population\": 195705\n },\n {\n \"state\": \"NV\",\n \"age\": \"60-69\",\n \"population\": 309651\n },\n {\n \"state\": \"NH\",\n \"age\": \"60-69\",\n \"population\": 164287\n },\n {\n \"state\": \"NJ\",\n \"age\": \"60-69\",\n \"population\": 946399\n },\n {\n \"state\": \"NM\",\n \"age\": \"60-69\",\n \"population\": 239044\n },\n {\n \"state\": \"NY\",\n \"age\": \"60-69\",\n \"population\": 2095207\n },\n {\n \"state\": \"NC\",\n \"age\": \"60-69\",\n \"population\": 1095320\n },\n {\n \"state\": \"ND\",\n \"age\": \"60-69\",\n \"population\": 73825\n },\n {\n \"state\": \"OH\",\n \"age\": \"60-69\",\n \"population\": 1320776\n },\n {\n \"state\": \"OK\",\n \"age\": \"60-69\",\n \"population\": 404704\n },\n {\n \"state\": \"OR\",\n \"age\": \"60-69\",\n \"population\": 490894\n },\n {\n \"state\": \"PA\",\n \"age\": \"60-69\",\n \"population\": 1491536\n },\n {\n \"state\": \"RI\",\n \"age\": \"60-69\",\n \"population\": 117653\n },\n {\n \"state\": \"SC\",\n \"age\": \"60-69\",\n \"population\": 579856\n },\n {\n \"state\": \"SD\",\n \"age\": \"60-69\",\n \"population\": 92824\n },\n {\n \"state\": \"TN\",\n \"age\": \"60-69\",\n \"population\": 741045\n },\n {\n \"state\": \"TX\",\n \"age\": \"60-69\",\n \"population\": 2431494\n },\n {\n \"state\": \"UT\",\n \"age\": \"60-69\",\n \"population\": 230007\n },\n {\n \"state\": \"VT\",\n \"age\": \"60-69\",\n \"population\": 82136\n },\n {\n \"state\": \"VA\",\n \"age\": \"60-69\",\n \"population\": 881763\n },\n {\n \"state\": \"WA\",\n \"age\": \"60-69\",\n \"population\": 784208\n },\n {\n \"state\": \"WV\",\n \"age\": \"60-69\",\n \"population\": 243108\n },\n {\n \"state\": \"WI\",\n \"age\": \"60-69\",\n \"population\": 645015\n },\n {\n \"state\": \"WY\",\n \"age\": \"60-69\",\n \"population\": 67484\n },\n {\n \"state\": \"PR\",\n \"age\": \"60-69\",\n \"population\": 411924\n },\n {\n \"state\": \"AL\",\n \"age\": \"70-79\",\n \"population\": 316598\n },\n {\n \"state\": \"AK\",\n \"age\": \"70-79\",\n \"population\": 28422\n },\n {\n \"state\": \"AZ\",\n \"age\": \"70-79\",\n \"population\": 466153\n },\n {\n \"state\": \"AR\",\n \"age\": \"70-79\",\n \"population\": 197985\n },\n {\n \"state\": \"CA\",\n \"age\": \"70-79\",\n \"population\": 2011678\n },\n {\n \"state\": \"CO\",\n \"age\": \"70-79\",\n \"population\": 274466\n },\n {\n \"state\": \"CT\",\n \"age\": \"70-79\",\n \"population\": 217827\n },\n {\n \"state\": \"DE\",\n \"age\": \"70-79\",\n \"population\": 65369\n },\n {\n \"state\": \"DC\",\n \"age\": \"70-79\",\n \"population\": 31362\n },\n {\n \"state\": \"FL\",\n \"age\": \"70-79\",\n \"population\": 1615547\n },\n {\n \"state\": \"GA\",\n \"age\": \"70-79\",\n \"population\": 528108\n },\n {\n \"state\": \"HI\",\n \"age\": \"70-79\",\n \"population\": 85345\n },\n {\n \"state\": \"ID\",\n \"age\": \"70-79\",\n \"population\": 97621\n },\n {\n \"state\": \"IL\",\n \"age\": \"70-79\",\n \"population\": 728821\n },\n {\n \"state\": \"IN\",\n \"age\": \"70-79\",\n \"population\": 384788\n },\n {\n \"state\": \"IA\",\n \"age\": \"70-79\",\n \"population\": 197223\n },\n {\n \"state\": \"KS\",\n \"age\": \"70-79\",\n \"population\": 166104\n },\n {\n \"state\": \"KY\",\n \"age\": \"70-79\",\n \"population\": 273961\n },\n {\n \"state\": \"LA\",\n \"age\": \"70-79\",\n \"population\": 266123\n },\n {\n \"state\": \"ME\",\n \"age\": \"70-79\",\n \"population\": 97899\n },\n {\n \"state\": \"MD\",\n \"age\": \"70-79\",\n \"population\": 330736\n },\n {\n \"state\": \"MA\",\n \"age\": \"70-79\",\n \"population\": 401931\n },\n {\n \"state\": \"MI\",\n \"age\": \"70-79\",\n \"population\": 619722\n },\n {\n \"state\": \"MN\",\n \"age\": \"70-79\",\n \"population\": 312906\n },\n {\n \"state\": \"MS\",\n \"age\": \"70-79\",\n \"population\": 181195\n },\n {\n \"state\": \"MO\",\n \"age\": \"70-79\",\n \"population\": 388086\n },\n {\n \"state\": \"MT\",\n \"age\": \"70-79\",\n \"population\": 70528\n },\n {\n \"state\": \"NE\",\n \"age\": \"70-79\",\n \"population\": 107650\n },\n {\n \"state\": \"NV\",\n \"age\": \"70-79\",\n \"population\": 173499\n },\n {\n \"state\": \"NH\",\n \"age\": \"70-79\",\n \"population\": 84791\n },\n {\n \"state\": \"NJ\",\n \"age\": \"70-79\",\n \"population\": 523620\n },\n {\n \"state\": \"NM\",\n \"age\": \"70-79\",\n \"population\": 135013\n },\n {\n \"state\": \"NY\",\n \"age\": \"70-79\",\n \"population\": 1160055\n },\n {\n \"state\": \"NC\",\n \"age\": \"70-79\",\n \"population\": 609234\n },\n {\n \"state\": \"ND\",\n \"age\": \"70-79\",\n \"population\": 41348\n },\n {\n \"state\": \"OH\",\n \"age\": \"70-79\",\n \"population\": 728158\n },\n {\n \"state\": \"OK\",\n \"age\": \"70-79\",\n \"population\": 239887\n },\n {\n \"state\": \"OR\",\n \"age\": \"70-79\",\n \"population\": 255809\n },\n {\n \"state\": \"PA\",\n \"age\": \"70-79\",\n \"population\": 850897\n },\n {\n \"state\": \"RI\",\n \"age\": \"70-79\",\n \"population\": 63359\n },\n {\n \"state\": \"SC\",\n \"age\": \"70-79\",\n \"population\": 322073\n },\n {\n \"state\": \"SD\",\n \"age\": \"70-79\",\n \"population\": 50398\n },\n {\n \"state\": \"TN\",\n \"age\": \"70-79\",\n \"population\": 414939\n },\n {\n \"state\": \"TX\",\n \"age\": \"70-79\",\n \"population\": 1291486\n },\n {\n \"state\": \"UT\",\n \"age\": \"70-79\",\n \"population\": 123674\n },\n {\n \"state\": \"VT\",\n \"age\": \"70-79\",\n \"population\": 42978\n },\n {\n \"state\": \"VA\",\n \"age\": \"70-79\",\n \"population\": 475141\n },\n {\n \"state\": \"WA\",\n \"age\": \"70-79\",\n \"population\": 401094\n },\n {\n \"state\": \"WV\",\n \"age\": \"70-79\",\n \"population\": 138134\n },\n {\n \"state\": \"WI\",\n \"age\": \"70-79\",\n \"population\": 350772\n },\n {\n \"state\": \"WY\",\n \"age\": \"70-79\",\n \"population\": 32819\n },\n {\n \"state\": \"PR\",\n \"age\": \"70-79\",\n \"population\": 268783\n },\n {\n \"state\": \"AL\",\n \"age\": \"≥80\",\n \"population\": 174781\n },\n {\n \"state\": \"AK\",\n \"age\": \"≥80\",\n \"population\": 12503\n },\n {\n \"state\": \"AZ\",\n \"age\": \"≥80\",\n \"population\": 254716\n },\n {\n \"state\": \"AR\",\n \"age\": \"≥80\",\n \"population\": 113468\n },\n {\n \"state\": \"CA\",\n \"age\": \"≥80\",\n \"population\": 1311374\n },\n {\n \"state\": \"CO\",\n \"age\": \"≥80\",\n \"population\": 155175\n },\n {\n \"state\": \"CT\",\n \"age\": \"≥80\",\n \"population\": 159475\n },\n {\n \"state\": \"DE\",\n \"age\": \"≥80\",\n \"population\": 35937\n },\n {\n \"state\": \"DC\",\n \"age\": \"≥80\",\n \"population\": 19658\n },\n {\n \"state\": \"FL\",\n \"age\": \"≥80\",\n \"population\": 1019566\n },\n {\n \"state\": \"GA\",\n \"age\": \"≥80\",\n \"population\": 269182\n },\n {\n \"state\": \"HI\",\n \"age\": \"≥80\",\n \"population\": 66060\n },\n {\n \"state\": \"ID\",\n \"age\": \"≥80\",\n \"population\": 54234\n },\n {\n \"state\": \"IL\",\n \"age\": \"≥80\",\n \"population\": 478948\n },\n {\n \"state\": \"IN\",\n \"age\": \"≥80\",\n \"population\": 243131\n },\n {\n \"state\": \"IA\",\n \"age\": \"≥80\",\n \"population\": 143583\n },\n {\n \"state\": \"KS\",\n \"age\": \"≥80\",\n \"population\": 117637\n },\n {\n \"state\": \"KY\",\n \"age\": \"≥80\",\n \"population\": 155074\n },\n {\n \"state\": \"LA\",\n \"age\": \"≥80\",\n \"population\": 152063\n },\n {\n \"state\": \"ME\",\n \"age\": \"≥80\",\n \"population\": 62007\n },\n {\n \"state\": \"MD\",\n \"age\": \"≥80\",\n \"population\": 208079\n },\n {\n \"state\": \"MA\",\n \"age\": \"≥80\",\n \"population\": 288408\n },\n {\n \"state\": \"MI\",\n \"age\": \"≥80\",\n \"population\": 398303\n },\n {\n \"state\": \"MN\",\n \"age\": \"≥80\",\n \"population\": 215985\n },\n {\n \"state\": \"MS\",\n \"age\": \"≥80\",\n \"population\": 100689\n },\n {\n \"state\": \"MO\",\n \"age\": \"≥80\",\n \"population\": 242554\n },\n {\n \"state\": \"MT\",\n \"age\": \"≥80\",\n \"population\": 41920\n },\n {\n \"state\": \"NE\",\n \"age\": \"≥80\",\n \"population\": 78504\n },\n {\n \"state\": \"NV\",\n \"age\": \"≥80\",\n \"population\": 82273\n },\n {\n \"state\": \"NH\",\n \"age\": \"≥80\",\n \"population\": 52552\n },\n {\n \"state\": \"NJ\",\n \"age\": \"≥80\",\n \"population\": 367432\n },\n {\n \"state\": \"NM\",\n \"age\": \"≥80\",\n \"population\": 74393\n },\n {\n \"state\": \"NY\",\n \"age\": \"≥80\",\n \"population\": 804091\n },\n {\n \"state\": \"NC\",\n \"age\": \"≥80\",\n \"population\": 342497\n },\n {\n \"state\": \"ND\",\n \"age\": \"≥80\",\n \"population\": 32206\n },\n {\n \"state\": \"OH\",\n \"age\": \"≥80\",\n \"population\": 481890\n },\n {\n \"state\": \"OK\",\n \"age\": \"≥80\",\n \"population\": 138055\n },\n {\n \"state\": \"OR\",\n \"age\": \"≥80\",\n \"population\": 157153\n },\n {\n \"state\": \"PA\",\n \"age\": \"≥80\",\n \"population\": 615069\n },\n {\n \"state\": \"RI\",\n \"age\": \"≥80\",\n \"population\": 51021\n },\n {\n \"state\": \"SC\",\n \"age\": \"≥80\",\n \"population\": 166727\n },\n {\n \"state\": \"SD\",\n \"age\": \"≥80\",\n \"population\": 38540\n },\n {\n \"state\": \"TN\",\n \"age\": \"≥80\",\n \"population\": 227483\n },\n {\n \"state\": \"TX\",\n \"age\": \"≥80\",\n \"population\": 732179\n },\n {\n \"state\": \"UT\",\n \"age\": \"≥80\",\n \"population\": 70711\n },\n {\n \"state\": \"VT\",\n \"age\": \"≥80\",\n \"population\": 26656\n },\n {\n \"state\": \"VA\",\n \"age\": \"≥80\",\n \"population\": 274606\n },\n {\n \"state\": \"WA\",\n \"age\": \"≥80\",\n \"population\": 242589\n },\n {\n \"state\": \"WV\",\n \"age\": \"≥80\",\n \"population\": 79201\n },\n {\n \"state\": \"WI\",\n \"age\": \"≥80\",\n \"population\": 241747\n },\n {\n \"state\": \"WY\",\n \"age\": \"≥80\",\n \"population\": 19682\n },\n {\n \"state\": \"PR\",\n \"age\": \"≥80\",\n \"population\": 148963\n }\n ],\n format: 'csv',\n },\n encode: {\n x: 'state',\n y: 'population',\n color: 'age',\n },\n transform: [\n { type: 'sortX', by: 'y', reverse: true, reducer: 'sum', slice: 6 },\n { type: 'dodgeX' },\n ],\n legend: false,\n interaction: {\n tooltip: {\n shared: true,\n mount: 'body',\n css: {\n '.g2-tooltip': {\n background: '#eee',\n 'border-radius': ' 0.25em !important',\n },\n '.g2-tooltip-title': {\n 'font-size': '20px',\n 'font-weight': 'bold',\n 'padding-bottom': '0.25em',\n },\n '.g2-tooltip-list-item': {\n background: '#ccc',\n padding: '0.25em',\n margin: '0.25em',\n 'border-radius': '0.25em',\n },\n '.g2-tooltip-list-item-name-label': {\n 'font-weight': 'bold',\n 'font-size': '16px',\n },\n 'g2-tooltip-list-item-marker': {\n 'border-radius': '0.25em',\n width: '15px',\n height: '15px',\n },\n '.g2-tooltip-list-item-value': {\n 'font-weight': 'bold',\n 'font-size': '16px',\n },\n },\n },\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\n// 构造完整的模拟数据(包含多个州和多个年龄段)\nconst rawData = [\n // California (CA) - 总人口约 29.5M\n {\"state\":\"CA\",\"age\":\"<10\",\"population\":5038433},\n {\"state\":\"CA\",\"age\":\"10-19\",\"population\":4500000},\n {\"state\":\"CA\",\"age\":\"20-29\",\"population\":5200000},\n {\"state\":\"CA\",\"age\":\"30-39\",\"population\":4800000},\n {\"state\":\"CA\",\"age\":\"40-49\",\"population\":4500000},\n {\"state\":\"CA\",\"age\":\"50-59\",\"population\":4000000},\n {\"state\":\"CA\",\"age\":\"60+\",\"population\":3500000},\n \n // Texas (TX) - 总人口约 23.5M\n {\"state\":\"TX\",\"age\":\"<10\",\"population\":3800000},\n {\"state\":\"TX\",\"age\":\"10-19\",\"population\":3600000},\n {\"state\":\"TX\",\"age\":\"20-29\",\"population\":3900000},\n {\"state\":\"TX\",\"age\":\"30-39\",\"population\":3700000},\n {\"state\":\"TX\",\"age\":\"40-49\",\"population\":3400000},\n {\"state\":\"TX\",\"age\":\"50-59\",\"population\":3000000},\n {\"state\":\"TX\",\"age\":\"60+\",\"population\":2500000},\n \n // Florida (FL) - 总人口约 17.5M\n {\"state\":\"FL\",\"age\":\"<10\",\"population\":2211012},\n {\"state\":\"FL\",\"age\":\"10-19\",\"population\":2100000},\n {\"state\":\"FL\",\"age\":\"20-29\",\"population\":2400000},\n {\"state\":\"FL\",\"age\":\"30-39\",\"population\":2300000},\n {\"state\":\"FL\",\"age\":\"40-49\",\"population\":2500000},\n {\"state\":\"FL\",\"age\":\"50-59\",\"population\":2800000},\n {\"state\":\"FL\",\"age\":\"60+\",\"population\":3200000},\n \n // New York (NY) - 总人口约 18.3M\n {\"state\":\"NY\",\"age\":\"<10\",\"population\":2400000},\n {\"state\":\"NY\",\"age\":\"10-19\",\"population\":2600000},\n {\"state\":\"NY\",\"age\":\"20-29\",\"population\":3200000},\n {\"state\":\"NY\",\"age\":\"30-39\",\"population\":2900000},\n {\"state\":\"NY\",\"age\":\"40-49\",\"population\":2800000},\n {\"state\":\"NY\",\"age\":\"50-59\",\"population\":2600000},\n {\"state\":\"NY\",\"age\":\"60+\",\"population\":2400000},\n \n // Pennsylvania (PA) - 总人口约 12.8M\n {\"state\":\"PA\",\"age\":\"<10\",\"population\":1500000},\n {\"state\":\"PA\",\"age\":\"10-19\",\"population\":1600000},\n {\"state\":\"PA\",\"age\":\"20-29\",\"population\":1800000},\n {\"state\":\"PA\",\"age\":\"30-39\",\"population\":1700000},\n {\"state\":\"PA\",\"age\":\"40-49\",\"population\":1900000},\n {\"state\":\"PA\",\"age\":\"50-59\",\"population\":2000000},\n {\"state\":\"PA\",\"age\":\"60+\",\"population\":2100000},\n \n // Illinois (IL) - 总人口约 12.1M\n {\"state\":\"IL\",\"age\":\"<10\",\"population\":1600000},\n {\"state\":\"IL\",\"age\":\"10-19\",\"population\":1700000},\n {\"state\":\"IL\",\"age\":\"20-29\",\"population\":1900000},\n {\"state\":\"IL\",\"age\":\"30-39\",\"population\":1800000},\n {\"state\":\"IL\",\"age\":\"40-49\",\"population\":1700000},\n {\"state\":\"IL\",\"age\":\"50-59\",\"population\":1600000},\n {\"state\":\"IL\",\"age\":\"60+\",\"population\":1500000},\n \n // Ohio (OH) - 总人口约 11.7M(第7名,应被过滤)\n {\"state\":\"OH\",\"age\":\"<10\",\"population\":1400000},\n {\"state\":\"OH\",\"age\":\"10-19\",\"population\":1500000},\n {\"state\":\"OH\",\"age\":\"20-29\",\"population\":1600000},\n {\"state\":\"OH\",\"age\":\"30-39\",\"population\":1500000},\n {\"state\":\"OH\",\"age\":\"40-49\",\"population\":1600000},\n {\"state\":\"OH\",\"age\":\"50-59\",\"population\":1700000},\n {\"state\":\"OH\",\"age\":\"60+\",\"population\":1800000},\n \n // Georgia (GA) - 总人口约 10.8M(第8名,应被过滤)\n {\"state\":\"GA\",\"age\":\"<10\",\"population\":1300000},\n {\"state\":\"GA\",\"age\":\"10-19\",\"population\":1400000},\n {\"state\":\"GA\",\"age\":\"20-29\",\"population\":1500000},\n {\"state\":\"GA\",\"age\":\"30-39\",\"population\":1400000},\n {\"state\":\"GA\",\"age\":\"40-49\",\"population\":1500000},\n {\"state\":\"GA\",\"age\":\"50-59\",\"population\":1600000},\n {\"state\":\"GA\",\"age\":\"60+\",\"population\":1700000},\n];\n\n// 计算各州总人口并排序,取前6名\nconst stateTotals = rawData.reduce((acc, curr) => {\n acc[curr.state] = (acc[curr.state] || 0) + curr.population;\n return acc;\n}, {});\n\nconst top6States = Object.entries(stateTotals)\n .sort((a, b) => b[1] - a[1])\n .slice(0, 6)\n .map(([state]) => state);\n\n// 过滤数据,仅保留排名前六的州\nconst filteredData = rawData.filter(d => top6States.includes(d.state));\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: filteredData,\n encode: {\n x: 'state',\n y: 'population',\n color: 'age',\n },\n transform: [\n { type: 'dodgeX' },\n { type: 'sortX', by: 'y', reducer: 'sum', reverse: true }\n ],\n axis: {\n y: { \n title: '人口数量',\n labelFormatter: (d) => `${(d / 1000000).toFixed(1)}M`\n },\n x: { title: '州' }\n },\n tooltip: {\n shared: true,\n },\n legend: {\n color: { \n title: '年龄段',\n layout: { justifyContent: 'center' }\n }\n }\n});\n\nchart.render();", + "duration": 37195, + "retrievedSkillIds": [ + "g2-mark-interval-grouped", + "g2-concept-chart-selection", + "g2-mark-bi-directional-bar", + "g2-mark-histogram", + "g2-mark-arc-donut" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 4297, + "expectedLength": 37660, + "similarity": 0.3803837819313385, + "extractedCode": "import { Chart } from '@antv/g2';\n\n// 构造完整的模拟数据(包含多个州和多个年龄段)\nconst rawData = [\n // California (CA) - 总人口约 29.5M\n {\"state\":\"CA\",\"age\":\"<10\",\"population\":5038433},\n {\"state\":\"CA\",\"age\":\"10-19\",\"population\":4500000},\n {\"state\":\"CA\",\"age\":\"20-29\",\"population\":5200000},\n {\"state\":\"CA\",\"age\":\"30-39\",\"population\":4800000},\n {\"state\":\"CA\",\"age\":\"40-49\",\"population\":4500000},\n {\"state\":\"CA\",\"age\":\"50-59\",\"population\":4000000},\n {\"state\":\"CA\",\"age\":\"60+\",\"population\":3500000},\n \n // Texas (TX) - 总人口约 23.5M\n {\"state\":\"TX\",\"age\":\"<10\",\"population\":3800000},\n {\"state\":\"TX\",\"age\":\"10-19\",\"population\":3600000},\n {\"state\":\"TX\",\"age\":\"20-29\",\"population\":3900000},\n {\"state\":\"TX\",\"age\":\"30-39\",\"population\":3700000},\n {\"state\":\"TX\",\"age\":\"40-49\",\"population\":3400000},\n {\"state\":\"TX\",\"age\":\"50-59\",\"population\":3000000},\n {\"state\":\"TX\",\"age\":\"60+\",\"population\":2500000},\n \n // Florida (FL) - 总人口约 17.5M\n {\"state\":\"FL\",\"age\":\"<10\",\"population\":2211012},\n {\"state\":\"FL\",\"age\":\"10-19\",\"population\":2100000},\n {\"state\":\"FL\",\"age\":\"20-29\",\"population\":2400000},\n {\"state\":\"FL\",\"age\":\"30-39\",\"population\":2300000},\n {\"state\":\"FL\",\"age\":\"40-49\",\"population\":2500000},\n {\"state\":\"FL\",\"age\":\"50-59\",\"population\":2800000},\n {\"state\":\"FL\",\"age\":\"60+\",\"population\":3200000},\n \n // New York (NY) - 总人口约 18.3M\n {\"state\":\"NY\",\"age\":\"<10\",\"population\":2400000},\n {\"state\":\"NY\",\"age\":\"10-19\",\"population\":2600000},\n {\"state\":\"NY\",\"age\":\"20-29\",\"population\":3200000},\n {\"state\":\"NY\",\"age\":\"30-39\",\"population\":2900000},\n {\"state\":\"NY\",\"age\":\"40-49\",\"population\":2800000},\n {\"state\":\"NY\",\"age\":\"50-59\",\"population\":2600000},\n {\"state\":\"NY\",\"age\":\"60+\",\"population\":2400000},\n \n // Pennsylvania (PA) - 总人口约 12.8M\n {\"state\":\"PA\",\"age\":\"<10\",\"population\":1500000},\n {\"state\":\"PA\",\"age\":\"10-19\",\"population\":1600000},\n {\"state\":\"PA\",\"age\":\"20-29\",\"population\":1800000},\n {\"state\":\"PA\",\"age\":\"30-39\",\"population\":1700000},\n {\"state\":\"PA\",\"age\":\"40-49\",\"population\":1900000},\n {\"state\":\"PA\",\"age\":\"50-59\",\"population\":2000000},\n {\"state\":\"PA\",\"age\":\"60+\",\"population\":2100000},\n \n // Illinois (IL) - 总人口约 12.1M\n {\"state\":\"IL\",\"age\":\"<10\",\"population\":1600000},\n {\"state\":\"IL\",\"age\":\"10-19\",\"population\":1700000},\n {\"state\":\"IL\",\"age\":\"20-29\",\"population\":1900000},\n {\"state\":\"IL\",\"age\":\"30-39\",\"population\":1800000},\n {\"state\":\"IL\",\"age\":\"40-49\",\"population\":1700000},\n {\"state\":\"IL\",\"age\":\"50-59\",\"population\":1600000},\n {\"state\":\"IL\",\"age\":\"60+\",\"population\":1500000},\n \n // Ohio (OH) - 总人口约 11.7M(第7名,应被过滤)\n {\"state\":\"OH\",\"age\":\"<10\",\"population\":1400000},\n {\"state\":\"OH\",\"age\":\"10-19\",\"population\":1500000},\n {\"state\":\"OH\",\"age\":\"20-29\",\"population\":1600000},\n {\"state\":\"OH\",\"age\":\"30-39\",\"population\":1500000},\n {\"state\":\"OH\",\"age\":\"40-49\",\"population\":1600000},\n {\"state\":\"OH\",\"age\":\"50-59\",\"population\":1700000},\n {\"state\":\"OH\",\"age\":\"60+\",\"population\":1800000},\n \n // Georgia (GA) - 总人口约 10.8M(第8名,应被过滤)\n {\"state\":\"GA\",\"age\":\"<10\",\"population\":1300000},\n {\"state\":\"GA\",\"age\":\"10-19\",\"population\":1400000},\n {\"state\":\"GA\",\"age\":\"20-29\",\"population\":1500000},\n {\"state\":\"GA\",\"age\":\"30-39\",\"population\":1400000},\n {\"state\":\"GA\",\"age\":\"40-49\",\"population\":1500000},\n {\"state\":\"GA\",\"age\":\"50-59\",\"population\":1600000},\n {\"state\":\"GA\",\"age\":\"60+\",\"population\":1700000},\n];\n\n// 计算各州总人口并排序,取前6名\nconst stateTotals = rawData.reduce((acc, curr) => {\n acc[curr.state] = (acc[curr.state] || 0) + curr.population;\n return acc;\n}, {});\n\nconst top6States = Object.entries(stateTotals)\n .sort((a, b) => b[1] - a[1])\n .slice(0, 6)\n .map(([state]) => state);\n\n// 过滤数据,仅保留排名前六的州\nconst filteredData = rawData.filter(d => top6States.includes(d.state));\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: filteredData,\n encode: {\n x: 'state',\n y: 'population',\n color: 'age',\n },\n transform: [\n { type: 'dodgeX' },\n { type: 'sortX', by: 'y', reducer: 'sum', reverse: true }\n ],\n axis: {\n y: { \n title: '人口数量',\n labelFormatter: (d) => `${(d / 1000000).toFixed(1)}M`\n },\n x: { title: '州' }\n },\n tooltip: {\n shared: true,\n },\n legend: {\n color: { \n title: '年龄段',\n layout: { justifyContent: 'center' }\n }\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "California", + "Texas", + "Florida", + "York", + "Pennsylvania", + "Illinois", + "Ohio", + "Georgia", + "reduce", + "entries", + "sort", + "slice", + "map", + "filter", + "includes", + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "encode", + "x", + "y", + "color", + "transform", + "type", + "type", + "by", + "reducer", + "reverse", + "axis", + "y", + "title", + "labelFormatter", + "x", + "title", + "tooltip", + "shared", + "legend", + "color", + "title", + "layout", + "justifyContent" + ], + "stringLiterals": [ + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population", + "state", + "age", + "population" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "type.interval" + ] + } + } + }, + { + "id": "case-113", + "query": "根据描述绘制图表,渲染一个基于层级数据的圆形打包图(pack layout),用于展示游戏技能树的结构分布,包含近战、远程、辅助和通用四大类别及其子技能节点,通过颜色区分层级深度,并启用了元素高亮交互与入场动画。参考数据:{\"value\":{\"name\":\"游戏技能树\",\"children\":[{\"name\":\"近战\",\"value\":35,\"children\":[{\"name\":\"剑术\",\"value\":15},{\"name\":\"斧技\",\"value\":10},{\"name\":\"格挡\",\"value\":10}]},{\"name\":\"远程\",\"value\":25,\"children\":[{\"name\":\"弓箭\",\"value\":10},{\"name\":\"法杖\",\"value\":15}]},{\"name\":\"辅助\",\"value\":20,\"children\":[{\"name\":\"治疗\",\"value\":8},{\"name\":\"增益\",\"value\":7},{\"name\":\"侦查\",\"value\":5}]},{\"name\":\"通用\",\"value\":20}]}}", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({\n container: 'container',\n theme: 'dark',\n autoFit: true,\n});\n\nchart.options({\n type: 'pack',\n width: 600,\n height: 600,\n data: {\n value: {\n name: '游戏技能树',\n children: [\n { name: '近战', value: 35, children: [\n { name: '剑术', value: 15 }, { name: '斧技', value: 10 }, { name: '格挡', value: 10 }\n ]},\n { name: '远程', value: 25, children: [\n { name: '弓箭', value: 10 }, { name: '法杖', value: 15 }\n ]},\n { name: '辅助', value: 20, children: [\n { name: '治疗', value: 8 }, { name: '增益', value: 7 }, { name: '侦查', value: 5 }\n ]},\n { name: '通用', value: 20 }\n ],\n },\n },\n encode: {\n value: 'value',\n color: 'depth',\n },\n scale: {\n color: { domain: [0,1,2], range: ['#1f1f2e', '#ff7f0e', '#2ca02c'] }\n },\n style: {\n labelText: (d) => d.height === 0 ? d.data.name : '',\n labelFill: '#eee',\n labelFontWeight: 'bold',\n fillOpacity: 0.85,\n stroke: '#222',\n strokeWidth: 2,\n cursor: 'pointer'\n },\n interaction: [{ type: 'elementHighlightByColor'}],\nstate: { inactive: { opacity: 0.2 }, active: { opacity: 0.8 } },\n animate: { enter: { duration: 600 }, update: { duration: 300 } },\n legend: { color: false }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '游戏技能树',\n children: [\n {\n name: '近战',\n value: 35,\n children: [\n { name: '剑术', value: 15 },\n { name: '斧技', value: 10 },\n { name: '格挡', value: 10 },\n ],\n },\n {\n name: '远程',\n value: 25,\n children: [\n { name: '弓箭', value: 10 },\n { name: '法杖', value: 15 },\n ],\n },\n {\n name: '辅助',\n value: 20,\n children: [\n { name: '治疗', value: 8 },\n { name: '增益', value: 7 },\n { name: '侦查', value: 5 },\n ],\n },\n {\n name: '通用',\n value: 20,\n },\n ],\n};\n\nconst chart = new Chart({\n container: 'container',\n width: 600,\n height: 600,\n});\n\nchart.options({\n type: 'pack',\n data: {\n value: data,\n },\n encode: {\n value: 'value',\n color: (d) => d.depth,\n },\n scale: {\n color: {\n type: 'ordinal',\n domain: [0, 1, 2],\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16'],\n },\n },\n style: {\n fillOpacity: 0.85,\n stroke: '#fff',\n lineWidth: 2,\n },\n labels: [\n {\n text: (d) => {\n if (d.height > 0) return '';\n return d.data?.name;\n },\n position: 'inside',\n fontSize: 11,\n fill: '#fff',\n transform: [{ type: 'contrastReverse' }],\n },\n ],\n interaction: {\n elementHighlight: true,\n },\n animate: {\n enter: {\n type: 'fadeIn',\n duration: 1000,\n },\n },\n legend: false,\n});\n\nchart.render();", + "duration": 28450, + "retrievedSkillIds": [ + "g2-mark-pack", + "g2-mark-tree", + "g2-mark-partition", + "g2-comp-space-layer", + "g2-mark-treemap" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1472, + "expectedLength": 1268, + "similarity": 0.6732004202064493, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '游戏技能树',\n children: [\n {\n name: '近战',\n value: 35,\n children: [\n { name: '剑术', value: 15 },\n { name: '斧技', value: 10 },\n { name: '格挡', value: 10 },\n ],\n },\n {\n name: '远程',\n value: 25,\n children: [\n { name: '弓箭', value: 10 },\n { name: '法杖', value: 15 },\n ],\n },\n {\n name: '辅助',\n value: 20,\n children: [\n { name: '治疗', value: 8 },\n { name: '增益', value: 7 },\n { name: '侦查', value: 5 },\n ],\n },\n {\n name: '通用',\n value: 20,\n },\n ],\n};\n\nconst chart = new Chart({\n container: 'container',\n width: 600,\n height: 600,\n});\n\nchart.options({\n type: 'pack',\n data: {\n value: data,\n },\n encode: {\n value: 'value',\n color: (d) => d.depth,\n },\n scale: {\n color: {\n type: 'ordinal',\n domain: [0, 1, 2],\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16'],\n },\n },\n style: {\n fillOpacity: 0.85,\n stroke: '#fff',\n lineWidth: 2,\n },\n labels: [\n {\n text: (d) => {\n if (d.height > 0) return '';\n return d.data?.name;\n },\n position: 'inside',\n fontSize: 11,\n fill: '#fff',\n transform: [{ type: 'contrastReverse' }],\n },\n ],\n interaction: {\n elementHighlight: true,\n },\n animate: {\n enter: {\n type: 'fadeIn',\n duration: 1000,\n },\n },\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "name", + "children", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "container", + "width", + "height", + "type", + "data", + "value", + "encode", + "value", + "color", + "scale", + "color", + "type", + "domain", + "range", + "style", + "fillOpacity", + "stroke", + "lineWidth", + "labels", + "text", + "position", + "fontSize", + "fill", + "transform", + "type", + "interaction", + "elementHighlight", + "animate", + "enter", + "type", + "duration", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "view.children", + "interaction", + "animate", + "x6.labels" + ] + } + } + }, + { + "id": "case-114", + "query": "根据描述绘制图表,使用 G2 渲染一个螺旋坐标系下的折线图,对比两个类别(系统负载和网络流量)在400个时间点上的数值变化趋势,用于周期性指标的双序列对比可视化,关闭坐标轴显示并配置图例和工具提示。\n参考数据:\n[{\"time\":0,\"value\":75.123,\"category\":\"系统负载\"},{\"time\":1,\"value\":42.456,\"category\":\"网络流量\"},{\"time\":2,\"value\":79.876,\"category\":\"系统负载\"},{\"time\":3,\"value\":20.321,\"category\":\"网络流量\"},{\"time\":4,\"value\":50.654,\"category\":\"系统负载\"},{\"time\":5,\"value\":78.901,\"category\":\"网络流量\"},{\"time\":6,\"value\":25.678,\"category\":\"系统负载\"},{\"time\":7,\"value\":60.123,\"category\":\"网络流量\"},{\"time\":8,\"value\":48.456,\"category\":\"系统负载\"},{\"time\":9,\"value\":10.789,\"category\":\"网络流量\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from \"@antv/g2\";\n\nconst chart = new Chart({ container: \"container\" });\n\nchart.options({\n type: \"line\",\n autoFit: true,\n height: 600,\n data: Array.from({ length: 400 }, (_, i) => ({\n time: i,\n value: Math.abs(50 + 30 * Math.sin(i * 0.08) + Math.random() * 20),\n category: i % 2 === 0 ? \"系统负载\" : \"网络流量\"\n })),\n encode: {\n x: (d) => d.time,\n y: \"value\",\n color: \"category\",\n key: \"time\"\n },\n scale: {\n x: { type: \"linear\", nice: true },\n color: { palette: [\"#1890FF\", \"#52c41a\"] }\n },\n coordinate: {\n type: \"helix\",\n startAngle: Math.PI / 2,\n endAngle: Math.PI * 10\n },\n style: {\n lineWidth: 2.5,\n strokeOpacity: 0.8\n },\n axis: {\n x: null,\n y: null\n },\n legend: {\n color: { position: \"bottom\", layout: { justifyContent: \"center\" } }\n },\n tooltip: {\n title: \"time\",\n items: [\n { field: \"value\", name: \"数值\", valueFormatter: \".1f\" },\n { field: \"category\", name: \"指标\" }\n ]\n },\n title: \"双序列周期性负载对比(400个时间点)\"\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\n// 生成400个时间点的模拟数据(系统负载和网络流量)\nconst generateData = () => {\n const data = [];\n for (let i = 0; i < 400; i++) {\n // 系统负载:模拟周期性波动,周期约100个点\n const loadBase = 50 + 25 * Math.sin((i / 100) * Math.PI * 2);\n const loadNoise = (Math.random() - 0.5) * 15;\n const loadValue = Math.max(10, Math.min(95, loadBase + loadNoise));\n \n // 网络流量:模拟周期性波动,与负载有相位差\n const trafficBase = 40 + 20 * Math.sin((i / 100) * Math.PI * 2 + Math.PI / 3);\n const trafficNoise = (Math.random() - 0.5) * 12;\n const trafficValue = Math.max(5, Math.min(80, trafficBase + trafficNoise));\n \n data.push({\n time: i,\n value: parseFloat(loadValue.toFixed(3)),\n category: '系统负载'\n });\n data.push({\n time: i,\n value: parseFloat(trafficValue.toFixed(3)),\n category: '网络流量'\n });\n }\n return data;\n};\n\nconst data = generateData();\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 600,\n});\n\nchart.options({\n type: 'line',\n data,\n encode: {\n x: 'time',\n y: 'value',\n color: 'category',\n },\n coordinate: {\n type: 'helix',\n startAngle: Math.PI / 2,\n endAngle: Math.PI / 2 + 6 * Math.PI,\n innerRadius: 0.15,\n outerRadius: 0.85,\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6'],\n },\n },\n axis: false,\n legend: {\n color: {\n position: 'bottom',\n layout: { justifyContent: 'center' },\n },\n },\n tooltip: {\n title: (d) => `时间点: ${d.time}`,\n items: [\n { field: 'category', name: '类别' },\n { field: 'value', name: '数值', valueFormatter: (v) => v.toFixed(3) },\n ],\n },\n style: {\n lineWidth: 2,\n },\n});\n\nchart.render();", + "duration": 13799, + "retrievedSkillIds": [ + "g2-mark-line-basic", + "g2-mark-line-multi", + "g2-coord-helix", + "g2-mark-arc-pie", + "g2-mark-helix" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1686, + "expectedLength": 1026, + "similarity": 0.6104208404208404, + "extractedCode": "import { Chart } from '@antv/g2';\n\n// 生成400个时间点的模拟数据(系统负载和网络流量)\nconst generateData = () => {\n const data = [];\n for (let i = 0; i < 400; i++) {\n // 系统负载:模拟周期性波动,周期约100个点\n const loadBase = 50 + 25 * Math.sin((i / 100) * Math.PI * 2);\n const loadNoise = (Math.random() - 0.5) * 15;\n const loadValue = Math.max(10, Math.min(95, loadBase + loadNoise));\n \n // 网络流量:模拟周期性波动,与负载有相位差\n const trafficBase = 40 + 20 * Math.sin((i / 100) * Math.PI * 2 + Math.PI / 3);\n const trafficNoise = (Math.random() - 0.5) * 12;\n const trafficValue = Math.max(5, Math.min(80, trafficBase + trafficNoise));\n \n data.push({\n time: i,\n value: parseFloat(loadValue.toFixed(3)),\n category: '系统负载'\n });\n data.push({\n time: i,\n value: parseFloat(trafficValue.toFixed(3)),\n category: '网络流量'\n });\n }\n return data;\n};\n\nconst data = generateData();\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 600,\n});\n\nchart.options({\n type: 'line',\n data,\n encode: {\n x: 'time',\n y: 'value',\n color: 'category',\n },\n coordinate: {\n type: 'helix',\n startAngle: Math.PI / 2,\n endAngle: Math.PI / 2 + 6 * Math.PI,\n innerRadius: 0.15,\n outerRadius: 0.85,\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6'],\n },\n },\n axis: false,\n legend: {\n color: {\n position: 'bottom',\n layout: { justifyContent: 'center' },\n },\n },\n tooltip: {\n title: (d) => `时间点: ${d.time}`,\n items: [\n { field: 'category', name: '类别' },\n { field: 'value', name: '数值', valueFormatter: (v) => v.toFixed(3) },\n ],\n },\n style: {\n lineWidth: 2,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "sin", + "random", + "max", + "min", + "sin", + "random", + "max", + "min", + "push", + "parseFloat", + "toFixed", + "push", + "parseFloat", + "toFixed", + "generateData", + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "time", + "value", + "category", + "time", + "value", + "category", + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "color", + "coordinate", + "type", + "startAngle", + "endAngle", + "innerRadius", + "outerRadius", + "scale", + "color", + "range", + "axis", + "legend", + "color", + "position", + "layout", + "justifyContent", + "tooltip", + "title", + "items", + "field", + "name", + "field", + "name", + "valueFormatter", + "style", + "lineWidth" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale", + "type.line" + ] + } + } + }, + { + "id": "case-115", + "query": "根据描述绘制图表,使用树图展示产品库存的分布情况,数据按类别和子类嵌套组织,通过不同颜色标识库存状态(如低库存或正常),并支持交互高亮和提示信息显示。参考数据:[{\"name\":\"手机\",\"value\":120},{\"name\":\"耳机\",\"value\":45,\"low\":true},{\"name\":\"键盘\",\"value\":80},{\"name\":\"桌子\",\"value\":30,\"low\":true},{\"name\":\"椅子\",\"value\":90},{\"name\":\"其他\",\"value\":150}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n autoFit: true,\n});\n\nconst inventoryData = {\n name: '产品库存',\n children: [\n {\n name: '电子产品',\n children: [\n { name: '手机', value: 120 },\n { name: '耳机', value: 45, low: true },\n { name: '键盘', value: 80 },\n ],\n },\n {\n name: '家具',\n children: [\n { name: '桌子', value: 30, low: true },\n { name: '椅子', value: 90 },\n ],\n },\n { name: '其他', value: 150 },\n ],\n};\n\nchart.options({\n type: 'treemap',\n data: { value: inventoryData },\n layout: {\n tile: 'treemapSliceDice',\n paddingInner: 4,\n },\n encode: {\n value: 'value', },\n style: {\n labelText: (d) => `${d.data.name} ${d.value}件`,\n labelFill: (d) => (d.data.low ? '#ff4d4f' : '#52c41a'),\nlabelBackground:true,\nlabelBackgroundFill:'#fff',\n labelFontSize: 12,\n stroke: '#000',\n lineWidth: 1,\n fillOpacity: 0.8,\n },\n interaction: {\n elementHighlight: {\n fill: '#faad14',\n },\n },\n tooltip: {\n title: (d) => d.data.name,\n items: [\n { field: 'value', name: '库存量' },\n { field: 'low', name: '状态', valueFormatter: (v) => (v ? '低库存' : '正常') },\n ],\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '产品库存',\n children: [\n {\n name: '电子产品',\n children: [\n { name: '手机', value: 120 },\n { name: '耳机', value: 45, low: true },\n { name: '键盘', value: 80 }\n ]\n },\n {\n name: '办公家具',\n children: [\n { name: '桌子', value: 30, low: true },\n { name: '椅子', value: 90 }\n ]\n },\n {\n name: '其他',\n children: [\n { name: '其他', value: 150 }\n ]\n }\n ]\n};\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 500\n});\n\nchart.options({\n type: 'treemap',\n data: {\n value: data\n },\n encode: {\n value: 'value',\n color: (d) => d.data?.low ? '低库存' : '正常库存'\n },\n scale: {\n color: {\n domain: ['低库存', '正常库存'],\n range: ['#ff4d4f', '#52c41a']\n }\n },\n layout: {\n tile: 'treemapSquarify',\n paddingInner: 3,\n paddingTop: 24\n },\n style: {\n labelText: (d) => {\n const name = d.data?.name || '';\n const value = d.data?.value || '';\n return `${name}\\n${value}`;\n },\n labelFill: '#fff',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n fillOpacity: 0.9,\n stroke: '#fff',\n lineWidth: 2\n },\n tooltip: {\n items: [\n { field: 'name', name: '产品' },\n { field: 'value', name: '库存量' },\n { field: (d) => d.data?.low ? '低库存' : '正常库存', name: '状态' }\n ]\n },\n interaction: {\n elementHighlight: true\n },\n legend: {\n color: {\n position: 'top',\n title: '库存状态',\n layout: { justifyContent: 'center' }\n }\n }\n});\n\nchart.render();", + "duration": 12234, + "retrievedSkillIds": [ + "g2-mark-tree", + "g2-mark-treemap", + "g2-concept-chart-selection", + "g2-comp-legend-category", + "g2-mark-bullet" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1580, + "expectedLength": 1257, + "similarity": 0.7807174532784289, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '产品库存',\n children: [\n {\n name: '电子产品',\n children: [\n { name: '手机', value: 120 },\n { name: '耳机', value: 45, low: true },\n { name: '键盘', value: 80 }\n ]\n },\n {\n name: '办公家具',\n children: [\n { name: '桌子', value: 30, low: true },\n { name: '椅子', value: 90 }\n ]\n },\n {\n name: '其他',\n children: [\n { name: '其他', value: 150 }\n ]\n }\n ]\n};\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 500\n});\n\nchart.options({\n type: 'treemap',\n data: {\n value: data\n },\n encode: {\n value: 'value',\n color: (d) => d.data?.low ? '低库存' : '正常库存'\n },\n scale: {\n color: {\n domain: ['低库存', '正常库存'],\n range: ['#ff4d4f', '#52c41a']\n }\n },\n layout: {\n tile: 'treemapSquarify',\n paddingInner: 3,\n paddingTop: 24\n },\n style: {\n labelText: (d) => {\n const name = d.data?.name || '';\n const value = d.data?.value || '';\n return `${name}\\n${value}`;\n },\n labelFill: '#fff',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n fillOpacity: 0.9,\n stroke: '#fff',\n lineWidth: 2\n },\n tooltip: {\n items: [\n { field: 'name', name: '产品' },\n { field: 'value', name: '库存量' },\n { field: (d) => d.data?.low ? '低库存' : '正常库存', name: '状态' }\n ]\n },\n interaction: {\n elementHighlight: true\n },\n legend: {\n color: {\n position: 'top',\n title: '库存状态',\n layout: { justifyContent: 'center' }\n }\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "name", + "children", + "name", + "children", + "name", + "value", + "name", + "value", + "low", + "name", + "value", + "name", + "children", + "name", + "value", + "low", + "name", + "value", + "name", + "children", + "name", + "value", + "container", + "width", + "height", + "type", + "data", + "value", + "encode", + "value", + "color", + "scale", + "color", + "domain", + "range", + "layout", + "tile", + "paddingInner", + "paddingTop", + "style", + "labelText", + "labelFill", + "labelFontSize", + "labelFontWeight", + "fillOpacity", + "stroke", + "lineWidth", + "tooltip", + "items", + "field", + "name", + "field", + "name", + "field", + "name", + "interaction", + "elementHighlight", + "legend", + "color", + "position", + "title", + "layout", + "justifyContent" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "view.children", + "interaction" + ] + } + } + }, + { + "id": "case-116", + "query": "根据描述绘制图表,使用 G2 渲染一个水波图(liquid chart),展示数值 0.581 的填充状态,并配置了波浪样式、文本样式及轮廓等绘制属性。参考数据:\n[0.581]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n height: 350,\n});\n\nchart.options({\n type: 'liquid',\n autoFit: true,\n data: 0.581,\n style: {\n waveLength: 50,\n contentText: 'center text',\n outlineBorder: 4,\n outlineDistance: 8,\n // 绘图属性\n contentFontSize: 30,\n contentFontFamily: 'sans-serif',\n contentFontWeight: 500,\n contentLineHeight: 20,\n contentTextAlign: 'center',\n contentTextBaseline: 'middle',\n contentFill: '#fff',\n contentFillOpacity: 0.9,\n contentStroke: 'yellow',\n contentStrokeOpacity: 0.9,\n contentLineWidth: 2,\n contentLineDash: [4, 8],\n contentOpacity: 1,\n contentShadowColor: '#d3d3d3',\n contentShadowBlur: 4,\n contentShadowOffsetX: 4,\n contentShadowOffsetY: 4,\n contentCursor: 'pointer',\n contentDx: 10,\n contentDy: 10,\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container', width: 300, height: 300 });\n\nchart.options({\n type: 'liquid',\n data: 0.581,\n style: {\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n fill: '#5B8FF9',\n fillOpacity: 0.85,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 28,\n fontWeight: 'bold',\n fill: '#fff',\n formatter: (v) => `${(v * 100).toFixed(1)}%`,\n },\n },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "duration": 11929, + "retrievedSkillIds": [ + "g2-mark-liquid", + "g2-mark-shape", + "g2-mark-partition", + "g2-mark-interval-basic", + "g2-scale-linear" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 577, + "expectedLength": 881, + "similarity": 0.6035077227104894, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container', width: 300, height: 300 });\n\nchart.options({\n type: 'liquid',\n data: 0.581,\n style: {\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n fill: '#5B8FF9',\n fillOpacity: 0.85,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 28,\n fontWeight: 'bold',\n fill: '#fff',\n formatter: (v) => `${(v * 100).toFixed(1)}%`,\n },\n },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "style", + "outlineBorder", + "outlineDistance", + "waveLength", + "fill", + "fillOpacity", + "background", + "fill", + "text", + "style", + "fontSize", + "fontWeight", + "fill", + "formatter", + "axis", + "legend", + "tooltip" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "x6.background" + ] + } + } + }, + { + "id": "case-117", + "query": "根据描述绘制图表,使用 G2 创建一个散点图,对数据点应用鱼眼坐标变换以实现局部放大效果,按分类设置颜色并配置点样式。\n参考数据:\n[{\"x\":1,\"y\":1,\"category\":\"A\"},{\"x\":2,\"y\":2,\"category\":\"B\"},{\"x\":3,\"y\":3,\"category\":\"C\"},{\"x\":4,\"y\":4,\"category\":\"D\"},{\"x\":5,\"y\":5,\"category\":\"E\"},{\"x\":6,\"y\":6,\"category\":\"F\"},{\"x\":7,\"y\":7,\"category\":\"G\"},{\"x\":8,\"y\":8,\"category\":\"H\"},{\"x\":9,\"y\":9,\"category\":\"I\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n coordinate: {\n transform: [\n {\n type: 'fisheye',\n focusX: 0.7,\n focusY: 0.3,\n distortionX: 3,\n distortionY: 3,\n },\n ],\n },\n type: 'point',\n data: [\n { x: 1, y: 1, category: 'A' },\n { x: 2, y: 2, category: 'B' },\n { x: 3, y: 3, category: 'C' },\n { x: 4, y: 4, category: 'D' },\n { x: 5, y: 5, category: 'E' },\n { x: 6, y: 6, category: 'F' },\n { x: 7, y: 7, category: 'G' },\n { x: 8, y: 8, category: 'H' },\n { x: 9, y: 9, category: 'I' },\n ],\n encode: {\n x: 'x',\n y: 'y',\n color: 'category',\n shape: 'point',\n },\n style: {\n r: 6,\n lineWidth: 1,\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"x\":1,\"y\":1,\"category\":\"A\"},\n {\"x\":2,\"y\":2,\"category\":\"B\"},\n {\"x\":3,\"y\":3,\"category\":\"C\"},\n {\"x\":4,\"y\":4,\"category\":\"D\"},\n {\"x\":5,\"y\":5,\"category\":\"E\"},\n {\"x\":6,\"y\":6,\"category\":\"F\"},\n {\"x\":7,\"y\":7,\"category\":\"G\"},\n {\"x\":8,\"y\":8,\"category\":\"H\"},\n {\"x\":9,\"y\":9,\"category\":\"I\"}\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480\n});\n\nchart.options({\n type: 'point',\n data: data,\n encode: {\n x: 'x',\n y: 'y',\n color: 'category'\n },\n coordinate: {\n transform: [\n {\n type: 'fisheye'\n }\n ]\n },\n interaction: {\n fisheye: true\n }\n});\n\nchart.render();", + "duration": 7262, + "retrievedSkillIds": [ + "g2-interaction-fisheye", + "g2-coord-fisheye", + "g2-mark-point-scatter", + "g2-scale-point", + "g2-transform-jitterx" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 679, + "expectedLength": 780, + "similarity": 0.6082080951502858, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"x\":1,\"y\":1,\"category\":\"A\"},\n {\"x\":2,\"y\":2,\"category\":\"B\"},\n {\"x\":3,\"y\":3,\"category\":\"C\"},\n {\"x\":4,\"y\":4,\"category\":\"D\"},\n {\"x\":5,\"y\":5,\"category\":\"E\"},\n {\"x\":6,\"y\":6,\"category\":\"F\"},\n {\"x\":7,\"y\":7,\"category\":\"G\"},\n {\"x\":8,\"y\":8,\"category\":\"H\"},\n {\"x\":9,\"y\":9,\"category\":\"I\"}\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480\n});\n\nchart.options({\n type: 'point',\n data: data,\n encode: {\n x: 'x',\n y: 'y',\n color: 'category'\n },\n coordinate: {\n transform: [\n {\n type: 'fisheye'\n }\n ]\n },\n interaction: {\n fisheye: true\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "encode", + "x", + "y", + "color", + "coordinate", + "transform", + "type", + "interaction", + "fisheye" + ], + "stringLiterals": [ + "x", + "y", + "category", + "x", + "y", + "category", + "x", + "y", + "category", + "x", + "y", + "category", + "x", + "y", + "category", + "x", + "y", + "category", + "x", + "y", + "category", + "x", + "y", + "category", + "x", + "y", + "category" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.point", + "interaction" + ] + } + } + }, + { + "id": "case-118", + "query": "根据描述绘制图表,通过生成模拟的年度空气质量数据,按月份和昼夜分段展示 AQI 指数的变化情况。使用螺旋坐标系绘制柱状图,将昼夜数据作为不同系列展示在同一图表中,颜色根据 AQI 阈值进行映射以反映污染程度,辅以标题说明其为城市 AQI 年度昼夜螺旋分布图。参考数据:[{\"segment\":\"Jan Day\",\"time\":\"Jan-01\",\"aqi\":59.75309820130072,\"section\":\"Day\"},{\"segment\":\"Jan Night\",\"time\":\"Jan-01\",\"aqi\":38.42223227663679,\"section\":\"Night\"},{\"segment\":\"Jan Day\",\"time\":\"Jan-02\",\"aqi\":63.18905725375226,\"section\":\"Day\"},{\"segment\":\"Jan Night\",\"time\":\"Jan-02\",\"aqi\":41.28575136478989,\"section\":\"Night\"},{\"segment\":\"Jan Day\",\"time\":\"Jan-03\",\"aqi\":65.79830525173698,\"section\":\"Day\"},{\"segment\":\"Jan Night\",\"time\":\"Jan-03\",\"aqi\":43.16982369674006,\"section\":\"Night\"},{\"segment\":\"Jan Day\",\"time\":\"Jan-04\",\"aqi\":67.61207982884797,\"section\":\"Day\"},{\"segment\":\"Jan Night\",\"time\":\"Jan-04\",\"aqi\":45.45676930938814,\"section\":\"Night\"},{\"segment\":\"Jan Day\",\"time\":\"Jan-05\",\"aqi\":69.13532791158072,\"section\":\"Day\"},{\"segment\":\"Jan Night\",\"time\":\"Jan-05\",\"aqi\":47.21420319164731,\"section\":\"Night\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from \"@antv/g2\";\n\n// 生成模拟空气质量年度数据(按月+昼夜分段)\nconst months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];\nconst sections = ['Day','Night'];\nconst data = [];\nmonths.forEach((month, mIdx) => {\n sections.forEach(section => {\n for (let day = 1; day <= 15; day++) {\n const baseAQI = 50 + Math.sin((mIdx + day/30) * Math.PI/6) * 30; // 季节性基线\n const sectionAdjust = section === 'Day' ? 15 : -10; // 昼夜差异\n const noise = (Math.random() - 0.5) * 15;\n data.push({\n segment: `${month} ${section}`,\n time: `${month}-${day.toString().padStart(2,'0')}`,\n aqi: Math.max(10, Math.min(150, baseAQI + sectionAdjust + noise)),\n section\n });\n }\n });\n});\n\nconst chart = new Chart({ container: \"container\", autoFit: true, height: 520 });\nchart.options({\n type: \"interval\",\n data,\n encode: {\n x: \"time\",\n y: \"aqi\",\n color: \"aqi\",\n series: \"section\"\n },\n scale: {\n color: {\n type: \"threshold\",\n domain: [0, 50, 100, 150],\n range: [\"#1a9850\", \"#fee08b\", \"#d73027\", \"#762a83\"]\n }\n },\n coordinate: {\n type: \"helix\",\n startAngle: Math.PI,\n endAngle: 7 * Math.PI,\n innerRadius: 0.2,\n outerRadius: 0.9,\n },\n style: {\n fillOpacity: 0.75,\n stroke: \"#fff\",\n lineWidth: 0.5\n },\n\n axis: {\n y: { title: \"AQI指数\", grid: true, tickCount: 4 },\n x: { tickCount: 6, labelTransform: \"rotate(30)\" }\n },\n title:{\ntitle: \"城市AQI年度昼夜螺旋分布\",\n subtitle: \"内外环区分昼夜,双螺旋对比季节性污染变化\"\n}\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\n// 生成完整的年度模拟数据(365天 × 昼夜 = 730条记录)\nconst generateData = () => {\n const data = [];\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n const daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n \n let dayIndex = 0;\n months.forEach((month, mIdx) => {\n for (let d = 1; d <= daysInMonth[mIdx]; d++) {\n const dayStr = `${month}-${String(d).padStart(2, '0')}`;\n // 模拟AQI变化:冬季较高,夏季较低,添加随机波动\n const seasonalBase = 60 + 40 * Math.sin((dayIndex / 365) * Math.PI * 2 + Math.PI / 2);\n \n // Day AQI(白天通常较高)\n const dayAQI = Math.max(15, Math.min(280, seasonalBase + 25 + Math.random() * 30));\n data.push({\n time: dayStr,\n dayIndex: dayIndex,\n section: 'Day',\n aqi: dayAQI,\n segment: `${month} Day`\n });\n \n // Night AQI(夜间通常较低)\n const nightAQI = Math.max(10, Math.min(250, seasonalBase - 10 + Math.random() * 25));\n data.push({\n time: dayStr,\n dayIndex: dayIndex,\n section: 'Night',\n aqi: nightAQI,\n segment: `${month} Night`\n });\n \n dayIndex++;\n }\n });\n return data;\n};\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 600,\n});\n\nchart.options({\n type: 'interval',\n data: generateData(),\n encode: {\n x: 'dayIndex',\n y: 'aqi',\n color: 'aqi',\n series: 'section',\n },\n transform: [\n { type: 'dodgeX' }\n ],\n scale: {\n color: {\n type: 'threshold',\n domain: [50, 100, 150, 200, 300],\n range: ['#00e400', '#ffff00', '#ff7e00', '#ff0000', '#99004c', '#7e0023'],\n guide: {\n title: 'AQI 等级',\n items: [\n { value: 25, label: '优 (0-50)' },\n { value: 75, label: '良 (51-100)' },\n { value: 125, label: '轻度污染 (101-150)' },\n { value: 175, label: '中度污染 (151-200)' },\n { value: 250, label: '重度污染 (201-300)' },\n { value: 350, label: '严重污染 (>300)' }\n ]\n }\n },\n y: { domain: [0, 400] }\n },\n coordinate: {\n type: 'helix',\n startAngle: Math.PI / 2,\n endAngle: Math.PI / 2 + Math.PI * 6,\n innerRadius: 0.15,\n outerRadius: 0.95,\n },\n style: {\n lineWidth: 0,\n },\n title: {\n title: '城市 AQI 年度昼夜螺旋分布图',\n subtitle: '基于月度与昼夜分段的空气质量指数变化展示',\n },\n legend: {\n color: {\n position: 'right',\n layout: { justifyContent: 'center' },\n }\n },\n tooltip: {\n title: 'time',\n items: [\n { field: 'section', name: '时段' },\n { field: 'aqi', name: 'AQI指数', valueFormatter: (d) => d.toFixed(1) },\n { field: 'segment', name: '月份' }\n ]\n }\n});\n\nchart.render();", + "duration": 31439, + "retrievedSkillIds": [ + "g2-coord-helix", + "g2-mark-interval-basic", + "g2-mark-helix", + "g2-mark-arc-pie", + "g2-mark-bullet" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2681, + "expectedLength": 1544, + "similarity": 0.6644309469722076, + "extractedCode": "import { Chart } from '@antv/g2';\n\n// 生成完整的年度模拟数据(365天 × 昼夜 = 730条记录)\nconst generateData = () => {\n const data = [];\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n const daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n \n let dayIndex = 0;\n months.forEach((month, mIdx) => {\n for (let d = 1; d <= daysInMonth[mIdx]; d++) {\n const dayStr = `${month}-${String(d).padStart(2, '0')}`;\n // 模拟AQI变化:冬季较高,夏季较低,添加随机波动\n const seasonalBase = 60 + 40 * Math.sin((dayIndex / 365) * Math.PI * 2 + Math.PI / 2);\n \n // Day AQI(白天通常较高)\n const dayAQI = Math.max(15, Math.min(280, seasonalBase + 25 + Math.random() * 30));\n data.push({\n time: dayStr,\n dayIndex: dayIndex,\n section: 'Day',\n aqi: dayAQI,\n segment: `${month} Day`\n });\n \n // Night AQI(夜间通常较低)\n const nightAQI = Math.max(10, Math.min(250, seasonalBase - 10 + Math.random() * 25));\n data.push({\n time: dayStr,\n dayIndex: dayIndex,\n section: 'Night',\n aqi: nightAQI,\n segment: `${month} Night`\n });\n \n dayIndex++;\n }\n });\n return data;\n};\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 600,\n});\n\nchart.options({\n type: 'interval',\n data: generateData(),\n encode: {\n x: 'dayIndex',\n y: 'aqi',\n color: 'aqi',\n series: 'section',\n },\n transform: [\n { type: 'dodgeX' }\n ],\n scale: {\n color: {\n type: 'threshold',\n domain: [50, 100, 150, 200, 300],\n range: ['#00e400', '#ffff00', '#ff7e00', '#ff0000', '#99004c', '#7e0023'],\n guide: {\n title: 'AQI 等级',\n items: [\n { value: 25, label: '优 (0-50)' },\n { value: 75, label: '良 (51-100)' },\n { value: 125, label: '轻度污染 (101-150)' },\n { value: 175, label: '中度污染 (151-200)' },\n { value: 250, label: '重度污染 (201-300)' },\n { value: 350, label: '严重污染 (>300)' }\n ]\n }\n },\n y: { domain: [0, 400] }\n },\n coordinate: {\n type: 'helix',\n startAngle: Math.PI / 2,\n endAngle: Math.PI / 2 + Math.PI * 6,\n innerRadius: 0.15,\n outerRadius: 0.95,\n },\n style: {\n lineWidth: 0,\n },\n title: {\n title: '城市 AQI 年度昼夜螺旋分布图',\n subtitle: '基于月度与昼夜分段的空气质量指数变化展示',\n },\n legend: {\n color: {\n position: 'right',\n layout: { justifyContent: 'center' },\n }\n },\n tooltip: {\n title: 'time',\n items: [\n { field: 'section', name: '时段' },\n { field: 'aqi', name: 'AQI指数', valueFormatter: (d) => d.toFixed(1) },\n { field: 'segment', name: '月份' }\n ]\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "forEach", + "String", + "padStart", + "sin", + "max", + "min", + "random", + "push", + "max", + "min", + "random", + "push", + "Chart", + "options", + "generateData", + "toFixed", + "render" + ], + "objectKeys": [ + "time", + "dayIndex", + "section", + "aqi", + "segment", + "time", + "dayIndex", + "section", + "aqi", + "segment", + "container", + "autoFit", + "height", + "type", + "data", + "encode", + "x", + "y", + "color", + "series", + "transform", + "type", + "scale", + "color", + "type", + "domain", + "range", + "guide", + "title", + "items", + "value", + "label", + "value", + "label", + "value", + "label", + "value", + "label", + "value", + "label", + "value", + "label", + "y", + "domain", + "coordinate", + "type", + "startAngle", + "endAngle", + "innerRadius", + "outerRadius", + "style", + "lineWidth", + "title", + "title", + "subtitle", + "legend", + "color", + "position", + "layout", + "justifyContent", + "tooltip", + "title", + "items", + "field", + "name", + "field", + "name", + "valueFormatter", + "field", + "name" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.interval", + "x6.label" + ] + } + } + }, + { + "id": "case-119", + "query": "根据描述绘制图表,使用 G2 创建一个折线图,展示年份和数值的时间趋势,数值同时用于Y轴映射和线条颜色编码,采用 turbo 调色板,配置渐变线条样式。\n参考数据:\n[{\"year\":\"2000\",\"value\":50},{\"year\":\"2001\",\"value\":52},{\"year\":\"2002\",\"value\":40},{\"year\":\"2003\",\"value\":70},{\"year\":\"2004\",\"value\":60},{\"year\":\"2005\",\"value\":80},{\"year\":\"2006\",\"value\":88},{\"year\":\"2007\",\"value\":86},{\"year\":\"2008\",\"value\":90},{\"year\":\"2009\",\"value\":78}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'line',\n data: [\n { year: '2000', value: 50 },\n { year: '2001', value: 52 },\n { year: '2002', value: 40 },\n { year: '2003', value: 70 },\n { year: '2004', value: 60 },\n { year: '2005', value: 80 },\n { year: '2006', value: 88 },\n { year: '2007', value: 86 },\n { year: '2008', value: 90 },\n { year: '2009', value: 78 },\n { year: '2010', value: 110 },\n { year: '2011', value: 115 },\n ],\n encode: {\n x: 'year',\n y: 'value',\n color: 'value',\n },\n scale: {\n y: { nice: true },\n color: { palette: 'turbo' },\n },\n style: {\n gradient: 'y', // 渐变的方向\n lineWidth: 2,\n lineJoin: 'bevel', // 连接处样式\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"year\":\"2000\",\"value\":50},\n {\"year\":\"2001\",\"value\":52},\n {\"year\":\"2002\",\"value\":40},\n {\"year\":\"2003\",\"value\":70},\n {\"year\":\"2004\",\"value\":60},\n {\"year\":\"2005\",\"value\":80},\n {\"year\":\"2006\",\"value\":88},\n {\"year\":\"2007\",\"value\":86},\n {\"year\":\"2008\",\"value\":90},\n {\"year\":\"2009\",\"value\":78}\n].map(d => ({ ...d, year: new Date(d.year) }));\n\nchart.options({\n type: 'line',\n data,\n encode: {\n x: 'year',\n y: 'value',\n color: 'value',\n },\n scale: {\n color: {\n palette: 'turbo',\n },\n },\n style: {\n lineWidth: 3,\n },\n});\n\nchart.render();", + "duration": 26106, + "retrievedSkillIds": [ + "g2-mark-line-basic", + "g2-mark-line-multi", + "g2-scale-linear", + "g2-scale-time", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 706, + "expectedLength": 791, + "similarity": 0.7083644390929159, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"year\":\"2000\",\"value\":50},\n {\"year\":\"2001\",\"value\":52},\n {\"year\":\"2002\",\"value\":40},\n {\"year\":\"2003\",\"value\":70},\n {\"year\":\"2004\",\"value\":60},\n {\"year\":\"2005\",\"value\":80},\n {\"year\":\"2006\",\"value\":88},\n {\"year\":\"2007\",\"value\":86},\n {\"year\":\"2008\",\"value\":90},\n {\"year\":\"2009\",\"value\":78}\n].map(d => ({ ...d, year: new Date(d.year) }));\n\nchart.options({\n type: 'line',\n data,\n encode: {\n x: 'year',\n y: 'value',\n color: 'value',\n },\n scale: {\n color: {\n palette: 'turbo',\n },\n },\n style: {\n lineWidth: 3,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "map", + "Date", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "year", + "type", + "encode", + "x", + "y", + "color", + "scale", + "color", + "palette", + "style", + "lineWidth" + ], + "stringLiterals": [ + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value", + "year", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "type.line" + ] + } + } + }, + { + "id": "case-120", + "query": "根据描述绘制图表,基于每日气象数据(温度、降水、风力、天气类型)渲染一个类型为'cell'的图表,使用日期的UTC日作为x轴,UTC月作为y轴,颜色映射到最高温度(temp_max),并应用分组和顺序色板变换。参考数据:\n[{\"date\":\"2012-01-01\",\"precipitation\":0,\"temp_max\":12.8,\"temp_min\":5,\"wind\":4.7,\"weather\":\"drizzle\"},{\"date\":\"2012-01-02\",\"precipitation\":10.9,\"temp_max\":10.6,\"temp_min\":2.8,\"wind\":4.5,\"weather\":\"rain\"},{\"date\":\"2012-01-03\",\"precipitation\":0.8,\"temp_max\":11.7,\"temp_min\":7.2,\"wind\":2.3,\"weather\":\"rain\"},{\"date\":\"2012-01-04\",\"precipitation\":20.3,\"temp_max\":12.2,\"temp_min\":5.6,\"wind\":4.7,\"weather\":\"rain\"},{\"date\":\"2012-01-05\",\"precipitation\":1.3,\"temp_max\":8.9,\"temp_min\":2.8,\"wind\":6.1,\"weather\":\"rain\"},{\"date\":\"2012-01-06\",\"precipitation\":2.5,\"temp_max\":4.4,\"temp_min\":2.2,\"wind\":2.2,\"weather\":\"rain\"},{\"date\":\"2012-01-07\",\"precipitation\":0,\"temp_max\":7.2,\"temp_min\":2.8,\"wind\":2.3,\"weather\":\"rain\"},{\"date\":\"2012-01-08\",\"precipitation\":0,\"temp_max\":10,\"temp_min\":2.8,\"wind\":2,\"weather\":\"sun\"},{\"date\":\"2012-01-09\",\"precipitation\":4.3,\"temp_max\":9.4,\"temp_min\":5,\"wind\":3.4,\"weather\":\"rain\"},{\"date\":\"2012-01-10\",\"precipitation\":1,\"temp_max\":6.1,\"temp_min\":0.6,\"wind\":3.4,\"weather\":\"rain\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'cell',\n height: 300,\n data: {\n type: 'inline',\n value: [\n {\n \"date\": \"2012-01-01\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 5,\n \"wind\": 4.7,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-01-02\",\n \"precipitation\": 10.9,\n \"temp_max\": 10.6,\n \"temp_min\": 2.8,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-03\",\n \"precipitation\": 0.8,\n \"temp_max\": 11.7,\n \"temp_min\": 7.2,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-04\",\n \"precipitation\": 20.3,\n \"temp_max\": 12.2,\n \"temp_min\": 5.6,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-05\",\n \"precipitation\": 1.3,\n \"temp_max\": 8.9,\n \"temp_min\": 2.8,\n \"wind\": 6.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-06\",\n \"precipitation\": 2.5,\n \"temp_max\": 4.4,\n \"temp_min\": 2.2,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-07\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 2.8,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-08\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 2.8,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-01-09\",\n \"precipitation\": 4.3,\n \"temp_max\": 9.4,\n \"temp_min\": 5,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-10\",\n \"precipitation\": 1,\n \"temp_max\": 6.1,\n \"temp_min\": 0.6,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-11\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": -1.1,\n \"wind\": 5.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-01-12\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": -1.7,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-01-13\",\n \"precipitation\": 0,\n \"temp_max\": 5,\n \"temp_min\": -2.8,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-01-14\",\n \"precipitation\": 4.1,\n \"temp_max\": 4.4,\n \"temp_min\": 0.6,\n \"wind\": 5.3,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-01-15\",\n \"precipitation\": 5.3,\n \"temp_max\": 1.1,\n \"temp_min\": -3.3,\n \"wind\": 3.2,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-01-16\",\n \"precipitation\": 2.5,\n \"temp_max\": 1.7,\n \"temp_min\": -2.8,\n \"wind\": 5,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-01-17\",\n \"precipitation\": 8.1,\n \"temp_max\": 3.3,\n \"temp_min\": 0,\n \"wind\": 5.6,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-01-18\",\n \"precipitation\": 19.8,\n \"temp_max\": 0,\n \"temp_min\": -2.8,\n \"wind\": 5,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-01-19\",\n \"precipitation\": 15.2,\n \"temp_max\": -1.1,\n \"temp_min\": -2.8,\n \"wind\": 1.6,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-01-20\",\n \"precipitation\": 13.5,\n \"temp_max\": 7.2,\n \"temp_min\": -1.1,\n \"wind\": 2.3,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-01-21\",\n \"precipitation\": 3,\n \"temp_max\": 8.3,\n \"temp_min\": 3.3,\n \"wind\": 8.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-22\",\n \"precipitation\": 6.1,\n \"temp_max\": 6.7,\n \"temp_min\": 2.2,\n \"wind\": 4.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-23\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 1.1,\n \"wind\": 3.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-24\",\n \"precipitation\": 8.6,\n \"temp_max\": 10,\n \"temp_min\": 2.2,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-25\",\n \"precipitation\": 8.1,\n \"temp_max\": 8.9,\n \"temp_min\": 4.4,\n \"wind\": 5.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-26\",\n \"precipitation\": 4.8,\n \"temp_max\": 8.9,\n \"temp_min\": 1.1,\n \"wind\": 4.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-27\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": -2.2,\n \"wind\": 1.4,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-01-28\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": 0.6,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-29\",\n \"precipitation\": 27.7,\n \"temp_max\": 9.4,\n \"temp_min\": 3.9,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-30\",\n \"precipitation\": 3.6,\n \"temp_max\": 8.3,\n \"temp_min\": 6.1,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-01-31\",\n \"precipitation\": 1.8,\n \"temp_max\": 9.4,\n \"temp_min\": 6.1,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-01\",\n \"precipitation\": 13.5,\n \"temp_max\": 8.9,\n \"temp_min\": 3.3,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-02\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 1.7,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-03\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 2.2,\n \"wind\": 5.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-04\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 5,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-05\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 1.7,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-06\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 1.7,\n \"wind\": 5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-07\",\n \"precipitation\": 0.3,\n \"temp_max\": 15.6,\n \"temp_min\": 7.8,\n \"wind\": 5.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-08\",\n \"precipitation\": 2.8,\n \"temp_max\": 10,\n \"temp_min\": 5,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-09\",\n \"precipitation\": 2.5,\n \"temp_max\": 11.1,\n \"temp_min\": 7.8,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-10\",\n \"precipitation\": 2.5,\n \"temp_max\": 12.8,\n \"temp_min\": 6.7,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-11\",\n \"precipitation\": 0.8,\n \"temp_max\": 8.9,\n \"temp_min\": 5.6,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-12\",\n \"precipitation\": 1,\n \"temp_max\": 8.3,\n \"temp_min\": 5,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-13\",\n \"precipitation\": 11.4,\n \"temp_max\": 7.2,\n \"temp_min\": 4.4,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-14\",\n \"precipitation\": 2.5,\n \"temp_max\": 6.7,\n \"temp_min\": 1.1,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-15\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 0.6,\n \"wind\": 1.8,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-02-16\",\n \"precipitation\": 1.8,\n \"temp_max\": 7.2,\n \"temp_min\": 3.3,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-17\",\n \"precipitation\": 17.3,\n \"temp_max\": 10,\n \"temp_min\": 4.4,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-18\",\n \"precipitation\": 6.4,\n \"temp_max\": 6.7,\n \"temp_min\": 3.9,\n \"wind\": 8.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-19\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": 2.2,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-20\",\n \"precipitation\": 3,\n \"temp_max\": 7.8,\n \"temp_min\": 1.7,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-21\",\n \"precipitation\": 0.8,\n \"temp_max\": 10,\n \"temp_min\": 7.8,\n \"wind\": 7.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-22\",\n \"precipitation\": 8.6,\n \"temp_max\": 10,\n \"temp_min\": 2.8,\n \"wind\": 5.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-23\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 2.8,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-24\",\n \"precipitation\": 11.4,\n \"temp_max\": 6.7,\n \"temp_min\": 4.4,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-25\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 2.8,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-02-26\",\n \"precipitation\": 1.3,\n \"temp_max\": 5,\n \"temp_min\": -1.1,\n \"wind\": 3.4,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-02-27\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": -2.2,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-02-28\",\n \"precipitation\": 3.6,\n \"temp_max\": 6.7,\n \"temp_min\": -0.6,\n \"wind\": 4.2,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-02-29\",\n \"precipitation\": 0.8,\n \"temp_max\": 5,\n \"temp_min\": 1.1,\n \"wind\": 7,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-03-01\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": 1.1,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-03-02\",\n \"precipitation\": 2,\n \"temp_max\": 6.7,\n \"temp_min\": 3.9,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-03\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 6.7,\n \"wind\": 7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-03-04\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 6.7,\n \"wind\": 5.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-05\",\n \"precipitation\": 6.9,\n \"temp_max\": 7.8,\n \"temp_min\": 1.1,\n \"wind\": 6.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-06\",\n \"precipitation\": 0.5,\n \"temp_max\": 6.7,\n \"temp_min\": 0,\n \"wind\": 2.7,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-03-07\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": -1.7,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-03-08\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 0.6,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-03-09\",\n \"precipitation\": 3.6,\n \"temp_max\": 9.4,\n \"temp_min\": 5,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-10\",\n \"precipitation\": 10.4,\n \"temp_max\": 7.2,\n \"temp_min\": 6.1,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-11\",\n \"precipitation\": 13.7,\n \"temp_max\": 6.7,\n \"temp_min\": 2.8,\n \"wind\": 5.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-12\",\n \"precipitation\": 19.3,\n \"temp_max\": 8.3,\n \"temp_min\": 0.6,\n \"wind\": 6.2,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-03-13\",\n \"precipitation\": 9.4,\n \"temp_max\": 5.6,\n \"temp_min\": 0.6,\n \"wind\": 5.3,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-03-14\",\n \"precipitation\": 8.6,\n \"temp_max\": 7.8,\n \"temp_min\": 1.1,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-15\",\n \"precipitation\": 23.9,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 5.8,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-03-16\",\n \"precipitation\": 8.4,\n \"temp_max\": 8.9,\n \"temp_min\": 3.9,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-17\",\n \"precipitation\": 9.4,\n \"temp_max\": 10,\n \"temp_min\": 0.6,\n \"wind\": 3.8,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-03-18\",\n \"precipitation\": 3.6,\n \"temp_max\": 5,\n \"temp_min\": -0.6,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-19\",\n \"precipitation\": 2,\n \"temp_max\": 7.2,\n \"temp_min\": -1.1,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-20\",\n \"precipitation\": 3.6,\n \"temp_max\": 7.8,\n \"temp_min\": 2.2,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-21\",\n \"precipitation\": 1.3,\n \"temp_max\": 8.9,\n \"temp_min\": 1.1,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-22\",\n \"precipitation\": 4.1,\n \"temp_max\": 10,\n \"temp_min\": 1.7,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-23\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 0.6,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-03-24\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 3.3,\n \"wind\": 5.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-03-25\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 2.2,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-26\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 6.1,\n \"wind\": 4.3,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-03-27\",\n \"precipitation\": 4.8,\n \"temp_max\": 14.4,\n \"temp_min\": 6.7,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-28\",\n \"precipitation\": 1.3,\n \"temp_max\": 10.6,\n \"temp_min\": 7.2,\n \"wind\": 5.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-29\",\n \"precipitation\": 27.4,\n \"temp_max\": 10,\n \"temp_min\": 6.1,\n \"wind\": 4.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-30\",\n \"precipitation\": 5.6,\n \"temp_max\": 9.4,\n \"temp_min\": 5,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-03-31\",\n \"precipitation\": 13.2,\n \"temp_max\": 10,\n \"temp_min\": 2.8,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-01\",\n \"precipitation\": 1.5,\n \"temp_max\": 8.9,\n \"temp_min\": 4.4,\n \"wind\": 6.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-02\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 4.4,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-03\",\n \"precipitation\": 1.5,\n \"temp_max\": 11.7,\n \"temp_min\": 3.3,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-04\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 2.8,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-05\",\n \"precipitation\": 4.6,\n \"temp_max\": 9.4,\n \"temp_min\": 2.8,\n \"wind\": 1.8,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-04-06\",\n \"precipitation\": 0.3,\n \"temp_max\": 11.1,\n \"temp_min\": 3.3,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-07\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 1.7,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-08\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 7.2,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-09\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 6.1,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-10\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 8.9,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-11\",\n \"precipitation\": 2.3,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-12\",\n \"precipitation\": 0.5,\n \"temp_max\": 13.9,\n \"temp_min\": 5.6,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-13\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 3.9,\n \"wind\": 4,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-04-14\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 3.3,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-15\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 7.2,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-16\",\n \"precipitation\": 8.1,\n \"temp_max\": 13.3,\n \"temp_min\": 6.7,\n \"wind\": 5.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-17\",\n \"precipitation\": 1.8,\n \"temp_max\": 10,\n \"temp_min\": 4.4,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-18\",\n \"precipitation\": 1.8,\n \"temp_max\": 13.3,\n \"temp_min\": 7.2,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-19\",\n \"precipitation\": 10.9,\n \"temp_max\": 13.9,\n \"temp_min\": 5,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-20\",\n \"precipitation\": 6.6,\n \"temp_max\": 13.3,\n \"temp_min\": 6.7,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-21\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 4.4,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-22\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 8.3,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-23\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 8.9,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-04-24\",\n \"precipitation\": 4.3,\n \"temp_max\": 13.9,\n \"temp_min\": 10,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-25\",\n \"precipitation\": 10.7,\n \"temp_max\": 16.7,\n \"temp_min\": 8.9,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-26\",\n \"precipitation\": 3.8,\n \"temp_max\": 13.9,\n \"temp_min\": 6.7,\n \"wind\": 5.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-27\",\n \"precipitation\": 0.8,\n \"temp_max\": 13.3,\n \"temp_min\": 6.1,\n \"wind\": 4.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-28\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 8.3,\n \"wind\": 2.5,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-04-29\",\n \"precipitation\": 4.3,\n \"temp_max\": 15.6,\n \"temp_min\": 8.9,\n \"wind\": 1.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-04-30\",\n \"precipitation\": 4.3,\n \"temp_max\": 12.8,\n \"temp_min\": 7.2,\n \"wind\": 8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-01\",\n \"precipitation\": 0.5,\n \"temp_max\": 11.7,\n \"temp_min\": 6.1,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-02\",\n \"precipitation\": 0.5,\n \"temp_max\": 13.3,\n \"temp_min\": 5.6,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-03\",\n \"precipitation\": 18.5,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-04\",\n \"precipitation\": 1.8,\n \"temp_max\": 12.2,\n \"temp_min\": 6.1,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-05\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 5,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-06\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 5,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-07\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 6.1,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-08\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 9.4,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-09\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 6.7,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-10\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 3.9,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-11\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 4.4,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-12\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 6.7,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-13\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 9.4,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-14\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.8,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-15\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 9.4,\n \"wind\": 4.1,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-05-16\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 9.4,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-17\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 6.7,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-18\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 7.8,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-19\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 7.2,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-20\",\n \"precipitation\": 6.4,\n \"temp_max\": 14.4,\n \"temp_min\": 11.7,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-21\",\n \"precipitation\": 14,\n \"temp_max\": 16.7,\n \"temp_min\": 10,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-22\",\n \"precipitation\": 6.1,\n \"temp_max\": 12.8,\n \"temp_min\": 8.9,\n \"wind\": 4.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-23\",\n \"precipitation\": 0.3,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 6.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-24\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 8.9,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-25\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 8.9,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-26\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 8.9,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-27\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 11.7,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-28\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 10,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-29\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 7.8,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-05-30\",\n \"precipitation\": 0.3,\n \"temp_max\": 18.9,\n \"temp_min\": 11.1,\n \"wind\": 1.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-05-31\",\n \"precipitation\": 3.8,\n \"temp_max\": 17.8,\n \"temp_min\": 12.2,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-01\",\n \"precipitation\": 6.6,\n \"temp_max\": 20,\n \"temp_min\": 12.8,\n \"wind\": 3.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-02\",\n \"precipitation\": 0.3,\n \"temp_max\": 18.9,\n \"temp_min\": 10.6,\n \"wind\": 3.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-03\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 9.4,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-04\",\n \"precipitation\": 1.3,\n \"temp_max\": 12.8,\n \"temp_min\": 8.9,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-05\",\n \"precipitation\": 16,\n \"temp_max\": 13.3,\n \"temp_min\": 8.3,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-06\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 6.1,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-07\",\n \"precipitation\": 16.5,\n \"temp_max\": 16.1,\n \"temp_min\": 8.9,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-08\",\n \"precipitation\": 1.5,\n \"temp_max\": 15,\n \"temp_min\": 8.3,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-09\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 8.3,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-10\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 10,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-11\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 10,\n \"wind\": 1.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-12\",\n \"precipitation\": 0.8,\n \"temp_max\": 18.3,\n \"temp_min\": 12.8,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-13\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 11.1,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-14\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 10,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-15\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 9.4,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-16\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 15,\n \"wind\": 4.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-17\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 11.7,\n \"wind\": 6.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-18\",\n \"precipitation\": 3,\n \"temp_max\": 17.2,\n \"temp_min\": 10,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-19\",\n \"precipitation\": 1,\n \"temp_max\": 19.4,\n \"temp_min\": 10,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-20\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 10,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-21\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 11.7,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-22\",\n \"precipitation\": 15.7,\n \"temp_max\": 13.9,\n \"temp_min\": 11.7,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-23\",\n \"precipitation\": 8.6,\n \"temp_max\": 15.6,\n \"temp_min\": 9.4,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-24\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 9.4,\n \"wind\": 2,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-06-25\",\n \"precipitation\": 0.5,\n \"temp_max\": 19.4,\n \"temp_min\": 11.1,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-26\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10.6,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-27\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 8.9,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-06-28\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 11.7,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-29\",\n \"precipitation\": 0.3,\n \"temp_max\": 21.7,\n \"temp_min\": 15,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-06-30\",\n \"precipitation\": 3,\n \"temp_max\": 20,\n \"temp_min\": 13.3,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-01\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 12.2,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-02\",\n \"precipitation\": 2,\n \"temp_max\": 18.9,\n \"temp_min\": 11.7,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-03\",\n \"precipitation\": 5.8,\n \"temp_max\": 18.3,\n \"temp_min\": 10.6,\n \"wind\": 6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-04\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 9.4,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-05\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 10.6,\n \"wind\": 3.1,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-07-06\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 11.1,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-07\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.8,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-08\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 14.4,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-09\",\n \"precipitation\": 1.5,\n \"temp_max\": 25,\n \"temp_min\": 12.8,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-10\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 11.1,\n \"wind\": 2.3,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-07-11\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.3,\n \"wind\": 2.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2012-07-12\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 13.3,\n \"wind\": 2.7,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-07-13\",\n \"precipitation\": 0.5,\n \"temp_max\": 23.3,\n \"temp_min\": 13.9,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-14\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 15,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-15\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 13.3,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-16\",\n \"precipitation\": 0.3,\n \"temp_max\": 26.1,\n \"temp_min\": 13.3,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-17\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 15,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-18\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 14.4,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-19\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 14.4,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-20\",\n \"precipitation\": 15.2,\n \"temp_max\": 19.4,\n \"temp_min\": 13.9,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-21\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.9,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-22\",\n \"precipitation\": 1,\n \"temp_max\": 20.6,\n \"temp_min\": 12.2,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-23\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 11.1,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-07-24\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 12.2,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-25\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.8,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-26\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 12.8,\n \"wind\": 2.2,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-07-27\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 13.9,\n \"wind\": 2.8,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-07-28\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 13.3,\n \"wind\": 1.7,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-07-29\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 15,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-30\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 13.3,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-07-31\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 13.9,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-01\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.3,\n \"wind\": 2.2,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-08-02\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 12.2,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-03\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 12.8,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-04\",\n \"precipitation\": 0,\n \"temp_max\": 33.9,\n \"temp_min\": 16.7,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-05\",\n \"precipitation\": 0,\n \"temp_max\": 33.9,\n \"temp_min\": 17.8,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-06\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 15.6,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-08-07\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 15,\n \"wind\": 2.6,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-08-08\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 15,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-09\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 14.4,\n \"wind\": 3.8,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-08-10\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 12.2,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-11\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 13.3,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-12\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 15,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-13\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 15,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-14\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 13.9,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-15\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 16.7,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-16\",\n \"precipitation\": 0,\n \"temp_max\": 34.4,\n \"temp_min\": 18.3,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-17\",\n \"precipitation\": 0,\n \"temp_max\": 32.8,\n \"temp_min\": 16.1,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-18\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 14.4,\n \"wind\": 3,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-08-19\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 15,\n \"wind\": 2.7,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-08-20\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 15,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-21\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 13.3,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-08-22\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 13.3,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-23\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 13.9,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-24\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 10,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-25\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 11.7,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-26\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 12.2,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-27\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.3,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-28\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 12.2,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-29\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 13.3,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-30\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 12.8,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-08-31\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 10.6,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-01\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 10.6,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-02\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 10,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-03\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 12.8,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-04\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 11.1,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-05\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 11.7,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-06\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 14.4,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-07\",\n \"precipitation\": 0,\n \"temp_max\": 32.2,\n \"temp_min\": 13.3,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-08\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 13.3,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-09\",\n \"precipitation\": 0.3,\n \"temp_max\": 18.9,\n \"temp_min\": 13.9,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-09-10\",\n \"precipitation\": 0.3,\n \"temp_max\": 20,\n \"temp_min\": 11.7,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-09-11\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 8.9,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-12\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 10,\n \"wind\": 5.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-13\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 11.7,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-14\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 11.1,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-15\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 11.1,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-16\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 9.4,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-17\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 11.7,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2012-09-18\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 11.7,\n \"wind\": 1.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-19\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 11.7,\n \"wind\": 1.9,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-09-20\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 10,\n \"wind\": 2.5,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-09-21\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 12.8,\n \"wind\": 2.1,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-09-22\",\n \"precipitation\": 0.3,\n \"temp_max\": 19.4,\n \"temp_min\": 11.7,\n \"wind\": 1.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-09-23\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 10,\n \"wind\": 1.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2012-09-24\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 10,\n \"wind\": 1.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2012-09-25\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 11.1,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-26\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 9.4,\n \"wind\": 1.7,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-09-27\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 10,\n \"wind\": 1.7,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-09-28\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 12.2,\n \"wind\": 1.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-09-29\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 12.2,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-09-30\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 7.8,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-01\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 8.9,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-02\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 10,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-03\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 7.8,\n \"wind\": 7.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-04\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 8.3,\n \"wind\": 6.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-05\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 8.9,\n \"wind\": 5.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-06\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 7.8,\n \"wind\": 5.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-07\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 7.8,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-08\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 7.8,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-09\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 8.9,\n \"wind\": 1.6,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-10-10\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 8.3,\n \"wind\": 1.4,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-10-11\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 7.2,\n \"wind\": 1.3,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-10-12\",\n \"precipitation\": 2,\n \"temp_max\": 13.9,\n \"temp_min\": 8.9,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-13\",\n \"precipitation\": 4.8,\n \"temp_max\": 15.6,\n \"temp_min\": 12.2,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-14\",\n \"precipitation\": 16.5,\n \"temp_max\": 17.8,\n \"temp_min\": 13.3,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-15\",\n \"precipitation\": 7.9,\n \"temp_max\": 17.2,\n \"temp_min\": 11.1,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-16\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 8.3,\n \"wind\": 5.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-17\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 6.1,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-18\",\n \"precipitation\": 20.8,\n \"temp_max\": 17.8,\n \"temp_min\": 6.7,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-19\",\n \"precipitation\": 4.8,\n \"temp_max\": 15,\n \"temp_min\": 9.4,\n \"wind\": 5.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-20\",\n \"precipitation\": 0.5,\n \"temp_max\": 11.1,\n \"temp_min\": 6.1,\n \"wind\": 5.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-21\",\n \"precipitation\": 6.4,\n \"temp_max\": 11.7,\n \"temp_min\": 4.4,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-22\",\n \"precipitation\": 8.9,\n \"temp_max\": 7.8,\n \"temp_min\": 3.3,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-23\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-24\",\n \"precipitation\": 7.1,\n \"temp_max\": 11.7,\n \"temp_min\": 6.1,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-25\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 6.7,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-10-26\",\n \"precipitation\": 1.5,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-27\",\n \"precipitation\": 23.1,\n \"temp_max\": 14.4,\n \"temp_min\": 9.4,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-28\",\n \"precipitation\": 6.1,\n \"temp_max\": 14.4,\n \"temp_min\": 10,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-29\",\n \"precipitation\": 10.9,\n \"temp_max\": 15.6,\n \"temp_min\": 10,\n \"wind\": 4.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-30\",\n \"precipitation\": 34.5,\n \"temp_max\": 15,\n \"temp_min\": 12.2,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-10-31\",\n \"precipitation\": 14.5,\n \"temp_max\": 15.6,\n \"temp_min\": 11.1,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-01\",\n \"precipitation\": 9.7,\n \"temp_max\": 15,\n \"temp_min\": 10.6,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-02\",\n \"precipitation\": 5.6,\n \"temp_max\": 15,\n \"temp_min\": 10.6,\n \"wind\": 1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-03\",\n \"precipitation\": 0.5,\n \"temp_max\": 15.6,\n \"temp_min\": 11.1,\n \"wind\": 3.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-04\",\n \"precipitation\": 8.1,\n \"temp_max\": 17.8,\n \"temp_min\": 12.8,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-05\",\n \"precipitation\": 0.8,\n \"temp_max\": 15,\n \"temp_min\": 7.8,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-06\",\n \"precipitation\": 0.3,\n \"temp_max\": 12.8,\n \"temp_min\": 6.7,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-07\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 3.9,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-08\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 1.1,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-09\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 1.1,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-10\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": -0.6,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-11-11\",\n \"precipitation\": 15.2,\n \"temp_max\": 8.9,\n \"temp_min\": 1.1,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-12\",\n \"precipitation\": 3.6,\n \"temp_max\": 12.8,\n \"temp_min\": 6.1,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-13\",\n \"precipitation\": 5.3,\n \"temp_max\": 11.1,\n \"temp_min\": 7.8,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-14\",\n \"precipitation\": 0.8,\n \"temp_max\": 11.1,\n \"temp_min\": 5,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-15\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 2.8,\n \"wind\": 2.4,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-11-16\",\n \"precipitation\": 5.6,\n \"temp_max\": 9.4,\n \"temp_min\": 2.2,\n \"wind\": 1.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-17\",\n \"precipitation\": 6.1,\n \"temp_max\": 12.2,\n \"temp_min\": 6.1,\n \"wind\": 5.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-18\",\n \"precipitation\": 7.9,\n \"temp_max\": 10,\n \"temp_min\": 6.1,\n \"wind\": 4.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-19\",\n \"precipitation\": 54.1,\n \"temp_max\": 13.3,\n \"temp_min\": 8.3,\n \"wind\": 6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-20\",\n \"precipitation\": 3.8,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-21\",\n \"precipitation\": 11.2,\n \"temp_max\": 8.3,\n \"temp_min\": 3.9,\n \"wind\": 5.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-22\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 2.8,\n \"wind\": 1.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-23\",\n \"precipitation\": 32,\n \"temp_max\": 9.4,\n \"temp_min\": 6.1,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-24\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 3.9,\n \"wind\": 1.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-25\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 1.1,\n \"wind\": 3.6,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-11-26\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 1.7,\n \"wind\": 3.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2012-11-27\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 1.7,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-11-28\",\n \"precipitation\": 2.8,\n \"temp_max\": 9.4,\n \"temp_min\": 2.2,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-29\",\n \"precipitation\": 1.5,\n \"temp_max\": 12.8,\n \"temp_min\": 7.8,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-11-30\",\n \"precipitation\": 35.6,\n \"temp_max\": 15,\n \"temp_min\": 7.8,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-01\",\n \"precipitation\": 4.1,\n \"temp_max\": 13.3,\n \"temp_min\": 8.3,\n \"wind\": 5.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-02\",\n \"precipitation\": 19.6,\n \"temp_max\": 8.3,\n \"temp_min\": 7.2,\n \"wind\": 6.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-03\",\n \"precipitation\": 13,\n \"temp_max\": 9.4,\n \"temp_min\": 7.2,\n \"wind\": 4.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-04\",\n \"precipitation\": 14.2,\n \"temp_max\": 11.7,\n \"temp_min\": 7.2,\n \"wind\": 6.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-05\",\n \"precipitation\": 1.5,\n \"temp_max\": 8.9,\n \"temp_min\": 4.4,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-06\",\n \"precipitation\": 1.5,\n \"temp_max\": 7.2,\n \"temp_min\": 6.1,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-07\",\n \"precipitation\": 1,\n \"temp_max\": 7.8,\n \"temp_min\": 3.3,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-08\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": 3.3,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2012-12-09\",\n \"precipitation\": 1.5,\n \"temp_max\": 6.7,\n \"temp_min\": 2.8,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-10\",\n \"precipitation\": 0.5,\n \"temp_max\": 7.2,\n \"temp_min\": 5.6,\n \"wind\": 1.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-11\",\n \"precipitation\": 3,\n \"temp_max\": 7.8,\n \"temp_min\": 5.6,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-12\",\n \"precipitation\": 8.1,\n \"temp_max\": 6.7,\n \"temp_min\": 4.4,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-13\",\n \"precipitation\": 2.3,\n \"temp_max\": 7.2,\n \"temp_min\": 3.3,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-14\",\n \"precipitation\": 7.9,\n \"temp_max\": 6.1,\n \"temp_min\": 1.1,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-15\",\n \"precipitation\": 5.3,\n \"temp_max\": 4.4,\n \"temp_min\": 0.6,\n \"wind\": 5.1,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-12-16\",\n \"precipitation\": 22.6,\n \"temp_max\": 6.7,\n \"temp_min\": 3.3,\n \"wind\": 5.5,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-12-17\",\n \"precipitation\": 2,\n \"temp_max\": 8.3,\n \"temp_min\": 1.7,\n \"wind\": 9.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-18\",\n \"precipitation\": 3.3,\n \"temp_max\": 3.9,\n \"temp_min\": 0.6,\n \"wind\": 5.3,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-12-19\",\n \"precipitation\": 13.7,\n \"temp_max\": 8.3,\n \"temp_min\": 1.7,\n \"wind\": 5.8,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-12-20\",\n \"precipitation\": 13.2,\n \"temp_max\": 7.2,\n \"temp_min\": 0.6,\n \"wind\": 3.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-21\",\n \"precipitation\": 1.8,\n \"temp_max\": 8.3,\n \"temp_min\": -1.7,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-22\",\n \"precipitation\": 3.3,\n \"temp_max\": 8.3,\n \"temp_min\": 3.9,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-23\",\n \"precipitation\": 6.6,\n \"temp_max\": 7.2,\n \"temp_min\": 3.3,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-24\",\n \"precipitation\": 0.3,\n \"temp_max\": 5.6,\n \"temp_min\": 2.8,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-25\",\n \"precipitation\": 13.5,\n \"temp_max\": 5.6,\n \"temp_min\": 2.8,\n \"wind\": 4.2,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2012-12-26\",\n \"precipitation\": 4.6,\n \"temp_max\": 6.7,\n \"temp_min\": 3.3,\n \"wind\": 4.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-27\",\n \"precipitation\": 4.1,\n \"temp_max\": 7.8,\n \"temp_min\": 3.3,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-28\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 3.9,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-29\",\n \"precipitation\": 1.5,\n \"temp_max\": 5,\n \"temp_min\": 3.3,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2012-12-30\",\n \"precipitation\": 0,\n \"temp_max\": 4.4,\n \"temp_min\": 0,\n \"wind\": 1.8,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2012-12-31\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -1.1,\n \"wind\": 2,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-01\",\n \"precipitation\": 0,\n \"temp_max\": 5,\n \"temp_min\": -2.8,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-01-02\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": -1.1,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-01-03\",\n \"precipitation\": 4.1,\n \"temp_max\": 6.7,\n \"temp_min\": -1.7,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-04\",\n \"precipitation\": 2.5,\n \"temp_max\": 10,\n \"temp_min\": 2.2,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-05\",\n \"precipitation\": 3,\n \"temp_max\": 6.7,\n \"temp_min\": 4.4,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-06\",\n \"precipitation\": 2,\n \"temp_max\": 7.2,\n \"temp_min\": 2.8,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-07\",\n \"precipitation\": 2.3,\n \"temp_max\": 10,\n \"temp_min\": 4.4,\n \"wind\": 7.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-08\",\n \"precipitation\": 16.3,\n \"temp_max\": 11.7,\n \"temp_min\": 5.6,\n \"wind\": 6.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-09\",\n \"precipitation\": 38.4,\n \"temp_max\": 10,\n \"temp_min\": 1.7,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-10\",\n \"precipitation\": 0.3,\n \"temp_max\": 3.3,\n \"temp_min\": -0.6,\n \"wind\": 2.1,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2013-01-11\",\n \"precipitation\": 0,\n \"temp_max\": 2.8,\n \"temp_min\": -2.8,\n \"wind\": 1.9,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-12\",\n \"precipitation\": 0,\n \"temp_max\": 2.8,\n \"temp_min\": -3.9,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-01-13\",\n \"precipitation\": 0,\n \"temp_max\": 2.2,\n \"temp_min\": -4.4,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-01-14\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -2.2,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-01-15\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": -0.6,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-01-16\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": -3.9,\n \"wind\": 1.8,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-17\",\n \"precipitation\": 0,\n \"temp_max\": 3.9,\n \"temp_min\": -2.8,\n \"wind\": 1,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-18\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -1.1,\n \"wind\": 1.3,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-19\",\n \"precipitation\": 0,\n \"temp_max\": 1.1,\n \"temp_min\": -0.6,\n \"wind\": 1.9,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-20\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -0.6,\n \"wind\": 2.1,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-21\",\n \"precipitation\": 0,\n \"temp_max\": 2.2,\n \"temp_min\": -1.7,\n \"wind\": 1.1,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-22\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -1.7,\n \"wind\": 0.6,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-01-23\",\n \"precipitation\": 5.1,\n \"temp_max\": 7.2,\n \"temp_min\": 2.2,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-24\",\n \"precipitation\": 5.8,\n \"temp_max\": 7.2,\n \"temp_min\": 1.1,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-25\",\n \"precipitation\": 3,\n \"temp_max\": 10.6,\n \"temp_min\": 2.8,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-26\",\n \"precipitation\": 2.3,\n \"temp_max\": 8.3,\n \"temp_min\": 3.9,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-27\",\n \"precipitation\": 1.8,\n \"temp_max\": 5.6,\n \"temp_min\": 3.9,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-28\",\n \"precipitation\": 7.9,\n \"temp_max\": 6.1,\n \"temp_min\": 3.3,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-29\",\n \"precipitation\": 4.3,\n \"temp_max\": 8.3,\n \"temp_min\": 5,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-30\",\n \"precipitation\": 3.6,\n \"temp_max\": 8.9,\n \"temp_min\": 6.7,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-01-31\",\n \"precipitation\": 3,\n \"temp_max\": 9.4,\n \"temp_min\": 7.2,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-01\",\n \"precipitation\": 0.3,\n \"temp_max\": 11.7,\n \"temp_min\": 5,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-02\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": 2.8,\n \"wind\": 2,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-02-03\",\n \"precipitation\": 2.3,\n \"temp_max\": 8.9,\n \"temp_min\": 2.8,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-04\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 6.7,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-05\",\n \"precipitation\": 3.3,\n \"temp_max\": 10,\n \"temp_min\": 6.7,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-06\",\n \"precipitation\": 1,\n \"temp_max\": 10.6,\n \"temp_min\": 6.1,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-07\",\n \"precipitation\": 1.3,\n \"temp_max\": 9.4,\n \"temp_min\": 3.3,\n \"wind\": 4.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-08\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 2.2,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-02-09\",\n \"precipitation\": 0.3,\n \"temp_max\": 8.3,\n \"temp_min\": 4.4,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-10\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 1.7,\n \"wind\": 2,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-02-11\",\n \"precipitation\": 0.3,\n \"temp_max\": 8.3,\n \"temp_min\": 4.4,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-12\",\n \"precipitation\": 1,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 5.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-13\",\n \"precipitation\": 2.3,\n \"temp_max\": 9.4,\n \"temp_min\": 7.2,\n \"wind\": 4.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-14\",\n \"precipitation\": 1,\n \"temp_max\": 9.4,\n \"temp_min\": 5.6,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-15\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 5,\n \"wind\": 2.4,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-02-16\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 3.9,\n \"wind\": 5.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-17\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 4.4,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-18\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 3.9,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-19\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 1.7,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-02-20\",\n \"precipitation\": 1.5,\n \"temp_max\": 7.8,\n \"temp_min\": 1.1,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-21\",\n \"precipitation\": 0.5,\n \"temp_max\": 6.7,\n \"temp_min\": 3.9,\n \"wind\": 6.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-22\",\n \"precipitation\": 9.4,\n \"temp_max\": 7.8,\n \"temp_min\": 3.9,\n \"wind\": 8.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-23\",\n \"precipitation\": 0.3,\n \"temp_max\": 10,\n \"temp_min\": 3.9,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-24\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 5,\n \"wind\": 5.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-25\",\n \"precipitation\": 2.3,\n \"temp_max\": 10.6,\n \"temp_min\": 3.3,\n \"wind\": 7.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-26\",\n \"precipitation\": 0.5,\n \"temp_max\": 8.9,\n \"temp_min\": 3.9,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-27\",\n \"precipitation\": 4.6,\n \"temp_max\": 10,\n \"temp_min\": 4.4,\n \"wind\": 1.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-02-28\",\n \"precipitation\": 8.1,\n \"temp_max\": 11.7,\n \"temp_min\": 6.7,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-01\",\n \"precipitation\": 4.1,\n \"temp_max\": 15,\n \"temp_min\": 11.1,\n \"wind\": 5.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-02\",\n \"precipitation\": 0.8,\n \"temp_max\": 13.9,\n \"temp_min\": 5,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-03\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 2.2,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-04\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 0,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-05\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 6.1,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-06\",\n \"precipitation\": 11.9,\n \"temp_max\": 7.2,\n \"temp_min\": 5,\n \"wind\": 4.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-07\",\n \"precipitation\": 7.4,\n \"temp_max\": 12.2,\n \"temp_min\": 5,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-08\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 2.2,\n \"wind\": 2.6,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-03-09\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 1.1,\n \"wind\": 1.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-03-10\",\n \"precipitation\": 0.8,\n \"temp_max\": 7.8,\n \"temp_min\": 3.9,\n \"wind\": 1.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-11\",\n \"precipitation\": 1.3,\n \"temp_max\": 10.6,\n \"temp_min\": 6.1,\n \"wind\": 1.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-12\",\n \"precipitation\": 2,\n \"temp_max\": 12.8,\n \"temp_min\": 10,\n \"wind\": 5.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-13\",\n \"precipitation\": 2.3,\n \"temp_max\": 11.7,\n \"temp_min\": 9.4,\n \"wind\": 3.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-14\",\n \"precipitation\": 2.8,\n \"temp_max\": 11.7,\n \"temp_min\": 9.4,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-15\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-16\",\n \"precipitation\": 4.3,\n \"temp_max\": 10.6,\n \"temp_min\": 4.4,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-17\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 3.9,\n \"wind\": 6.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-18\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 3.9,\n \"wind\": 5.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-19\",\n \"precipitation\": 11.7,\n \"temp_max\": 12.8,\n \"temp_min\": 1.7,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-20\",\n \"precipitation\": 9.9,\n \"temp_max\": 11.1,\n \"temp_min\": 4.4,\n \"wind\": 7.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-21\",\n \"precipitation\": 8.1,\n \"temp_max\": 10,\n \"temp_min\": 2.2,\n \"wind\": 4.9,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2013-03-22\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 0.6,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-23\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 1.1,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-24\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 0.6,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-25\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 4.4,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-26\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 6.1,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-03-27\",\n \"precipitation\": 0.3,\n \"temp_max\": 13.3,\n \"temp_min\": 7.2,\n \"wind\": 1.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-28\",\n \"precipitation\": 2,\n \"temp_max\": 16.1,\n \"temp_min\": 8.3,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-29\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 7.8,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-03-30\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 5.6,\n \"wind\": 4.4,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-03-31\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 6.7,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-01\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 8.3,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-02\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 8.9,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-03\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 7.8,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-04\",\n \"precipitation\": 8.4,\n \"temp_max\": 14.4,\n \"temp_min\": 10,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-05\",\n \"precipitation\": 18.5,\n \"temp_max\": 13.9,\n \"temp_min\": 10,\n \"wind\": 5.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-06\",\n \"precipitation\": 12.7,\n \"temp_max\": 12.2,\n \"temp_min\": 7.2,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-07\",\n \"precipitation\": 39.1,\n \"temp_max\": 8.3,\n \"temp_min\": 5,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-08\",\n \"precipitation\": 0.8,\n \"temp_max\": 13.3,\n \"temp_min\": 6.1,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-09\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 6.1,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-10\",\n \"precipitation\": 9.4,\n \"temp_max\": 15,\n \"temp_min\": 8.9,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-11\",\n \"precipitation\": 1.5,\n \"temp_max\": 12.2,\n \"temp_min\": 6.7,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-12\",\n \"precipitation\": 9.7,\n \"temp_max\": 7.8,\n \"temp_min\": 4.4,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-13\",\n \"precipitation\": 9.4,\n \"temp_max\": 10.6,\n \"temp_min\": 3.3,\n \"wind\": 5.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-14\",\n \"precipitation\": 5.8,\n \"temp_max\": 12.8,\n \"temp_min\": 4.4,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-15\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 4.4,\n \"wind\": 2.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-04-16\",\n \"precipitation\": 0.3,\n \"temp_max\": 13.9,\n \"temp_min\": 3.3,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-17\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 3.9,\n \"wind\": 3.3,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-04-18\",\n \"precipitation\": 5.3,\n \"temp_max\": 11.7,\n \"temp_min\": 6.7,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-19\",\n \"precipitation\": 20.6,\n \"temp_max\": 13.3,\n \"temp_min\": 9.4,\n \"wind\": 4.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-20\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 8.3,\n \"wind\": 5.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-21\",\n \"precipitation\": 3.3,\n \"temp_max\": 12.2,\n \"temp_min\": 6.7,\n \"wind\": 4.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-22\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 5,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-23\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 3.9,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-24\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 6.1,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-25\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 6.7,\n \"wind\": 1.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-26\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 8.3,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-04-27\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 10.6,\n \"wind\": 5.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-04-28\",\n \"precipitation\": 1,\n \"temp_max\": 15,\n \"temp_min\": 9.4,\n \"wind\": 5.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-29\",\n \"precipitation\": 3.8,\n \"temp_max\": 13.9,\n \"temp_min\": 6.7,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-04-30\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 4.4,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-01\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 3.3,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-02\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 6.7,\n \"wind\": 4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-03\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 9.4,\n \"wind\": 4.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-04\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 11.1,\n \"wind\": 6.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-05\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 11.7,\n \"wind\": 5.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-06\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 12.2,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-07\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 11.1,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-08\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 11.1,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-09\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 10,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-10\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 9.4,\n \"wind\": 1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-11\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 12.2,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-12\",\n \"precipitation\": 6.6,\n \"temp_max\": 21.7,\n \"temp_min\": 13.9,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-13\",\n \"precipitation\": 3.3,\n \"temp_max\": 18.9,\n \"temp_min\": 9.4,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-14\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 7.8,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-15\",\n \"precipitation\": 1,\n \"temp_max\": 17.2,\n \"temp_min\": 8.9,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-16\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 12.2,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-05-17\",\n \"precipitation\": 0.5,\n \"temp_max\": 17.2,\n \"temp_min\": 11.7,\n \"wind\": 3.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-18\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 11.1,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-19\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10.6,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-20\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 9.4,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-21\",\n \"precipitation\": 13.7,\n \"temp_max\": 15.6,\n \"temp_min\": 8.3,\n \"wind\": 4.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-22\",\n \"precipitation\": 13.7,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-23\",\n \"precipitation\": 4.1,\n \"temp_max\": 12.2,\n \"temp_min\": 6.7,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-24\",\n \"precipitation\": 0.3,\n \"temp_max\": 16.7,\n \"temp_min\": 8.9,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-25\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 10,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-26\",\n \"precipitation\": 1.5,\n \"temp_max\": 18.3,\n \"temp_min\": 10.6,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-27\",\n \"precipitation\": 9.7,\n \"temp_max\": 16.7,\n \"temp_min\": 11.1,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-28\",\n \"precipitation\": 0.5,\n \"temp_max\": 17.2,\n \"temp_min\": 11.7,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-29\",\n \"precipitation\": 5.6,\n \"temp_max\": 16.1,\n \"temp_min\": 9.4,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-05-30\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 9.4,\n \"wind\": 5.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-05-31\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 11.1,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-01\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 12.2,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-02\",\n \"precipitation\": 1,\n \"temp_max\": 20.6,\n \"temp_min\": 12.2,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-03\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 11.1,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-04\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 12.2,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-05\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 14.4,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-06\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.2,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-07\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 13.3,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-08\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 12.8,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-09\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 11.1,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-10\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 11.7,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-11\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 10,\n \"wind\": 5.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-12\",\n \"precipitation\": 0.3,\n \"temp_max\": 20.6,\n \"temp_min\": 11.7,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-13\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 11.7,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-14\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 12.2,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-15\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 10,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-16\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 12.8,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-17\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 13.9,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-18\",\n \"precipitation\": 0.3,\n \"temp_max\": 23.3,\n \"temp_min\": 13.3,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-19\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 12.8,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-20\",\n \"precipitation\": 3,\n \"temp_max\": 17.2,\n \"temp_min\": 12.8,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-21\",\n \"precipitation\": 0.3,\n \"temp_max\": 20.6,\n \"temp_min\": 12.2,\n \"wind\": 1.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-22\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 11.7,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-23\",\n \"precipitation\": 7.9,\n \"temp_max\": 22.2,\n \"temp_min\": 15,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-24\",\n \"precipitation\": 4.8,\n \"temp_max\": 21.1,\n \"temp_min\": 13.9,\n \"wind\": 3.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-25\",\n \"precipitation\": 9.9,\n \"temp_max\": 23.3,\n \"temp_min\": 14.4,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-26\",\n \"precipitation\": 2,\n \"temp_max\": 22.2,\n \"temp_min\": 15,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-27\",\n \"precipitation\": 3.6,\n \"temp_max\": 21.1,\n \"temp_min\": 16.7,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-06-28\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 16.1,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-29\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 18.3,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-06-30\",\n \"precipitation\": 0,\n \"temp_max\": 33.9,\n \"temp_min\": 17.2,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-01\",\n \"precipitation\": 0,\n \"temp_max\": 31.7,\n \"temp_min\": 18.3,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-02\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 15.6,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-03\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 16.7,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-04\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 13.9,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-07-05\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 13.9,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-06\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 13.3,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-07\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.9,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-08\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 13.3,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-09\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 15,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-10\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 13.9,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-11\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 12.2,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-12\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 13.3,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-13\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 11.1,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-14\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 12.8,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-15\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 14.4,\n \"wind\": 4.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-16\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 18.3,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-17\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 15,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-18\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 13.9,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-19\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.3,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-20\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 13.3,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-21\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 12.8,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-22\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 13.3,\n \"wind\": 2.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-07-23\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 13.9,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-24\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 14.4,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-25\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 12.8,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-26\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 14.4,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-27\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 12.8,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-28\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 12.2,\n \"wind\": 3.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-07-29\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 13.3,\n \"wind\": 1.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-30\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 13.3,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-07-31\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 13.3,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-01\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 13.3,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-02\",\n \"precipitation\": 2,\n \"temp_max\": 17.2,\n \"temp_min\": 15,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-03\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 15.6,\n \"wind\": 2.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-08-04\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 15,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-05\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 15,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-06\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 13.9,\n \"wind\": 1.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-07\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 13.9,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-08\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 14.4,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-09\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 14.4,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-10\",\n \"precipitation\": 2.3,\n \"temp_max\": 25.6,\n \"temp_min\": 15,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-11\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 14.4,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-12\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 16.1,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-13\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 15,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-14\",\n \"precipitation\": 0.8,\n \"temp_max\": 27.2,\n \"temp_min\": 15,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-15\",\n \"precipitation\": 1.8,\n \"temp_max\": 21.1,\n \"temp_min\": 17.2,\n \"wind\": 1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-16\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 16.1,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-08-17\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 17.2,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-18\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 15.6,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-19\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 15.6,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-20\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 16.1,\n \"wind\": 4.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-21\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 15,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-22\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 15,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-23\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 16.1,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-24\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 16.7,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-25\",\n \"precipitation\": 0.3,\n \"temp_max\": 22.2,\n \"temp_min\": 16.1,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-26\",\n \"precipitation\": 1,\n \"temp_max\": 24.4,\n \"temp_min\": 16.1,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-27\",\n \"precipitation\": 1.3,\n \"temp_max\": 26.7,\n \"temp_min\": 17.2,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-28\",\n \"precipitation\": 5.6,\n \"temp_max\": 26.7,\n \"temp_min\": 15.6,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-29\",\n \"precipitation\": 19.3,\n \"temp_max\": 23.9,\n \"temp_min\": 18.3,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-08-30\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 16.1,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-08-31\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.9,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-01\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 15.6,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-02\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 17.2,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-03\",\n \"precipitation\": 2.3,\n \"temp_max\": 25,\n \"temp_min\": 16.7,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-04\",\n \"precipitation\": 0.3,\n \"temp_max\": 22.8,\n \"temp_min\": 16.1,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-05\",\n \"precipitation\": 27.7,\n \"temp_max\": 20,\n \"temp_min\": 15.6,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-06\",\n \"precipitation\": 21.3,\n \"temp_max\": 21.7,\n \"temp_min\": 16.1,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-07\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 17.2,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-08\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 14.4,\n \"wind\": 1.5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-09-09\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 13.9,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-10\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 15,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-11\",\n \"precipitation\": 0,\n \"temp_max\": 33.9,\n \"temp_min\": 16.1,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-12\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 15,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-13\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 15.6,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-14\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 15.6,\n \"wind\": 1.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-09-15\",\n \"precipitation\": 3.3,\n \"temp_max\": 18.9,\n \"temp_min\": 14.4,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-16\",\n \"precipitation\": 0.3,\n \"temp_max\": 21.7,\n \"temp_min\": 15,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-17\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 13.9,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-18\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 13.3,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-19\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 10,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-20\",\n \"precipitation\": 3.6,\n \"temp_max\": 23.3,\n \"temp_min\": 13.3,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-21\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 13.3,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-22\",\n \"precipitation\": 13.5,\n \"temp_max\": 17.2,\n \"temp_min\": 13.3,\n \"wind\": 5.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-23\",\n \"precipitation\": 2.8,\n \"temp_max\": 16.1,\n \"temp_min\": 11.1,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-24\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 10,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-25\",\n \"precipitation\": 2,\n \"temp_max\": 16.1,\n \"temp_min\": 9.4,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-26\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 7.2,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-09-27\",\n \"precipitation\": 1,\n \"temp_max\": 13.9,\n \"temp_min\": 10.6,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-28\",\n \"precipitation\": 43.4,\n \"temp_max\": 16.7,\n \"temp_min\": 11.7,\n \"wind\": 6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-29\",\n \"precipitation\": 16.8,\n \"temp_max\": 14.4,\n \"temp_min\": 11.1,\n \"wind\": 7.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-09-30\",\n \"precipitation\": 18.5,\n \"temp_max\": 13.9,\n \"temp_min\": 10,\n \"wind\": 6.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-01\",\n \"precipitation\": 7.9,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-02\",\n \"precipitation\": 5.3,\n \"temp_max\": 12.8,\n \"temp_min\": 9.4,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-03\",\n \"precipitation\": 0.8,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 0.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-04\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 5.6,\n \"wind\": 1.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-05\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 8.3,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-06\",\n \"precipitation\": 4.1,\n \"temp_max\": 22.8,\n \"temp_min\": 7.8,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-07\",\n \"precipitation\": 0.5,\n \"temp_max\": 16.1,\n \"temp_min\": 11.7,\n \"wind\": 6.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-08\",\n \"precipitation\": 6.9,\n \"temp_max\": 13.9,\n \"temp_min\": 7.8,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-09\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 5.6,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-10\",\n \"precipitation\": 1,\n \"temp_max\": 14.4,\n \"temp_min\": 8.3,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-11\",\n \"precipitation\": 9.1,\n \"temp_max\": 13.9,\n \"temp_min\": 10.6,\n \"wind\": 1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-12\",\n \"precipitation\": 1,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-13\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 6.7,\n \"wind\": 1.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-10-14\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 3.9,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-15\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 5,\n \"wind\": 0.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-16\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 8.9,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-10-17\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 1.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-10-18\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 7.2,\n \"wind\": 1.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-19\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 7.8,\n \"wind\": 1.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-20\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 7.8,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-21\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 8.3,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-22\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 7.2,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-23\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 6.1,\n \"wind\": 0.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-24\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 6.1,\n \"wind\": 0.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-25\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 7.8,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-26\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 8.3,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-27\",\n \"precipitation\": 1.8,\n \"temp_max\": 13.9,\n \"temp_min\": 8.3,\n \"wind\": 4.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-28\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 7.2,\n \"wind\": 5.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-29\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 3.3,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-10-30\",\n \"precipitation\": 0.5,\n \"temp_max\": 15,\n \"temp_min\": 5.6,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-10-31\",\n \"precipitation\": 0.3,\n \"temp_max\": 14.4,\n \"temp_min\": 10.6,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-01\",\n \"precipitation\": 1.3,\n \"temp_max\": 17.8,\n \"temp_min\": 11.7,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-02\",\n \"precipitation\": 12.7,\n \"temp_max\": 14.4,\n \"temp_min\": 8.3,\n \"wind\": 7.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-03\",\n \"precipitation\": 0.5,\n \"temp_max\": 12.2,\n \"temp_min\": 4.4,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-04\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 3.9,\n \"wind\": 1.6,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2013-11-05\",\n \"precipitation\": 2.5,\n \"temp_max\": 13.3,\n \"temp_min\": 7.2,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-06\",\n \"precipitation\": 3.8,\n \"temp_max\": 12.8,\n \"temp_min\": 7.8,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-07\",\n \"precipitation\": 30,\n \"temp_max\": 11.1,\n \"temp_min\": 10,\n \"wind\": 7.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-08\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 7.2,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-09\",\n \"precipitation\": 1.8,\n \"temp_max\": 11.1,\n \"temp_min\": 5,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-10\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 8.3,\n \"wind\": 4.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-11\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 6.1,\n \"wind\": 2.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-11-12\",\n \"precipitation\": 4.1,\n \"temp_max\": 15.6,\n \"temp_min\": 8.9,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-13\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 10.6,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-14\",\n \"precipitation\": 1.3,\n \"temp_max\": 11.1,\n \"temp_min\": 6.1,\n \"wind\": 1.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-15\",\n \"precipitation\": 3,\n \"temp_max\": 10.6,\n \"temp_min\": 7.2,\n \"wind\": 6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-16\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 5,\n \"wind\": 4.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-17\",\n \"precipitation\": 5.3,\n \"temp_max\": 11.7,\n \"temp_min\": 7.2,\n \"wind\": 5.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-18\",\n \"precipitation\": 26.2,\n \"temp_max\": 12.8,\n \"temp_min\": 9.4,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-19\",\n \"precipitation\": 1,\n \"temp_max\": 13.3,\n \"temp_min\": 4.4,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-20\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 1.7,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-21\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": -0.5,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-22\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 0,\n \"wind\": 4.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-23\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 1.1,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-24\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 0.6,\n \"wind\": 0.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2013-11-25\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 2.2,\n \"wind\": 0.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-26\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 2.8,\n \"wind\": 1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-27\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 5.6,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-28\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 3.3,\n \"wind\": 0.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-11-29\",\n \"precipitation\": 0.5,\n \"temp_max\": 9.4,\n \"temp_min\": 5,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-11-30\",\n \"precipitation\": 2.3,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-01\",\n \"precipitation\": 3,\n \"temp_max\": 13.3,\n \"temp_min\": 7.8,\n \"wind\": 8.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-02\",\n \"precipitation\": 4.6,\n \"temp_max\": 7.8,\n \"temp_min\": 1.7,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-03\",\n \"precipitation\": 0,\n \"temp_max\": 5,\n \"temp_min\": -0.5,\n \"wind\": 5.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-04\",\n \"precipitation\": 0,\n \"temp_max\": 4.4,\n \"temp_min\": -2.1,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-05\",\n \"precipitation\": 0,\n \"temp_max\": 1.1,\n \"temp_min\": -4.9,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-06\",\n \"precipitation\": 0,\n \"temp_max\": 1.1,\n \"temp_min\": -4.3,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-07\",\n \"precipitation\": 0,\n \"temp_max\": 0,\n \"temp_min\": -7.1,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-08\",\n \"precipitation\": 0,\n \"temp_max\": 2.2,\n \"temp_min\": -6.6,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-09\",\n \"precipitation\": 0,\n \"temp_max\": 1.1,\n \"temp_min\": -4.9,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-10\",\n \"precipitation\": 0,\n \"temp_max\": 5.6,\n \"temp_min\": 0.6,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-11\",\n \"precipitation\": 0,\n \"temp_max\": 5,\n \"temp_min\": -1.6,\n \"wind\": 0.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-12\",\n \"precipitation\": 6.9,\n \"temp_max\": 5.6,\n \"temp_min\": -0.5,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-13\",\n \"precipitation\": 0.5,\n \"temp_max\": 9.4,\n \"temp_min\": 5.6,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-14\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 6.1,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-15\",\n \"precipitation\": 1.3,\n \"temp_max\": 11.7,\n \"temp_min\": 8.3,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-16\",\n \"precipitation\": 0.3,\n \"temp_max\": 10,\n \"temp_min\": 4.4,\n \"wind\": 1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-17\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 4.4,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-18\",\n \"precipitation\": 1.3,\n \"temp_max\": 7.8,\n \"temp_min\": 2.2,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-19\",\n \"precipitation\": 0,\n \"temp_max\": 5,\n \"temp_min\": 0,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-20\",\n \"precipitation\": 5.6,\n \"temp_max\": 8.3,\n \"temp_min\": 0.6,\n \"wind\": 3.7,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2013-12-21\",\n \"precipitation\": 5.6,\n \"temp_max\": 8.9,\n \"temp_min\": 5.6,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-22\",\n \"precipitation\": 10.7,\n \"temp_max\": 10.6,\n \"temp_min\": 8.3,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-23\",\n \"precipitation\": 1.5,\n \"temp_max\": 11.7,\n \"temp_min\": 6.1,\n \"wind\": 5.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-24\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 2.8,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-25\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": 1.7,\n \"wind\": 0.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-26\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": 0.6,\n \"wind\": 0.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-27\",\n \"precipitation\": 0.3,\n \"temp_max\": 8.9,\n \"temp_min\": 0,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-28\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 3.3,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-29\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 1.7,\n \"wind\": 1.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2013-12-30\",\n \"precipitation\": 0.3,\n \"temp_max\": 8.9,\n \"temp_min\": 4.4,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2013-12-31\",\n \"precipitation\": 0.5,\n \"temp_max\": 8.3,\n \"temp_min\": 5,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-01\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 3.3,\n \"wind\": 1.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-02\",\n \"precipitation\": 4.1,\n \"temp_max\": 10.6,\n \"temp_min\": 6.1,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-03\",\n \"precipitation\": 1.5,\n \"temp_max\": 8.9,\n \"temp_min\": 2.8,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-04\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 0.6,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-01-05\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": -0.5,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-06\",\n \"precipitation\": 0.3,\n \"temp_max\": 7.8,\n \"temp_min\": -0.5,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-07\",\n \"precipitation\": 12.2,\n \"temp_max\": 8.3,\n \"temp_min\": 5,\n \"wind\": 1.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-08\",\n \"precipitation\": 9.7,\n \"temp_max\": 10,\n \"temp_min\": 7.2,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-09\",\n \"precipitation\": 5.8,\n \"temp_max\": 9.4,\n \"temp_min\": 5.6,\n \"wind\": 6.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-10\",\n \"precipitation\": 4.3,\n \"temp_max\": 12.8,\n \"temp_min\": 8.3,\n \"wind\": 7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-11\",\n \"precipitation\": 21.3,\n \"temp_max\": 14.4,\n \"temp_min\": 7.2,\n \"wind\": 8.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-12\",\n \"precipitation\": 1.5,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 8.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-13\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 10,\n \"wind\": 7.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-14\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-15\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-16\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": 4.4,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-17\",\n \"precipitation\": 0,\n \"temp_max\": 5.6,\n \"temp_min\": 2.8,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-18\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 0.6,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-19\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": 3.3,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-20\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 2.8,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-21\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 1.7,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-22\",\n \"precipitation\": 0.5,\n \"temp_max\": 9.4,\n \"temp_min\": 5.6,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-23\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 2.8,\n \"wind\": 5.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-01-24\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 1.1,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-25\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 1.1,\n \"wind\": 0.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-26\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 0.6,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-27\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 1.7,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-28\",\n \"precipitation\": 8.9,\n \"temp_max\": 11.1,\n \"temp_min\": 6.1,\n \"wind\": 1.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-29\",\n \"precipitation\": 21.6,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-01-30\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 6.1,\n \"wind\": 6.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-01-31\",\n \"precipitation\": 2.3,\n \"temp_max\": 7.8,\n \"temp_min\": 5.6,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-01\",\n \"precipitation\": 2,\n \"temp_max\": 7.8,\n \"temp_min\": 2.8,\n \"wind\": 0.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-02\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 1.1,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-03\",\n \"precipitation\": 0,\n \"temp_max\": 5,\n \"temp_min\": 0,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-04\",\n \"precipitation\": 0,\n \"temp_max\": 2.8,\n \"temp_min\": -2.1,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-05\",\n \"precipitation\": 0,\n \"temp_max\": -0.5,\n \"temp_min\": -5.5,\n \"wind\": 6.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-06\",\n \"precipitation\": 0,\n \"temp_max\": -1.6,\n \"temp_min\": -6,\n \"wind\": 4.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-07\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -4.9,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-08\",\n \"precipitation\": 5.1,\n \"temp_max\": 5.6,\n \"temp_min\": -0.5,\n \"wind\": 4.6,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2014-02-09\",\n \"precipitation\": 0.5,\n \"temp_max\": 3.9,\n \"temp_min\": 0,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-10\",\n \"precipitation\": 18.3,\n \"temp_max\": 10,\n \"temp_min\": 2.2,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-11\",\n \"precipitation\": 17,\n \"temp_max\": 12.2,\n \"temp_min\": 5.6,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-12\",\n \"precipitation\": 4.6,\n \"temp_max\": 12.2,\n \"temp_min\": 7.2,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-13\",\n \"precipitation\": 1.8,\n \"temp_max\": 12.8,\n \"temp_min\": 7.8,\n \"wind\": 6.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-14\",\n \"precipitation\": 9.4,\n \"temp_max\": 11.7,\n \"temp_min\": 6.1,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-15\",\n \"precipitation\": 11.7,\n \"temp_max\": 11.1,\n \"temp_min\": 5,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-16\",\n \"precipitation\": 26.4,\n \"temp_max\": 9.4,\n \"temp_min\": 3.9,\n \"wind\": 7.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-17\",\n \"precipitation\": 14.5,\n \"temp_max\": 8.3,\n \"temp_min\": 4.4,\n \"wind\": 5.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-18\",\n \"precipitation\": 15.2,\n \"temp_max\": 8.9,\n \"temp_min\": 5,\n \"wind\": 6.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-19\",\n \"precipitation\": 1,\n \"temp_max\": 8.3,\n \"temp_min\": 3.9,\n \"wind\": 6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-20\",\n \"precipitation\": 3,\n \"temp_max\": 10,\n \"temp_min\": 5.6,\n \"wind\": 6.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-21\",\n \"precipitation\": 2.8,\n \"temp_max\": 6.7,\n \"temp_min\": 3.9,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-22\",\n \"precipitation\": 2.5,\n \"temp_max\": 5.6,\n \"temp_min\": 2.8,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-23\",\n \"precipitation\": 6.1,\n \"temp_max\": 7.2,\n \"temp_min\": 3.9,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-24\",\n \"precipitation\": 13,\n \"temp_max\": 6.7,\n \"temp_min\": 3.3,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-25\",\n \"precipitation\": 0.3,\n \"temp_max\": 12.2,\n \"temp_min\": 3.9,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-02-26\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 5.6,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-27\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 4.4,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-02-28\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 4.4,\n \"wind\": 5.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-01\",\n \"precipitation\": 0.5,\n \"temp_max\": 7.2,\n \"temp_min\": 4.4,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-02\",\n \"precipitation\": 19.1,\n \"temp_max\": 11.1,\n \"temp_min\": 2.8,\n \"wind\": 5.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-03\",\n \"precipitation\": 10.7,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-04\",\n \"precipitation\": 16.5,\n \"temp_max\": 13.9,\n \"temp_min\": 7.8,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-05\",\n \"precipitation\": 46.7,\n \"temp_max\": 15.6,\n \"temp_min\": 10.6,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-06\",\n \"precipitation\": 3,\n \"temp_max\": 13.3,\n \"temp_min\": 10,\n \"wind\": 6.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-07\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 8.9,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-08\",\n \"precipitation\": 32.3,\n \"temp_max\": 12.8,\n \"temp_min\": 6.7,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-09\",\n \"precipitation\": 4.3,\n \"temp_max\": 15,\n \"temp_min\": 9.4,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-10\",\n \"precipitation\": 18.8,\n \"temp_max\": 12.2,\n \"temp_min\": 6.1,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-11\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 4.4,\n \"wind\": 2.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-03-12\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 3.3,\n \"wind\": 1.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-03-13\",\n \"precipitation\": 0.5,\n \"temp_max\": 13.9,\n \"temp_min\": 5,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-14\",\n \"precipitation\": 6.9,\n \"temp_max\": 14.4,\n \"temp_min\": 8.3,\n \"wind\": 6.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-15\",\n \"precipitation\": 8.1,\n \"temp_max\": 16.7,\n \"temp_min\": 4.4,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-16\",\n \"precipitation\": 27.7,\n \"temp_max\": 10.6,\n \"temp_min\": 4.4,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-17\",\n \"precipitation\": 0.3,\n \"temp_max\": 10,\n \"temp_min\": 2.8,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-18\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 3.3,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-19\",\n \"precipitation\": 0.5,\n \"temp_max\": 11.1,\n \"temp_min\": 3.3,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-20\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 1.7,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-21\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 2.8,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-22\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 1.1,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-23\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 4.4,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-24\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 2.8,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-25\",\n \"precipitation\": 4.1,\n \"temp_max\": 13.9,\n \"temp_min\": 6.7,\n \"wind\": 4.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-26\",\n \"precipitation\": 3.6,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-27\",\n \"precipitation\": 0.3,\n \"temp_max\": 12.2,\n \"temp_min\": 6.7,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-28\",\n \"precipitation\": 22.1,\n \"temp_max\": 11.7,\n \"temp_min\": 7.2,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-29\",\n \"precipitation\": 14,\n \"temp_max\": 11.7,\n \"temp_min\": 7.2,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-03-30\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 5,\n \"wind\": 5.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-03-31\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 2.2,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-01\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 6.7,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-02\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 5.6,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-03\",\n \"precipitation\": 2.5,\n \"temp_max\": 13.3,\n \"temp_min\": 6.1,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-04\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 6.1,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-05\",\n \"precipitation\": 4.6,\n \"temp_max\": 11.7,\n \"temp_min\": 7.8,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-06\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 8.3,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-07\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 9.4,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-08\",\n \"precipitation\": 4.6,\n \"temp_max\": 15.6,\n \"temp_min\": 8.3,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-09\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 6.7,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-10\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 6.7,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-11\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 5,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-12\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 7.8,\n \"wind\": 4.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-13\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 5.6,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-14\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 5.6,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-15\",\n \"precipitation\": 0.5,\n \"temp_max\": 14.4,\n \"temp_min\": 7.8,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-16\",\n \"precipitation\": 10.9,\n \"temp_max\": 11.1,\n \"temp_min\": 8.9,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-17\",\n \"precipitation\": 18.5,\n \"temp_max\": 11.7,\n \"temp_min\": 7.2,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-18\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 5.6,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-19\",\n \"precipitation\": 13.7,\n \"temp_max\": 11.7,\n \"temp_min\": 5.6,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-20\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 5.6,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-21\",\n \"precipitation\": 5.1,\n \"temp_max\": 17.2,\n \"temp_min\": 7.8,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-22\",\n \"precipitation\": 14.2,\n \"temp_max\": 12.2,\n \"temp_min\": 5,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-23\",\n \"precipitation\": 8.9,\n \"temp_max\": 11.7,\n \"temp_min\": 6.1,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-24\",\n \"precipitation\": 12.4,\n \"temp_max\": 13.9,\n \"temp_min\": 6.1,\n \"wind\": 5.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-25\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 5.6,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-26\",\n \"precipitation\": 3.3,\n \"temp_max\": 15,\n \"temp_min\": 5.6,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-27\",\n \"precipitation\": 6.9,\n \"temp_max\": 11.1,\n \"temp_min\": 6.1,\n \"wind\": 5.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-04-28\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 4.4,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-29\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 9.4,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-04-30\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 9.4,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-01\",\n \"precipitation\": 0,\n \"temp_max\": 29.4,\n \"temp_min\": 11.1,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-02\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10.6,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-03\",\n \"precipitation\": 33.3,\n \"temp_max\": 15,\n \"temp_min\": 8.9,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-04\",\n \"precipitation\": 16,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-05\",\n \"precipitation\": 5.1,\n \"temp_max\": 15.6,\n \"temp_min\": 9.4,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-06\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 8.3,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-07\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 7.2,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-08\",\n \"precipitation\": 13.7,\n \"temp_max\": 13.9,\n \"temp_min\": 9.4,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-09\",\n \"precipitation\": 2,\n \"temp_max\": 13.3,\n \"temp_min\": 7.2,\n \"wind\": 5.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-10\",\n \"precipitation\": 0.5,\n \"temp_max\": 15.6,\n \"temp_min\": 7.2,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-11\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 8.3,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-12\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 9.4,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-13\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.8,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-14\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.3,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-15\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.8,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-16\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 11.7,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-17\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 11.7,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-18\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 10.6,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-19\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 10,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-20\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 10,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-21\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 10.6,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-22\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 11.7,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-23\",\n \"precipitation\": 3.8,\n \"temp_max\": 20,\n \"temp_min\": 12.8,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-24\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 11.1,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-25\",\n \"precipitation\": 5.6,\n \"temp_max\": 15,\n \"temp_min\": 10.6,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-05-26\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 11.1,\n \"wind\": 4.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-27\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 10,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-28\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 10,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-29\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 11.1,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-30\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 8.9,\n \"wind\": 4.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-05-31\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 10,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-01\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 10.6,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-02\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 11.1,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-03\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 11.1,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-04\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 10,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-05\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 10,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-06\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 10.6,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-07\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 13.3,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-08\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 12.2,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-09\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 13.3,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-10\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 12.2,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-11\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 11.1,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-12\",\n \"precipitation\": 1.8,\n \"temp_max\": 21.7,\n \"temp_min\": 12.2,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-13\",\n \"precipitation\": 6.4,\n \"temp_max\": 15.6,\n \"temp_min\": 11.1,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-14\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 11.7,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-15\",\n \"precipitation\": 0.5,\n \"temp_max\": 18.3,\n \"temp_min\": 10,\n \"wind\": 3.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-16\",\n \"precipitation\": 3.6,\n \"temp_max\": 17.8,\n \"temp_min\": 8.9,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-17\",\n \"precipitation\": 1.3,\n \"temp_max\": 17.8,\n \"temp_min\": 10,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-18\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 11.1,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-19\",\n \"precipitation\": 0.8,\n \"temp_max\": 25.6,\n \"temp_min\": 11.7,\n \"wind\": 3.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-20\",\n \"precipitation\": 0.3,\n \"temp_max\": 20,\n \"temp_min\": 10,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-21\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 10.6,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-22\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 11.1,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-23\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 13.3,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-24\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 14.4,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-25\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 13.9,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-26\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 14.4,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-27\",\n \"precipitation\": 1.8,\n \"temp_max\": 21.1,\n \"temp_min\": 13.9,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-28\",\n \"precipitation\": 2.3,\n \"temp_max\": 20,\n \"temp_min\": 13.3,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-06-29\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 12.8,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-06-30\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 12.8,\n \"wind\": 4.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-01\",\n \"precipitation\": 0,\n \"temp_max\": 34.4,\n \"temp_min\": 15.6,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-02\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 14.4,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-03\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 13.9,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-04\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.9,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-05\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 13.3,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-07-06\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 15,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-07\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 17.8,\n \"wind\": 4.1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-07-08\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 15.6,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-09\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 13.9,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-10\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 12.8,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-07-11\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 15,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-12\",\n \"precipitation\": 0,\n \"temp_max\": 32.2,\n \"temp_min\": 16.7,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-13\",\n \"precipitation\": 0,\n \"temp_max\": 29.4,\n \"temp_min\": 15,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-14\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 15,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-15\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 13.9,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-16\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 14.4,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-17\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 13.9,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-18\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 11.7,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-19\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 15,\n \"wind\": 5.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-07-20\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 14.4,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-21\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.3,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-22\",\n \"precipitation\": 0.3,\n \"temp_max\": 21.1,\n \"temp_min\": 13.3,\n \"wind\": 1.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-07-23\",\n \"precipitation\": 19.3,\n \"temp_max\": 18.9,\n \"temp_min\": 13.3,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-07-24\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 12.8,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-25\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 12.2,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-26\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 13.3,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-27\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 15,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-28\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 15,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-29\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 15.6,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-30\",\n \"precipitation\": 0,\n \"temp_max\": 29.4,\n \"temp_min\": 14.4,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-07-31\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 17.8,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-01\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 15,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-02\",\n \"precipitation\": 0.5,\n \"temp_max\": 29.4,\n \"temp_min\": 15.6,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-08-03\",\n \"precipitation\": 0,\n \"temp_max\": 31.7,\n \"temp_min\": 14.4,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-04\",\n \"precipitation\": 0,\n \"temp_max\": 32.8,\n \"temp_min\": 16.1,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-05\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 13.9,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-06\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 15,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-08-07\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 13.3,\n \"wind\": 2.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-08-08\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 13.3,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-09\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 15.6,\n \"wind\": 4.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-10\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 13.9,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-11\",\n \"precipitation\": 0.5,\n \"temp_max\": 35.6,\n \"temp_min\": 17.8,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-08-12\",\n \"precipitation\": 12.7,\n \"temp_max\": 27.2,\n \"temp_min\": 17.2,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-08-13\",\n \"precipitation\": 21.6,\n \"temp_max\": 23.3,\n \"temp_min\": 15,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-08-14\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 17.2,\n \"wind\": 0.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-15\",\n \"precipitation\": 1,\n \"temp_max\": 24.4,\n \"temp_min\": 16.7,\n \"wind\": 1.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-08-16\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 15.6,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-17\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 15,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-18\",\n \"precipitation\": 0,\n \"temp_max\": 29.4,\n \"temp_min\": 15.6,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-19\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 15.6,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-20\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 13.9,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-21\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 11.1,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-22\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.3,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-23\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.9,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-24\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 13.3,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-25\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 14.4,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-26\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 15.6,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-27\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 16.1,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-28\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 14.4,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-29\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 15,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-08-30\",\n \"precipitation\": 8.4,\n \"temp_max\": 17.8,\n \"temp_min\": 15,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-08-31\",\n \"precipitation\": 1.3,\n \"temp_max\": 21.1,\n \"temp_min\": 13.9,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-01\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 12.8,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-02\",\n \"precipitation\": 3,\n \"temp_max\": 20,\n \"temp_min\": 13.9,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-03\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 12.8,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-04\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 11.1,\n \"wind\": 3.1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-09-05\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.9,\n \"wind\": 6.5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-09-06\",\n \"precipitation\": 0,\n \"temp_max\": 32.2,\n \"temp_min\": 15,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-07\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 13.3,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-08\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 13.3,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-09\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 13.3,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-10\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 12.2,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-11\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 12.8,\n \"wind\": 5.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-12\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 12.8,\n \"wind\": 5.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-13\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 10,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-14\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 11.7,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-15\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 12.2,\n \"wind\": 1.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-16\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 13.9,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-17\",\n \"precipitation\": 0.5,\n \"temp_max\": 22.8,\n \"temp_min\": 14.4,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-18\",\n \"precipitation\": 0.3,\n \"temp_max\": 19.4,\n \"temp_min\": 15,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-19\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 16.1,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-20\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 14.4,\n \"wind\": 4.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-09-21\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 12.8,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-09-22\",\n \"precipitation\": 0.3,\n \"temp_max\": 22.2,\n \"temp_min\": 15,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-23\",\n \"precipitation\": 18.3,\n \"temp_max\": 18.9,\n \"temp_min\": 14.4,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-24\",\n \"precipitation\": 20.3,\n \"temp_max\": 18.9,\n \"temp_min\": 14.4,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-25\",\n \"precipitation\": 4.3,\n \"temp_max\": 21.7,\n \"temp_min\": 14.4,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-26\",\n \"precipitation\": 8.9,\n \"temp_max\": 20,\n \"temp_min\": 13.9,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-27\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 11.7,\n \"wind\": 3.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-09-28\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 12.2,\n \"wind\": 2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-09-29\",\n \"precipitation\": 0.8,\n \"temp_max\": 16.7,\n \"temp_min\": 11.1,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-09-30\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 12.2,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-01\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 11.1,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-02\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 10,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-03\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 8.9,\n \"wind\": 1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-04\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 12.2,\n \"wind\": 1.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-05\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 11.7,\n \"wind\": 1.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-10-06\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 13.3,\n \"wind\": 2.5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-10-07\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 13.9,\n \"wind\": 1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-10-08\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 12.8,\n \"wind\": 1.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-10-09\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 11.1,\n \"wind\": 1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-10-10\",\n \"precipitation\": 0.3,\n \"temp_max\": 18.3,\n \"temp_min\": 10,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-11\",\n \"precipitation\": 7.4,\n \"temp_max\": 18.3,\n \"temp_min\": 11.7,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-12\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 11.7,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-13\",\n \"precipitation\": 7.6,\n \"temp_max\": 21.1,\n \"temp_min\": 10,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-14\",\n \"precipitation\": 7.1,\n \"temp_max\": 16.7,\n \"temp_min\": 11.7,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-15\",\n \"precipitation\": 8.6,\n \"temp_max\": 16.1,\n \"temp_min\": 11.7,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-16\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 11.1,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-17\",\n \"precipitation\": 3.3,\n \"temp_max\": 16.7,\n \"temp_min\": 11.7,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-18\",\n \"precipitation\": 15,\n \"temp_max\": 19.4,\n \"temp_min\": 13.9,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-19\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 12.8,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-10-20\",\n \"precipitation\": 11.7,\n \"temp_max\": 16.1,\n \"temp_min\": 12.2,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-21\",\n \"precipitation\": 1,\n \"temp_max\": 16.1,\n \"temp_min\": 11.7,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-22\",\n \"precipitation\": 32,\n \"temp_max\": 15.6,\n \"temp_min\": 11.7,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-23\",\n \"precipitation\": 9.4,\n \"temp_max\": 14.4,\n \"temp_min\": 8.3,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-24\",\n \"precipitation\": 4.1,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-25\",\n \"precipitation\": 6.1,\n \"temp_max\": 16.7,\n \"temp_min\": 8.3,\n \"wind\": 5.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-26\",\n \"precipitation\": 1.5,\n \"temp_max\": 12.8,\n \"temp_min\": 7.8,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-27\",\n \"precipitation\": 0.8,\n \"temp_max\": 15.6,\n \"temp_min\": 6.7,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-28\",\n \"precipitation\": 12.7,\n \"temp_max\": 15,\n \"temp_min\": 9.4,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-29\",\n \"precipitation\": 0.5,\n \"temp_max\": 16.7,\n \"temp_min\": 11.7,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-30\",\n \"precipitation\": 25.4,\n \"temp_max\": 15.6,\n \"temp_min\": 11.1,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-10-31\",\n \"precipitation\": 17,\n \"temp_max\": 12.8,\n \"temp_min\": 8.3,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-01\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 1.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-11-02\",\n \"precipitation\": 1.8,\n \"temp_max\": 13.3,\n \"temp_min\": 7.2,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-03\",\n \"precipitation\": 10.9,\n \"temp_max\": 13.9,\n \"temp_min\": 11.1,\n \"wind\": 4.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-04\",\n \"precipitation\": 4.1,\n \"temp_max\": 14.4,\n \"temp_min\": 10.6,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-05\",\n \"precipitation\": 4.8,\n \"temp_max\": 15,\n \"temp_min\": 10.6,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-06\",\n \"precipitation\": 4.1,\n \"temp_max\": 16.7,\n \"temp_min\": 10.6,\n \"wind\": 6.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-07\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 7.2,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-08\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 3.9,\n \"wind\": 0.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-11-09\",\n \"precipitation\": 5.1,\n \"temp_max\": 13.3,\n \"temp_min\": 7.8,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-10\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-11\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 1.1,\n \"wind\": 7.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-12\",\n \"precipitation\": 0,\n \"temp_max\": 6.7,\n \"temp_min\": 0,\n \"wind\": 7.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-13\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 0.6,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-14\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": -2.1,\n \"wind\": 4.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-15\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": -1.6,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-16\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": -2.1,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-17\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": -2.1,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-18\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": -0.5,\n \"wind\": 0.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-19\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 2.2,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-11-20\",\n \"precipitation\": 3.6,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-21\",\n \"precipitation\": 15.2,\n \"temp_max\": 11.1,\n \"temp_min\": 8.3,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-22\",\n \"precipitation\": 0.5,\n \"temp_max\": 9.4,\n \"temp_min\": 6.7,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-23\",\n \"precipitation\": 11.9,\n \"temp_max\": 12.8,\n \"temp_min\": 5.6,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-24\",\n \"precipitation\": 1.3,\n \"temp_max\": 11.7,\n \"temp_min\": 4.4,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-25\",\n \"precipitation\": 18.3,\n \"temp_max\": 13.9,\n \"temp_min\": 9.4,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-26\",\n \"precipitation\": 0.3,\n \"temp_max\": 15,\n \"temp_min\": 12.2,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-27\",\n \"precipitation\": 3.3,\n \"temp_max\": 14.4,\n \"temp_min\": 11.7,\n \"wind\": 6.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-28\",\n \"precipitation\": 34.3,\n \"temp_max\": 12.8,\n \"temp_min\": 3.3,\n \"wind\": 5.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-11-29\",\n \"precipitation\": 3.6,\n \"temp_max\": 4.4,\n \"temp_min\": -4.3,\n \"wind\": 5.3,\n \"weather\": \"snow\"\n },\n {\n \"date\": \"2014-11-30\",\n \"precipitation\": 0,\n \"temp_max\": 2.8,\n \"temp_min\": -4.9,\n \"wind\": 4.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-01\",\n \"precipitation\": 0,\n \"temp_max\": 4.4,\n \"temp_min\": -3.2,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-02\",\n \"precipitation\": 0,\n \"temp_max\": 5.6,\n \"temp_min\": -3.2,\n \"wind\": 5.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-12-03\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 0,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-04\",\n \"precipitation\": 0.8,\n \"temp_max\": 8.3,\n \"temp_min\": 3.9,\n \"wind\": 1.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-05\",\n \"precipitation\": 3,\n \"temp_max\": 12.8,\n \"temp_min\": 6.7,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-06\",\n \"precipitation\": 7.4,\n \"temp_max\": 11.7,\n \"temp_min\": 7.8,\n \"wind\": 3.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-07\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 6.1,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-08\",\n \"precipitation\": 9.1,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-09\",\n \"precipitation\": 9.9,\n \"temp_max\": 16.1,\n \"temp_min\": 10.6,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-10\",\n \"precipitation\": 13,\n \"temp_max\": 18.9,\n \"temp_min\": 10,\n \"wind\": 6.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-11\",\n \"precipitation\": 6.9,\n \"temp_max\": 14.4,\n \"temp_min\": 8.3,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-12\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-13\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 3.9,\n \"wind\": 1.1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-12-14\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 1.7,\n \"wind\": 3.5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-12-15\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 6.7,\n \"wind\": 5.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-16\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 8.3,\n \"wind\": 4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-17\",\n \"precipitation\": 2.8,\n \"temp_max\": 8.9,\n \"temp_min\": 6.1,\n \"wind\": 1.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-18\",\n \"precipitation\": 13,\n \"temp_max\": 9.4,\n \"temp_min\": 6.7,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-19\",\n \"precipitation\": 3,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-20\",\n \"precipitation\": 19.6,\n \"temp_max\": 12.8,\n \"temp_min\": 6.7,\n \"wind\": 5.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-21\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 10,\n \"wind\": 5.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-22\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 6.1,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-23\",\n \"precipitation\": 20.6,\n \"temp_max\": 12.2,\n \"temp_min\": 5,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-24\",\n \"precipitation\": 5.3,\n \"temp_max\": 7.2,\n \"temp_min\": 3.9,\n \"wind\": 1.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-25\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 2.8,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-12-26\",\n \"precipitation\": 0,\n \"temp_max\": 5.6,\n \"temp_min\": 1.7,\n \"wind\": 1.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-12-27\",\n \"precipitation\": 3.3,\n \"temp_max\": 9.4,\n \"temp_min\": 4.4,\n \"wind\": 4.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-28\",\n \"precipitation\": 4.1,\n \"temp_max\": 6.7,\n \"temp_min\": 2.8,\n \"wind\": 1.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2014-12-29\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": 0.6,\n \"wind\": 4.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2014-12-30\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -2.1,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2014-12-31\",\n \"precipitation\": 0,\n \"temp_max\": 3.3,\n \"temp_min\": -2.7,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-01-01\",\n \"precipitation\": 0,\n \"temp_max\": 5.6,\n \"temp_min\": -3.2,\n \"wind\": 1.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-01-02\",\n \"precipitation\": 1.5,\n \"temp_max\": 5.6,\n \"temp_min\": 0,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-03\",\n \"precipitation\": 0,\n \"temp_max\": 5,\n \"temp_min\": 1.7,\n \"wind\": 1.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-04\",\n \"precipitation\": 10.2,\n \"temp_max\": 10.6,\n \"temp_min\": 3.3,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-05\",\n \"precipitation\": 8.1,\n \"temp_max\": 12.2,\n \"temp_min\": 9.4,\n \"wind\": 6.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-06\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 6.1,\n \"wind\": 1.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-07\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 5.6,\n \"wind\": 1.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-08\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 1.7,\n \"wind\": 2.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-09\",\n \"precipitation\": 0.3,\n \"temp_max\": 10,\n \"temp_min\": 3.3,\n \"wind\": 0.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-10\",\n \"precipitation\": 5.8,\n \"temp_max\": 7.8,\n \"temp_min\": 6.1,\n \"wind\": 0.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-11\",\n \"precipitation\": 1.5,\n \"temp_max\": 9.4,\n \"temp_min\": 7.2,\n \"wind\": 1.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-12\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 4.4,\n \"wind\": 1.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-13\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": 2.8,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-14\",\n \"precipitation\": 0,\n \"temp_max\": 6.1,\n \"temp_min\": 0.6,\n \"wind\": 2.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-15\",\n \"precipitation\": 9.7,\n \"temp_max\": 7.8,\n \"temp_min\": 1.1,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-16\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 5.6,\n \"wind\": 4.5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-17\",\n \"precipitation\": 26.2,\n \"temp_max\": 13.3,\n \"temp_min\": 3.3,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-18\",\n \"precipitation\": 21.3,\n \"temp_max\": 13.9,\n \"temp_min\": 7.2,\n \"wind\": 6.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-19\",\n \"precipitation\": 0.5,\n \"temp_max\": 10,\n \"temp_min\": 6.1,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-20\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 3.3,\n \"wind\": 3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-21\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": -0.5,\n \"wind\": 1.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-22\",\n \"precipitation\": 0.8,\n \"temp_max\": 9.4,\n \"temp_min\": 6.1,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-23\",\n \"precipitation\": 5.8,\n \"temp_max\": 12.2,\n \"temp_min\": 8.3,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-24\",\n \"precipitation\": 0.5,\n \"temp_max\": 14.4,\n \"temp_min\": 11.1,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-25\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 7.2,\n \"wind\": 1.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-26\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 6.1,\n \"wind\": 2.2,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-27\",\n \"precipitation\": 0.8,\n \"temp_max\": 11.1,\n \"temp_min\": 8.3,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-01-28\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 5,\n \"wind\": 1.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-29\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 3.3,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-01-30\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 1.1,\n \"wind\": 0.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-01-31\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 3.3,\n \"wind\": 1.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-02-01\",\n \"precipitation\": 1.5,\n \"temp_max\": 9.4,\n \"temp_min\": 4.4,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-02\",\n \"precipitation\": 7.4,\n \"temp_max\": 11.1,\n \"temp_min\": 5,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-03\",\n \"precipitation\": 1.3,\n \"temp_max\": 10,\n \"temp_min\": 5.6,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-04\",\n \"precipitation\": 8.4,\n \"temp_max\": 10.6,\n \"temp_min\": 4.4,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-05\",\n \"precipitation\": 26.2,\n \"temp_max\": 13.3,\n \"temp_min\": 8.3,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-06\",\n \"precipitation\": 17.3,\n \"temp_max\": 14.4,\n \"temp_min\": 10,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-07\",\n \"precipitation\": 23.6,\n \"temp_max\": 12.2,\n \"temp_min\": 9.4,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-08\",\n \"precipitation\": 3.6,\n \"temp_max\": 15,\n \"temp_min\": 8.3,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-09\",\n \"precipitation\": 6.1,\n \"temp_max\": 13.3,\n \"temp_min\": 8.3,\n \"wind\": 2.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-10\",\n \"precipitation\": 0.3,\n \"temp_max\": 12.8,\n \"temp_min\": 8.3,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-11\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 5.6,\n \"wind\": 1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-02-12\",\n \"precipitation\": 1,\n \"temp_max\": 16.7,\n \"temp_min\": 9.4,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-13\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 6.7,\n \"wind\": 1.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-02-14\",\n \"precipitation\": 0.3,\n \"temp_max\": 14.4,\n \"temp_min\": 6.7,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-15\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 3.9,\n \"wind\": 4.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-02-16\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 5.6,\n \"wind\": 6.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-02-17\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 4.4,\n \"wind\": 4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-02-18\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 4.4,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-02-19\",\n \"precipitation\": 4.6,\n \"temp_max\": 10.6,\n \"temp_min\": 8.3,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-20\",\n \"precipitation\": 0.8,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 0.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-21\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 5.6,\n \"wind\": 4.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-02-22\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 3.3,\n \"wind\": 4.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-02-23\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 0.6,\n \"wind\": 1.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-02-24\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 2.2,\n \"wind\": 1.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-02-25\",\n \"precipitation\": 4.1,\n \"temp_max\": 10,\n \"temp_min\": 6.7,\n \"wind\": 1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-26\",\n \"precipitation\": 9.4,\n \"temp_max\": 11.7,\n \"temp_min\": 7.8,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-27\",\n \"precipitation\": 18.3,\n \"temp_max\": 10,\n \"temp_min\": 6.7,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-02-28\",\n \"precipitation\": 0,\n \"temp_max\": 12.2,\n \"temp_min\": 3.3,\n \"wind\": 5.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-01\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 1.1,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-02\",\n \"precipitation\": 0,\n \"temp_max\": 11.1,\n \"temp_min\": 4.4,\n \"wind\": 4.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-03\",\n \"precipitation\": 0,\n \"temp_max\": 10.6,\n \"temp_min\": 0,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-04\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": -0.5,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-05\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 2.8,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-06\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 3.3,\n \"wind\": 1.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-07\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 3.9,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-03-08\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 3.9,\n \"wind\": 1.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-03-09\",\n \"precipitation\": 0,\n \"temp_max\": 14.4,\n \"temp_min\": 4.4,\n \"wind\": 1.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-03-10\",\n \"precipitation\": 0.8,\n \"temp_max\": 13.3,\n \"temp_min\": 5,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-11\",\n \"precipitation\": 2.5,\n \"temp_max\": 14.4,\n \"temp_min\": 8.9,\n \"wind\": 3.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-12\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 9.4,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-13\",\n \"precipitation\": 2,\n \"temp_max\": 17.2,\n \"temp_min\": 7.8,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-14\",\n \"precipitation\": 17,\n \"temp_max\": 13.9,\n \"temp_min\": 9.4,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-15\",\n \"precipitation\": 55.9,\n \"temp_max\": 10.6,\n \"temp_min\": 6.1,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-16\",\n \"precipitation\": 1,\n \"temp_max\": 13.9,\n \"temp_min\": 6.1,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-17\",\n \"precipitation\": 0.8,\n \"temp_max\": 13.3,\n \"temp_min\": 4.4,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-18\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 7.2,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-19\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 8.3,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-20\",\n \"precipitation\": 4.1,\n \"temp_max\": 13.9,\n \"temp_min\": 8.9,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-21\",\n \"precipitation\": 3.8,\n \"temp_max\": 13.3,\n \"temp_min\": 8.3,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-22\",\n \"precipitation\": 1,\n \"temp_max\": 11.7,\n \"temp_min\": 6.1,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-23\",\n \"precipitation\": 8.1,\n \"temp_max\": 11.1,\n \"temp_min\": 5.6,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-24\",\n \"precipitation\": 7.6,\n \"temp_max\": 12.8,\n \"temp_min\": 6.1,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-25\",\n \"precipitation\": 5.1,\n \"temp_max\": 14.4,\n \"temp_min\": 7.2,\n \"wind\": 4.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-26\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 10,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-27\",\n \"precipitation\": 1,\n \"temp_max\": 18.3,\n \"temp_min\": 8.9,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-28\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 9.4,\n \"wind\": 5.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-29\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 8.9,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-03-30\",\n \"precipitation\": 1.8,\n \"temp_max\": 17.8,\n \"temp_min\": 10.6,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-03-31\",\n \"precipitation\": 1,\n \"temp_max\": 12.8,\n \"temp_min\": 6.1,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-01\",\n \"precipitation\": 5.1,\n \"temp_max\": 12.8,\n \"temp_min\": 5.6,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-02\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 5.6,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-03\",\n \"precipitation\": 1.5,\n \"temp_max\": 11.1,\n \"temp_min\": 5,\n \"wind\": 3.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-04\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 3.9,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-05\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 2.8,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-06\",\n \"precipitation\": 1,\n \"temp_max\": 13.9,\n \"temp_min\": 6.7,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-07\",\n \"precipitation\": 0.5,\n \"temp_max\": 14.4,\n \"temp_min\": 6.7,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-08\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 6.1,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-09\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 6.1,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-10\",\n \"precipitation\": 10.9,\n \"temp_max\": 13.9,\n \"temp_min\": 7.8,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-11\",\n \"precipitation\": 0,\n \"temp_max\": 11.7,\n \"temp_min\": 5.6,\n \"wind\": 6.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-12\",\n \"precipitation\": 0,\n \"temp_max\": 13.3,\n \"temp_min\": 5.6,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-13\",\n \"precipitation\": 14,\n \"temp_max\": 11.7,\n \"temp_min\": 3.9,\n \"wind\": 3.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-14\",\n \"precipitation\": 3.3,\n \"temp_max\": 11.7,\n \"temp_min\": 2.8,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-15\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 3.3,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-16\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 3.9,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-17\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 6.1,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-18\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 8.3,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-19\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 8.3,\n \"wind\": 3.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-20\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 7.8,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-21\",\n \"precipitation\": 5.6,\n \"temp_max\": 17.2,\n \"temp_min\": 6.7,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-22\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 5,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-23\",\n \"precipitation\": 3,\n \"temp_max\": 12.2,\n \"temp_min\": 6.7,\n \"wind\": 4.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-24\",\n \"precipitation\": 3.3,\n \"temp_max\": 12.2,\n \"temp_min\": 6.1,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-25\",\n \"precipitation\": 1.3,\n \"temp_max\": 13.3,\n \"temp_min\": 5.6,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-26\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 4.4,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-04-27\",\n \"precipitation\": 0.3,\n \"temp_max\": 25,\n \"temp_min\": 10.6,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-28\",\n \"precipitation\": 1.8,\n \"temp_max\": 15.6,\n \"temp_min\": 8.9,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-04-29\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 7.2,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-04-30\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 7.8,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-01\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 8.9,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-02\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 7.8,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-03\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 7.8,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-04\",\n \"precipitation\": 0,\n \"temp_max\": 17.2,\n \"temp_min\": 7.2,\n \"wind\": 5.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-05\",\n \"precipitation\": 6.1,\n \"temp_max\": 14.4,\n \"temp_min\": 7.2,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-05-06\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 7.2,\n \"wind\": 2.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-05-07\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 6.1,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-08\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 8.3,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-09\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 9.4,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-10\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 11.1,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-11\",\n \"precipitation\": 0,\n \"temp_max\": 13.9,\n \"temp_min\": 10,\n \"wind\": 2.5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-05-12\",\n \"precipitation\": 4.3,\n \"temp_max\": 15.6,\n \"temp_min\": 10.6,\n \"wind\": 3.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-05-13\",\n \"precipitation\": 4.1,\n \"temp_max\": 12.2,\n \"temp_min\": 10,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-05-14\",\n \"precipitation\": 0.3,\n \"temp_max\": 17.8,\n \"temp_min\": 9.4,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-05-15\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 9.4,\n \"wind\": 2.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-05-16\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 11.1,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-17\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 10.6,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-18\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 12.2,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-19\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 11.7,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-20\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 10.6,\n \"wind\": 1.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-05-21\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 11.7,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-22\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 11.7,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-23\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 11.7,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-24\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 11.1,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-25\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 11.1,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-26\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 11.7,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-27\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 11.7,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-28\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 12.2,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-29\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 12.8,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-30\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 10,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-05-31\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 11.7,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-01\",\n \"precipitation\": 4.6,\n \"temp_max\": 16.1,\n \"temp_min\": 11.7,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-06-02\",\n \"precipitation\": 0.5,\n \"temp_max\": 17.8,\n \"temp_min\": 12.8,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-06-03\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 11.7,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-04\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 11.7,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-05\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.8,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-06\",\n \"precipitation\": 0,\n \"temp_max\": 29.4,\n \"temp_min\": 13.3,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-07\",\n \"precipitation\": 0,\n \"temp_max\": 31.1,\n \"temp_min\": 15.6,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-08\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 14.4,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-09\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 14.4,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-10\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 11.1,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-11\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 11.1,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-12\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 11.7,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-13\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 9.4,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-14\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 11.7,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-15\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 16.1,\n \"wind\": 3.5,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2015-06-16\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 11.1,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-17\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 11.1,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-18\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 13.9,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-19\",\n \"precipitation\": 0.5,\n \"temp_max\": 23.9,\n \"temp_min\": 13.3,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-06-20\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 12.8,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-21\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 13.9,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-22\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 12.8,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-23\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 11.7,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-24\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 16.1,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-25\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 15.6,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-26\",\n \"precipitation\": 0,\n \"temp_max\": 31.7,\n \"temp_min\": 17.8,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-27\",\n \"precipitation\": 0,\n \"temp_max\": 33.3,\n \"temp_min\": 17.2,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-28\",\n \"precipitation\": 0.3,\n \"temp_max\": 28.3,\n \"temp_min\": 18.3,\n \"wind\": 2.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-06-29\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 17.2,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-06-30\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 15,\n \"wind\": 3.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-07-01\",\n \"precipitation\": 0,\n \"temp_max\": 32.2,\n \"temp_min\": 17.2,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-02\",\n \"precipitation\": 0,\n \"temp_max\": 33.9,\n \"temp_min\": 17.8,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-03\",\n \"precipitation\": 0,\n \"temp_max\": 33.3,\n \"temp_min\": 17.8,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-04\",\n \"precipitation\": 0,\n \"temp_max\": 33.3,\n \"temp_min\": 15,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-05\",\n \"precipitation\": 0,\n \"temp_max\": 32.8,\n \"temp_min\": 16.7,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-06\",\n \"precipitation\": 0,\n \"temp_max\": 29.4,\n \"temp_min\": 15.6,\n \"wind\": 3.2,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2015-07-07\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 13.9,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-08\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 14.4,\n \"wind\": 1.9,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2015-07-09\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 14.4,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-10\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 16.7,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-11\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 16.7,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-12\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 16.7,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-13\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 16.1,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-14\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 16.1,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-15\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 14.4,\n \"wind\": 3.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-16\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 15,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-17\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.9,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-18\",\n \"precipitation\": 0,\n \"temp_max\": 33.3,\n \"temp_min\": 17.8,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-19\",\n \"precipitation\": 0,\n \"temp_max\": 35,\n \"temp_min\": 17.2,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-20\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 16.7,\n \"wind\": 3.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-21\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 15,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-22\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 13.9,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-23\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 14.4,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-24\",\n \"precipitation\": 0.3,\n \"temp_max\": 22.8,\n \"temp_min\": 13.3,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-07-25\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 14.4,\n \"wind\": 2.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-07-26\",\n \"precipitation\": 2,\n \"temp_max\": 22.2,\n \"temp_min\": 13.9,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-07-27\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 12.2,\n \"wind\": 1.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-07-28\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.9,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-29\",\n \"precipitation\": 0,\n \"temp_max\": 32.2,\n \"temp_min\": 14.4,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-30\",\n \"precipitation\": 0,\n \"temp_max\": 34.4,\n \"temp_min\": 17.2,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-07-31\",\n \"precipitation\": 0,\n \"temp_max\": 34.4,\n \"temp_min\": 17.8,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-01\",\n \"precipitation\": 0,\n \"temp_max\": 33.3,\n \"temp_min\": 15.6,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-02\",\n \"precipitation\": 0,\n \"temp_max\": 30.6,\n \"temp_min\": 16.1,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-03\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 17.2,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-04\",\n \"precipitation\": 0,\n \"temp_max\": 26.1,\n \"temp_min\": 14.4,\n \"wind\": 2.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-08-05\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 12.2,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-06\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 15,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-07\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 15.6,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-08\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 15.6,\n \"wind\": 3.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-08-09\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 15,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-10\",\n \"precipitation\": 0,\n \"temp_max\": 28.9,\n \"temp_min\": 16.1,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-11\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 16.7,\n \"wind\": 4.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-12\",\n \"precipitation\": 7.6,\n \"temp_max\": 28.3,\n \"temp_min\": 16.7,\n \"wind\": 2.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-08-13\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 15.6,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-14\",\n \"precipitation\": 30.5,\n \"temp_max\": 18.3,\n \"temp_min\": 15,\n \"wind\": 5.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-08-15\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 13.9,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-16\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 14.4,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-17\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 13.9,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-18\",\n \"precipitation\": 0,\n \"temp_max\": 30,\n \"temp_min\": 15,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-19\",\n \"precipitation\": 0,\n \"temp_max\": 31.7,\n \"temp_min\": 16.1,\n \"wind\": 2.1,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2015-08-20\",\n \"precipitation\": 2,\n \"temp_max\": 22.8,\n \"temp_min\": 14.4,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-08-21\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 14.4,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-22\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 12.2,\n \"wind\": 2.5,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2015-08-23\",\n \"precipitation\": 0,\n \"temp_max\": 27.8,\n \"temp_min\": 13.9,\n \"wind\": 1.8,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2015-08-24\",\n \"precipitation\": 0,\n \"temp_max\": 23.9,\n \"temp_min\": 12.2,\n \"wind\": 2.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-25\",\n \"precipitation\": 0,\n \"temp_max\": 25.6,\n \"temp_min\": 12.2,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-26\",\n \"precipitation\": 0,\n \"temp_max\": 28.3,\n \"temp_min\": 13.9,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-27\",\n \"precipitation\": 0,\n \"temp_max\": 29.4,\n \"temp_min\": 14.4,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-08-28\",\n \"precipitation\": 0.5,\n \"temp_max\": 23.3,\n \"temp_min\": 15.6,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-08-29\",\n \"precipitation\": 32.5,\n \"temp_max\": 22.2,\n \"temp_min\": 13.3,\n \"wind\": 5.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-08-30\",\n \"precipitation\": 10.2,\n \"temp_max\": 20,\n \"temp_min\": 12.8,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-08-31\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 16.1,\n \"wind\": 5.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-01\",\n \"precipitation\": 5.8,\n \"temp_max\": 19.4,\n \"temp_min\": 13.9,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-02\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 11.1,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-03\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10.6,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-04\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10,\n \"wind\": 2.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-05\",\n \"precipitation\": 0.3,\n \"temp_max\": 20.6,\n \"temp_min\": 8.9,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-06\",\n \"precipitation\": 5.3,\n \"temp_max\": 16.1,\n \"temp_min\": 11.7,\n \"wind\": 2.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-07\",\n \"precipitation\": 0.3,\n \"temp_max\": 21.1,\n \"temp_min\": 13.3,\n \"wind\": 1.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-08\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 13.3,\n \"wind\": 2.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-09\",\n \"precipitation\": 0,\n \"temp_max\": 24.4,\n \"temp_min\": 13.9,\n \"wind\": 3.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-10\",\n \"precipitation\": 0,\n \"temp_max\": 25,\n \"temp_min\": 14.4,\n \"wind\": 3.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-09-11\",\n \"precipitation\": 0,\n \"temp_max\": 27.2,\n \"temp_min\": 15,\n \"wind\": 3.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-12\",\n \"precipitation\": 0,\n \"temp_max\": 26.7,\n \"temp_min\": 14.4,\n \"wind\": 2.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-13\",\n \"precipitation\": 0.5,\n \"temp_max\": 20.6,\n \"temp_min\": 12.8,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-14\",\n \"precipitation\": 0,\n \"temp_max\": 16.7,\n \"temp_min\": 10.6,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-15\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 10,\n \"wind\": 2.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-16\",\n \"precipitation\": 1,\n \"temp_max\": 20,\n \"temp_min\": 10,\n \"wind\": 1.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-17\",\n \"precipitation\": 1.8,\n \"temp_max\": 18.3,\n \"temp_min\": 12.8,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-18\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 12.8,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-19\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 14.4,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-20\",\n \"precipitation\": 4.1,\n \"temp_max\": 22.8,\n \"temp_min\": 12.2,\n \"wind\": 6.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-21\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 9.4,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-09-22\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 7.8,\n \"wind\": 2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-23\",\n \"precipitation\": 0,\n \"temp_max\": 20.6,\n \"temp_min\": 8.3,\n \"wind\": 1.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-24\",\n \"precipitation\": 0,\n \"temp_max\": 22.2,\n \"temp_min\": 11.1,\n \"wind\": 2.5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-09-25\",\n \"precipitation\": 2,\n \"temp_max\": 15.6,\n \"temp_min\": 12.8,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-09-26\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10,\n \"wind\": 2.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-27\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 7.2,\n \"wind\": 3.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-28\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 9.4,\n \"wind\": 5.1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-29\",\n \"precipitation\": 0,\n \"temp_max\": 21.7,\n \"temp_min\": 8.9,\n \"wind\": 1.9,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-09-30\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10,\n \"wind\": 1.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-01\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 9.4,\n \"wind\": 1.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-02\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 10,\n \"wind\": 2.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-03\",\n \"precipitation\": 0,\n \"temp_max\": 19.4,\n \"temp_min\": 11.1,\n \"wind\": 4.8,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-10-04\",\n \"precipitation\": 0,\n \"temp_max\": 22.8,\n \"temp_min\": 10,\n \"wind\": 3.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-10-05\",\n \"precipitation\": 0,\n \"temp_max\": 23.3,\n \"temp_min\": 9.4,\n \"wind\": 1.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-10-06\",\n \"precipitation\": 0,\n \"temp_max\": 18.3,\n \"temp_min\": 10,\n \"wind\": 2.6,\n \"weather\": \"drizzle\"\n },\n {\n \"date\": \"2015-10-07\",\n \"precipitation\": 9.9,\n \"temp_max\": 16.1,\n \"temp_min\": 13.9,\n \"wind\": 2.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-08\",\n \"precipitation\": 0,\n \"temp_max\": 18.9,\n \"temp_min\": 13.3,\n \"wind\": 1.1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-09\",\n \"precipitation\": 0.3,\n \"temp_max\": 19.4,\n \"temp_min\": 12.2,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-10\",\n \"precipitation\": 28.7,\n \"temp_max\": 21.1,\n \"temp_min\": 13.3,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-11\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 10.6,\n \"wind\": 2.6,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-10-12\",\n \"precipitation\": 4.6,\n \"temp_max\": 18.3,\n \"temp_min\": 10.6,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-13\",\n \"precipitation\": 1.3,\n \"temp_max\": 16.7,\n \"temp_min\": 9.4,\n \"wind\": 3.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-14\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 10,\n \"wind\": 5,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-15\",\n \"precipitation\": 0,\n \"temp_max\": 21.1,\n \"temp_min\": 9.4,\n \"wind\": 3.4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-16\",\n \"precipitation\": 0,\n \"temp_max\": 20,\n \"temp_min\": 8.9,\n \"wind\": 1.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-10-17\",\n \"precipitation\": 0.3,\n \"temp_max\": 19.4,\n \"temp_min\": 11.7,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-18\",\n \"precipitation\": 3.8,\n \"temp_max\": 15,\n \"temp_min\": 12.8,\n \"wind\": 2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-19\",\n \"precipitation\": 0.3,\n \"temp_max\": 17.2,\n \"temp_min\": 12.2,\n \"wind\": 2.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-20\",\n \"precipitation\": 0,\n \"temp_max\": 17.8,\n \"temp_min\": 10.6,\n \"wind\": 1.8,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-21\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 8.3,\n \"wind\": 1.3,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-22\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 8.9,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-23\",\n \"precipitation\": 0,\n \"temp_max\": 12.8,\n \"temp_min\": 7.2,\n \"wind\": 2.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-24\",\n \"precipitation\": 0,\n \"temp_max\": 15,\n \"temp_min\": 8.9,\n \"wind\": 2.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-25\",\n \"precipitation\": 8.9,\n \"temp_max\": 19.4,\n \"temp_min\": 8.9,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-26\",\n \"precipitation\": 6.9,\n \"temp_max\": 12.2,\n \"temp_min\": 10,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-27\",\n \"precipitation\": 0,\n \"temp_max\": 16.1,\n \"temp_min\": 7.8,\n \"wind\": 1.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-10-28\",\n \"precipitation\": 3.3,\n \"temp_max\": 13.9,\n \"temp_min\": 11.1,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-29\",\n \"precipitation\": 1.8,\n \"temp_max\": 15,\n \"temp_min\": 12.2,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-30\",\n \"precipitation\": 19.3,\n \"temp_max\": 17.2,\n \"temp_min\": 11.7,\n \"wind\": 6.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-10-31\",\n \"precipitation\": 33,\n \"temp_max\": 15.6,\n \"temp_min\": 11.7,\n \"wind\": 7.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-01\",\n \"precipitation\": 26.2,\n \"temp_max\": 12.2,\n \"temp_min\": 8.9,\n \"wind\": 6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-02\",\n \"precipitation\": 0.3,\n \"temp_max\": 11.1,\n \"temp_min\": 7.2,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-03\",\n \"precipitation\": 0.8,\n \"temp_max\": 10.6,\n \"temp_min\": 5,\n \"wind\": 1.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-04\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 3.3,\n \"wind\": 2.2,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-11-05\",\n \"precipitation\": 1.3,\n \"temp_max\": 11.7,\n \"temp_min\": 7.8,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-06\",\n \"precipitation\": 0,\n \"temp_max\": 15.6,\n \"temp_min\": 8.3,\n \"wind\": 2.7,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-11-07\",\n \"precipitation\": 12.7,\n \"temp_max\": 12.2,\n \"temp_min\": 9.4,\n \"wind\": 3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-08\",\n \"precipitation\": 6.6,\n \"temp_max\": 11.1,\n \"temp_min\": 7.8,\n \"wind\": 1.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-09\",\n \"precipitation\": 3.3,\n \"temp_max\": 10,\n \"temp_min\": 5,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-10\",\n \"precipitation\": 1.3,\n \"temp_max\": 11.1,\n \"temp_min\": 3.9,\n \"wind\": 3.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-11\",\n \"precipitation\": 1.5,\n \"temp_max\": 11.1,\n \"temp_min\": 6.1,\n \"wind\": 4.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-12\",\n \"precipitation\": 9.9,\n \"temp_max\": 11.1,\n \"temp_min\": 5,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-13\",\n \"precipitation\": 33.5,\n \"temp_max\": 13.3,\n \"temp_min\": 9.4,\n \"wind\": 6.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-14\",\n \"precipitation\": 47.2,\n \"temp_max\": 9.4,\n \"temp_min\": 6.1,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-15\",\n \"precipitation\": 22.4,\n \"temp_max\": 8.9,\n \"temp_min\": 2.2,\n \"wind\": 4.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-16\",\n \"precipitation\": 2,\n \"temp_max\": 8.9,\n \"temp_min\": 1.7,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-17\",\n \"precipitation\": 29.5,\n \"temp_max\": 13.3,\n \"temp_min\": 6.7,\n \"wind\": 8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-18\",\n \"precipitation\": 1.5,\n \"temp_max\": 8.9,\n \"temp_min\": 3.3,\n \"wind\": 3.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-19\",\n \"precipitation\": 2,\n \"temp_max\": 8.9,\n \"temp_min\": 2.8,\n \"wind\": 4.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-20\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 0.6,\n \"wind\": 4,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-11-21\",\n \"precipitation\": 0,\n \"temp_max\": 8.9,\n \"temp_min\": 0.6,\n \"wind\": 4.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-11-22\",\n \"precipitation\": 0,\n \"temp_max\": 10,\n \"temp_min\": 1.7,\n \"wind\": 3.1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-11-23\",\n \"precipitation\": 3,\n \"temp_max\": 6.7,\n \"temp_min\": 0,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-24\",\n \"precipitation\": 7.1,\n \"temp_max\": 6.7,\n \"temp_min\": 2.8,\n \"wind\": 4.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-11-25\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 0,\n \"wind\": 5.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-11-26\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": -1,\n \"wind\": 4.3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-11-27\",\n \"precipitation\": 0,\n \"temp_max\": 9.4,\n \"temp_min\": -1.6,\n \"wind\": 3,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-11-28\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": -2.7,\n \"wind\": 1,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-11-29\",\n \"precipitation\": 0,\n \"temp_max\": 1.7,\n \"temp_min\": -2.1,\n \"wind\": 0.9,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-11-30\",\n \"precipitation\": 0.5,\n \"temp_max\": 5.6,\n \"temp_min\": -3.8,\n \"wind\": 1.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-01\",\n \"precipitation\": 12.2,\n \"temp_max\": 10,\n \"temp_min\": 3.9,\n \"wind\": 3.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-02\",\n \"precipitation\": 2.5,\n \"temp_max\": 10.6,\n \"temp_min\": 4.4,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-03\",\n \"precipitation\": 12.7,\n \"temp_max\": 15.6,\n \"temp_min\": 7.8,\n \"wind\": 5.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-04\",\n \"precipitation\": 2,\n \"temp_max\": 10.6,\n \"temp_min\": 6.1,\n \"wind\": 4.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-05\",\n \"precipitation\": 15.7,\n \"temp_max\": 10,\n \"temp_min\": 6.1,\n \"wind\": 4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-06\",\n \"precipitation\": 11.2,\n \"temp_max\": 12.8,\n \"temp_min\": 7.2,\n \"wind\": 5.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-07\",\n \"precipitation\": 27.4,\n \"temp_max\": 11.1,\n \"temp_min\": 8.3,\n \"wind\": 3.4,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-08\",\n \"precipitation\": 54.1,\n \"temp_max\": 15.6,\n \"temp_min\": 10,\n \"wind\": 6.2,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-09\",\n \"precipitation\": 13.5,\n \"temp_max\": 12.2,\n \"temp_min\": 7.8,\n \"wind\": 6.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-10\",\n \"precipitation\": 9.4,\n \"temp_max\": 11.7,\n \"temp_min\": 6.1,\n \"wind\": 7.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-11\",\n \"precipitation\": 0.3,\n \"temp_max\": 9.4,\n \"temp_min\": 4.4,\n \"wind\": 2.8,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-12\",\n \"precipitation\": 16,\n \"temp_max\": 8.9,\n \"temp_min\": 5.6,\n \"wind\": 5.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-13\",\n \"precipitation\": 1.3,\n \"temp_max\": 7.8,\n \"temp_min\": 6.1,\n \"wind\": 6.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-14\",\n \"precipitation\": 0,\n \"temp_max\": 7.8,\n \"temp_min\": 1.7,\n \"wind\": 1.7,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-12-15\",\n \"precipitation\": 1.5,\n \"temp_max\": 6.7,\n \"temp_min\": 1.1,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-16\",\n \"precipitation\": 3.6,\n \"temp_max\": 6.1,\n \"temp_min\": 2.8,\n \"wind\": 2.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-17\",\n \"precipitation\": 21.8,\n \"temp_max\": 6.7,\n \"temp_min\": 3.9,\n \"wind\": 6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-18\",\n \"precipitation\": 18.5,\n \"temp_max\": 8.9,\n \"temp_min\": 4.4,\n \"wind\": 5.1,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-19\",\n \"precipitation\": 0,\n \"temp_max\": 8.3,\n \"temp_min\": 2.8,\n \"wind\": 4.1,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-12-20\",\n \"precipitation\": 4.3,\n \"temp_max\": 7.8,\n \"temp_min\": 4.4,\n \"wind\": 6.7,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-21\",\n \"precipitation\": 27.4,\n \"temp_max\": 5.6,\n \"temp_min\": 2.8,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-22\",\n \"precipitation\": 4.6,\n \"temp_max\": 7.8,\n \"temp_min\": 2.8,\n \"wind\": 5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-23\",\n \"precipitation\": 6.1,\n \"temp_max\": 5,\n \"temp_min\": 2.8,\n \"wind\": 7.6,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-24\",\n \"precipitation\": 2.5,\n \"temp_max\": 5.6,\n \"temp_min\": 2.2,\n \"wind\": 4.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-25\",\n \"precipitation\": 5.8,\n \"temp_max\": 5,\n \"temp_min\": 2.2,\n \"wind\": 1.5,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-26\",\n \"precipitation\": 0,\n \"temp_max\": 4.4,\n \"temp_min\": 0,\n \"wind\": 2.5,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-12-27\",\n \"precipitation\": 8.6,\n \"temp_max\": 4.4,\n \"temp_min\": 1.7,\n \"wind\": 2.9,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-28\",\n \"precipitation\": 1.5,\n \"temp_max\": 5,\n \"temp_min\": 1.7,\n \"wind\": 1.3,\n \"weather\": \"rain\"\n },\n {\n \"date\": \"2015-12-29\",\n \"precipitation\": 0,\n \"temp_max\": 7.2,\n \"temp_min\": 0.6,\n \"wind\": 2.6,\n \"weather\": \"fog\"\n },\n {\n \"date\": \"2015-12-30\",\n \"precipitation\": 0,\n \"temp_max\": 5.6,\n \"temp_min\": -1,\n \"wind\": 3.4,\n \"weather\": \"sun\"\n },\n {\n \"date\": \"2015-12-31\",\n \"precipitation\": 0,\n \"temp_max\": 5.6,\n \"temp_min\": -2.1,\n \"wind\": 3.5,\n \"weather\": \"sun\"\n }\n ],\n },\n encode: {\n x: (d) => new Date(d.date).getUTCDate(),\n y: (d) => new Date(d.date).getUTCMonth(),\n color: 'temp_max',\n },\n transform: [{ type: 'group', color: 'max' }],\n scale: { color: { type: 'sequential', palette: 'gnBu' } },\n style: { inset: 0.5 },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"date\":\"2012-01-01\",\"precipitation\":0,\"temp_max\":12.8,\"temp_min\":5,\"wind\":4.7,\"weather\":\"drizzle\"},\n {\"date\":\"2012-01-02\",\"precipitation\":10.9,\"temp_max\":10.6,\"temp_min\":2.8,\"wind\":4.5,\"weather\":\"rain\"},\n {\"date\":\"2012-01-03\",\"precipitation\":0.8,\"temp_max\":11.7,\"temp_min\":7.2,\"wind\":2.3,\"weather\":\"rain\"},\n {\"date\":\"2012-01-04\",\"precipitation\":20.3,\"temp_max\":12.2,\"temp_min\":5.6,\"wind\":4.7,\"weather\":\"rain\"},\n {\"date\":\"2012-01-05\",\"precipitation\":1.3,\"temp_max\":8.9,\"temp_min\":2.8,\"wind\":6.1,\"weather\":\"rain\"},\n {\"date\":\"2012-01-06\",\"precipitation\":2.5,\"temp_max\":4.4,\"temp_min\":2.2,\"wind\":2.2,\"weather\":\"rain\"},\n {\"date\":\"2012-01-07\",\"precipitation\":0,\"temp_max\":7.2,\"temp_min\":2.8,\"wind\":2.3,\"weather\":\"rain\"},\n {\"date\":\"2012-01-08\",\"precipitation\":0,\"temp_max\":10,\"temp_min\":2.8,\"wind\":2,\"weather\":\"sun\"},\n {\"date\":\"2012-01-09\",\"precipitation\":4.3,\"temp_max\":9.4,\"temp_min\":5,\"wind\":3.4,\"weather\":\"rain\"},\n {\"date\":\"2012-01-10\",\"precipitation\":1,\"temp_max\":6.1,\"temp_min\":0.6,\"wind\":3.4,\"weather\":\"rain\"}\n];\n\nchart.options({\n type: 'cell',\n data: data,\n encode: {\n x: (d) => new Date(d.date).getUTCDate(),\n y: (d) => new Date(d.date).getUTCMonth(),\n color: 'temp_max',\n },\n transform: [\n { type: 'group', color: 'max' }\n ],\n scale: {\n color: {\n type: 'sequential',\n palette: 'gnBu',\n },\n },\n style: {\n inset: 0.5,\n },\n});\n\nchart.render();", + "duration": 20196, + "retrievedSkillIds": [ + "g2-mark-cell-heatmap", + "g2-scale-linear", + "g2-scale-time", + "g2-scale-sequential", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1532, + "expectedLength": 218166, + "similarity": 0.7399471644945402, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"date\":\"2012-01-01\",\"precipitation\":0,\"temp_max\":12.8,\"temp_min\":5,\"wind\":4.7,\"weather\":\"drizzle\"},\n {\"date\":\"2012-01-02\",\"precipitation\":10.9,\"temp_max\":10.6,\"temp_min\":2.8,\"wind\":4.5,\"weather\":\"rain\"},\n {\"date\":\"2012-01-03\",\"precipitation\":0.8,\"temp_max\":11.7,\"temp_min\":7.2,\"wind\":2.3,\"weather\":\"rain\"},\n {\"date\":\"2012-01-04\",\"precipitation\":20.3,\"temp_max\":12.2,\"temp_min\":5.6,\"wind\":4.7,\"weather\":\"rain\"},\n {\"date\":\"2012-01-05\",\"precipitation\":1.3,\"temp_max\":8.9,\"temp_min\":2.8,\"wind\":6.1,\"weather\":\"rain\"},\n {\"date\":\"2012-01-06\",\"precipitation\":2.5,\"temp_max\":4.4,\"temp_min\":2.2,\"wind\":2.2,\"weather\":\"rain\"},\n {\"date\":\"2012-01-07\",\"precipitation\":0,\"temp_max\":7.2,\"temp_min\":2.8,\"wind\":2.3,\"weather\":\"rain\"},\n {\"date\":\"2012-01-08\",\"precipitation\":0,\"temp_max\":10,\"temp_min\":2.8,\"wind\":2,\"weather\":\"sun\"},\n {\"date\":\"2012-01-09\",\"precipitation\":4.3,\"temp_max\":9.4,\"temp_min\":5,\"wind\":3.4,\"weather\":\"rain\"},\n {\"date\":\"2012-01-10\",\"precipitation\":1,\"temp_max\":6.1,\"temp_min\":0.6,\"wind\":3.4,\"weather\":\"rain\"}\n];\n\nchart.options({\n type: 'cell',\n data: data,\n encode: {\n x: (d) => new Date(d.date).getUTCDate(),\n y: (d) => new Date(d.date).getUTCMonth(),\n color: 'temp_max',\n },\n transform: [\n { type: 'group', color: 'max' }\n ],\n scale: {\n color: {\n type: 'sequential',\n palette: 'gnBu',\n },\n },\n style: {\n inset: 0.5,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "Date", + "getUTCDate", + "Date", + "getUTCMonth", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "encode", + "x", + "y", + "color", + "transform", + "type", + "color", + "scale", + "color", + "type", + "palette", + "style", + "inset" + ], + "stringLiterals": [ + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather", + "date", + "precipitation", + "temp_max", + "temp_min", + "wind", + "weather" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale" + ] + } + } + }, + { + "id": "case-121", + "query": "根据描述绘制图表,使用径向坐标系展示不同区域的销售数据,通过间隔条形图的形式呈现各区域销售额的大小,并支持元素激活交互。参考数据:[{\"region\":\"华中\",\"sales\":90},{\"region\":\"西南\",\"sales\":110},{\"region\":\"华北\",\"sales\":120},{\"region\":\"华南\",\"sales\":150},{\"region\":\"华东\",\"sales\":180}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'interval',\n data: [\n { region: '华北', sales: 120 },\n { region: '华东', sales: 180 },\n { region: '华南', sales: 150 },\n { region: '华中', sales: 90 },\n { region: '西南', sales: 110 }\n ].sort((a, b) => a.sales - b.sales),\n coordinate: { type: 'radial', innerRadius: 0.25 },\n encode: {\n x: 'region',\n y: 'sales',\n color: 'region'\n },\n scale: {\n y: { domain: [0, 200] }\n },\n style: {\n radius: 10,\n },\n legend: {\n color: {\n itemLabelFill: '#000'\n }\n },\n labels: [{\n text: d => `${d.sales}万`,\n position: 'outside',\n }],\n axis: {\n x: { label: { style: { fill: '#ccc' } } },\n y: false\n }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"region\":\"华中\",\"sales\":90},\n {\"region\":\"西南\",\"sales\":110},\n {\"region\":\"华北\",\"sales\":120},\n {\"region\":\"华南\",\"sales\":150},\n {\"region\":\"华东\",\"sales\":180}\n ],\n encode: {\n x: 'region',\n y: 'sales',\n color: 'region',\n },\n transform: [\n { type: 'sortX', by: 'y', reverse: true }\n ],\n coordinate: {\n type: 'radial',\n innerRadius: 0.2,\n },\n interaction: {\n elementHighlight: true,\n },\n});\n\nchart.render();", + "duration": 17511, + "retrievedSkillIds": [ + "g2-mark-interval-basic", + "g2-concept-chart-selection", + "g2-mark-arc-donut", + "g2-mark-rose", + "g2-transform-sortx" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 608, + "expectedLength": 776, + "similarity": 0.6226994629842731, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"region\":\"华中\",\"sales\":90},\n {\"region\":\"西南\",\"sales\":110},\n {\"region\":\"华北\",\"sales\":120},\n {\"region\":\"华南\",\"sales\":150},\n {\"region\":\"华东\",\"sales\":180}\n ],\n encode: {\n x: 'region',\n y: 'sales',\n color: 'region',\n },\n transform: [\n { type: 'sortX', by: 'y', reverse: true }\n ],\n coordinate: {\n type: 'radial',\n innerRadius: 0.2,\n },\n interaction: {\n elementHighlight: true,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "encode", + "x", + "y", + "color", + "transform", + "type", + "by", + "reverse", + "coordinate", + "type", + "innerRadius", + "interaction", + "elementHighlight" + ], + "stringLiterals": [ + "region", + "sales", + "region", + "sales", + "region", + "sales", + "region", + "sales", + "region", + "sales" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval", + "interaction" + ] + } + } + }, + { + "id": "case-122", + "query": "根据描述绘制图表,基于Iris数据集,使用G2库创建一个组合视图,包含按物种和测量类别(x轴为PetalWidth、PetalLength、SepalWidth、SepalLength)分组的密度估计曲线(KDE)和小提琴形状的箱线图,用于展示不同物种在各测量维度上的数值分布情况。参考数据:\n[{\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},{\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},{\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.5},{\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":5.1},{\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},{\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},{\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3},{\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":4.9},{\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},{\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.3}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'view',\n data: {\n type: 'inline',\n value: [\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 4.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.9\n }\n ],\n },\n children: [\n {\n type: 'density',\n data: {\n transform: [\n {\n type: 'kde',\n field: 'y',\n groupBy: ['x', 'species'],\n size: 50,\n },\n ],\n },\n encode: {\n x: 'x',\n y: 'y',\n series: 'species',\n color: 'species',\n size: 'size',\n },\n style: {\n fillOpacity: 0.7,\n },\n tooltip: false,\n },\n {\n type: 'boxplot',\n encode: {\n x: 'x',\n y: 'y',\n series: 'species',\n color: 'species',\n shape: 'violin',\n },\n style: {\n opacity: 0.8,\n strokeOpacity: 0.6,\n point: false,\n },\n },\n ],\n axis: {\n x: { title: '类别分组', labelAutoRotate: false },\n y: { title: '数值分布' },\n },\n legend: { color: { title: '物种' } },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.5},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":5.1},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":4.9},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.3}\n];\n\nchart.options({\n type: 'view',\n data: {\n type: 'inline',\n value: data,\n },\n children: [\n {\n type: 'density',\n data: {\n transform: [\n {\n type: 'kde',\n field: 'y',\n groupBy: ['x', 'species'],\n size: 20,\n },\n ],\n },\n encode: {\n x: 'x',\n y: 'y',\n series: 'species',\n color: 'species',\n size: 'size',\n },\n style: {\n fillOpacity: 0.6,\n },\n tooltip: false,\n },\n {\n type: 'boxplot',\n encode: {\n x: 'x',\n y: 'y',\n series: 'species',\n color: 'species',\n shape: 'violin',\n },\n style: {\n opacity: 0.5,\n strokeOpacity: 0.5,\n point: false,\n },\n },\n ],\n});\n\nchart.render();", + "duration": 13047, + "retrievedSkillIds": [ + "g2-mark-violin", + "g2-mark-distribution-curve", + "g2-mark-boxplot", + "g2-mark-box-boxplot", + "g2-scale-band" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1485, + "expectedLength": 49418, + "similarity": 0.7850898018166804, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.5},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":5.1},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":4.9},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.3}\n];\n\nchart.options({\n type: 'view',\n data: {\n type: 'inline',\n value: data,\n },\n children: [\n {\n type: 'density',\n data: {\n transform: [\n {\n type: 'kde',\n field: 'y',\n groupBy: ['x', 'species'],\n size: 20,\n },\n ],\n },\n encode: {\n x: 'x',\n y: 'y',\n series: 'species',\n color: 'species',\n size: 'size',\n },\n style: {\n fillOpacity: 0.6,\n },\n tooltip: false,\n },\n {\n type: 'boxplot',\n encode: {\n x: 'x',\n y: 'y',\n series: 'species',\n color: 'species',\n shape: 'violin',\n },\n style: {\n opacity: 0.5,\n strokeOpacity: 0.5,\n point: false,\n },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "type", + "value", + "children", + "type", + "data", + "transform", + "type", + "field", + "groupBy", + "size", + "encode", + "x", + "y", + "series", + "color", + "size", + "style", + "fillOpacity", + "tooltip", + "type", + "encode", + "x", + "y", + "series", + "color", + "shape", + "style", + "opacity", + "strokeOpacity", + "point" + ], + "stringLiterals": [ + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "view.children", + "type.view" + ] + } + } + }, + { + "id": "case-123", + "query": "根据描述绘制图表,使用极坐标系绘制一个类似K线图的图表,展示每个类别的开盘价、收盘价、最高价和最低价,并根据收盘价与开盘价的关系对颜色进行编码。参考数据:[{\"t\":\"A\",\"open\":10,\"close\":14,\"high\":15,\"low\":9},{\"t\":\"B\",\"open\":15,\"close\":9,\"high\":16,\"low\":8},{\"t\":\"C\",\"open\":9,\"close\":13,\"high\":14,\"low\":8},{\"t\":\"D\",\"open\":13,\"close\":13,\"high\":15,\"low\":11}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const data = [\n { t: 'A', open: 10, close: 14, high: 15, low: 9 },\n { t: 'B', open: 15, close: 9, high: 16, low: 8 },\n { t: 'C', open: 9, close: 13, high: 14, low: 8 },\n { t: 'D', open: 13, close: 13, high: 15, low: 11 }\n];\n\nconst chart = new Chart({ container: 'container', autoFit: true, height: 300 });\nchart.options({\n type: 'view',\n data,\n coordinate: { type: 'polar', innerRadius: 0.2 },\n encode: {\n x: 't',\n color: d => d.close > d.open ? 'up' : d.close < d.open ? 'down' : 'flat',\n y: ['low','high','open','close']\n },\n scale: {\n color: { domain: ['up','down','flat'], range: ['#e41a1c','#4daf4a','#999'] }\n },\n children: [\n { type: 'link', encode: { y: ['low','high'] }, style: { stroke: '#ddd' } },\n {\n type: 'interval',\n encode: { y: ['open','close'] },\n style: { fillOpacity: 0.9, radius: 4 }\n }\n ],\n axis: {\n x: { tickLine: null, label: { fontSize: 11 } },\n y: { title: false, grid: true }\n },\n legend: { color: { position: 'bottom' } }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"t\":\"A\",\"open\":10,\"close\":14,\"high\":15,\"low\":9},\n {\"t\":\"B\",\"open\":15,\"close\":9,\"high\":16,\"low\":8},\n {\"t\":\"C\",\"open\":9,\"close\":13,\"high\":14,\"low\":8},\n {\"t\":\"D\",\"open\":13,\"close\":13,\"high\":15,\"low\":11}\n];\n\nchart.options({\n type: 'view',\n data,\n coordinate: { type: 'polar' },\n encode: {\n x: 't',\n color: (d) => d.close > d.open ? '上涨' : d.close < d.open ? '下跌' : '持平',\n },\n scale: {\n color: { \n domain: ['上涨', '下跌', '持平'], \n range: ['#e41a1c', '#4daf4a', '#999999'] \n },\n },\n children: [\n {\n type: 'link',\n encode: { y: 'low', y1: 'high' },\n },\n {\n type: 'interval',\n encode: { y: 'open', y1: 'close' },\n },\n ],\n});\n\nchart.render();", + "duration": 17148, + "retrievedSkillIds": [ + "g2-mark-k-chart", + "g2-mark-line-multi", + "g2-mark-interval-basic", + "g2-mark-line-basic", + "g2-mark-arc-pie" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 823, + "expectedLength": 1027, + "similarity": 0.5758525594808941, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"t\":\"A\",\"open\":10,\"close\":14,\"high\":15,\"low\":9},\n {\"t\":\"B\",\"open\":15,\"close\":9,\"high\":16,\"low\":8},\n {\"t\":\"C\",\"open\":9,\"close\":13,\"high\":14,\"low\":8},\n {\"t\":\"D\",\"open\":13,\"close\":13,\"high\":15,\"low\":11}\n];\n\nchart.options({\n type: 'view',\n data,\n coordinate: { type: 'polar' },\n encode: {\n x: 't',\n color: (d) => d.close > d.open ? '上涨' : d.close < d.open ? '下跌' : '持平',\n },\n scale: {\n color: { \n domain: ['上涨', '下跌', '持平'], \n range: ['#e41a1c', '#4daf4a', '#999999'] \n },\n },\n children: [\n {\n type: 'link',\n encode: { y: 'low', y1: 'high' },\n },\n {\n type: 'interval',\n encode: { y: 'open', y1: 'close' },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "coordinate", + "type", + "encode", + "x", + "color", + "scale", + "color", + "domain", + "range", + "children", + "type", + "encode", + "y", + "y1", + "type", + "encode", + "y", + "y1" + ], + "stringLiterals": [ + "t", + "open", + "close", + "high", + "low", + "t", + "open", + "close", + "high", + "low", + "t", + "open", + "close", + "high", + "low", + "t", + "open", + "close", + "high", + "low" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale", + "view.children", + "type.view", + "type.interval" + ] + } + } + }, + { + "id": "case-124", + "query": "根据描述绘制图表,使用 G2 创建一个散点图视图,展示不同产品的销量数据,其中 x 轴为产品类型(分类数据),y 轴为销量数值,并配置了点样式、坐标轴标题和图表标题,指出这是一种不推荐的散点图用法(用于展示分类数据)。参考数据:\n[{\"product\":\"产品A\",\"sales\":275},{\"product\":\"产品B\",\"sales\":115},{\"product\":\"产品C\",\"sales\":120},{\"product\":\"产品D\",\"sales\":350},{\"product\":\"产品E\",\"sales\":150}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'view',\n autoFit: true,\n data: [\n { product: '产品A', sales: 275 },\n { product: '产品B', sales: 115 },\n { product: '产品C', sales: 120 },\n { product: '产品D', sales: 350 },\n { product: '产品E', sales: 150 },\n ],\n encode: { x: 'product', y: 'sales' },\n scale: { x: { range: [0, 1] }, y: { domainMin: 0, nice: true } },\n children: [\n {\n type: 'point',\n style: {\n fill: '#1890ff',\n fillOpacity: 0.8,\n stroke: '#1890ff',\n strokeWidth: 2,\n r: 8,\n },\n },\n ],\n axis: {\n x: { title: '产品类型' },\n y: { title: '销量' },\n },\n title: '不适合的用法:用散点图展示分类数据',\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"product\":\"产品A\",\"sales\":275},\n {\"product\":\"产品B\",\"sales\":115},\n {\"product\":\"产品C\",\"sales\":120},\n {\"product\":\"产品D\",\"sales\":350},\n {\"product\":\"产品E\",\"sales\":150}\n];\n\nchart.options({\n type: 'point',\n data,\n encode: {\n x: 'product',\n y: 'sales',\n },\n scale: {\n x: { type: 'point' },\n },\n style: {\n fill: '#5B8FF9',\n fillOpacity: 0.8,\n stroke: '#1890FF',\n lineWidth: 2,\n size: 12,\n },\n axis: {\n x: { \n title: '产品类型',\n labelAutoHide: true \n },\n y: { \n title: '销量',\n grid: true \n },\n },\n title: {\n title: '不推荐:散点图用于展示分类数据',\n subtitle: '散点图适用于展示两个连续变量的相关性,此处用于分类-数值对比仅为演示',\n },\n});\n\nchart.render();", + "duration": 9405, + "retrievedSkillIds": [ + "g2-mark-point-scatter", + "g2-scale-point", + "g2-concept-chart-selection", + "g2-transform-jittery", + "g2-mark-arc-pie" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 804, + "expectedLength": 752, + "similarity": 0.7135721864342555, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"product\":\"产品A\",\"sales\":275},\n {\"product\":\"产品B\",\"sales\":115},\n {\"product\":\"产品C\",\"sales\":120},\n {\"product\":\"产品D\",\"sales\":350},\n {\"product\":\"产品E\",\"sales\":150}\n];\n\nchart.options({\n type: 'point',\n data,\n encode: {\n x: 'product',\n y: 'sales',\n },\n scale: {\n x: { type: 'point' },\n },\n style: {\n fill: '#5B8FF9',\n fillOpacity: 0.8,\n stroke: '#1890FF',\n lineWidth: 2,\n size: 12,\n },\n axis: {\n x: { \n title: '产品类型',\n labelAutoHide: true \n },\n y: { \n title: '销量',\n grid: true \n },\n },\n title: {\n title: '不推荐:散点图用于展示分类数据',\n subtitle: '散点图适用于展示两个连续变量的相关性,此处用于分类-数值对比仅为演示',\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "encode", + "x", + "y", + "scale", + "x", + "type", + "style", + "fill", + "fillOpacity", + "stroke", + "lineWidth", + "size", + "axis", + "x", + "title", + "labelAutoHide", + "y", + "title", + "grid", + "title", + "title", + "subtitle" + ], + "stringLiterals": [ + "product", + "sales", + "product", + "sales", + "product", + "sales", + "product", + "sales", + "product", + "sales" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "type.point" + ] + } + } + }, + { + "id": "case-125", + "query": "根据描述绘制图表,使用 G2 绘制一个热力图,展示不同产品在各个月份的销售数据。数据通过模拟函数生成,横轴表示月份,纵轴表示产品类别,颜色深浅代表销售额大小。参考数据:[{\"month\":\"Jan\",\"product\":\"A\",\"sales\":58},{\"month\":\"Feb\",\"product\":\"A\",\"sales\":76},{\"month\":\"Mar\",\"product\":\"A\",\"sales\":98},{\"month\":\"Apr\",\"product\":\"A\",\"sales\":78},{\"month\":\"May\",\"product\":\"A\",\"sales\":60},{\"month\":\"Jun\",\"product\":\"A\",\"sales\":68},{\"month\":\"Jul\",\"product\":\"A\",\"sales\":86},{\"month\":\"Aug\",\"product\":\"A\",\"sales\":93},{\"month\":\"Sep\",\"product\":\"A\",\"sales\":65},{\"month\":\"Oct\",\"product\":\"A\",\"sales\":42}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst months = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n];\nconst products = ['A', 'B', 'C', 'D', 'E', 'F'];\nconst data = products.flatMap((p) =>\n months.map((m, i) => ({\n month: m,\n product: p,\n sales: Math.round(50 + Math.sin(i / 2) * 30 + Math.random() * 40),\n }))\n);\n\nconst chart = new Chart({ container: 'container', autoFit: true });\nchart.options({\n type: 'heatmap',\n data,\n encode: { x: 'month', y: 'product', color: 'sales' },\n axis: { x: { tickCount: 6 }, y: { labelFill: '#333' } },\n});\nchart.render();\n", + "generatedCode": "import { Chart } from '@antv/g2';\n\n// 生成模拟数据:5个产品 × 12个月\nconst months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\nconst products = ['A', 'B', 'C', 'D', 'E'];\nconst data = [];\n\nproducts.forEach(product => {\n months.forEach(month => {\n data.push({\n month,\n product,\n sales: Math.floor(Math.random() * 80) + 20 // 20-100之间的随机销售额\n });\n });\n});\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500\n});\n\nchart.options({\n type: 'cell',\n data,\n encode: {\n x: 'month',\n y: 'product',\n color: 'sales'\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'YlOrRd'\n }\n },\n style: {\n inset: 2\n },\n labels: [\n {\n text: 'sales',\n style: {\n fontSize: 10,\n fill: (d) => d.sales > 60 ? '#fff' : '#333'\n }\n }\n ],\n axis: {\n x: { title: '月份' },\n y: { title: '产品' }\n }\n});\n\nchart.render();", + "duration": 11290, + "retrievedSkillIds": [ + "g2-comp-facet-circle", + "g2-mark-arc-donut", + "g2-concept-chart-selection", + "g2-mark-cell-heatmap", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 948, + "expectedLength": 632, + "similarity": 0.6266502380015311, + "extractedCode": "import { Chart } from '@antv/g2';\n\n// 生成模拟数据:5个产品 × 12个月\nconst months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\nconst products = ['A', 'B', 'C', 'D', 'E'];\nconst data = [];\n\nproducts.forEach(product => {\n months.forEach(month => {\n data.push({\n month,\n product,\n sales: Math.floor(Math.random() * 80) + 20 // 20-100之间的随机销售额\n });\n });\n});\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500\n});\n\nchart.options({\n type: 'cell',\n data,\n encode: {\n x: 'month',\n y: 'product',\n color: 'sales'\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'YlOrRd'\n }\n },\n style: {\n inset: 2\n },\n labels: [\n {\n text: 'sales',\n style: {\n fontSize: 10,\n fill: (d) => d.sales > 60 ? '#fff' : '#333'\n }\n }\n ],\n axis: {\n x: { title: '月份' },\n y: { title: '产品' }\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "forEach", + "forEach", + "push", + "floor", + "random", + "Chart", + "options", + "render" + ], + "objectKeys": [ + "sales", + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "color", + "scale", + "color", + "type", + "palette", + "style", + "inset", + "labels", + "text", + "style", + "fontSize", + "fill", + "axis", + "x", + "title", + "y", + "title" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "x6.labels" + ] + } + } + }, + { + "id": "case-126", + "query": "根据描述绘制图表,使用 G2 创建一个密度图,对不同特征(x: PetalWidth、PetalLength、SepalWidth、SepalLength)按物种分类的数据进行核密度估计变换,将原始数值映射为密度曲线,并按 x 字段分组、着色,密度值影响图形尺寸,最终渲染图表。参考数据:\n[{\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},{\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},{\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.5},{\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":5.1},{\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},{\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},{\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3},{\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":4.9},{\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},{\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.3}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\nchart.options({\n type: 'density',\n data: {\n type: 'inline',\n value: [\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 4.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.9\n }\n ],\n transform: [\n {\n type: 'kde',\n field: 'y',\n groupBy: ['x'],\n size: 30, // 增加采样点数量,获得更精细的密度曲线\n width: 3, // 增加带宽,使曲线更平滑\n min: 0, // 指定处理范围的最小值\n max: 8, // 指定处理范围的最大值\n as: ['density_x', 'density_y'], // 自定义输出字段名\n },\n ],\n },\n encode: {\n x: 'x',\n y: 'density_x', // 使用自定义的输出字段\n color: 'x',\n size: 'density_y', // 使用自定义的输出字段\n },\n tooltip: false,\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'density',\n data: {\n type: 'inline',\n value: [\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.3},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.1},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.4},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.5},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.3},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.6},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.5},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.0},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.2},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.4},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.1},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":5.1},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":4.9},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":5.0},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":5.2},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":4.8},\n {\"species\":\"I. versicolor\",\"x\":\"PetalWidth\",\"y\":1.2},\n {\"species\":\"I. versicolor\",\"x\":\"PetalWidth\",\"y\":1.4},\n {\"species\":\"I. versicolor\",\"x\":\"PetalWidth\",\"y\":1.0},\n {\"species\":\"I. versicolor\",\"x\":\"PetalWidth\",\"y\":1.3},\n {\"species\":\"I. versicolor\",\"x\":\"PetalWidth\",\"y\":1.1},\n {\"species\":\"I. versicolor\",\"x\":\"PetalLength\",\"y\":4.2},\n {\"species\":\"I. versicolor\",\"x\":\"PetalLength\",\"y\":4.5},\n {\"species\":\"I. versicolor\",\"x\":\"PetalLength\",\"y\":4.0},\n {\"species\":\"I. versicolor\",\"x\":\"PetalLength\",\"y\":4.3},\n {\"species\":\"I. versicolor\",\"x\":\"PetalLength\",\"y\":4.1},\n {\"species\":\"I. versicolor\",\"x\":\"SepalWidth\",\"y\":2.8},\n {\"species\":\"I. versicolor\",\"x\":\"SepalWidth\",\"y\":3.0},\n {\"species\":\"I. versicolor\",\"x\":\"SepalWidth\",\"y\":2.7},\n {\"species\":\"I. versicolor\",\"x\":\"SepalWidth\",\"y\":2.9},\n {\"species\":\"I. versicolor\",\"x\":\"SepalWidth\",\"y\":2.6},\n {\"species\":\"I. versicolor\",\"x\":\"SepalLength\",\"y\":6.0},\n {\"species\":\"I. versicolor\",\"x\":\"SepalLength\",\"y\":6.2},\n {\"species\":\"I. versicolor\",\"x\":\"SepalLength\",\"y\":5.9},\n {\"species\":\"I. versicolor\",\"x\":\"SepalLength\",\"y\":6.1},\n {\"species\":\"I. versicolor\",\"x\":\"SepalLength\",\"y\":5.8},\n {\"species\":\"I. virginica\",\"x\":\"PetalWidth\",\"y\":2.0},\n {\"species\":\"I. virginica\",\"x\":\"PetalWidth\",\"y\":2.2},\n {\"species\":\"I. virginica\",\"x\":\"PetalWidth\",\"y\":1.8},\n {\"species\":\"I. virginica\",\"x\":\"PetalWidth\",\"y\":2.3},\n {\"species\":\"I. virginica\",\"x\":\"PetalWidth\",\"y\":2.1},\n {\"species\":\"I. virginica\",\"x\":\"PetalLength\",\"y\":5.5},\n {\"species\":\"I. virginica\",\"x\":\"PetalLength\",\"y\":5.8},\n {\"species\":\"I. virginica\",\"x\":\"PetalLength\",\"y\":5.2},\n {\"species\":\"I. virginica\",\"x\":\"PetalLength\",\"y\":5.6},\n {\"species\":\"I. virginica\",\"x\":\"PetalLength\",\"y\":5.4},\n {\"species\":\"I. virginica\",\"x\":\"SepalWidth\",\"y\":3.0},\n {\"species\":\"I. virginica\",\"x\":\"SepalWidth\",\"y\":3.2},\n {\"species\":\"I. virginica\",\"x\":\"SepalWidth\",\"y\":2.8},\n {\"species\":\"I. virginica\",\"x\":\"SepalWidth\",\"y\":3.4},\n {\"species\":\"I. virginica\",\"x\":\"SepalWidth\",\"y\":3.1},\n {\"species\":\"I. virginica\",\"x\":\"SepalLength\",\"y\":6.8},\n {\"species\":\"I. virginica\",\"x\":\"SepalLength\",\"y\":7.0},\n {\"species\":\"I. virginica\",\"x\":\"SepalLength\",\"y\":6.5},\n {\"species\":\"I. virginica\",\"x\":\"SepalLength\",\"y\":7.1},\n {\"species\":\"I. virginica\",\"x\":\"SepalLength\",\"y\":6.9}\n ],\n transform: [\n {\n type: 'kde',\n field: 'y',\n groupBy: ['x', 'species'],\n as: ['y', 'size'],\n },\n ],\n },\n encode: {\n x: 'x',\n y: 'y',\n color: 'species',\n size: 'size',\n series: 'species',\n },\n tooltip: false,\n});\n\nchart.render();", + "duration": 77069, + "retrievedSkillIds": [ + "g2-mark-density", + "g2-data-kde", + "g2-mark-distribution-curve", + "g2-scale-linear", + "g2-transform-groupx" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 4029, + "expectedLength": 48979, + "similarity": 0.8239353099730458, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'density',\n data: {\n type: 'inline',\n value: [\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.3},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.1},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.4},\n {\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.5},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.3},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.6},\n {\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.5},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.0},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.2},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.4},\n {\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.1},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":5.1},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":4.9},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":5.0},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":5.2},\n {\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":4.8},\n {\"species\":\"I. versicolor\",\"x\":\"PetalWidth\",\"y\":1.2},\n {\"species\":\"I. versicolor\",\"x\":\"PetalWidth\",\"y\":1.4},\n {\"species\":\"I. versicolor\",\"x\":\"PetalWidth\",\"y\":1.0},\n {\"species\":\"I. versicolor\",\"x\":\"PetalWidth\",\"y\":1.3},\n {\"species\":\"I. versicolor\",\"x\":\"PetalWidth\",\"y\":1.1},\n {\"species\":\"I. versicolor\",\"x\":\"PetalLength\",\"y\":4.2},\n {\"species\":\"I. versicolor\",\"x\":\"PetalLength\",\"y\":4.5},\n {\"species\":\"I. versicolor\",\"x\":\"PetalLength\",\"y\":4.0},\n {\"species\":\"I. versicolor\",\"x\":\"PetalLength\",\"y\":4.3},\n {\"species\":\"I. versicolor\",\"x\":\"PetalLength\",\"y\":4.1},\n {\"species\":\"I. versicolor\",\"x\":\"SepalWidth\",\"y\":2.8},\n {\"species\":\"I. versicolor\",\"x\":\"SepalWidth\",\"y\":3.0},\n {\"species\":\"I. versicolor\",\"x\":\"SepalWidth\",\"y\":2.7},\n {\"species\":\"I. versicolor\",\"x\":\"SepalWidth\",\"y\":2.9},\n {\"species\":\"I. versicolor\",\"x\":\"SepalWidth\",\"y\":2.6},\n {\"species\":\"I. versicolor\",\"x\":\"SepalLength\",\"y\":6.0},\n {\"species\":\"I. versicolor\",\"x\":\"SepalLength\",\"y\":6.2},\n {\"species\":\"I. versicolor\",\"x\":\"SepalLength\",\"y\":5.9},\n {\"species\":\"I. versicolor\",\"x\":\"SepalLength\",\"y\":6.1},\n {\"species\":\"I. versicolor\",\"x\":\"SepalLength\",\"y\":5.8},\n {\"species\":\"I. virginica\",\"x\":\"PetalWidth\",\"y\":2.0},\n {\"species\":\"I. virginica\",\"x\":\"PetalWidth\",\"y\":2.2},\n {\"species\":\"I. virginica\",\"x\":\"PetalWidth\",\"y\":1.8},\n {\"species\":\"I. virginica\",\"x\":\"PetalWidth\",\"y\":2.3},\n {\"species\":\"I. virginica\",\"x\":\"PetalWidth\",\"y\":2.1},\n {\"species\":\"I. virginica\",\"x\":\"PetalLength\",\"y\":5.5},\n {\"species\":\"I. virginica\",\"x\":\"PetalLength\",\"y\":5.8},\n {\"species\":\"I. virginica\",\"x\":\"PetalLength\",\"y\":5.2},\n {\"species\":\"I. virginica\",\"x\":\"PetalLength\",\"y\":5.6},\n {\"species\":\"I. virginica\",\"x\":\"PetalLength\",\"y\":5.4},\n {\"species\":\"I. virginica\",\"x\":\"SepalWidth\",\"y\":3.0},\n {\"species\":\"I. virginica\",\"x\":\"SepalWidth\",\"y\":3.2},\n {\"species\":\"I. virginica\",\"x\":\"SepalWidth\",\"y\":2.8},\n {\"species\":\"I. virginica\",\"x\":\"SepalWidth\",\"y\":3.4},\n {\"species\":\"I. virginica\",\"x\":\"SepalWidth\",\"y\":3.1},\n {\"species\":\"I. virginica\",\"x\":\"SepalLength\",\"y\":6.8},\n {\"species\":\"I. virginica\",\"x\":\"SepalLength\",\"y\":7.0},\n {\"species\":\"I. virginica\",\"x\":\"SepalLength\",\"y\":6.5},\n {\"species\":\"I. virginica\",\"x\":\"SepalLength\",\"y\":7.1},\n {\"species\":\"I. virginica\",\"x\":\"SepalLength\",\"y\":6.9}\n ],\n transform: [\n {\n type: 'kde',\n field: 'y',\n groupBy: ['x', 'species'],\n as: ['y', 'size'],\n },\n ],\n },\n encode: {\n x: 'x',\n y: 'y',\n color: 'species',\n size: 'size',\n series: 'species',\n },\n tooltip: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "type", + "value", + "transform", + "type", + "field", + "groupBy", + "as", + "encode", + "x", + "y", + "color", + "size", + "series", + "tooltip" + ], + "stringLiterals": [ + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y", + "species", + "x", + "y" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform" + ] + } + } + }, + { + "id": "case-127", + "query": "根据描述绘制图表,使用 G2 渲染一个韦恩图,展示 iOS、安卓、Web 三个平台用户群体的交集与数量分布,包括单平台用户和跨平台组合用户,使用路径图表示区域并通过标签显示关键信息。\n参考数据:\n[{\"sets\":[\"iOS\"],\"size\":32},{\"sets\":[\"安卓\"],\"size\":28},{\"sets\":[\"Web\"],\"size\":18},{\"sets\":[\"iOS\",\"安卓\"],\"size\":12,\"label\":\"双端\"},{\"sets\":[\"iOS\",\"Web\"],\"size\":8},{\"sets\":[\"安卓\",\"Web\"],\"size\":6},{\"sets\":[\"iOS\",\"安卓\",\"Web\"],\"size\":3,\"label\":\"全平台\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({ container: 'container', autoFit: true });\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['iOS'], size: 32 },\n { sets: ['安卓'], size: 28 },\n { sets: ['Web'], size: 18 },\n { sets: ['iOS', '安卓'], size: 12, label: '双端' },\n { sets: ['iOS', 'Web'], size: 8 },\n { sets: ['安卓', 'Web'], size: 6 },\n { sets: ['iOS', '安卓', 'Web'], size: 3, label: '全平台' }\n ],\n transform: [{ type: 'venn', padding: 12 }],\n },\n encode: { d: 'path', color: 'key' },\n labels: [\n { position: 'inside', text: (d) => d.sets.length === 1 ? `${d.sets[0]}\n${d.size}万` : d.label || '', style: { fontSize: 11 }, },\n ],\n state: {\n inactive: {\n opacity: 0.2\n },\n active: {\n opacity: 0.8\n }\n },\n legend: false,\n interaction: {\n elementHighlight: true\n },\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['iOS'], size: 32, label: 'iOS' },\n { sets: ['安卓'], size: 28, label: '安卓' },\n { sets: ['Web'], size: 18, label: 'Web' },\n { sets: ['iOS', '安卓'], size: 12, label: '双端' },\n { sets: ['iOS', 'Web'], size: 8 },\n { sets: ['安卓', 'Web'], size: 6 },\n { sets: ['iOS', '安卓', 'Web'], size: 3, label: '全平台' }\n ],\n transform: [{ type: 'venn' }]\n },\n encode: {\n d: 'path',\n color: 'key'\n },\n labels: [\n { \n position: 'inside', \n text: (d) => d.label || '',\n style: { fontSize: 12, fontWeight: 'bold' }\n }\n ],\n style: {\n opacity: (d) => (d.sets.length > 1 ? 0.4 : 0.8),\n lineWidth: 2,\n stroke: '#fff'\n }\n});\n\nchart.render();", + "duration": 18197, + "retrievedSkillIds": [ + "g2-mark-venn", + "g2-animation-keyframe", + "g2-comp-view", + "g2-comp-repeat-matrix", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 885, + "expectedLength": 872, + "similarity": 0.8687513061650992, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['iOS'], size: 32, label: 'iOS' },\n { sets: ['安卓'], size: 28, label: '安卓' },\n { sets: ['Web'], size: 18, label: 'Web' },\n { sets: ['iOS', '安卓'], size: 12, label: '双端' },\n { sets: ['iOS', 'Web'], size: 8 },\n { sets: ['安卓', 'Web'], size: 6 },\n { sets: ['iOS', '安卓', 'Web'], size: 3, label: '全平台' }\n ],\n transform: [{ type: 'venn' }]\n },\n encode: {\n d: 'path',\n color: 'key'\n },\n labels: [\n { \n position: 'inside', \n text: (d) => d.label || '',\n style: { fontSize: 12, fontWeight: 'bold' }\n }\n ],\n style: {\n opacity: (d) => (d.sets.length > 1 ? 0.4 : 0.8),\n lineWidth: 2,\n stroke: '#fff'\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "type", + "value", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "sets", + "size", + "sets", + "size", + "label", + "transform", + "type", + "encode", + "d", + "color", + "labels", + "position", + "text", + "style", + "fontSize", + "fontWeight", + "style", + "opacity", + "4", + "lineWidth", + "stroke" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "x6.labels", + "x6.label" + ] + } + } + }, + { + "id": "case-128", + "query": "根据描述绘制图表,使用 G2 绘制一个韦恩图,用于展示不同部门之间的人员交集情况。通过路径类型图表呈现集合关系,支持交互高亮和提示信息显示。参考数据:[{\"sets\":[\"市场营销\"],\"size\":18,\"label\":\"市场\"},{\"sets\":[\"产品开发\"],\"size\":22,\"label\":\"产品\"},{\"sets\":[\"客户服务\"],\"size\":15,\"label\":\"客服\"},{\"sets\":[\"市场营销\",\"产品开发\"],\"size\":7,\"label\":\"市场+产品\"},{\"sets\":[\"市场营销\",\"客户服务\"],\"size\":5,\"label\":\"市场+客服\"},{\"sets\":[\"产品开发\",\"客户服务\"],\"size\":6,\"label\":\"产品+客服\"},{\"sets\":[\"市场营销\",\"产品开发\",\"客户服务\"],\"size\":3,\"label\":\"跨部门\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['市场营销'], size: 18, label: '市场' },\n { sets: ['产品开发'], size: 22, label: '产品' },\n { sets: ['客户服务'], size: 15, label: '客服' },\n { sets: ['市场营销', '产品开发'], size: 7, label: '市场+产品' },\n { sets: ['市场营销', '客户服务'], size: 5, label: '市场+客服' },\n { sets: ['产品开发', '客户服务'], size: 6, label: '产品+客服' },\n { sets: ['市场营销', '产品开发', '客户服务'], size: 3, label: '跨部门' }\n ],\n transform: [\n {\n type: 'venn',\n padding: 20,\n }\n ]\n },\n encode: {\n d: 'path',\n color: 'key'\n },\n scale: {\n color: {\n range: ['#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494']\n }\n },\n labels: [{\n position: 'inside',\n text: (d) => `${d.label}\\n${d.size}人`,\n style: { fontSize: 10, fill: '#333', fontWeight: 600 },\ntransform: [{ type: 'overlapDodgeY' }] \n }],\n style: {\n fillOpacity: 0.6,\n stroke: '#fff',\n lineWidth: 2\n },\n interaction: { elementHighlight: true },\n state: { inactive: { opacity: 0.2 }, active: { opacity: 0.8 } },\n tooltip: {\n items: [\n { name: '部门组合', field: 'key' },\n { name: '成员数量', field: 'size' }\n ]\n },\n legend: { color: { position: 'bottom' } }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['市场营销'], size: 18, label: '市场' },\n { sets: ['产品开发'], size: 22, label: '产品' },\n { sets: ['客户服务'], size: 15, label: '客服' },\n { sets: ['市场营销', '产品开发'], size: 7, label: '市场+产品' },\n { sets: ['市场营销', '客户服务'], size: 5, label: '市场+客服' },\n { sets: ['产品开发', '客户服务'], size: 6, label: '产品+客服' },\n { sets: ['市场营销', '产品开发', '客户服务'], size: 3, label: '跨部门' },\n ],\n transform: [{ type: 'venn' }],\n },\n encode: {\n d: 'path',\n color: 'key',\n tooltip: 'size',\n },\n style: {\n opacity: (d) => (d.sets.length > 1 ? 0.3 : 0.7),\n },\n labels: [\n {\n position: 'inside',\n text: (d) => d.label || '',\n transform: [{ type: 'contrastReverse' }],\n },\n ],\n state: {\n active: { opacity: 0.9, lineWidth: 2, stroke: '#333' },\n inactive: { opacity: 0.1 },\n },\n interaction: {\n elementHighlight: true,\n },\n});\n\nchart.render();", + "duration": 16334, + "retrievedSkillIds": [ + "g2-mark-venn", + "g2-mark-arc-donut", + "g2-interaction-legend-highlight", + "g2-mark-arc-diagram", + "g2-interaction-legend-filter" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1076, + "expectedLength": 1389, + "similarity": 0.9516784641784641, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['市场营销'], size: 18, label: '市场' },\n { sets: ['产品开发'], size: 22, label: '产品' },\n { sets: ['客户服务'], size: 15, label: '客服' },\n { sets: ['市场营销', '产品开发'], size: 7, label: '市场+产品' },\n { sets: ['市场营销', '客户服务'], size: 5, label: '市场+客服' },\n { sets: ['产品开发', '客户服务'], size: 6, label: '产品+客服' },\n { sets: ['市场营销', '产品开发', '客户服务'], size: 3, label: '跨部门' },\n ],\n transform: [{ type: 'venn' }],\n },\n encode: {\n d: 'path',\n color: 'key',\n tooltip: 'size',\n },\n style: {\n opacity: (d) => (d.sets.length > 1 ? 0.3 : 0.7),\n },\n labels: [\n {\n position: 'inside',\n text: (d) => d.label || '',\n transform: [{ type: 'contrastReverse' }],\n },\n ],\n state: {\n active: { opacity: 0.9, lineWidth: 2, stroke: '#333' },\n inactive: { opacity: 0.1 },\n },\n interaction: {\n elementHighlight: true,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "type", + "value", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "sets", + "size", + "label", + "transform", + "type", + "encode", + "d", + "color", + "tooltip", + "style", + "opacity", + "3", + "labels", + "position", + "text", + "transform", + "type", + "state", + "active", + "opacity", + "lineWidth", + "stroke", + "inactive", + "opacity", + "interaction", + "elementHighlight" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "interaction", + "x6.labels", + "x6.label" + ] + } + } + }, + { + "id": "case-129", + "query": "根据描述绘制图表,使用G2绘制帕累托图,展示客户投诉问题的频数柱状图和累积百分比折线图,其中柱状图根据单项占比是否小于10%进行颜色区分,折线图和点图表示累积百分比,数据经自定义转换计算百分比和累积值。参考数据:\n[{\"x\":\"Parking Difficult\",\"value\":95},{\"x\":\"Sales Rep was Rude\",\"value\":60},{\"x\":\"Poor Lighting\",\"value\":45},{\"x\":\"Layout Confusing\",\"value\":37},{\"x\":\"Sizes Limited\",\"value\":30},{\"x\":\"Clothing Faded\",\"value\":27},{\"x\":\"Clothing Shrank\",\"value\":18}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"title\": \"Pareto Chart of Customer Complaints\",\n \"data\": {\n \"type\": \"inline\",\n \"value\": [\n {\n \"x\": \"Parking Difficult\",\n \"value\": 95\n },\n {\n \"x\": \"Sales Rep was Rude\",\n \"value\": 60\n },\n {\n \"x\": \"Poor Lighting\",\n \"value\": 45\n },\n {\n \"x\": \"Layout Confusing\",\n \"value\": 37\n },\n {\n \"x\": \"Sizes Limited\",\n \"value\": 30\n },\n {\n \"x\": \"Clothing Faded\",\n \"value\": 27\n },\n {\n \"x\": \"Clothing Shrank\",\n \"value\": 18\n }\n ],\n \"transform\": [\n {\n \"type\": \"custom\",\n \"callback\": (data) => {\n const sum = data.reduce((r, curr) => r + curr.value, 0);\n return data\n .map((d) => ({ ...d, percentage: d.value / sum }))\n .reduce((r, curr) => {\n const v = r.length ? r[r.length - 1].accumulate : 0;\n const accumulate = v + curr.percentage;\n r.push({ ...curr, accumulate });\n return r;\n }, []);\n }\n }\n ]\n },\n \"type\": \"view\",\n \"children\": [\n {\n \"encode\": {\n \"x\": \"x\",\n \"y\": \"value\"\n },\n \"style\": {\n \"fill\": (d) => (d.percentage < 0.1 ? '#E24B26' : '#78B3F0')\n },\n \"scale\": {\n \"x\": {\n \"padding\": 0.5\n },\n \"y\": {\n \"domainMax\": 312,\n \"tickCount\": 5\n }\n },\n \"axis\": {\n \"x\": {\n \"title\": null\n },\n \"y\": {\n \"title\": \"Defect frequency\"\n }\n },\n \"labels\": [\n {\n \"text\": (d) => `${(d.percentage * 100).toFixed(1)}%`,\n \"textBaseline\": \"bottom\"\n }\n ],\n \"type\": \"interval\"\n },\n {\n \"encode\": {\n \"x\": \"x\",\n \"y\": \"accumulate\"\n },\n \"scale\": {\n \"y\": {\n \"independent\": true,\n \"domainMin\": 0,\n \"tickCount\": 5\n }\n },\n \"axis\": {\n \"y\": {\n \"position\": \"right\",\n \"title\": \"Cumulative Percentage\",\n \"grid\": null,\n \"labelFormatter\": (d) => `${(d * 100).toFixed(0)}%`\n }\n },\n \"tooltip\": {\n \"items\": [\n {\n \"channel\": \"y\",\n \"valueFormatter\": (d) => `${(d * 100).toFixed(2)}%`\n }\n ]\n },\n \"type\": \"line\"\n },\n {\n \"encode\": {\n \"x\": \"x\",\n \"y\": \"accumulate\",\n \"shape\": \"diamond\"\n },\n \"scale\": {\n \"y\": {\n \"independent\": true,\n \"domainMin\": 0\n }\n },\n \"axis\": {\n \"y\": null\n },\n \"tooltip\": null,\n \"type\": \"point\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst rawData = [\n {\"x\":\"Parking Difficult\",\"value\":95},\n {\"x\":\"Sales Rep was Rude\",\"value\":60},\n {\"x\":\"Poor Lighting\",\"value\":45},\n {\"x\":\"Layout Confusing\",\"value\":37},\n {\"x\":\"Sizes Limited\",\"value\":30},\n {\"x\":\"Clothing Faded\",\"value\":27},\n {\"x\":\"Clothing Shrank\",\"value\":18}\n];\n\n// 自定义数据转换:计算单项占比、累积百分比和颜色分类\nconst total = rawData.reduce((sum, d) => sum + d.value, 0);\nlet cumulative = 0;\nconst data = [...rawData]\n .sort((a, b) => b.value - a.value)\n .map(d => {\n const percentage = d.value / total;\n cumulative += percentage;\n return {\n ...d,\n percentage,\n cumulative,\n category: percentage < 0.1 ? 'Minor (<10%)' : 'Major (≥10%)'\n };\n });\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 500\n});\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'interval',\n encode: {\n x: 'x',\n y: 'value',\n color: 'category'\n },\n scale: {\n color: {\n domain: ['Major (≥10%)', 'Minor (<10%)'],\n range: ['#5B8FF9', '#E8E8E8']\n }\n },\n axis: {\n y: {\n title: '频数',\n grid: true\n },\n x: {\n title: '投诉问题',\n labelTransform: 'rotate(30)'\n }\n },\n labels: [\n {\n text: 'value',\n position: 'outside',\n style: { fontSize: 11 }\n }\n ]\n },\n {\n type: 'line',\n encode: {\n x: 'x',\n y: 'cumulative'\n },\n scale: {\n y: {\n independent: true,\n domain: [0, 1]\n }\n },\n axis: {\n y: {\n position: 'right',\n title: '累积百分比',\n labelFormatter: (v) => `${(v * 100).toFixed(0)}%`,\n grid: false\n }\n },\n style: {\n stroke: '#F4664A',\n lineWidth: 2\n }\n },\n {\n type: 'point',\n encode: {\n x: 'x',\n y: 'cumulative'\n },\n scale: {\n y: {\n independent: true\n }\n },\n style: {\n fill: '#F4664A',\n r: 4,\n stroke: '#fff',\n lineWidth: 1\n }\n }\n ]\n});\n\nchart.render();", + "duration": 24198, + "retrievedSkillIds": [ + "g2-interaction-element-point-move", + "g2-mark-line-basic", + "g2-mark-interval-normalized", + "g2-comp-space-layer", + "g2-mark-interval-grouped" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2197, + "expectedLength": 2829, + "similarity": 0.4428804528804529, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst rawData = [\n {\"x\":\"Parking Difficult\",\"value\":95},\n {\"x\":\"Sales Rep was Rude\",\"value\":60},\n {\"x\":\"Poor Lighting\",\"value\":45},\n {\"x\":\"Layout Confusing\",\"value\":37},\n {\"x\":\"Sizes Limited\",\"value\":30},\n {\"x\":\"Clothing Faded\",\"value\":27},\n {\"x\":\"Clothing Shrank\",\"value\":18}\n];\n\n// 自定义数据转换:计算单项占比、累积百分比和颜色分类\nconst total = rawData.reduce((sum, d) => sum + d.value, 0);\nlet cumulative = 0;\nconst data = [...rawData]\n .sort((a, b) => b.value - a.value)\n .map(d => {\n const percentage = d.value / total;\n cumulative += percentage;\n return {\n ...d,\n percentage,\n cumulative,\n category: percentage < 0.1 ? 'Minor (<10%)' : 'Major (≥10%)'\n };\n });\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 500\n});\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'interval',\n encode: {\n x: 'x',\n y: 'value',\n color: 'category'\n },\n scale: {\n color: {\n domain: ['Major (≥10%)', 'Minor (<10%)'],\n range: ['#5B8FF9', '#E8E8E8']\n }\n },\n axis: {\n y: {\n title: '频数',\n grid: true\n },\n x: {\n title: '投诉问题',\n labelTransform: 'rotate(30)'\n }\n },\n labels: [\n {\n text: 'value',\n position: 'outside',\n style: { fontSize: 11 }\n }\n ]\n },\n {\n type: 'line',\n encode: {\n x: 'x',\n y: 'cumulative'\n },\n scale: {\n y: {\n independent: true,\n domain: [0, 1]\n }\n },\n axis: {\n y: {\n position: 'right',\n title: '累积百分比',\n labelFormatter: (v) => `${(v * 100).toFixed(0)}%`,\n grid: false\n }\n },\n style: {\n stroke: '#F4664A',\n lineWidth: 2\n }\n },\n {\n type: 'point',\n encode: {\n x: 'x',\n y: 'cumulative'\n },\n scale: {\n y: {\n independent: true\n }\n },\n style: {\n fill: '#F4664A',\n r: 4,\n stroke: '#fff',\n lineWidth: 1\n }\n }\n ]\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "reduce", + "sort", + "map", + "Minor", + "Major", + "Chart", + "options", + "Major", + "Minor", + "rotate", + "toFixed", + "render" + ], + "objectKeys": [ + "category", + "container", + "width", + "height", + "type", + "children", + "type", + "encode", + "x", + "y", + "color", + "scale", + "color", + "domain", + "range", + "axis", + "y", + "title", + "grid", + "x", + "title", + "labelTransform", + "labels", + "text", + "position", + "style", + "fontSize", + "type", + "encode", + "x", + "y", + "scale", + "y", + "independent", + "domain", + "axis", + "y", + "position", + "title", + "labelFormatter", + "grid", + "style", + "stroke", + "lineWidth", + "type", + "encode", + "x", + "y", + "scale", + "y", + "independent", + "style", + "fill", + "r", + "stroke", + "lineWidth" + ], + "stringLiterals": [ + "x", + "value", + "x", + "value", + "x", + "value", + "x", + "value", + "x", + "value", + "x", + "value", + "x", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "view.children", + "type.view", + "type.interval", + "type.line", + "type.point", + "x6.labels" + ] + } + } + }, + { + "id": "case-130", + "query": "根据描述绘制图表,使用径向坐标系展示电影评分数据,按评分高低排序,通过颜色映射评分值,呈现不同电影的评分分布和对比情况。参考数据:[{\"movie\":\"电影A\",\"rating\":9.2,\"genre\":\"科幻\"},{\"movie\":\"电影B\",\"rating\":8.7,\"genre\":\"动作\"},{\"movie\":\"电影C\",\"rating\":8.5,\"genre\":\"科幻\"},{\"movie\":\"电影D\",\"rating\":7.9,\"genre\":\"喜剧\"},{\"movie\":\"电影E\",\"rating\":7.2,\"genre\":\"动作\"},{\"movie\":\"电影F\",\"rating\":6.8,\"genre\":\"喜剧\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic'\n});\n\nchart.options({\n type: 'interval',\n data: [\n { movie: '电影A', rating: 9.2, genre: '科幻' },\n { movie: '电影B', rating: 8.7, genre: '动作' },\n { movie: '电影C', rating: 8.5, genre: '科幻' },\n { movie: '电影D', rating: 7.9, genre: '喜剧' },\n { movie: '电影E', rating: 7.2, genre: '动作' },\n { movie: '电影F', rating: 6.8, genre: '喜剧' },\n ].sort((a, b) => b.rating - a.rating),\n coordinate: { type: 'radial', innerRadius: 0.35 },\n encode: {\n x: 'movie',\n y: 'rating',\n color: 'rating',\n },\n scale: {\n y: { domain: [0, 10] },\n },\n style: {\n radius: 5,\n fillOpacity: 0.95,\n },\n labels: [{\n text: 'rating',\n position: 'inside',\n style: { fontWeight: 'bold', fill: 'white' },\n }],\n axis: {\n x: { label: { autoRotate: true, style: { fontSize: 10 } } },\n y: { label: true, grid: false, style: { fontSize: 9 } },\n },\n interaction: [{ type: 'elementHighlightByColor' }],\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"movie\":\"电影A\",\"rating\":9.2,\"genre\":\"科幻\"},\n {\"movie\":\"电影B\",\"rating\":8.7,\"genre\":\"动作\"},\n {\"movie\":\"电影C\",\"rating\":8.5,\"genre\":\"科幻\"},\n {\"movie\":\"电影D\",\"rating\":7.9,\"genre\":\"喜剧\"},\n {\"movie\":\"电影E\",\"rating\":7.2,\"genre\":\"动作\"},\n {\"movie\":\"电影F\",\"rating\":6.8,\"genre\":\"喜剧\"}\n];\n\nchart.options({\n type: 'interval',\n data,\n coordinate: { type: 'polar' },\n encode: {\n x: 'movie',\n y: 'rating',\n color: 'rating',\n },\n transform: [\n { type: 'sortX', by: 'y', reverse: true }\n ],\n scale: {\n color: {\n type: 'sequential',\n palette: 'ylOrRd',\n },\n },\n axis: {\n y: { tickCount: 5, gridLineWidth: 1 },\n x: { title: false, grid: false },\n },\n labels: [\n {\n text: (d) => `${d.movie}\\n${d.rating}`,\n position: 'outside',\n },\n ],\n});\n\nchart.render();", + "duration": 12206, + "retrievedSkillIds": [ + "g2-concept-chart-selection", + "g2-mark-arc-pie", + "g2-concept-color-theory", + "g2-mark-parallel", + "g2-transform-groupy" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 932, + "expectedLength": 1036, + "similarity": 0.5812437562437562, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"movie\":\"电影A\",\"rating\":9.2,\"genre\":\"科幻\"},\n {\"movie\":\"电影B\",\"rating\":8.7,\"genre\":\"动作\"},\n {\"movie\":\"电影C\",\"rating\":8.5,\"genre\":\"科幻\"},\n {\"movie\":\"电影D\",\"rating\":7.9,\"genre\":\"喜剧\"},\n {\"movie\":\"电影E\",\"rating\":7.2,\"genre\":\"动作\"},\n {\"movie\":\"电影F\",\"rating\":6.8,\"genre\":\"喜剧\"}\n];\n\nchart.options({\n type: 'interval',\n data,\n coordinate: { type: 'polar' },\n encode: {\n x: 'movie',\n y: 'rating',\n color: 'rating',\n },\n transform: [\n { type: 'sortX', by: 'y', reverse: true }\n ],\n scale: {\n color: {\n type: 'sequential',\n palette: 'ylOrRd',\n },\n },\n axis: {\n y: { tickCount: 5, gridLineWidth: 1 },\n x: { title: false, grid: false },\n },\n labels: [\n {\n text: (d) => `${d.movie}\\n${d.rating}`,\n position: 'outside',\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "coordinate", + "type", + "encode", + "x", + "y", + "color", + "transform", + "type", + "by", + "reverse", + "scale", + "color", + "type", + "palette", + "axis", + "y", + "tickCount", + "gridLineWidth", + "x", + "title", + "grid", + "labels", + "text", + "position" + ], + "stringLiterals": [ + "movie", + "rating", + "genre", + "movie", + "rating", + "genre", + "movie", + "rating", + "genre", + "movie", + "rating", + "genre", + "movie", + "rating", + "genre", + "movie", + "rating", + "genre" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-131", + "query": "根据描述绘制图表,使用韦恩图展示不同兴趣领域(如户外、电竞、艺术等)之间的交集关系,通过颜色区分不同的学校类型,并显示每个区域代表的学校名称及对应的人数规模,支持交互高亮效果和底部图例。参考数据:[{\"sets\":[\"户外\"],\"size\":60,\"schools\":[\"中学\"]},{\"sets\":[\"电竞\"],\"size\":40,\"schools\":[\"职校\"]},{\"sets\":[\"艺术\"],\"size\":35,\"schools\":[\"美术学院\"]},{\"sets\":[\"户外\",\"电竞\"],\"size\":20,\"schools\":[\"青少年活动中心\"]},{\"sets\":[\"艺术\",\"电竞\"],\"size\":10,\"schools\":[\"艺术职校\"]}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['户外'], size: 60, schools: ['中学'] },\n { sets: ['电竞'], size: 40, schools: ['职校'] },\n { sets: ['艺术'], size: 35, schools: ['美术学院'] },\n { sets: ['户外', '电竞'], size: 20, schools: ['青少年活动中心'] },\n { sets: ['艺术', '电竞'], size: 10, schools: ['艺术职校'] }\n ],\n transform: [{ type: 'venn' }]\n },\n encode: {\n d: 'path',\n color: 'schools',\n },\n labels: [{\n position: 'inside',\n text: (d) => d.schools?.[0] || '',\n style: { fontSize: 9, fontWeight: 500 }\n }],\nstyle:{\nfillOpacity:(d)=>d.sets.length===1?0.5:1\n},\n tooltip: {\n items: [\n { name: '学段/机构', field: 'schools', valueFormatter: (v) => v.join(' | ') },\n { name: '兴趣人数', field: 'size' }\n ]\n },\n interaction: [{ type: 'elementHighlight' }],\n legend: { position: 'bottom' }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['户外'], size: 60, schools: ['中学'] },\n { sets: ['电竞'], size: 40, schools: ['职校'] },\n { sets: ['艺术'], size: 35, schools: ['美术学院'] },\n { sets: ['户外', '电竞'], size: 20, schools: ['青少年活动中心'] },\n { sets: ['艺术', '电竞'], size: 10, schools: ['艺术职校'] },\n ],\n transform: [{ type: 'venn' }],\n },\n encode: {\n d: 'path',\n color: (d) => d.schools[0],\n },\n scale: {\n color: {\n palette: 'tableau10',\n },\n },\n style: {\n opacity: (d) => (d.sets.length > 1 ? 0.5 : 0.7),\n },\n labels: [\n {\n position: 'inside',\n text: (d) => `${d.schools[0]}\\n${d.size}人`,\n style: {\n fontSize: 11,\n textAlign: 'center',\n },\n },\n ],\n legend: {\n color: {\n position: 'bottom',\n title: '学校类型',\n layout: { justifyContent: 'center' },\n },\n },\n interaction: {\n elementHighlight: true,\n },\n state: {\n inactive: { opacity: 0.2 },\n active: { opacity: 1 },\n },\n});\n\nchart.render();", + "duration": 24971, + "retrievedSkillIds": [ + "g2-mark-venn", + "g2-comp-legend-config", + "g2-concept-chart-selection", + "g2-interaction-legend-highlight", + "g2-concept-color-theory" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1159, + "expectedLength": 993, + "similarity": 0.897794117647059, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'path',\n data: {\n type: 'inline',\n value: [\n { sets: ['户外'], size: 60, schools: ['中学'] },\n { sets: ['电竞'], size: 40, schools: ['职校'] },\n { sets: ['艺术'], size: 35, schools: ['美术学院'] },\n { sets: ['户外', '电竞'], size: 20, schools: ['青少年活动中心'] },\n { sets: ['艺术', '电竞'], size: 10, schools: ['艺术职校'] },\n ],\n transform: [{ type: 'venn' }],\n },\n encode: {\n d: 'path',\n color: (d) => d.schools[0],\n },\n scale: {\n color: {\n palette: 'tableau10',\n },\n },\n style: {\n opacity: (d) => (d.sets.length > 1 ? 0.5 : 0.7),\n },\n labels: [\n {\n position: 'inside',\n text: (d) => `${d.schools[0]}\\n${d.size}人`,\n style: {\n fontSize: 11,\n textAlign: 'center',\n },\n },\n ],\n legend: {\n color: {\n position: 'bottom',\n title: '学校类型',\n layout: { justifyContent: 'center' },\n },\n },\n interaction: {\n elementHighlight: true,\n },\n state: {\n inactive: { opacity: 0.2 },\n active: { opacity: 1 },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "type", + "value", + "sets", + "size", + "schools", + "sets", + "size", + "schools", + "sets", + "size", + "schools", + "sets", + "size", + "schools", + "sets", + "size", + "schools", + "transform", + "type", + "encode", + "d", + "color", + "scale", + "color", + "palette", + "style", + "opacity", + "5", + "labels", + "position", + "text", + "style", + "fontSize", + "textAlign", + "legend", + "color", + "position", + "title", + "layout", + "justifyContent", + "interaction", + "elementHighlight", + "state", + "inactive", + "opacity", + "active", + "opacity" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "interaction", + "x6.labels" + ] + } + } + }, + { + "id": "case-132", + "query": "根据描述绘制图表,使用 G2 创建一个极坐标堆叠柱状图,展示2000至2014年间不同类型(A、B、C)随年份变化的数值分布,数据通过 fold 转换宽格式为长格式后按难民类型堆叠渲染,包含自定义图例、交互高亮和坐标轴设置。参考数据:\n[{\"year\":\"2000\",\"类型 A\":21,\"类型 B\":16,\"类型 C\":8},{\"year\":\"2001\",\"类型 A\":25,\"类型 B\":16,\"类型 C\":8},{\"year\":\"2002\",\"类型 A\":25,\"类型 B\":15,\"类型 C\":8},{\"year\":\"2003\",\"类型 A\":25,\"类型 B\":14,\"类型 C\":7},{\"year\":\"2004\",\"类型 A\":25,\"类型 B\":14,\"类型 C\":7},{\"year\":\"2005\",\"类型 A\":24,\"类型 B\":13,\"类型 C\":8},{\"year\":\"2006\",\"类型 A\":24,\"类型 B\":14,\"类型 C\":7},{\"year\":\"2007\",\"类型 A\":26,\"类型 B\":16,\"类型 C\":7},{\"year\":\"2008\",\"类型 A\":26,\"类型 B\":15.2,\"类型 C\":8},{\"year\":\"2009\",\"类型 A\":27.1,\"类型 B\":15.2,\"类型 C\":10}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const data = [\n { year: '2000', '类型 A': 21.0, '类型 B': 16, '类型 C': 8 },\n { year: '2001', '类型 A': 25.0, '类型 B': 16, '类型 C': 8 },\n { year: '2002', '类型 A': 25.0, '类型 B': 15, '类型 C': 8 },\n { year: '2003', '类型 A': 25.0, '类型 B': 14, '类型 C': 7 },\n { year: '2004', '类型 A': 25.0, '类型 B': 14, '类型 C': 7 },\n { year: '2005', '类型 A': 24.0, '类型 B': 13, '类型 C': 8 },\n { year: '2006', '类型 A': 24.0, '类型 B': 14, '类型 C': 7 },\n { year: '2007', '类型 A': 26.0, '类型 B': 16, '类型 C': 7 },\n { year: '2008', '类型 A': 26.0, '类型 B': 15.2, '类型 C': 8 },\n { year: '2009', '类型 A': 27.1, '类型 B': 15.2, '类型 C': 10 },\n { year: '2010', '类型 A': 27.5, '类型 B': 15.4, '类型 C': 8 },\n { year: '2011', '类型 A': 26.4, '类型 B': 15.2, '类型 C': 9 },\n { year: '2012', '类型 A': 28.8, '类型 B': 15.4, '类型 C': 9 },\n { year: '2013', '类型 A': 33.3, '类型 B': 16.7, '类型 C': 12 },\n { year: '2014', '类型 A': 38.2, '类型 B': 19.5, '类型 C': 18 },\n];\n\nimport { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"width\": 720,\n \"height\": 720,\n \"coordinate\": {\n \"type\": \"polar\",\n \"innerRadius\": 0.1\n },\n \"interaction\": {\n \"tooltip\": {\n \"body\": false,\n \"crosshairsStroke\": \"red\",\n \"crosshairsStrokeWidth\": 4\n },\n \"elementHighlight\": true\n },\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": {\n \"value\": [\n {\n \"year\": \"2000\",\n \"类型 A\": 21,\n \"类型 B\": 16,\n \"类型 C\": 8\n },\n {\n \"year\": \"2001\",\n \"类型 A\": 25,\n \"类型 B\": 16,\n \"类型 C\": 8\n },\n {\n \"year\": \"2002\",\n \"类型 A\": 25,\n \"类型 B\": 15,\n \"类型 C\": 8\n },\n {\n \"year\": \"2003\",\n \"类型 A\": 25,\n \"类型 B\": 14,\n \"类型 C\": 7\n },\n {\n \"year\": \"2004\",\n \"类型 A\": 25,\n \"类型 B\": 14,\n \"类型 C\": 7\n },\n {\n \"year\": \"2005\",\n \"类型 A\": 24,\n \"类型 B\": 13,\n \"类型 C\": 8\n },\n {\n \"year\": \"2006\",\n \"类型 A\": 24,\n \"类型 B\": 14,\n \"类型 C\": 7\n },\n {\n \"year\": \"2007\",\n \"类型 A\": 26,\n \"类型 B\": 16,\n \"类型 C\": 7\n },\n {\n \"year\": \"2008\",\n \"类型 A\": 26,\n \"类型 B\": 15.2,\n \"类型 C\": 8\n },\n {\n \"year\": \"2009\",\n \"类型 A\": 27.1,\n \"类型 B\": 15.2,\n \"类型 C\": 10\n },\n {\n \"year\": \"2010\",\n \"类型 A\": 27.5,\n \"类型 B\": 15.4,\n \"类型 C\": 8\n },\n {\n \"year\": \"2011\",\n \"类型 A\": 26.4,\n \"类型 B\": 15.2,\n \"类型 C\": 9\n },\n {\n \"year\": \"2012\",\n \"类型 A\": 28.8,\n \"类型 B\": 15.4,\n \"类型 C\": 9\n },\n {\n \"year\": \"2013\",\n \"类型 A\": 33.3,\n \"类型 B\": 16.7,\n \"类型 C\": 12\n },\n {\n \"year\": \"2014\",\n \"类型 A\": 38.2,\n \"类型 B\": 19.5,\n \"类型 C\": 18\n }\n ],\n \"transform\": [\n {\n \"type\": \"fold\",\n \"fields\": [\n \"类型 A\",\n \"类型 B\",\n \"类型 C\"\n ],\n \"key\": \"难民类型\",\n \"value\": \"count\"\n }\n ]\n },\n \"encode\": {\n \"x\": \"year\",\n \"y\": \"count\",\n \"color\": \"难民类型\"\n },\n \"scale\": {\n \"x\": {\n \"padding\": 0\n }\n },\n \"style\": {\n \"lineWidth\": 1,\n \"stroke\": \"#fff\"\n },\n \"transform\": [\n {\n \"type\": \"stackY\"\n }\n ],\n \"axis\": {\n \"x\": {\n \"line\": true,\n \"grid\": true,\n \"gridLineDash\": [\n 0,\n 0\n ],\n \"gridLineWidth\": 1\n },\n \"y\": {\n \"title\": false,\n \"line\": true,\n \"gridLineWidth\": 1\n }\n },\n \"legend\": {\n \"color\": {\n \"position\": \"bottom\",\n \"layout\": {\n \"justifyContent\": \"center\"\n }\n }\n },\n \"state\": {\n \"active\": {\n \"stroke\": \"black\",\n \"lineWidth\": 1,\n \"zIndex\": 101\n },\n \"inactive\": {\n \"opacity\": 0.5,\n \"zIndex\": 100\n }\n },\n \"type\": \"interval\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"year\":\"2000\",\"类型 A\":21,\"类型 B\":16,\"类型 C\":8},\n {\"year\":\"2001\",\"类型 A\":25,\"类型 B\":16,\"类型 C\":8},\n {\"year\":\"2002\",\"类型 A\":25,\"类型 B\":15,\"类型 C\":8},\n {\"year\":\"2003\",\"类型 A\":25,\"类型 B\":14,\"类型 C\":7},\n {\"year\":\"2004\",\"类型 A\":25,\"类型 B\":14,\"类型 C\":7},\n {\"year\":\"2005\",\"类型 A\":24,\"类型 B\":13,\"类型 C\":8},\n {\"year\":\"2006\",\"类型 A\":24,\"类型 B\":14,\"类型 C\":7},\n {\"year\":\"2007\",\"类型 A\":26,\"类型 B\":16,\"类型 C\":7},\n {\"year\":\"2008\",\"类型 A\":26,\"类型 B\":15.2,\"类型 C\":8},\n {\"year\":\"2009\",\"类型 A\":27.1,\"类型 B\":15.2,\"类型 C\":10}\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: {\n type: 'inline',\n value: data,\n transform: [\n {\n type: 'fold',\n fields: ['类型 A', '类型 B', '类型 C'],\n key: 'type',\n value: 'value',\n },\n ],\n },\n encode: {\n x: 'year',\n y: 'value',\n color: 'type',\n },\n transform: [{ type: 'stackY' }],\n coordinate: { type: 'polar' },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16'],\n },\n },\n legend: {\n color: {\n title: '难民类型',\n position: 'right',\n },\n },\n axis: {\n x: {\n title: '年份',\n },\n y: {\n title: '数值',\n labelFormatter: (v) => v.toFixed(0),\n },\n },\n interaction: [\n { type: 'elementHighlight' },\n { type: 'tooltip' },\n ],\n});\n\nchart.render();", + "duration": 38523, + "retrievedSkillIds": [ + "g2-mark-interval-stacked", + "g2-transform-stacky", + "g2-mark-line-basic", + "g2-comp-space-layer", + "g2-mark-partition" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1398, + "expectedLength": 4548, + "similarity": 0.46579662782987596, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"year\":\"2000\",\"类型 A\":21,\"类型 B\":16,\"类型 C\":8},\n {\"year\":\"2001\",\"类型 A\":25,\"类型 B\":16,\"类型 C\":8},\n {\"year\":\"2002\",\"类型 A\":25,\"类型 B\":15,\"类型 C\":8},\n {\"year\":\"2003\",\"类型 A\":25,\"类型 B\":14,\"类型 C\":7},\n {\"year\":\"2004\",\"类型 A\":25,\"类型 B\":14,\"类型 C\":7},\n {\"year\":\"2005\",\"类型 A\":24,\"类型 B\":13,\"类型 C\":8},\n {\"year\":\"2006\",\"类型 A\":24,\"类型 B\":14,\"类型 C\":7},\n {\"year\":\"2007\",\"类型 A\":26,\"类型 B\":16,\"类型 C\":7},\n {\"year\":\"2008\",\"类型 A\":26,\"类型 B\":15.2,\"类型 C\":8},\n {\"year\":\"2009\",\"类型 A\":27.1,\"类型 B\":15.2,\"类型 C\":10}\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: {\n type: 'inline',\n value: data,\n transform: [\n {\n type: 'fold',\n fields: ['类型 A', '类型 B', '类型 C'],\n key: 'type',\n value: 'value',\n },\n ],\n },\n encode: {\n x: 'year',\n y: 'value',\n color: 'type',\n },\n transform: [{ type: 'stackY' }],\n coordinate: { type: 'polar' },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16'],\n },\n },\n legend: {\n color: {\n title: '难民类型',\n position: 'right',\n },\n },\n axis: {\n x: {\n title: '年份',\n },\n y: {\n title: '数值',\n labelFormatter: (v) => v.toFixed(0),\n },\n },\n interaction: [\n { type: 'elementHighlight' },\n { type: 'tooltip' },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "type", + "value", + "transform", + "type", + "fields", + "key", + "value", + "encode", + "x", + "y", + "color", + "transform", + "type", + "coordinate", + "type", + "scale", + "color", + "range", + "legend", + "color", + "title", + "position", + "axis", + "x", + "title", + "y", + "title", + "labelFormatter", + "interaction", + "type", + "type" + ], + "stringLiterals": [ + "year", + "year", + "year", + "year", + "year", + "year", + "year", + "year", + "year", + "year" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.interval", + "interaction" + ] + } + } + }, + { + "id": "case-133", + "query": "根据描述绘制图表,使用弦图展示多个模块之间的关联关系,每个模块根据风险等级着色,连接线的粗细和颜色映射了模块间关系的强度。参考数据:[{\"source\":\"支付\",\"target\":\"客服\",\"value\":16},{\"source\":\"支付\",\"target\":\"营销\",\"value\":24},{\"source\":\"支付\",\"target\":\"风控\",\"value\":38},{\"source\":\"支付\",\"target\":\"数据平台\",\"value\":30},{\"source\":\"支付\",\"target\":\"网关\",\"value\":12},{\"source\":\"客服\",\"target\":\"支付\",\"value\":16},{\"source\":\"客服\",\"target\":\"营销\",\"value\":10},{\"source\":\"客服\",\"target\":\"风控\",\"value\":19},{\"source\":\"客服\",\"target\":\"数据平台\",\"value\":15},{\"source\":\"客服\",\"target\":\"网关\",\"value\":6}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nconst modules = ['支付', '客服', '营销', '风控', '数据平台', '网关'];\nconst riskLevels = { 支付: 0.9, 客服: 0.4, 营销: 0.6, 风控: 0.95, 数据平台: 0.75, 网关: 0.3 };\n\nchart.options({\n type: 'chord',\n autoFit: true,\n data: {\n value: {\n links: modules.flatMap(s => modules.filter(t => t !== s).map(t => ({\n source: s, target: t, value: Math.floor(50 * Math.random() * riskLevels[s] * riskLevels[t])\n }))),\n },\n },\n layout: { nodeWidthRatio: 0.06 },\n scale: {\n color: {\n type: 'linear',\n field: 'value',\n range: ['#ffedcc', '#ff7f0e', '#800026'],\n },\n },\n style: {\n linkStroke: '#eee',\n linkStrokeWidth: 0.2,\n labelFontWeight: 'bold',\n nodeFill: d => riskLevels[d.id] > 0.7 ? '#d7191c' :\n riskLevels[d.id] > 0.5 ? '#fdae61' : '#a6d96a',\n }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = {\n nodes: [\n { key: '支付', name: '支付', riskLevel: '高风险' },\n { key: '客服', name: '客服', riskLevel: '中风险' },\n { key: '营销', name: '营销', riskLevel: '低风险' },\n { key: '风控', name: '风控', riskLevel: '高风险' },\n { key: '数据平台', name: '数据平台', riskLevel: '中风险' },\n { key: '网关', name: '网关', riskLevel: '低风险' },\n ],\n links: [\n { source: '支付', target: '客服', value: 16 },\n { source: '支付', target: '营销', value: 24 },\n { source: '支付', target: '风控', value: 38 },\n { source: '支付', target: '数据平台', value: 30 },\n { source: '支付', target: '网关', value: 12 },\n { source: '客服', target: '支付', value: 16 },\n { source: '客服', target: '营销', value: 10 },\n { source: '客服', target: '风控', value: 19 },\n { source: '客服', target: '数据平台', value: 15 },\n { source: '客服', target: '网关', value: 6 },\n ],\n};\n\nchart.options({\n type: 'chord',\n data: {\n value: data,\n },\n encode: {\n source: 'source',\n target: 'target',\n value: 'value',\n nodeColor: 'riskLevel',\n linkColor: 'value',\n },\n scale: {\n riskLevel: {\n type: 'ordinal',\n domain: ['高风险', '中风险', '低风险'],\n range: ['#ff4d4f', '#faad14', '#52c41a'],\n },\n value: {\n type: 'linear',\n domain: [0, 40],\n range: ['#e6f7ff', '#1677ff'],\n },\n },\n style: {\n link: {\n opacity: 0.6,\n },\n },\n nodeLabels: [\n { text: 'name', position: 'outside', fontSize: 12 },\n ],\n});\n\nchart.render();", + "duration": 56983, + "retrievedSkillIds": [ + "g2-mark-chord", + "g2-mark-arc-diagram", + "g2-mark-parallel", + "g2-scale-linear", + "g2-mark-contourline" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1532, + "expectedLength": 923, + "similarity": 0.5945155418575641, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = {\n nodes: [\n { key: '支付', name: '支付', riskLevel: '高风险' },\n { key: '客服', name: '客服', riskLevel: '中风险' },\n { key: '营销', name: '营销', riskLevel: '低风险' },\n { key: '风控', name: '风控', riskLevel: '高风险' },\n { key: '数据平台', name: '数据平台', riskLevel: '中风险' },\n { key: '网关', name: '网关', riskLevel: '低风险' },\n ],\n links: [\n { source: '支付', target: '客服', value: 16 },\n { source: '支付', target: '营销', value: 24 },\n { source: '支付', target: '风控', value: 38 },\n { source: '支付', target: '数据平台', value: 30 },\n { source: '支付', target: '网关', value: 12 },\n { source: '客服', target: '支付', value: 16 },\n { source: '客服', target: '营销', value: 10 },\n { source: '客服', target: '风控', value: 19 },\n { source: '客服', target: '数据平台', value: 15 },\n { source: '客服', target: '网关', value: 6 },\n ],\n};\n\nchart.options({\n type: 'chord',\n data: {\n value: data,\n },\n encode: {\n source: 'source',\n target: 'target',\n value: 'value',\n nodeColor: 'riskLevel',\n linkColor: 'value',\n },\n scale: {\n riskLevel: {\n type: 'ordinal',\n domain: ['高风险', '中风险', '低风险'],\n range: ['#ff4d4f', '#faad14', '#52c41a'],\n },\n value: {\n type: 'linear',\n domain: [0, 40],\n range: ['#e6f7ff', '#1677ff'],\n },\n },\n style: {\n link: {\n opacity: 0.6,\n },\n },\n nodeLabels: [\n { text: 'name', position: 'outside', fontSize: 12 },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "nodes", + "key", + "name", + "riskLevel", + "key", + "name", + "riskLevel", + "key", + "name", + "riskLevel", + "key", + "name", + "riskLevel", + "key", + "name", + "riskLevel", + "key", + "name", + "riskLevel", + "links", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "type", + "data", + "value", + "encode", + "source", + "target", + "value", + "nodeColor", + "linkColor", + "scale", + "riskLevel", + "type", + "domain", + "range", + "value", + "type", + "domain", + "range", + "style", + "link", + "opacity", + "nodeLabels", + "text", + "position", + "fontSize" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-134", + "query": "根据描述绘制图表,使用 G2 渲染一个桑基图,展示能源从开采到消费的流动路径及对应数值,体现不同能源节点间的流量关系。参考数据:{\"value\":{\"links\":[{\"source\":\"煤炭开采\",\"target\":\"发电厂\",\"value\":2800},{\"source\":\"发电厂\",\"target\":\"居民用电\",\"value\":1500},{\"source\":\"发电厂\",\"target\":\"工业用电\",\"value\":1000},{\"source\":\"发电厂\",\"target\":\"输电损耗\",\"value\":300},{\"source\":\"石油开采\",\"target\":\"炼油厂\",\"value\":2500},{\"source\":\"炼油厂\",\"target\":\"交通燃油\",\"value\":1800},{\"source\":\"炼油厂\",\"target\":\"化工原料\",\"value\":700},{\"source\":\"天然气\",\"target\":\"城市燃气\",\"value\":1200},{\"source\":\"天然气\",\"target\":\"发电厂\",\"value\":800}]}}", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'sankey',\n autoFit: true,\n data: {\n value: {\n links: [\n { source: '煤炭开采', target: '发电厂', value: 2800 },\n { source: '发电厂', target: '居民用电', value: 1500 },\n { source: '发电厂', target: '工业用电', value: 1000 },\n { source: '发电厂', target: '输电损耗', value: 300 },\n { source: '石油开采', target: '炼油厂', value: 2500 },\n { source: '炼油厂', target: '交通燃油', value: 1800 },\n { source: '炼油厂', target: '化工原料', value: 700 },\n { source: '天然气', target: '城市燃气', value: 1200 },\n { source: '天然气', target: '发电厂', value: 800 }\n ]\n }\n },\n layout: {\n nodeAlign: 'center',\n nodePadding: 0.05,\n nodeWidth: 0.03\n },\n style: {\n labelFontSize: 11,\n labelSpacing: 6,\n nodeStroke: '#333',\n nodeStrokeWidth: 1.5,\n linkFillOpacity: 0.5\n },\n scale: {\n color: {\n range: ['#7fc97f', '#fdc086', '#beaed4', '#386cb0']\n }\n }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 600,\n});\n\nchart.options({\n type: 'sankey',\n data: {\n value: {\n links: [\n { source: '煤炭开采', target: '发电厂', value: 2800 },\n { source: '发电厂', target: '居民用电', value: 1500 },\n { source: '发电厂', target: '工业用电', value: 1000 },\n { source: '发电厂', target: '输电损耗', value: 300 },\n { source: '石油开采', target: '炼油厂', value: 2500 },\n { source: '炼油厂', target: '交通燃油', value: 1800 },\n { source: '炼油厂', target: '化工原料', value: 700 },\n { source: '天然气', target: '城市燃气', value: 1200 },\n { source: '天然气', target: '发电厂', value: 800 }\n ]\n }\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.03,\n nodeWidth: 0.02\n },\n style: {\n labelSpacing: 4,\n labelFontSize: 12,\n labelFontWeight: 'bold',\n nodeLineWidth: 1,\n linkFillOpacity: 0.4\n },\n legend: false\n});\n\nchart.render();", + "duration": 10976, + "retrievedSkillIds": [ + "g2-mark-sankey", + "g2-mark-chord", + "g2-concept-chart-selection", + "g2-interaction-adaptive-filter", + "g2-mark-area-stacked" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 969, + "expectedLength": 1051, + "similarity": 0.8703386243386243, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 600,\n});\n\nchart.options({\n type: 'sankey',\n data: {\n value: {\n links: [\n { source: '煤炭开采', target: '发电厂', value: 2800 },\n { source: '发电厂', target: '居民用电', value: 1500 },\n { source: '发电厂', target: '工业用电', value: 1000 },\n { source: '发电厂', target: '输电损耗', value: 300 },\n { source: '石油开采', target: '炼油厂', value: 2500 },\n { source: '炼油厂', target: '交通燃油', value: 1800 },\n { source: '炼油厂', target: '化工原料', value: 700 },\n { source: '天然气', target: '城市燃气', value: 1200 },\n { source: '天然气', target: '发电厂', value: 800 }\n ]\n }\n },\n layout: {\n nodeAlign: 'justify',\n nodePadding: 0.03,\n nodeWidth: 0.02\n },\n style: {\n labelSpacing: 4,\n labelFontSize: 12,\n labelFontWeight: 'bold',\n nodeLineWidth: 1,\n linkFillOpacity: 0.4\n },\n legend: false\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "value", + "links", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "layout", + "nodeAlign", + "nodePadding", + "nodeWidth", + "style", + "labelSpacing", + "labelFontSize", + "labelFontWeight", + "nodeLineWidth", + "linkFillOpacity", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-135", + "query": "根据描述绘制图表,使用 G2 绘制螺旋坐标系中的点图,展示 180 个时间点的心率监测数据,包含角度、半径、心率值(bpm)和状态类型(静息/运动)四个字段。数据通过模拟生成,心率随角度呈正弦波动并叠加随机噪声,前90个点为静息状态,后90个为运动状态。图表设置颜色映射(心率从蓝到粉渐变)、图例、标题,并在螺旋坐标系中渲染点图,用于可视化连续心率监测的轨迹变化。参考数据:\n[{\"angle\":0,\"radius\":10,\"bpm\":70.123,\"type\":\"静息\"},{\"angle\":0.2,\"radius\":12,\"bpm\":68.456,\"type\":\"静息\"},{\"angle\":0.4,\"radius\":14,\"bpm\":82.789,\"type\":\"静息\"},{\"angle\":0.6,\"radius\":16,\"bpm\":75.321,\"type\":\"静息\"},{\"angle\":0.8,\"radius\":18,\"bpm\":69.654,\"type\":\"静息\"},{\"angle\":1,\"radius\":20,\"bpm\":81.987,\"type\":\"静息\"},{\"angle\":1.2,\"radius\":22,\"bpm\":73.21,\"type\":\"静息\"},{\"angle\":1.4,\"radius\":24,\"bpm\":77.543,\"type\":\"静息\"},{\"angle\":1.6,\"radius\":26,\"bpm\":66.876,\"type\":\"静息\"},{\"angle\":1.8,\"radius\":28,\"bpm\":84.209,\"type\":\"静息\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from \"@antv/g2\";\n\nconst data = [];\nfor (let i = 0; i < 180; i++) {\n const theta = i / 5;\n const r = 10 + 2 * i;\n const heartRate = 65 + 20 * Math.sin(theta / 3) + (Math.random() - 0.5) * 12;\n data.push({ angle: theta, radius: r, bpm: heartRate, type: (i < 90) ? \"静息\" : \"运动\" });\n}\n\nconst chart = new Chart({ container: \"container\", autoFit: true, height: 500 });\nchart.options({\n type: \"point\",\n data,\n encode: { x: \"angle\", y: \"radius\", color: \"bpm\", shape: \"type\" },\n scale: { color: { type: \"linear\", range: [\"#92cfff\", \"#d62a78\"] } },\n coordinate: { type: \"helix\", startAngle: 0, endAngle: 18 * Math.PI },\n point: { style: { r: 4, stroke: \"#333\", lineWidth: 0.5 } },\n legend: { color: { title: \"心率(bpm)\" }, shape: { title: \"状态\" } },\n title: \"连续心率监测螺旋轨迹(静息→运动)\"\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 800,\n padding: 40,\n});\n\n// 生成180个时间点的心率监测数据\nconst data = [];\nfor (let i = 0; i < 180; i++) {\n // 角度随时间递增,形成螺旋轨迹\n const angle = i * 0.15;\n // 半径从内向外扩展\n const radius = 10 + i * 0.25;\n \n // 状态划分:前90个为静息,后90个为运动\n const isRest = i < 90;\n const type = isRest ? '静息' : '运动';\n \n // 心率计算:基础值 + 正弦波动 + 随机噪声\n const baseBpm = isRest ? 72 : 135;\n const sineWave = Math.sin(i * 0.3) * 12;\n const noise = (Math.random() - 0.5) * 8;\n const bpm = Math.max(60, Math.min(160, baseBpm + sineWave + noise));\n \n data.push({\n angle: parseFloat(angle.toFixed(2)),\n radius: parseFloat(radius.toFixed(2)),\n bpm: parseFloat(bpm.toFixed(1)),\n type: type,\n });\n}\n\nchart.options({\n type: 'point',\n data: data,\n coordinate: {\n type: 'helix',\n innerRadius: 0.15,\n outerRadius: 0.85,\n },\n encode: {\n x: 'angle',\n y: 'radius',\n color: 'bpm',\n shape: 'type',\n size: 5,\n },\n scale: {\n color: {\n type: 'linear',\n domain: [60, 160],\n range: ['#5B8FF9', '#FF99C3'],\n },\n },\n style: {\n fillOpacity: 0.85,\n stroke: '#fff',\n lineWidth: 0.5,\n },\n legend: {\n color: {\n title: '心率 (bpm)',\n position: 'right',\n },\n shape: {\n title: '状态类型',\n position: 'top',\n },\n },\n title: {\n title: '心率监测数据螺旋轨迹图',\n subtitle: '180个连续时间点监测(蓝→粉:低→高心率)',\n },\n tooltip: {\n items: [\n { field: 'bpm', name: '心率 (bpm)' },\n { field: 'type', name: '状态' },\n { field: 'angle', name: '角度 (rad)' },\n { field: 'radius', name: '半径' },\n ],\n },\n});\n\nchart.render();", + "duration": 30393, + "retrievedSkillIds": [ + "g2-mark-interval-basic", + "g2-mark-point-scatter", + "g2-transform-jittery", + "g2-mark-liquid", + "g2-mark-bullet" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1661, + "expectedLength": 812, + "similarity": 0.61354140395124, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 800,\n padding: 40,\n});\n\n// 生成180个时间点的心率监测数据\nconst data = [];\nfor (let i = 0; i < 180; i++) {\n // 角度随时间递增,形成螺旋轨迹\n const angle = i * 0.15;\n // 半径从内向外扩展\n const radius = 10 + i * 0.25;\n \n // 状态划分:前90个为静息,后90个为运动\n const isRest = i < 90;\n const type = isRest ? '静息' : '运动';\n \n // 心率计算:基础值 + 正弦波动 + 随机噪声\n const baseBpm = isRest ? 72 : 135;\n const sineWave = Math.sin(i * 0.3) * 12;\n const noise = (Math.random() - 0.5) * 8;\n const bpm = Math.max(60, Math.min(160, baseBpm + sineWave + noise));\n \n data.push({\n angle: parseFloat(angle.toFixed(2)),\n radius: parseFloat(radius.toFixed(2)),\n bpm: parseFloat(bpm.toFixed(1)),\n type: type,\n });\n}\n\nchart.options({\n type: 'point',\n data: data,\n coordinate: {\n type: 'helix',\n innerRadius: 0.15,\n outerRadius: 0.85,\n },\n encode: {\n x: 'angle',\n y: 'radius',\n color: 'bpm',\n shape: 'type',\n size: 5,\n },\n scale: {\n color: {\n type: 'linear',\n domain: [60, 160],\n range: ['#5B8FF9', '#FF99C3'],\n },\n },\n style: {\n fillOpacity: 0.85,\n stroke: '#fff',\n lineWidth: 0.5,\n },\n legend: {\n color: {\n title: '心率 (bpm)',\n position: 'right',\n },\n shape: {\n title: '状态类型',\n position: 'top',\n },\n },\n title: {\n title: '心率监测数据螺旋轨迹图',\n subtitle: '180个连续时间点监测(蓝→粉:低→高心率)',\n },\n tooltip: {\n items: [\n { field: 'bpm', name: '心率 (bpm)' },\n { field: 'type', name: '状态' },\n { field: 'angle', name: '角度 (rad)' },\n { field: 'radius', name: '半径' },\n ],\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "sin", + "random", + "max", + "min", + "push", + "parseFloat", + "toFixed", + "parseFloat", + "toFixed", + "parseFloat", + "toFixed", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "padding", + "72", + "angle", + "radius", + "bpm", + "type", + "type", + "data", + "coordinate", + "type", + "innerRadius", + "outerRadius", + "encode", + "x", + "y", + "color", + "shape", + "size", + "scale", + "color", + "type", + "domain", + "range", + "style", + "fillOpacity", + "stroke", + "lineWidth", + "legend", + "color", + "title", + "position", + "shape", + "title", + "position", + "title", + "title", + "subtitle", + "tooltip", + "items", + "field", + "name", + "field", + "name", + "field", + "name", + "field", + "name" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale", + "type.point" + ] + } + } + }, + { + "id": "case-136", + "query": "根据描述绘制图表,使用 G2 构建了一个弦图(Chord Diagram),用于展示多个节点之间的双向连接关系及其权重。数据中每个条目表示两个地区之间存在连接,通过 value1 和 value2 表示不同的流量或关联强度。参考数据:[{\"begin\":\"北京\",\"end\":\"天津\",\"value1\":34,\"value2\":46},{\"begin\":\"北京\",\"end\":\"上海\",\"value1\":95,\"value2\":69},{\"begin\":\"北京\",\"end\":\"河北\",\"value1\":61,\"value2\":62},{\"begin\":\"北京\",\"end\":\"辽宁\",\"value1\":32,\"value2\":82},{\"begin\":\"北京\",\"end\":\"黑龙江\",\"value1\":84,\"value2\":30},{\"begin\":\"北京\",\"end\":\"吉林\",\"value1\":19,\"value2\":1},{\"begin\":\"天津\",\"end\":\"河北\",\"value1\":62,\"value2\":24},{\"begin\":\"天津\",\"end\":\"辽宁\",\"value1\":34,\"value2\":16},{\"begin\":\"天津\",\"end\":\"上海\",\"value1\":48,\"value2\":49},{\"begin\":\"上海\",\"end\":\"黑龙江\",\"value1\":67,\"value2\":80}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'chord',\n data: {\n value: {\n links: [\n { begin: '北京', end: '天津', value1: 34, value2: 46 },\n { begin: '北京', end: '上海', value1: 95, value2: 69 },\n { begin: '北京', end: '河北', value1: 61, value2: 62 },\n { begin: '北京', end: '辽宁', value1: 32, value2: 82 },\n { begin: '北京', end: '黑龙江', value1: 84, value2: 30 },\n { begin: '北京', end: '吉林', value1: 19, value2: 1 },\n { begin: '天津', end: '河北', value1: 62, value2: 24 },\n { begin: '天津', end: '辽宁', value1: 34, value2: 16 },\n { begin: '天津', end: '上海', value1: 48, value2: 49 },\n { begin: '上海', end: '黑龙江', value1: 67, value2: 80 },\n { begin: '河北', end: '黑龙江', value1: 37, value2: 67 },\n { begin: '河北', end: '内蒙古', value1: 51, value2: 16 },\n { begin: '内蒙古', end: '北京', value1: 56, value2: 76 },\n ],\n },\n },\n encode: {\n source: (d) => d.begin,\n target: (d) => d.end,\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 640,\n});\n\nconst rawData = [\n {\"begin\":\"北京\",\"end\":\"天津\",\"value1\":34,\"value2\":46},\n {\"begin\":\"北京\",\"end\":\"上海\",\"value1\":95,\"value2\":69},\n {\"begin\":\"北京\",\"end\":\"河北\",\"value1\":61,\"value2\":62},\n {\"begin\":\"北京\",\"end\":\"辽宁\",\"value1\":32,\"value2\":82},\n {\"begin\":\"北京\",\"end\":\"黑龙江\",\"value1\":84,\"value2\":30},\n {\"begin\":\"北京\",\"end\":\"吉林\",\"value1\":19,\"value2\":1},\n {\"begin\":\"天津\",\"end\":\"河北\",\"value1\":62,\"value2\":24},\n {\"begin\":\"天津\",\"end\":\"辽宁\",\"value1\":34,\"value2\":16},\n {\"begin\":\"天津\",\"end\":\"上海\",\"value1\":48,\"value2\":49},\n {\"begin\":\"上海\",\"end\":\"黑龙江\",\"value1\":67,\"value2\":80}\n];\n\nconst nodeKeys = [...new Set([...rawData.map(d => d.begin), ...rawData.map(d => d.end)])];\nconst nodes = nodeKeys.map(key => ({ key, name: key }));\nconst links = rawData.map(d => ({\n source: d.begin,\n target: d.end,\n value: d.value1,\n value2: d.value2\n}));\n\nchart.options({\n type: 'chord',\n data: {\n value: { nodes, links }\n },\n encode: {\n source: 'source',\n target: 'target',\n value: 'value',\n nodeKey: 'key',\n nodeColor: 'key',\n linkColor: 'source',\n },\n layout: {\n nodeWidthRatio: 0.05,\n nodePaddingRatio: 0.02,\n },\n style: {\n node: { opacity: 1, lineWidth: 1 },\n link: { opacity: 0.6, lineWidth: 1 },\n },\n nodeLabels: [\n { text: 'name', position: 'outside', fontSize: 12, fontWeight: 'bold' }\n ],\n tooltip: {\n node: {\n title: '',\n items: [(d) => ({ name: d.key, value: d.value })]\n },\n link: {\n title: '',\n items: [\n (d) => ({ name: `${d.source} → ${d.target}`, value: `Value1: ${d.value}` }),\n (d) => ({ name: `${d.target} → ${d.source}`, value: `Value2: ${d.value2}` })\n ]\n }\n }\n});\n\nchart.render();", + "duration": 25234, + "retrievedSkillIds": [ + "g2-mark-chord", + "g2-interaction-chart-index", + "g2-mark-link", + "g2-concept-chart-selection", + "g2-mark-line-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1782, + "expectedLength": 1059, + "similarity": 0.6105336617405582, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 640,\n});\n\nconst rawData = [\n {\"begin\":\"北京\",\"end\":\"天津\",\"value1\":34,\"value2\":46},\n {\"begin\":\"北京\",\"end\":\"上海\",\"value1\":95,\"value2\":69},\n {\"begin\":\"北京\",\"end\":\"河北\",\"value1\":61,\"value2\":62},\n {\"begin\":\"北京\",\"end\":\"辽宁\",\"value1\":32,\"value2\":82},\n {\"begin\":\"北京\",\"end\":\"黑龙江\",\"value1\":84,\"value2\":30},\n {\"begin\":\"北京\",\"end\":\"吉林\",\"value1\":19,\"value2\":1},\n {\"begin\":\"天津\",\"end\":\"河北\",\"value1\":62,\"value2\":24},\n {\"begin\":\"天津\",\"end\":\"辽宁\",\"value1\":34,\"value2\":16},\n {\"begin\":\"天津\",\"end\":\"上海\",\"value1\":48,\"value2\":49},\n {\"begin\":\"上海\",\"end\":\"黑龙江\",\"value1\":67,\"value2\":80}\n];\n\nconst nodeKeys = [...new Set([...rawData.map(d => d.begin), ...rawData.map(d => d.end)])];\nconst nodes = nodeKeys.map(key => ({ key, name: key }));\nconst links = rawData.map(d => ({\n source: d.begin,\n target: d.end,\n value: d.value1,\n value2: d.value2\n}));\n\nchart.options({\n type: 'chord',\n data: {\n value: { nodes, links }\n },\n encode: {\n source: 'source',\n target: 'target',\n value: 'value',\n nodeKey: 'key',\n nodeColor: 'key',\n linkColor: 'source',\n },\n layout: {\n nodeWidthRatio: 0.05,\n nodePaddingRatio: 0.02,\n },\n style: {\n node: { opacity: 1, lineWidth: 1 },\n link: { opacity: 0.6, lineWidth: 1 },\n },\n nodeLabels: [\n { text: 'name', position: 'outside', fontSize: 12, fontWeight: 'bold' }\n ],\n tooltip: {\n node: {\n title: '',\n items: [(d) => ({ name: d.key, value: d.value })]\n },\n link: {\n title: '',\n items: [\n (d) => ({ name: `${d.source} → ${d.target}`, value: `Value1: ${d.value}` }),\n (d) => ({ name: `${d.target} → ${d.source}`, value: `Value2: ${d.value2}` })\n ]\n }\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "Set", + "map", + "map", + "map", + "map", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "name", + "source", + "target", + "value", + "value2", + "type", + "data", + "value", + "encode", + "source", + "target", + "value", + "nodeKey", + "nodeColor", + "linkColor", + "layout", + "nodeWidthRatio", + "nodePaddingRatio", + "style", + "node", + "opacity", + "lineWidth", + "link", + "opacity", + "lineWidth", + "nodeLabels", + "text", + "position", + "fontSize", + "fontWeight", + "tooltip", + "node", + "title", + "items", + "name", + "value", + "link", + "title", + "items", + "name", + "value", + "Value1", + "name", + "value", + "Value2" + ], + "stringLiterals": [ + "begin", + "end", + "value1", + "value2", + "begin", + "end", + "value1", + "value2", + "begin", + "end", + "value1", + "value2", + "begin", + "end", + "value1", + "value2", + "begin", + "end", + "value1", + "value2", + "begin", + "end", + "value1", + "value2", + "begin", + "end", + "value1", + "value2", + "begin", + "end", + "value1", + "value2", + "begin", + "end", + "value1", + "value2", + "begin", + "end", + "value1", + "value2" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-137", + "query": "根据描述绘制图表,使用 G2 创建一个堆叠归一化的柱状图,展示不同市场(Auburn, AL、Birmingham, AL、Gainesville, FL 等)中各消费群体(如 Almond lovers、Berry buyers 等)的数值占比,数据来自内联数组,包含 market、segment 和 value 字段,通过 stackY 和 normalizeY 转换实现百分比堆叠效果,并在柱形上显示 segment 名称和对应 value 数值标签。参考数据:\n[{\"market\":\"Auburn, AL\",\"segment\":\"Almond lovers\",\"value\":3840},{\"market\":\"Auburn, AL\",\"segment\":\"Berry buyers\",\"value\":1920},{\"market\":\"Auburn, AL\",\"segment\":\"Carrots-n-more\",\"value\":960},{\"market\":\"Auburn, AL\",\"segment\":\"Delicious-n-new\",\"value\":400},{\"market\":\"Birmingham, AL\",\"segment\":\"Almond lovers\",\"value\":1600},{\"market\":\"Birmingham, AL\",\"segment\":\"Berry buyers\",\"value\":1440},{\"market\":\"Birmingham, AL\",\"segment\":\"Carrots-n-more\",\"value\":960},{\"market\":\"Birmingham, AL\",\"segment\":\"Delicious-n-new\",\"value\":400},{\"market\":\"Gainesville, FL\",\"segment\":\"Almond lovers\",\"value\":640},{\"market\":\"Gainesville, FL\",\"segment\":\"Berry buyers\",\"value\":960}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"width\": 900,\n \"height\": 800,\n \"paddingLeft\": 0,\n \"paddingRight\": 0,\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": {\n \"type\": \"inline\",\n \"value\": [\n {\n \"market\": \"Auburn, AL\",\n \"segment\": \"Almond lovers\",\n \"value\": 3840\n },\n {\n \"market\": \"Auburn, AL\",\n \"segment\": \"Berry buyers\",\n \"value\": 1920\n },\n {\n \"market\": \"Auburn, AL\",\n \"segment\": \"Carrots-n-more\",\n \"value\": 960\n },\n {\n \"market\": \"Auburn, AL\",\n \"segment\": \"Delicious-n-new\",\n \"value\": 400\n },\n {\n \"market\": \"Birmingham, AL\",\n \"segment\": \"Almond lovers\",\n \"value\": 1600\n },\n {\n \"market\": \"Birmingham, AL\",\n \"segment\": \"Berry buyers\",\n \"value\": 1440\n },\n {\n \"market\": \"Birmingham, AL\",\n \"segment\": \"Carrots-n-more\",\n \"value\": 960\n },\n {\n \"market\": \"Birmingham, AL\",\n \"segment\": \"Delicious-n-new\",\n \"value\": 400\n },\n {\n \"market\": \"Gainesville, FL\",\n \"segment\": \"Almond lovers\",\n \"value\": 640\n },\n {\n \"market\": \"Gainesville, FL\",\n \"segment\": \"Berry buyers\",\n \"value\": 960\n },\n {\n \"market\": \"Gainesville, FL\",\n \"segment\": \"Carrots-n-more\",\n \"value\": 640\n },\n {\n \"market\": \"Gainesville, FL\",\n \"segment\": \"Delicious-n-new\",\n \"value\": 400\n },\n {\n \"market\": \"Durham, NC\",\n \"segment\": \"Almond lovers\",\n \"value\": 320\n },\n {\n \"market\": \"Durham, NC\",\n \"segment\": \"Berry buyers\",\n \"value\": 480\n },\n {\n \"market\": \"Durham, NC\",\n \"segment\": \"Carrots-n-more\",\n \"value\": 640\n },\n {\n \"market\": \"Durham, NC\",\n \"segment\": \"Delicious-n-new\",\n \"value\": 400\n }\n ]\n },\n \"transform\": [\n {\n \"type\": \"flexX\",\n \"reducer\": \"sum\"\n },\n {\n \"type\": \"stackY\"\n },\n {\n \"type\": \"normalizeY\"\n }\n ],\n \"encode\": {\n \"x\": \"market\",\n \"y\": \"value\",\n \"color\": \"segment\"\n },\n \"axis\": {\n \"y\": false\n },\n \"scale\": {\n \"x\": {\n \"paddingOuter\": 0,\n \"paddingInner\": 0.01\n }\n },\n \"tooltip\": {\n \"items\": [\n \"value\"\n ]\n },\n \"labels\": [\n {\n \"text\": \"segment\",\n \"x\": 5,\n \"y\": 5,\n \"textAlign\": \"start\",\n \"textBaseline\": \"top\",\n \"fontSize\": 10,\n \"fill\": \"#fff\"\n },\n {\n \"text\": \"value\",\n \"x\": 5,\n \"y\": 5,\n \"textAlign\": \"start\",\n \"dy\": 15,\n \"fontSize\": 10,\n \"fill\": \"#fff\"\n }\n ],\n \"type\": \"interval\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"market\":\"Auburn, AL\",\"segment\":\"Almond lovers\",\"value\":3840},\n {\"market\":\"Auburn, AL\",\"segment\":\"Berry buyers\",\"value\":1920},\n {\"market\":\"Auburn, AL\",\"segment\":\"Carrots-n-more\",\"value\":960},\n {\"market\":\"Auburn, AL\",\"segment\":\"Delicious-n-new\",\"value\":400},\n {\"market\":\"Birmingham, AL\",\"segment\":\"Almond lovers\",\"value\":1600},\n {\"market\":\"Birmingham, AL\",\"segment\":\"Berry buyers\",\"value\":1440},\n {\"market\":\"Birmingham, AL\",\"segment\":\"Carrots-n-more\",\"value\":960},\n {\"market\":\"Birmingham, AL\",\"segment\":\"Delicious-n-new\",\"value\":400},\n {\"market\":\"Gainesville, FL\",\"segment\":\"Almond lovers\",\"value\":640},\n {\"market\":\"Gainesville, FL\",\"segment\":\"Berry buyers\",\"value\":960}\n ],\n encode: {\n x: 'market',\n y: 'value',\n color: 'segment',\n },\n transform: [\n { type: 'stackY' },\n { type: 'normalizeY' },\n ],\n axis: {\n y: {\n labelFormatter: (v) => `${(v * 100).toFixed(0)}%`,\n },\n },\n labels: [\n {\n text: (d) => `${d.segment}\\n${d.value}`,\n position: 'inside',\n transform: [{ type: 'contrastReverse' }, { type: 'overflowHide' }],\n style: {\n fontSize: 11,\n textAlign: 'center',\n },\n },\n ],\n});\n\nchart.render();", + "duration": 13261, + "retrievedSkillIds": [ + "g2-mark-interval-grouped", + "g2-transform-group", + "g2-mark-treemap", + "g2-transform-normalizey", + "g2-mark-interval-stacked" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1381, + "expectedLength": 2798, + "similarity": 0.5778571428571428, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"market\":\"Auburn, AL\",\"segment\":\"Almond lovers\",\"value\":3840},\n {\"market\":\"Auburn, AL\",\"segment\":\"Berry buyers\",\"value\":1920},\n {\"market\":\"Auburn, AL\",\"segment\":\"Carrots-n-more\",\"value\":960},\n {\"market\":\"Auburn, AL\",\"segment\":\"Delicious-n-new\",\"value\":400},\n {\"market\":\"Birmingham, AL\",\"segment\":\"Almond lovers\",\"value\":1600},\n {\"market\":\"Birmingham, AL\",\"segment\":\"Berry buyers\",\"value\":1440},\n {\"market\":\"Birmingham, AL\",\"segment\":\"Carrots-n-more\",\"value\":960},\n {\"market\":\"Birmingham, AL\",\"segment\":\"Delicious-n-new\",\"value\":400},\n {\"market\":\"Gainesville, FL\",\"segment\":\"Almond lovers\",\"value\":640},\n {\"market\":\"Gainesville, FL\",\"segment\":\"Berry buyers\",\"value\":960}\n ],\n encode: {\n x: 'market',\n y: 'value',\n color: 'segment',\n },\n transform: [\n { type: 'stackY' },\n { type: 'normalizeY' },\n ],\n axis: {\n y: {\n labelFormatter: (v) => `${(v * 100).toFixed(0)}%`,\n },\n },\n labels: [\n {\n text: (d) => `${d.segment}\\n${d.value}`,\n position: 'inside',\n transform: [{ type: 'contrastReverse' }, { type: 'overflowHide' }],\n style: {\n fontSize: 11,\n textAlign: 'center',\n },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "encode", + "x", + "y", + "color", + "transform", + "type", + "type", + "axis", + "y", + "labelFormatter", + "labels", + "text", + "position", + "transform", + "type", + "type", + "style", + "fontSize", + "textAlign" + ], + "stringLiterals": [ + "market", + "segment", + "value", + "market", + "segment", + "value", + "market", + "segment", + "value", + "market", + "segment", + "value", + "market", + "segment", + "value", + "market", + "segment", + "value", + "market", + "segment", + "value", + "market", + "segment", + "value", + "market", + "segment", + "value", + "market", + "segment", + "value" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-138", + "query": "根据描述绘制图表,使用G2渲染一个密度图,数据包含Iris花的三种物种(setosa、versicolor、virginica)在四个特征(SepalLength、SepalWidth、PetalLength、PetalWidth)上的测量值,通过kde变换按x字段分组计算数值型字段y的概率密度分布,并用颜色区分x字段对应的密度曲线。参考数据:\n[{\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},{\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},{\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3.5},{\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":5.1},{\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},{\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.4},{\"species\":\"I. setosa\",\"x\":\"SepalWidth\",\"y\":3},{\"species\":\"I. setosa\",\"x\":\"SepalLength\",\"y\":4.9},{\"species\":\"I. setosa\",\"x\":\"PetalWidth\",\"y\":0.2},{\"species\":\"I. setosa\",\"x\":\"PetalLength\",\"y\":1.3}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'density',\n data: {\n type: 'inline',\n value: [\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 4.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.7\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalWidth\",\n \"y\": 0.2\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"PetalLength\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. setosa\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 6.2\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalWidth\",\n \"y\": 1.3\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"PetalLength\",\n \"y\": 4.1\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. versicolor\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 6.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 7.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 4.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.6\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.7\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.9\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 2.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.5\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 2.3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3.4\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 6.2\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalWidth\",\n \"y\": 1.8\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"PetalLength\",\n \"y\": 5.1\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalWidth\",\n \"y\": 3\n },\n {\n \"species\": \"I. virginica\",\n \"x\": \"SepalLength\",\n \"y\": 5.9\n }\n ],\n transform: [\n {\n type: 'kde',\n field: 'y',\n groupBy: ['x'],\n size: 20,\n },\n ],\n },\n encode: {\n x: 'x',\n y: 'y',\n color: 'x',\n size: 'size',\n },\n tooltip: false,\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'density',\n data: {\n type: 'fetch',\n value: 'https://assets.antv.antgroup.com/g2/species.json',\n transform: [\n {\n type: 'kde',\n field: 'y',\n groupBy: ['x'],\n size: 20,\n },\n ],\n },\n encode: {\n x: 'x',\n y: 'y',\n color: 'x',\n size: 'size',\n series: 'x',\n },\n tooltip: false,\n});\n\nchart.render();", + "duration": 41754, + "retrievedSkillIds": [ + "g2-mark-density", + "g2-transform-groupx", + "g2-mark-distribution-curve", + "g2-data-kde", + "g2-scale-linear" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 495, + "expectedLength": 48793, + "similarity": 0.7747933227344992, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'density',\n data: {\n type: 'fetch',\n value: 'https://assets.antv.antgroup.com/g2/species.json',\n transform: [\n {\n type: 'kde',\n field: 'y',\n groupBy: ['x'],\n size: 20,\n },\n ],\n },\n encode: {\n x: 'x',\n y: 'y',\n color: 'x',\n size: 'size',\n series: 'x',\n },\n tooltip: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "type", + "value", + "https", + "transform", + "type", + "field", + "groupBy", + "size", + "encode", + "x", + "y", + "color", + "size", + "series", + "tooltip" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform" + ] + } + } + }, + { + "id": "case-139", + "query": "根据描述绘制图表,使用 G2 创建一个散点图,以身高为 x 轴、体重为 y 轴,按性别颜色分组,并添加一条 Y 轴范围标注(54-72)。参考数据:\n[{\"gender\":\"female\",\"height\":161.2,\"weight\":51.6},{\"gender\":\"female\",\"height\":167.5,\"weight\":59},{\"gender\":\"female\",\"height\":159.5,\"weight\":49.2},{\"gender\":\"female\",\"height\":157,\"weight\":63},{\"gender\":\"female\",\"height\":155.8,\"weight\":53.6},{\"gender\":\"female\",\"height\":170,\"weight\":59},{\"gender\":\"female\",\"height\":159.1,\"weight\":47.6},{\"gender\":\"female\",\"height\":166,\"weight\":69.8},{\"gender\":\"female\",\"height\":176.2,\"weight\":66.8},{\"gender\":\"female\",\"height\":160.2,\"weight\":75.2}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n width: 600,\n height: 470,\n type: 'view',\n children: [\n {\n type: 'point',\n data: {\n type: 'inline',\n value: [\n {\n \"gender\": \"female\",\n \"height\": 161.2,\n \"weight\": 51.6\n },\n {\n \"gender\": \"female\",\n \"height\": 167.5,\n \"weight\": 59\n },\n {\n \"gender\": \"female\",\n \"height\": 159.5,\n \"weight\": 49.2\n },\n {\n \"gender\": \"female\",\n \"height\": 157,\n \"weight\": 63\n },\n {\n \"gender\": \"female\",\n \"height\": 155.8,\n \"weight\": 53.6\n },\n {\n \"gender\": \"female\",\n \"height\": 170,\n \"weight\": 59\n },\n {\n \"gender\": \"female\",\n \"height\": 159.1,\n \"weight\": 47.6\n },\n {\n \"gender\": \"female\",\n \"height\": 166,\n \"weight\": 69.8\n },\n {\n \"gender\": \"female\",\n \"height\": 176.2,\n \"weight\": 66.8\n },\n {\n \"gender\": \"female\",\n \"height\": 160.2,\n \"weight\": 75.2\n },\n {\n \"gender\": \"female\",\n \"height\": 172.5,\n \"weight\": 55.2\n },\n {\n \"gender\": \"female\",\n \"height\": 170.9,\n \"weight\": 54.2\n },\n {\n \"gender\": \"female\",\n \"height\": 172.9,\n \"weight\": 62.5\n },\n {\n \"gender\": \"female\",\n \"height\": 153.4,\n \"weight\": 42\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 50\n },\n {\n \"gender\": \"female\",\n \"height\": 147.2,\n \"weight\": 49.8\n },\n {\n \"gender\": \"female\",\n \"height\": 168.2,\n \"weight\": 49.2\n },\n {\n \"gender\": \"female\",\n \"height\": 175,\n \"weight\": 73.2\n },\n {\n \"gender\": \"female\",\n \"height\": 157,\n \"weight\": 47.8\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 68.8\n },\n {\n \"gender\": \"female\",\n \"height\": 159.5,\n \"weight\": 50.6\n },\n {\n \"gender\": \"female\",\n \"height\": 175,\n \"weight\": 82.5\n },\n {\n \"gender\": \"female\",\n \"height\": 166.8,\n \"weight\": 57.2\n },\n {\n \"gender\": \"female\",\n \"height\": 176.5,\n \"weight\": 87.8\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 72.8\n },\n {\n \"gender\": \"female\",\n \"height\": 174,\n \"weight\": 54.5\n },\n {\n \"gender\": \"female\",\n \"height\": 173,\n \"weight\": 59.8\n },\n {\n \"gender\": \"female\",\n \"height\": 179.9,\n \"weight\": 67.3\n },\n {\n \"gender\": \"female\",\n \"height\": 170.5,\n \"weight\": 67.8\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 47\n },\n {\n \"gender\": \"female\",\n \"height\": 154.4,\n \"weight\": 46.2\n },\n {\n \"gender\": \"female\",\n \"height\": 162,\n \"weight\": 55\n },\n {\n \"gender\": \"female\",\n \"height\": 176.5,\n \"weight\": 83\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 54.4\n },\n {\n \"gender\": \"female\",\n \"height\": 152,\n \"weight\": 45.8\n },\n {\n \"gender\": \"female\",\n \"height\": 162.1,\n \"weight\": 53.6\n },\n {\n \"gender\": \"female\",\n \"height\": 170,\n \"weight\": 73.2\n },\n {\n \"gender\": \"female\",\n \"height\": 160.2,\n \"weight\": 52.1\n },\n {\n \"gender\": \"female\",\n \"height\": 161.3,\n \"weight\": 67.9\n },\n {\n \"gender\": \"female\",\n \"height\": 166.4,\n \"weight\": 56.6\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 62.3\n },\n {\n \"gender\": \"female\",\n \"height\": 163.8,\n \"weight\": 58.5\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 54.5\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 50.2\n },\n {\n \"gender\": \"female\",\n \"height\": 161.3,\n \"weight\": 60.3\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 58.3\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 56.2\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 50.2\n },\n {\n \"gender\": \"female\",\n \"height\": 170,\n \"weight\": 72.9\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 59.8\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 61\n },\n {\n \"gender\": \"female\",\n \"height\": 160.7,\n \"weight\": 69.1\n },\n {\n \"gender\": \"female\",\n \"height\": 163.2,\n \"weight\": 55.9\n },\n {\n \"gender\": \"female\",\n \"height\": 152.4,\n \"weight\": 46.5\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 54.3\n },\n {\n \"gender\": \"female\",\n \"height\": 168.3,\n \"weight\": 54.8\n },\n {\n \"gender\": \"female\",\n \"height\": 180.3,\n \"weight\": 60.7\n },\n {\n \"gender\": \"female\",\n \"height\": 165.5,\n \"weight\": 60\n },\n {\n \"gender\": \"female\",\n \"height\": 165,\n \"weight\": 62\n },\n {\n \"gender\": \"female\",\n \"height\": 164.5,\n \"weight\": 60.3\n },\n {\n \"gender\": \"female\",\n \"height\": 156,\n \"weight\": 52.7\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 74.3\n },\n {\n \"gender\": \"female\",\n \"height\": 163,\n \"weight\": 62\n },\n {\n \"gender\": \"female\",\n \"height\": 165.7,\n \"weight\": 73.1\n },\n {\n \"gender\": \"female\",\n \"height\": 161,\n \"weight\": 80\n },\n {\n \"gender\": \"female\",\n \"height\": 162,\n \"weight\": 54.7\n },\n {\n \"gender\": \"female\",\n \"height\": 166,\n \"weight\": 53.2\n },\n {\n \"gender\": \"female\",\n \"height\": 174,\n \"weight\": 75.7\n },\n {\n \"gender\": \"female\",\n \"height\": 172.7,\n \"weight\": 61.1\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 55.7\n },\n {\n \"gender\": \"female\",\n \"height\": 151.1,\n \"weight\": 48.7\n },\n {\n \"gender\": \"female\",\n \"height\": 164.5,\n \"weight\": 52.3\n },\n {\n \"gender\": \"female\",\n \"height\": 163.5,\n \"weight\": 50\n },\n {\n \"gender\": \"female\",\n \"height\": 152,\n \"weight\": 59.3\n },\n {\n \"gender\": \"female\",\n \"height\": 169,\n \"weight\": 62.5\n },\n {\n \"gender\": \"female\",\n \"height\": 164,\n \"weight\": 55.7\n },\n {\n \"gender\": \"female\",\n \"height\": 161.2,\n \"weight\": 54.8\n },\n {\n \"gender\": \"female\",\n \"height\": 155,\n \"weight\": 45.9\n },\n {\n \"gender\": \"female\",\n \"height\": 170,\n \"weight\": 70.6\n },\n {\n \"gender\": \"female\",\n \"height\": 176.2,\n \"weight\": 67.2\n },\n {\n \"gender\": \"female\",\n \"height\": 170,\n \"weight\": 69.4\n },\n {\n \"gender\": \"female\",\n \"height\": 162.5,\n \"weight\": 58.2\n },\n {\n \"gender\": \"female\",\n \"height\": 170.3,\n \"weight\": 64.8\n },\n {\n \"gender\": \"female\",\n \"height\": 164.1,\n \"weight\": 71.6\n },\n {\n \"gender\": \"female\",\n \"height\": 169.5,\n \"weight\": 52.8\n },\n {\n \"gender\": \"female\",\n \"height\": 163.2,\n \"weight\": 59.8\n },\n {\n \"gender\": \"female\",\n \"height\": 154.5,\n \"weight\": 49\n },\n {\n \"gender\": \"female\",\n \"height\": 159.8,\n \"weight\": 50\n },\n {\n \"gender\": \"female\",\n \"height\": 173.2,\n \"weight\": 69.2\n },\n {\n \"gender\": \"female\",\n \"height\": 170,\n \"weight\": 55.9\n },\n {\n \"gender\": \"female\",\n \"height\": 161.4,\n \"weight\": 63.4\n },\n {\n \"gender\": \"female\",\n \"height\": 169,\n \"weight\": 58.2\n },\n {\n \"gender\": \"female\",\n \"height\": 166.2,\n \"weight\": 58.6\n },\n {\n \"gender\": \"female\",\n \"height\": 159.4,\n \"weight\": 45.7\n },\n {\n \"gender\": \"female\",\n \"height\": 162.5,\n \"weight\": 52.2\n },\n {\n \"gender\": \"female\",\n \"height\": 159,\n \"weight\": 48.6\n },\n {\n \"gender\": \"female\",\n \"height\": 162.8,\n \"weight\": 57.8\n },\n {\n \"gender\": \"female\",\n \"height\": 159,\n \"weight\": 55.6\n },\n {\n \"gender\": \"female\",\n \"height\": 179.8,\n \"weight\": 66.8\n },\n {\n \"gender\": \"female\",\n \"height\": 162.9,\n \"weight\": 59.4\n },\n {\n \"gender\": \"female\",\n \"height\": 161,\n \"weight\": 53.6\n },\n {\n \"gender\": \"female\",\n \"height\": 151.1,\n \"weight\": 73.2\n },\n {\n \"gender\": \"female\",\n \"height\": 168.2,\n \"weight\": 53.4\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 69\n },\n {\n \"gender\": \"female\",\n \"height\": 173.2,\n \"weight\": 58.4\n },\n {\n \"gender\": \"female\",\n \"height\": 171.8,\n \"weight\": 56.2\n },\n {\n \"gender\": \"female\",\n \"height\": 178,\n \"weight\": 70.6\n },\n {\n \"gender\": \"female\",\n \"height\": 164.3,\n \"weight\": 59.8\n },\n {\n \"gender\": \"female\",\n \"height\": 163,\n \"weight\": 72\n },\n {\n \"gender\": \"female\",\n \"height\": 168.5,\n \"weight\": 65.2\n },\n {\n \"gender\": \"female\",\n \"height\": 166.8,\n \"weight\": 56.6\n },\n {\n \"gender\": \"female\",\n \"height\": 172.7,\n \"weight\": 105.2\n },\n {\n \"gender\": \"female\",\n \"height\": 163.5,\n \"weight\": 51.8\n },\n {\n \"gender\": \"female\",\n \"height\": 169.4,\n \"weight\": 63.4\n },\n {\n \"gender\": \"female\",\n \"height\": 167.8,\n \"weight\": 59\n },\n {\n \"gender\": \"female\",\n \"height\": 159.5,\n \"weight\": 47.6\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 63\n },\n {\n \"gender\": \"female\",\n \"height\": 161.2,\n \"weight\": 55.2\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 45\n },\n {\n \"gender\": \"female\",\n \"height\": 163.2,\n \"weight\": 54\n },\n {\n \"gender\": \"female\",\n \"height\": 162.2,\n \"weight\": 50.2\n },\n {\n \"gender\": \"female\",\n \"height\": 161.3,\n \"weight\": 60.2\n },\n {\n \"gender\": \"female\",\n \"height\": 149.5,\n \"weight\": 44.8\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 58.8\n },\n {\n \"gender\": \"female\",\n \"height\": 163.2,\n \"weight\": 56.4\n },\n {\n \"gender\": \"female\",\n \"height\": 172.7,\n \"weight\": 62\n },\n {\n \"gender\": \"female\",\n \"height\": 155,\n \"weight\": 49.2\n },\n {\n \"gender\": \"female\",\n \"height\": 156.5,\n \"weight\": 67.2\n },\n {\n \"gender\": \"female\",\n \"height\": 164,\n \"weight\": 53.8\n },\n {\n \"gender\": \"female\",\n \"height\": 160.9,\n \"weight\": 54.4\n },\n {\n \"gender\": \"female\",\n \"height\": 162.8,\n \"weight\": 58\n },\n {\n \"gender\": \"female\",\n \"height\": 167,\n \"weight\": 59.8\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 54.8\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 43.2\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 60.5\n },\n {\n \"gender\": \"female\",\n \"height\": 158.2,\n \"weight\": 46.4\n },\n {\n \"gender\": \"female\",\n \"height\": 156,\n \"weight\": 64.4\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 48.8\n },\n {\n \"gender\": \"female\",\n \"height\": 167.1,\n \"weight\": 62.2\n },\n {\n \"gender\": \"female\",\n \"height\": 158,\n \"weight\": 55.5\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 57.8\n },\n {\n \"gender\": \"female\",\n \"height\": 156,\n \"weight\": 54.6\n },\n {\n \"gender\": \"female\",\n \"height\": 162.1,\n \"weight\": 59.2\n },\n {\n \"gender\": \"female\",\n \"height\": 173.4,\n \"weight\": 52.7\n },\n {\n \"gender\": \"female\",\n \"height\": 159.8,\n \"weight\": 53.2\n },\n {\n \"gender\": \"female\",\n \"height\": 170.5,\n \"weight\": 64.5\n },\n {\n \"gender\": \"female\",\n \"height\": 159.2,\n \"weight\": 51.8\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 56\n },\n {\n \"gender\": \"female\",\n \"height\": 161.3,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 63.2\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 59.5\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 56.8\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 64.1\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 50\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 72.3\n },\n {\n \"gender\": \"female\",\n \"height\": 166.4,\n \"weight\": 55\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 55.9\n },\n {\n \"gender\": \"female\",\n \"height\": 152.4,\n \"weight\": 60.4\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 69.1\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 84.5\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 55.9\n },\n {\n \"gender\": \"female\",\n \"height\": 158.8,\n \"weight\": 55.5\n },\n {\n \"gender\": \"female\",\n \"height\": 172.7,\n \"weight\": 69.5\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 76.4\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 61.4\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 65.9\n },\n {\n \"gender\": \"female\",\n \"height\": 156.2,\n \"weight\": 58.6\n },\n {\n \"gender\": \"female\",\n \"height\": 175.2,\n \"weight\": 66.8\n },\n {\n \"gender\": \"female\",\n \"height\": 172.1,\n \"weight\": 56.6\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 58.6\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 55.9\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 59.1\n },\n {\n \"gender\": \"female\",\n \"height\": 182.9,\n \"weight\": 81.8\n },\n {\n \"gender\": \"female\",\n \"height\": 166.4,\n \"weight\": 70.7\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 56.8\n },\n {\n \"gender\": \"female\",\n \"height\": 177.8,\n \"weight\": 60\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 58.2\n },\n {\n \"gender\": \"female\",\n \"height\": 175.3,\n \"weight\": 72.7\n },\n {\n \"gender\": \"female\",\n \"height\": 154.9,\n \"weight\": 54.1\n },\n {\n \"gender\": \"female\",\n \"height\": 158.8,\n \"weight\": 49.1\n },\n {\n \"gender\": \"female\",\n \"height\": 172.7,\n \"weight\": 75.9\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 55\n },\n {\n \"gender\": \"female\",\n \"height\": 161.3,\n \"weight\": 57.3\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 55\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 65.5\n },\n {\n \"gender\": \"female\",\n \"height\": 175.3,\n \"weight\": 65.5\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 48.6\n },\n {\n \"gender\": \"female\",\n \"height\": 163.8,\n \"weight\": 58.6\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 55.2\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 62.7\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 56.6\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 53.9\n },\n {\n \"gender\": \"female\",\n \"height\": 164.5,\n \"weight\": 63.2\n },\n {\n \"gender\": \"female\",\n \"height\": 176.5,\n \"weight\": 73.6\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 62\n },\n {\n \"gender\": \"female\",\n \"height\": 175.3,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 159.4,\n \"weight\": 53.2\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 53.4\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 55\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 70.5\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 54.5\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 54.5\n },\n {\n \"gender\": \"female\",\n \"height\": 160.7,\n \"weight\": 55.9\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 59\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 54.5\n },\n {\n \"gender\": \"female\",\n \"height\": 152.4,\n \"weight\": 47.3\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 67.7\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 80.9\n },\n {\n \"gender\": \"female\",\n \"height\": 172.7,\n \"weight\": 70.5\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 60.9\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 54.5\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 59.1\n },\n {\n \"gender\": \"female\",\n \"height\": 161.3,\n \"weight\": 70.5\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 52.7\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 62.7\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 86.3\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 66.4\n },\n {\n \"gender\": \"female\",\n \"height\": 152.4,\n \"weight\": 67.3\n },\n {\n \"gender\": \"female\",\n \"height\": 168.9,\n \"weight\": 63\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 73.6\n },\n {\n \"gender\": \"female\",\n \"height\": 175.2,\n \"weight\": 62.3\n },\n {\n \"gender\": \"female\",\n \"height\": 175.2,\n \"weight\": 57.7\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 55.4\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 104.1\n },\n {\n \"gender\": \"female\",\n \"height\": 174,\n \"weight\": 55.5\n },\n {\n \"gender\": \"female\",\n \"height\": 170.2,\n \"weight\": 77.3\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 80.5\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 64.5\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 72.3\n },\n {\n \"gender\": \"female\",\n \"height\": 167.6,\n \"weight\": 61.4\n },\n {\n \"gender\": \"female\",\n \"height\": 154.9,\n \"weight\": 58.2\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 81.8\n },\n {\n \"gender\": \"female\",\n \"height\": 175.3,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 171.4,\n \"weight\": 53.4\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 54.5\n },\n {\n \"gender\": \"female\",\n \"height\": 165.1,\n \"weight\": 53.6\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 60\n },\n {\n \"gender\": \"female\",\n \"height\": 174,\n \"weight\": 73.6\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 61.4\n },\n {\n \"gender\": \"female\",\n \"height\": 174,\n \"weight\": 55.5\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 161.3,\n \"weight\": 60.9\n },\n {\n \"gender\": \"female\",\n \"height\": 156.2,\n \"weight\": 60\n },\n {\n \"gender\": \"female\",\n \"height\": 149.9,\n \"weight\": 46.8\n },\n {\n \"gender\": \"female\",\n \"height\": 169.5,\n \"weight\": 57.3\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 64.1\n },\n {\n \"gender\": \"female\",\n \"height\": 175.3,\n \"weight\": 63.6\n },\n {\n \"gender\": \"female\",\n \"height\": 169.5,\n \"weight\": 67.3\n },\n {\n \"gender\": \"female\",\n \"height\": 160,\n \"weight\": 75.5\n },\n {\n \"gender\": \"female\",\n \"height\": 172.7,\n \"weight\": 68.2\n },\n {\n \"gender\": \"female\",\n \"height\": 162.6,\n \"weight\": 61.4\n },\n {\n \"gender\": \"female\",\n \"height\": 157.5,\n \"weight\": 76.8\n },\n {\n \"gender\": \"female\",\n \"height\": 176.5,\n \"weight\": 71.8\n },\n {\n \"gender\": \"female\",\n \"height\": 164.4,\n \"weight\": 55.5\n },\n {\n \"gender\": \"female\",\n \"height\": 160.7,\n \"weight\": 48.6\n },\n {\n \"gender\": \"female\",\n \"height\": 174,\n \"weight\": 66.4\n },\n {\n \"gender\": \"female\",\n \"height\": 163.8,\n \"weight\": 67.3\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 65.6\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 71.8\n },\n {\n \"gender\": \"male\",\n \"height\": 193.5,\n \"weight\": 80.7\n },\n {\n \"gender\": \"male\",\n \"height\": 186.5,\n \"weight\": 72.6\n },\n {\n \"gender\": \"male\",\n \"height\": 187.2,\n \"weight\": 78.8\n },\n {\n \"gender\": \"male\",\n \"height\": 181.5,\n \"weight\": 74.8\n },\n {\n \"gender\": \"male\",\n \"height\": 184,\n \"weight\": 86.4\n },\n {\n \"gender\": \"male\",\n \"height\": 184.5,\n \"weight\": 78.4\n },\n {\n \"gender\": \"male\",\n \"height\": 175,\n \"weight\": 62\n },\n {\n \"gender\": \"male\",\n \"height\": 184,\n \"weight\": 81.6\n },\n {\n \"gender\": \"male\",\n \"height\": 180,\n \"weight\": 76.6\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 83.6\n },\n {\n \"gender\": \"male\",\n \"height\": 192,\n \"weight\": 90\n },\n {\n \"gender\": \"male\",\n \"height\": 176,\n \"weight\": 74.6\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 71\n },\n {\n \"gender\": \"male\",\n \"height\": 184,\n \"weight\": 79.6\n },\n {\n \"gender\": \"male\",\n \"height\": 192.7,\n \"weight\": 93.8\n },\n {\n \"gender\": \"male\",\n \"height\": 171.5,\n \"weight\": 70\n },\n {\n \"gender\": \"male\",\n \"height\": 173,\n \"weight\": 72.4\n },\n {\n \"gender\": \"male\",\n \"height\": 176,\n \"weight\": 85.9\n },\n {\n \"gender\": \"male\",\n \"height\": 176,\n \"weight\": 78.8\n },\n {\n \"gender\": \"male\",\n \"height\": 180.5,\n \"weight\": 77.8\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 66.2\n },\n {\n \"gender\": \"male\",\n \"height\": 176,\n \"weight\": 86.4\n },\n {\n \"gender\": \"male\",\n \"height\": 173.5,\n \"weight\": 81.8\n },\n {\n \"gender\": \"male\",\n \"height\": 178,\n \"weight\": 89.6\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 82.8\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 76.4\n },\n {\n \"gender\": \"male\",\n \"height\": 164.5,\n \"weight\": 63.2\n },\n {\n \"gender\": \"male\",\n \"height\": 173,\n \"weight\": 60.9\n },\n {\n \"gender\": \"male\",\n \"height\": 183.5,\n \"weight\": 74.8\n },\n {\n \"gender\": \"male\",\n \"height\": 175.5,\n \"weight\": 70\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 72.4\n },\n {\n \"gender\": \"male\",\n \"height\": 189.2,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 172.8,\n \"weight\": 69.1\n },\n {\n \"gender\": \"male\",\n \"height\": 170,\n \"weight\": 59.5\n },\n {\n \"gender\": \"male\",\n \"height\": 182,\n \"weight\": 67.2\n },\n {\n \"gender\": \"male\",\n \"height\": 170,\n \"weight\": 61.3\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 68.6\n },\n {\n \"gender\": \"male\",\n \"height\": 184.2,\n \"weight\": 80.1\n },\n {\n \"gender\": \"male\",\n \"height\": 186.7,\n \"weight\": 87.8\n },\n {\n \"gender\": \"male\",\n \"height\": 171.4,\n \"weight\": 84.7\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 73.4\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 72.1\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 82.6\n },\n {\n \"gender\": \"male\",\n \"height\": 182.9,\n \"weight\": 88.7\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 177.2,\n \"weight\": 94.1\n },\n {\n \"gender\": \"male\",\n \"height\": 172.1,\n \"weight\": 74.9\n },\n {\n \"gender\": \"male\",\n \"height\": 167,\n \"weight\": 59.1\n },\n {\n \"gender\": \"male\",\n \"height\": 169.5,\n \"weight\": 75.6\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 86.2\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 75.3\n },\n {\n \"gender\": \"male\",\n \"height\": 182.2,\n \"weight\": 87.1\n },\n {\n \"gender\": \"male\",\n \"height\": 164.1,\n \"weight\": 55.2\n },\n {\n \"gender\": \"male\",\n \"height\": 163,\n \"weight\": 57\n },\n {\n \"gender\": \"male\",\n \"height\": 171.5,\n \"weight\": 61.4\n },\n {\n \"gender\": \"male\",\n \"height\": 184.2,\n \"weight\": 76.8\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 86.8\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 72.2\n },\n {\n \"gender\": \"male\",\n \"height\": 177,\n \"weight\": 71.6\n },\n {\n \"gender\": \"male\",\n \"height\": 186,\n \"weight\": 84.8\n },\n {\n \"gender\": \"male\",\n \"height\": 167,\n \"weight\": 68.2\n },\n {\n \"gender\": \"male\",\n \"height\": 171.8,\n \"weight\": 66.1\n },\n {\n \"gender\": \"male\",\n \"height\": 182,\n \"weight\": 72\n },\n {\n \"gender\": \"male\",\n \"height\": 167,\n \"weight\": 64.6\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 74.8\n },\n {\n \"gender\": \"male\",\n \"height\": 164.5,\n \"weight\": 70\n },\n {\n \"gender\": \"male\",\n \"height\": 192,\n \"weight\": 101.6\n },\n {\n \"gender\": \"male\",\n \"height\": 175.5,\n \"weight\": 63.2\n },\n {\n \"gender\": \"male\",\n \"height\": 171.2,\n \"weight\": 79.1\n },\n {\n \"gender\": \"male\",\n \"height\": 181.6,\n \"weight\": 78.9\n },\n {\n \"gender\": \"male\",\n \"height\": 167.4,\n \"weight\": 67.7\n },\n {\n \"gender\": \"male\",\n \"height\": 181.1,\n \"weight\": 66\n },\n {\n \"gender\": \"male\",\n \"height\": 177,\n \"weight\": 68.2\n },\n {\n \"gender\": \"male\",\n \"height\": 174.5,\n \"weight\": 63.9\n },\n {\n \"gender\": \"male\",\n \"height\": 177.5,\n \"weight\": 72\n },\n {\n \"gender\": \"male\",\n \"height\": 170.5,\n \"weight\": 56.8\n },\n {\n \"gender\": \"male\",\n \"height\": 182.4,\n \"weight\": 74.5\n },\n {\n \"gender\": \"male\",\n \"height\": 197.1,\n \"weight\": 90.9\n },\n {\n \"gender\": \"male\",\n \"height\": 180.1,\n \"weight\": 93\n },\n {\n \"gender\": \"male\",\n \"height\": 175.5,\n \"weight\": 80.9\n },\n {\n \"gender\": \"male\",\n \"height\": 180.6,\n \"weight\": 72.7\n },\n {\n \"gender\": \"male\",\n \"height\": 184.4,\n \"weight\": 68\n },\n {\n \"gender\": \"male\",\n \"height\": 175.5,\n \"weight\": 70.9\n },\n {\n \"gender\": \"male\",\n \"height\": 180.6,\n \"weight\": 72.5\n },\n {\n \"gender\": \"male\",\n \"height\": 177,\n \"weight\": 72.5\n },\n {\n \"gender\": \"male\",\n \"height\": 177.1,\n \"weight\": 83.4\n },\n {\n \"gender\": \"male\",\n \"height\": 181.6,\n \"weight\": 75.5\n },\n {\n \"gender\": \"male\",\n \"height\": 176.5,\n \"weight\": 73\n },\n {\n \"gender\": \"male\",\n \"height\": 175,\n \"weight\": 70.2\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 73.4\n },\n {\n \"gender\": \"male\",\n \"height\": 165.1,\n \"weight\": 70.5\n },\n {\n \"gender\": \"male\",\n \"height\": 177,\n \"weight\": 68.9\n },\n {\n \"gender\": \"male\",\n \"height\": 192,\n \"weight\": 102.3\n },\n {\n \"gender\": \"male\",\n \"height\": 176.5,\n \"weight\": 68.4\n },\n {\n \"gender\": \"male\",\n \"height\": 169.4,\n \"weight\": 65.9\n },\n {\n \"gender\": \"male\",\n \"height\": 182.1,\n \"weight\": 75.7\n },\n {\n \"gender\": \"male\",\n \"height\": 179.8,\n \"weight\": 84.5\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 87.7\n },\n {\n \"gender\": \"male\",\n \"height\": 184.9,\n \"weight\": 86.4\n },\n {\n \"gender\": \"male\",\n \"height\": 177.3,\n \"weight\": 73.2\n },\n {\n \"gender\": \"male\",\n \"height\": 167.4,\n \"weight\": 53.9\n },\n {\n \"gender\": \"male\",\n \"height\": 178.1,\n \"weight\": 72\n },\n {\n \"gender\": \"male\",\n \"height\": 168.9,\n \"weight\": 55.5\n },\n {\n \"gender\": \"male\",\n \"height\": 157.2,\n \"weight\": 58.4\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 83.2\n },\n {\n \"gender\": \"male\",\n \"height\": 170.2,\n \"weight\": 72.7\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 64.1\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 72.3\n },\n {\n \"gender\": \"male\",\n \"height\": 165.1,\n \"weight\": 65\n },\n {\n \"gender\": \"male\",\n \"height\": 186.7,\n \"weight\": 86.4\n },\n {\n \"gender\": \"male\",\n \"height\": 165.1,\n \"weight\": 65\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 88.6\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 185.4,\n \"weight\": 66.8\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 75.5\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 93.2\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 82.7\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 58\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 79.5\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 78.6\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 71.8\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 116.4\n },\n {\n \"gender\": \"male\",\n \"height\": 163.8,\n \"weight\": 72.2\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 83.6\n },\n {\n \"gender\": \"male\",\n \"height\": 198.1,\n \"weight\": 85.5\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 90.9\n },\n {\n \"gender\": \"male\",\n \"height\": 166.4,\n \"weight\": 85.9\n },\n {\n \"gender\": \"male\",\n \"height\": 190.5,\n \"weight\": 89.1\n },\n {\n \"gender\": \"male\",\n \"height\": 166.4,\n \"weight\": 75\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 77.7\n },\n {\n \"gender\": \"male\",\n \"height\": 179.7,\n \"weight\": 86.4\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 90.9\n },\n {\n \"gender\": \"male\",\n \"height\": 190.5,\n \"weight\": 73.6\n },\n {\n \"gender\": \"male\",\n \"height\": 185.4,\n \"weight\": 76.4\n },\n {\n \"gender\": \"male\",\n \"height\": 168.9,\n \"weight\": 69.1\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 84.5\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 64.5\n },\n {\n \"gender\": \"male\",\n \"height\": 170.2,\n \"weight\": 69.1\n },\n {\n \"gender\": \"male\",\n \"height\": 190.5,\n \"weight\": 108.6\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 86.4\n },\n {\n \"gender\": \"male\",\n \"height\": 190.5,\n \"weight\": 80.9\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 87.7\n },\n {\n \"gender\": \"male\",\n \"height\": 184.2,\n \"weight\": 94.5\n },\n {\n \"gender\": \"male\",\n \"height\": 176.5,\n \"weight\": 80.2\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 72\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 71.4\n },\n {\n \"gender\": \"male\",\n \"height\": 171.4,\n \"weight\": 72.7\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 76.8\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 63.6\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 80.9\n },\n {\n \"gender\": \"male\",\n \"height\": 182.9,\n \"weight\": 80.9\n },\n {\n \"gender\": \"male\",\n \"height\": 170.2,\n \"weight\": 85.5\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 68.6\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 67.7\n },\n {\n \"gender\": \"male\",\n \"height\": 165.1,\n \"weight\": 66.4\n },\n {\n \"gender\": \"male\",\n \"height\": 185.4,\n \"weight\": 102.3\n },\n {\n \"gender\": \"male\",\n \"height\": 181.6,\n \"weight\": 70.5\n },\n {\n \"gender\": \"male\",\n \"height\": 172.7,\n \"weight\": 95.9\n },\n {\n \"gender\": \"male\",\n \"height\": 190.5,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 179.1,\n \"weight\": 87.3\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 71.8\n },\n {\n \"gender\": \"male\",\n \"height\": 170.2,\n \"weight\": 65.9\n },\n {\n \"gender\": \"male\",\n \"height\": 193,\n \"weight\": 95.9\n },\n {\n \"gender\": \"male\",\n \"height\": 171.4,\n \"weight\": 91.4\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 81.8\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 96.8\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 69.1\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 82.7\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 75.5\n },\n {\n \"gender\": \"male\",\n \"height\": 182.9,\n \"weight\": 79.5\n },\n {\n \"gender\": \"male\",\n \"height\": 176.5,\n \"weight\": 73.6\n },\n {\n \"gender\": \"male\",\n \"height\": 186.7,\n \"weight\": 91.8\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 85.9\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 81.8\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 82.5\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 80.5\n },\n {\n \"gender\": \"male\",\n \"height\": 171.4,\n \"weight\": 70\n },\n {\n \"gender\": \"male\",\n \"height\": 185.4,\n \"weight\": 81.8\n },\n {\n \"gender\": \"male\",\n \"height\": 185.4,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 90.5\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 91.4\n },\n {\n \"gender\": \"male\",\n \"height\": 182.9,\n \"weight\": 89.1\n },\n {\n \"gender\": \"male\",\n \"height\": 176.5,\n \"weight\": 85\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 69.1\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 73.6\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 80.5\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 82.7\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 86.4\n },\n {\n \"gender\": \"male\",\n \"height\": 170.5,\n \"weight\": 67.7\n },\n {\n \"gender\": \"male\",\n \"height\": 179.1,\n \"weight\": 92.7\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 93.6\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 70.9\n },\n {\n \"gender\": \"male\",\n \"height\": 182.9,\n \"weight\": 75\n },\n {\n \"gender\": \"male\",\n \"height\": 170.8,\n \"weight\": 93.2\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 93.2\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 77.7\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 61.4\n },\n {\n \"gender\": \"male\",\n \"height\": 185.4,\n \"weight\": 94.1\n },\n {\n \"gender\": \"male\",\n \"height\": 168.9,\n \"weight\": 75\n },\n {\n \"gender\": \"male\",\n \"height\": 185.4,\n \"weight\": 83.6\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 85.5\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 73.9\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 66.8\n },\n {\n \"gender\": \"male\",\n \"height\": 182.9,\n \"weight\": 87.3\n },\n {\n \"gender\": \"male\",\n \"height\": 160,\n \"weight\": 72.3\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 88.6\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 75.5\n },\n {\n \"gender\": \"male\",\n \"height\": 186.7,\n \"weight\": 101.4\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 91.1\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 67.3\n },\n {\n \"gender\": \"male\",\n \"height\": 175.9,\n \"weight\": 77.7\n },\n {\n \"gender\": \"male\",\n \"height\": 175.3,\n \"weight\": 81.8\n },\n {\n \"gender\": \"male\",\n \"height\": 179.1,\n \"weight\": 75.5\n },\n {\n \"gender\": \"male\",\n \"height\": 181.6,\n \"weight\": 84.5\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 76.6\n },\n {\n \"gender\": \"male\",\n \"height\": 182.9,\n \"weight\": 85\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 102.5\n },\n {\n \"gender\": \"male\",\n \"height\": 184.2,\n \"weight\": 77.3\n },\n {\n \"gender\": \"male\",\n \"height\": 179.1,\n \"weight\": 71.8\n },\n {\n \"gender\": \"male\",\n \"height\": 176.5,\n \"weight\": 87.9\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 94.3\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 70.9\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 64.5\n },\n {\n \"gender\": \"male\",\n \"height\": 170.2,\n \"weight\": 77.3\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 72.3\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 87.3\n },\n {\n \"gender\": \"male\",\n \"height\": 174,\n \"weight\": 80\n },\n {\n \"gender\": \"male\",\n \"height\": 176.5,\n \"weight\": 82.3\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 73.6\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 74.1\n },\n {\n \"gender\": \"male\",\n \"height\": 188,\n \"weight\": 85.9\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 73.2\n },\n {\n \"gender\": \"male\",\n \"height\": 167.6,\n \"weight\": 76.3\n },\n {\n \"gender\": \"male\",\n \"height\": 183,\n \"weight\": 65.9\n },\n {\n \"gender\": \"male\",\n \"height\": 183,\n \"weight\": 90.9\n },\n {\n \"gender\": \"male\",\n \"height\": 179.1,\n \"weight\": 89.1\n },\n {\n \"gender\": \"male\",\n \"height\": 170.2,\n \"weight\": 62.3\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 82.7\n },\n {\n \"gender\": \"male\",\n \"height\": 179.1,\n \"weight\": 79.1\n },\n {\n \"gender\": \"male\",\n \"height\": 190.5,\n \"weight\": 98.2\n },\n {\n \"gender\": \"male\",\n \"height\": 177.8,\n \"weight\": 84.1\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 83.2\n },\n {\n \"gender\": \"male\",\n \"height\": 180.3,\n \"weight\": 83.2\n }\n ],\n },\n encode: { x: 'height', y: 'weight', color: 'gender' },\n },\n { type: 'rangeY', data: [{ y: [54, 72] }], encode: { y: 'y' } },\n ],\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"gender\":\"female\",\"height\":161.2,\"weight\":51.6},\n {\"gender\":\"female\",\"height\":167.5,\"weight\":59},\n {\"gender\":\"female\",\"height\":159.5,\"weight\":49.2},\n {\"gender\":\"female\",\"height\":157,\"weight\":63},\n {\"gender\":\"female\",\"height\":155.8,\"weight\":53.6},\n {\"gender\":\"female\",\"height\":170,\"weight\":59},\n {\"gender\":\"female\",\"height\":159.1,\"weight\":47.6},\n {\"gender\":\"female\",\"height\":166,\"weight\":69.8},\n {\"gender\":\"female\",\"height\":176.2,\"weight\":66.8},\n {\"gender\":\"female\",\"height\":160.2,\"weight\":75.2}\n];\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'point',\n encode: {\n x: 'height',\n y: 'weight',\n color: 'gender',\n },\n },\n {\n type: 'rangeY',\n data: [{ y: 54, y1: 72 }],\n encode: {\n y: 'y',\n y1: 'y1',\n },\n style: {\n fill: 'rgba(255, 215, 0, 0.2)',\n },\n },\n ],\n});\n\nchart.render();", + "duration": 26313, + "retrievedSkillIds": [ + "g2-mark-box-boxplot", + "g2-scale-point", + "g2-mark-point-scatter", + "g2-scale-linear", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1046, + "expectedLength": 39124, + "similarity": 0.6178886099894504, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"gender\":\"female\",\"height\":161.2,\"weight\":51.6},\n {\"gender\":\"female\",\"height\":167.5,\"weight\":59},\n {\"gender\":\"female\",\"height\":159.5,\"weight\":49.2},\n {\"gender\":\"female\",\"height\":157,\"weight\":63},\n {\"gender\":\"female\",\"height\":155.8,\"weight\":53.6},\n {\"gender\":\"female\",\"height\":170,\"weight\":59},\n {\"gender\":\"female\",\"height\":159.1,\"weight\":47.6},\n {\"gender\":\"female\",\"height\":166,\"weight\":69.8},\n {\"gender\":\"female\",\"height\":176.2,\"weight\":66.8},\n {\"gender\":\"female\",\"height\":160.2,\"weight\":75.2}\n];\n\nchart.options({\n type: 'view',\n data,\n children: [\n {\n type: 'point',\n encode: {\n x: 'height',\n y: 'weight',\n color: 'gender',\n },\n },\n {\n type: 'rangeY',\n data: [{ y: 54, y1: 72 }],\n encode: {\n y: 'y',\n y1: 'y1',\n },\n style: {\n fill: 'rgba(255, 215, 0, 0.2)',\n },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "rgba", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "children", + "type", + "encode", + "x", + "y", + "color", + "type", + "data", + "y", + "y1", + "encode", + "y", + "y1", + "style", + "fill" + ], + "stringLiterals": [ + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight", + "gender", + "height", + "weight" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "view.children", + "type.view", + "type.point" + ] + } + } + }, + { + "id": "case-140", + "query": "根据描述绘制图表,使用径向坐标系渲染一个排序后的柱状图,展示各月份的销售数据,颜色根据销售值渐变映射,并在柱子外部显示具体数值标签。参考数据:[{\"month\":\"1月\",\"sales\":38},{\"month\":\"2月\",\"sales\":52},{\"month\":\"3月\",\"sales\":61},{\"month\":\"4月\",\"sales\":45},{\"month\":\"5月\",\"sales\":49},{\"month\":\"6月\",\"sales\":72}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic'\n});\n\nchart.options({\n type: 'interval',\n data: [\n { month: '1月', sales: 38 },\n { month: '2月', sales: 52 },\n { month: '3月', sales: 61 },\n { month: '4月', sales: 45 },\n { month: '5月', sales: 49 },\n { month: '6月', sales: 72 }\n ].sort((a, b) => a.sales - b.sales),\n coordinate: { type: 'radial', innerRadius: 0.3, startAngle: -Math.PI, endAngle: 0 },\n encode: { x: 'month', y: 'sales', color: 'sales' },\n scale: { color: { type: 'sequential', range: ['#e8f1f7', '#1890ff'] }, y: { domain: [0, 80] } },\n labels: [{\n text: 'sales',\n position: 'outside',\n style: { fill: '#333', fontSize: 12 }\n }],\n axis: { y: false, x: { label: { autoRotate: true }, title: false } },\n legend: { color: { position: 'bottom', layout: 'row' } }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { month: '1月', sales: 38 },\n { month: '2月', sales: 52 },\n { month: '3月', sales: 61 },\n { month: '4月', sales: 45 },\n { month: '5月', sales: 49 },\n { month: '6月', sales: 72 },\n ],\n transform: [\n {\n type: 'sortX',\n by: 'y',\n reverse: true,\n },\n ],\n coordinate: {\n type: 'radial',\n innerRadius: 0.2,\n },\n encode: {\n x: 'month',\n y: 'sales',\n color: 'sales',\n },\n scale: {\n color: {\n palette: 'blues',\n },\n },\n labels: [\n {\n text: 'sales',\n position: 'outside',\n transform: [{ type: 'overlapDodgeY' }],\n },\n ],\n style: {\n radius: 4,\n },\n});\n\nchart.render();", + "duration": 13441, + "retrievedSkillIds": [ + "g2-mark-interval-basic", + "g2-mark-rose", + "g2-mark-radial-bar", + "g2-mark-arc-pie", + "g2-transform-sortx" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 824, + "expectedLength": 883, + "similarity": 0.7535393160150442, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { month: '1月', sales: 38 },\n { month: '2月', sales: 52 },\n { month: '3月', sales: 61 },\n { month: '4月', sales: 45 },\n { month: '5月', sales: 49 },\n { month: '6月', sales: 72 },\n ],\n transform: [\n {\n type: 'sortX',\n by: 'y',\n reverse: true,\n },\n ],\n coordinate: {\n type: 'radial',\n innerRadius: 0.2,\n },\n encode: {\n x: 'month',\n y: 'sales',\n color: 'sales',\n },\n scale: {\n color: {\n palette: 'blues',\n },\n },\n labels: [\n {\n text: 'sales',\n position: 'outside',\n transform: [{ type: 'overlapDodgeY' }],\n },\n ],\n style: {\n radius: 4,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "month", + "sales", + "month", + "sales", + "month", + "sales", + "month", + "sales", + "month", + "sales", + "month", + "sales", + "transform", + "type", + "by", + "reverse", + "coordinate", + "type", + "innerRadius", + "encode", + "x", + "y", + "color", + "scale", + "color", + "palette", + "labels", + "text", + "position", + "transform", + "type", + "style", + "radius" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-141", + "query": "根据描述绘制图表,使用词云图展示一系列设计相关术语及其对应的重要性评分,通过字体大小和颜色映射体现数值差异,未启用图例但配置了提示框以显示详细信息。参考数据:[{\"text\":\"数据可视化\",\"value\":98},{\"text\":\"用户体验\",\"value\":92},{\"text\":\"交互设计\",\"value\":86},{\"text\":\"色彩感知\",\"value\":81},{\"text\":\"布局算法\",\"value\":77},{\"text\":\"可读性\",\"value\":73},{\"text\":\"信息密度\",\"value\":68},{\"text\":\"响应式\",\"value\":65},{\"text\":\"语义化\",\"value\":60},{\"text\":\"无障碍\",\"value\":55}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({ container: 'container', autoFit: true });\nchart.options({\n type: 'wordCloud',\n data: [\n { text: '数据可视化', value: 98 },\n { text: '用户体验', value: 92 },\n { text: '交互设计', value: 86 },\n { text: '色彩感知', value: 81 },\n { text: '布局算法', value: 77 },\n { text: '可读性', value: 73 },\n { text: '信息密度', value: 68 },\n { text: '响应式', value: 65 },\n { text: '语义化', value: 60 },\n { text: '无障碍', value: 55 },\n { text: '组件化', value: 50 },\n { text: '性能优化', value: 47 },\n { text: '动画过渡', value: 42 },\n { text: '实时渲染', value: 38 },\n { text: '多端适配', value: 35 }\n ],\n layout: { spiral: 'archimedean', fontSize: [14, 60], padding: 6 },\n encode: { text: 'text', color: 'text' },\n scale: { color: { palette: 'spectral' } },\n style: { fontFamily: 'PingFang SC, Microsoft YaHei' },\n legend: false,\n tooltip: {\n items: [\n { field: 'text', name: '设计术语' },\n { field: 'value', name: '重要性评分' }\n ]\n }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { text: '数据可视化', value: 98 },\n { text: '用户体验', value: 92 },\n { text: '交互设计', value: 86 },\n { text: '色彩感知', value: 81 },\n { text: '布局算法', value: 77 },\n { text: '可读性', value: 73 },\n { text: '信息密度', value: 68 },\n { text: '响应式', value: 65 },\n { text: '语义化', value: 60 },\n { text: '无障碍', value: 55 },\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'wordCloud',\n data,\n encode: {\n text: 'text',\n color: 'value',\n fontSize: {\n field: 'value',\n range: [16, 48],\n },\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'blues',\n },\n },\n layout: {\n spiral: 'archimedean',\n padding: 4,\n },\n style: {\n fontFamily: 'sans-serif',\n fontWeight: 'bold',\n },\n tooltip: {\n title: 'text',\n items: [{ field: 'value', name: '重要性评分' }],\n },\n legend: false,\n});\n\nchart.render();", + "duration": 9159, + "retrievedSkillIds": [ + "g2-mark-wordcloud", + "g2-concept-chart-selection", + "g2-mark-rose", + "g2-mark-interval-basic", + "g2-palette-category20" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 953, + "expectedLength": 975, + "similarity": 0.7718253708907914, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { text: '数据可视化', value: 98 },\n { text: '用户体验', value: 92 },\n { text: '交互设计', value: 86 },\n { text: '色彩感知', value: 81 },\n { text: '布局算法', value: 77 },\n { text: '可读性', value: 73 },\n { text: '信息密度', value: 68 },\n { text: '响应式', value: 65 },\n { text: '语义化', value: 60 },\n { text: '无障碍', value: 55 },\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'wordCloud',\n data,\n encode: {\n text: 'text',\n color: 'value',\n fontSize: {\n field: 'value',\n range: [16, 48],\n },\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'blues',\n },\n },\n layout: {\n spiral: 'archimedean',\n padding: 4,\n },\n style: {\n fontFamily: 'sans-serif',\n fontWeight: 'bold',\n },\n tooltip: {\n title: 'text',\n items: [{ field: 'value', name: '重要性评分' }],\n },\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "text", + "value", + "container", + "width", + "height", + "type", + "encode", + "text", + "color", + "fontSize", + "field", + "range", + "scale", + "color", + "type", + "palette", + "layout", + "spiral", + "padding", + "style", + "fontFamily", + "fontWeight", + "tooltip", + "title", + "items", + "field", + "name", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale" + ] + } + } + }, + { + "id": "case-142", + "query": "根据描述绘制图表,使用 G2 渲染一个箱线图(box plot),展示不同地区数据的五数概括(最小值、下四分位数、中位数、上四分位数、最大值),数据按地区分组,颜色区分区域,关闭图例,启用带统计项的提示框,并自动适应容器宽度。参考数据:\n[{\"x\":\"Oceania\",\"y\":[1,9,16,22,24]},{\"x\":\"East Europe\",\"y\":[1,5,8,12,16]},{\"x\":\"Australia\",\"y\":[1,8,12,19,26]},{\"x\":\"South America\",\"y\":[2,8,12,21,28]},{\"x\":\"North Africa\",\"y\":[1,8,14,18,24]},{\"x\":\"North America\",\"y\":[3,10,17,28,30]},{\"x\":\"West Europe\",\"y\":[1,7,10,17,22]},{\"x\":\"West Africa\",\"y\":[1,6,8,13,16]}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": [\n {\n \"x\": \"Oceania\",\n \"y\": [\n 1,\n 9,\n 16,\n 22,\n 24\n ]\n },\n {\n \"x\": \"East Europe\",\n \"y\": [\n 1,\n 5,\n 8,\n 12,\n 16\n ]\n },\n {\n \"x\": \"Australia\",\n \"y\": [\n 1,\n 8,\n 12,\n 19,\n 26\n ]\n },\n {\n \"x\": \"South America\",\n \"y\": [\n 2,\n 8,\n 12,\n 21,\n 28\n ]\n },\n {\n \"x\": \"North Africa\",\n \"y\": [\n 1,\n 8,\n 14,\n 18,\n 24\n ]\n },\n {\n \"x\": \"North America\",\n \"y\": [\n 3,\n 10,\n 17,\n 28,\n 30\n ]\n },\n {\n \"x\": \"West Europe\",\n \"y\": [\n 1,\n 7,\n 10,\n 17,\n 22\n ]\n },\n {\n \"x\": \"West Africa\",\n \"y\": [\n 1,\n 6,\n 8,\n 13,\n 16\n ]\n }\n ],\n \"encode\": {\n \"x\": \"x\",\n \"y\": \"y\",\n \"color\": \"x\"\n },\n \"scale\": {\n \"x\": {\n \"paddingInner\": 0.6,\n \"paddingOuter\": 0.3\n },\n \"y\": {\n \"zero\": true\n }\n },\n \"legend\": false,\n \"style\": {\n \"stroke\": \"black\"\n },\n \"tooltip\": {\n \"items\": [\n {\n \"name\": \"min\",\n \"channel\": \"y\"\n },\n {\n \"name\": \"q1\",\n \"channel\": \"y1\"\n },\n {\n \"name\": \"q2\",\n \"channel\": \"y2\"\n },\n {\n \"name\": \"q3\",\n \"channel\": \"y3\"\n },\n {\n \"name\": \"max\",\n \"channel\": \"y4\"\n }\n ]\n },\n \"type\": \"box\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n {\"x\":\"Oceania\",\"y\":[1,9,16,22,24]},\n {\"x\":\"East Europe\",\"y\":[1,5,8,12,16]},\n {\"x\":\"Australia\",\"y\":[1,8,12,19,26]},\n {\"x\":\"South America\",\"y\":[2,8,12,21,28]},\n {\"x\":\"North Africa\",\"y\":[1,8,14,18,24]},\n {\"x\":\"North America\",\"y\":[3,10,17,28,30]},\n {\"x\":\"West Europe\",\"y\":[1,7,10,17,22]},\n {\"x\":\"West Africa\",\"y\":[1,6,8,13,16]}\n];\n\nchart.options({\n type: 'box',\n data,\n encode: {\n x: 'x',\n y: 'y',\n color: 'x',\n },\n legend: false,\n tooltip: {\n items: [\n { channel: 'y', name: 'min' },\n { channel: 'y1', name: 'Q1' },\n { channel: 'y2', name: 'median' },\n { channel: 'y3', name: 'Q3' },\n { channel: 'y4', name: 'max' }\n ]\n },\n});\n\nchart.render();", + "duration": 21814, + "retrievedSkillIds": [ + "g2-mark-box-boxplot", + "g2-mark-boxplot", + "g2-mark-partition", + "g2-comp-legend-config", + "g2-scale-point" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 835, + "expectedLength": 2264, + "similarity": 0.6784863804406364, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n {\"x\":\"Oceania\",\"y\":[1,9,16,22,24]},\n {\"x\":\"East Europe\",\"y\":[1,5,8,12,16]},\n {\"x\":\"Australia\",\"y\":[1,8,12,19,26]},\n {\"x\":\"South America\",\"y\":[2,8,12,21,28]},\n {\"x\":\"North Africa\",\"y\":[1,8,14,18,24]},\n {\"x\":\"North America\",\"y\":[3,10,17,28,30]},\n {\"x\":\"West Europe\",\"y\":[1,7,10,17,22]},\n {\"x\":\"West Africa\",\"y\":[1,6,8,13,16]}\n];\n\nchart.options({\n type: 'box',\n data,\n encode: {\n x: 'x',\n y: 'y',\n color: 'x',\n },\n legend: false,\n tooltip: {\n items: [\n { channel: 'y', name: 'min' },\n { channel: 'y1', name: 'Q1' },\n { channel: 'y2', name: 'median' },\n { channel: 'y3', name: 'Q3' },\n { channel: 'y4', name: 'max' }\n ]\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "color", + "legend", + "tooltip", + "items", + "channel", + "name", + "channel", + "name", + "channel", + "name", + "channel", + "name", + "channel", + "name" + ], + "stringLiterals": [ + "x", + "y", + "x", + "y", + "x", + "y", + "x", + "y", + "x", + "y", + "x", + "y", + "x", + "y", + "x", + "y" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode" + ] + } + } + }, + { + "id": "case-143", + "query": "根据描述绘制图表,使用 G2 创建一个径向坐标系(极坐标)的视图,子图表为 interval 类型,数据包含问题名称和对应的百分比值,通过颜色映射 percent 字段,渲染柱状图并添加颜色图例、坐标轴配置及进入动画(波形进入,持续 800ms)。参考数据:\n[{\"question\":\"问题 1\",\"percent\":0.21},{\"question\":\"问题 2\",\"percent\":0.4},{\"question\":\"问题 3\",\"percent\":0.49},{\"question\":\"问题 4\",\"percent\":0.52},{\"question\":\"问题 5\",\"percent\":0.53},{\"question\":\"问题 6\",\"percent\":0.84},{\"question\":\"问题 7\",\"percent\":1},{\"question\":\"问题 8\",\"percent\":1.2}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"coordinate\": {\n \"type\": \"radial\",\n \"innerRadius\": 0.1,\n \"endAngle\": 3.141592653589793\n },\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": [\n {\n \"question\": \"问题 1\",\n \"percent\": 0.21\n },\n {\n \"question\": \"问题 2\",\n \"percent\": 0.4\n },\n {\n \"question\": \"问题 3\",\n \"percent\": 0.49\n },\n {\n \"question\": \"问题 4\",\n \"percent\": 0.52\n },\n {\n \"question\": \"问题 5\",\n \"percent\": 0.53\n },\n {\n \"question\": \"问题 6\",\n \"percent\": 0.84\n },\n {\n \"question\": \"问题 7\",\n \"percent\": 1\n },\n {\n \"question\": \"问题 8\",\n \"percent\": 1.2\n }\n ],\n \"encode\": {\n \"x\": \"question\",\n \"y\": \"percent\",\n \"color\": \"percent\"\n },\n \"style\": {\n \"stroke\": \"white\"\n },\n \"scale\": {\n \"color\": {\n \"range\": \"#BAE7FF-#1890FF-#0050B3\"\n }\n },\n \"axis\": {\n \"y\": {\n \"tickFilter\": (d, i) => i !== 0\n }\n },\n \"legend\": {\n \"color\": {\n \"length\": 400,\n \"position\": \"bottom\",\n \"layout\": {\n \"justifyContent\": \"center\"\n }\n }\n },\n \"animate\": {\n \"enter\": {\n \"type\": \"waveIn\",\n \"duration\": 800\n }\n },\n \"type\": \"interval\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { question: '问题 1', percent: 0.21 },\n { question: '问题 2', percent: 0.4 },\n { question: '问题 3', percent: 0.49 },\n { question: '问题 4', percent: 0.52 },\n { question: '问题 5', percent: 0.53 },\n { question: '问题 6', percent: 0.84 },\n { question: '问题 7', percent: 1 },\n { question: '问题 8', percent: 1.2 },\n ],\n coordinate: {\n type: 'radial',\n innerRadius: 0.2,\n },\n encode: {\n x: 'question',\n y: 'percent',\n color: 'percent',\n },\n scale: {\n color: {\n palette: 'blues',\n },\n },\n legend: {\n color: { position: 'right' },\n },\n axis: {\n x: { title: '问题名称' },\n y: { title: '百分比', labelFormatter: (d) => `${(d * 100).toFixed(0)}%` },\n },\n animate: {\n enter: {\n type: 'waveIn',\n duration: 800,\n },\n },\n});\n\nchart.render();", + "duration": 11727, + "retrievedSkillIds": [ + "g2-mark-interval-basic", + "g2-mark-arc-pie", + "g2-mark-rose", + "g2-mark-radial-bar", + "g2-mark-tree" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 963, + "expectedLength": 1601, + "similarity": 0.5747602839994144, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { question: '问题 1', percent: 0.21 },\n { question: '问题 2', percent: 0.4 },\n { question: '问题 3', percent: 0.49 },\n { question: '问题 4', percent: 0.52 },\n { question: '问题 5', percent: 0.53 },\n { question: '问题 6', percent: 0.84 },\n { question: '问题 7', percent: 1 },\n { question: '问题 8', percent: 1.2 },\n ],\n coordinate: {\n type: 'radial',\n innerRadius: 0.2,\n },\n encode: {\n x: 'question',\n y: 'percent',\n color: 'percent',\n },\n scale: {\n color: {\n palette: 'blues',\n },\n },\n legend: {\n color: { position: 'right' },\n },\n axis: {\n x: { title: '问题名称' },\n y: { title: '百分比', labelFormatter: (d) => `${(d * 100).toFixed(0)}%` },\n },\n animate: {\n enter: {\n type: 'waveIn',\n duration: 800,\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "question", + "percent", + "question", + "percent", + "question", + "percent", + "question", + "percent", + "question", + "percent", + "question", + "percent", + "question", + "percent", + "question", + "percent", + "coordinate", + "type", + "innerRadius", + "encode", + "x", + "y", + "color", + "scale", + "color", + "palette", + "legend", + "color", + "position", + "axis", + "x", + "title", + "y", + "title", + "labelFormatter", + "animate", + "enter", + "type", + "duration" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale", + "type.interval", + "animate" + ] + } + } + }, + { + "id": "case-144", + "query": "根据描述绘制图表,使用打包图展示电商平台各模块的访问量分布情况,通过圆形区域的大小表示数值高低,并根据层级深度进行颜色区分。图表渲染了一个根节点为“电商平台”的层次数据结构,包含首页、商品详情、购物车、订单页和个人中心等子模块及其进一步细分。参考数据:[{\"name\":\"电商平台\",\"value\":100,\"children\":[{\"name\":\"首页\",\"value\":30,\"children\":[{\"name\":\"轮播\",\"value\":8},{\"name\":\"推荐位\",\"value\":12},{\"name\":\"导航\",\"value\":10}]},{\"name\":\"商品详情\",\"value\":25},{\"name\":\"购物车\",\"value\":15},{\"name\":\"订单页\",\"value\":20,\"children\":[{\"name\":\"支付\",\"value\":7},{\"name\":\"列表\",\"value\":8},{\"name\":\"确认\",\"value\":5}]},{\"name\":\"个人中心\",\"value\":10}]}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({\n container: 'container',\n theme: 'classic',\n autoFit: true,\n});\n\nchart.options({\n type: 'pack',\n width: 650,\n height: 650,\n data: {\n value: {\n name: '电商平台',\n value: 100,\n children: [\n { name: '首页', value: 30, children: [\n { name: '轮播', value: 8 }, { name: '推荐位', value: 12 }, { name: '导航', value: 10 }\n ]},\n { name: '商品详情', value: 25 },\n { name: '购物车', value: 15 },\n { name: '订单页', value: 20, children: [\n { name: '支付', value: 7 }, { name: '列表', value: 8 }, { name: '确认', value: 5 }\n ]},\n { name: '个人中心', value: 10 }\n ],\n },\n },\n encode: {\n value: 'value',\n color: 'depth',\n },\n labels: [{\n text: (d) => d.height === 0 ? `${d.data.name}` : '',\n fontSize: (d) => Math.min(12, d.r / 2.5),\n fontWeight: 'bold',\n position: 'inside'\n }],\n\n legend: { color: false },\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '电商平台',\n value: 100,\n children: [\n {\n name: '首页',\n value: 30,\n children: [\n { name: '轮播', value: 8 },\n { name: '推荐位', value: 12 },\n { name: '导航', value: 10 }\n ]\n },\n { name: '商品详情', value: 25 },\n { name: '购物车', value: 15 },\n {\n name: '订单页',\n value: 20,\n children: [\n { name: '支付', value: 7 },\n { name: '列表', value: 8 },\n { name: '确认', value: 5 }\n ]\n },\n { name: '个人中心', value: 10 }\n ]\n};\n\nconst chart = new Chart({ container: 'container', width: 600, height: 600 });\n\nchart.options({\n type: 'pack',\n data: { value: data },\n encode: {\n value: 'value',\n color: (d) => d.depth,\n },\n scale: {\n color: {\n type: 'ordinal',\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A'],\n },\n },\n style: {\n fillOpacity: 0.85,\n stroke: '#fff',\n lineWidth: 1.5,\n },\n labels: [\n {\n text: (d) => {\n if (d.height > 0) return '';\n return `${d.data?.name}\\n${d.value}`;\n },\n position: 'inside',\n fontSize: 11,\n transform: [{ type: 'contrastReverse' }],\n },\n ],\n legend: {\n color: {\n title: '层级深度',\n itemLabelFormatter: (d) => `第${d}层`,\n },\n },\n});\n\nchart.render();", + "duration": 19857, + "retrievedSkillIds": [ + "g2-mark-pack", + "g2-mark-treemap", + "g2-concept-chart-selection", + "g2-mark-tree", + "g2-mark-partition" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1308, + "expectedLength": 930, + "similarity": 0.6862721776191892, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '电商平台',\n value: 100,\n children: [\n {\n name: '首页',\n value: 30,\n children: [\n { name: '轮播', value: 8 },\n { name: '推荐位', value: 12 },\n { name: '导航', value: 10 }\n ]\n },\n { name: '商品详情', value: 25 },\n { name: '购物车', value: 15 },\n {\n name: '订单页',\n value: 20,\n children: [\n { name: '支付', value: 7 },\n { name: '列表', value: 8 },\n { name: '确认', value: 5 }\n ]\n },\n { name: '个人中心', value: 10 }\n ]\n};\n\nconst chart = new Chart({ container: 'container', width: 600, height: 600 });\n\nchart.options({\n type: 'pack',\n data: { value: data },\n encode: {\n value: 'value',\n color: (d) => d.depth,\n },\n scale: {\n color: {\n type: 'ordinal',\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A'],\n },\n },\n style: {\n fillOpacity: 0.85,\n stroke: '#fff',\n lineWidth: 1.5,\n },\n labels: [\n {\n text: (d) => {\n if (d.height > 0) return '';\n return `${d.data?.name}\\n${d.value}`;\n },\n position: 'inside',\n fontSize: 11,\n transform: [{ type: 'contrastReverse' }],\n },\n ],\n legend: {\n color: {\n title: '层级深度',\n itemLabelFormatter: (d) => `第${d}层`,\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "name", + "value", + "children", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "container", + "width", + "height", + "type", + "data", + "value", + "encode", + "value", + "color", + "scale", + "color", + "type", + "range", + "style", + "fillOpacity", + "stroke", + "lineWidth", + "labels", + "text", + "position", + "fontSize", + "transform", + "type", + "legend", + "color", + "title", + "itemLabelFormatter" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "view.children", + "x6.labels" + ] + } + } + }, + { + "id": "case-145", + "query": "根据描述绘制图表,使用 G2 创建一个蜂群图,展示三种鸢尾花品种的萼片长度分布情况,通过不同形状和颜色区分种类,同时根据种类调整线条宽度以增强视觉效果。\n参考数据:[{\"species\":\"Setosa\",\"sepalLength\":4.987234234234234,\"shapeType\":\"cross\"},{\"species\":\"Setosa\",\"sepalLength\":5.234234234234234,\"shapeType\":\"cross\"},{\"species\":\"Setosa\",\"sepalLength\":4.876543210987654,\"shapeType\":\"cross\"},{\"species\":\"Setosa\",\"sepalLength\":5.123456789012345,\"shapeType\":\"cross\"},{\"species\":\"Setosa\",\"sepalLength\":4.654321098765432,\"shapeType\":\"cross\"},{\"species\":\"Setosa\",\"sepalLength\":5.345678901234567,\"shapeType\":\"cross\"},{\"species\":\"Setosa\",\"sepalLength\":4.789012345678901,\"shapeType\":\"cross\"},{\"species\":\"Setosa\",\"sepalLength\":5.432109876543211,\"shapeType\":\"cross\"},{\"species\":\"Setosa\",\"sepalLength\":4.567890123456789,\"shapeType\":\"cross\"},{\"species\":\"Setosa\",\"sepalLength\":5.012345678901234,\"shapeType\":\"cross\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({ container: 'container' });\nconst species = ['Setosa','Versicolor','Virginica'];\nconst data = species.flatMap((s, idx) =>\n Array.from({ length: 50 }, (_, i) => ({\n species: s,\n sepalLength: 4 + Math.random() * 2 + idx,\n shapeType: ['cross','tick','plus'][idx]\n }))\n);\nchart.options({\n type: 'beeswarm',\n data,\n encode: {\n x: 'species',\n y: 'sepalLength',\n color: 'species',\n shape: 'shapeType',\n size: 6\n },\n scale: { y: { nice: true } },\n legend: { shape: false },\n style: { lineWidth: d => d.species === 'Setosa' ? 2 : 1.5 }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 400,\n});\n\nchart.options({\n type: 'point',\n data: [\n {\"species\":\"Setosa\",\"sepalLength\":4.987234234234234,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":5.234234234234234,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":4.876543210987654,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":5.123456789012345,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":4.654321098765432,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":5.345678901234567,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":4.789012345678901,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":5.432109876543211,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":4.567890123456789,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":5.012345678901234,\"shapeType\":\"cross\"},\n {\"species\":\"Versicolor\",\"sepalLength\":5.9,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":6.2,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":5.7,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":6.0,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":5.8,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":6.3,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":5.5,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":6.1,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":5.6,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":6.4,\"shapeType\":\"circle\"},\n {\"species\":\"Virginica\",\"sepalLength\":6.5,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":7.0,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":6.8,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":7.2,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":6.3,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":7.1,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":6.9,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":7.3,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":6.7,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":7.5,\"shapeType\":\"diamond\"}\n ],\n encode: {\n x: 'species',\n y: 'sepalLength',\n color: 'species',\n shape: 'shapeType',\n },\n transform: [\n { type: 'jitter', padding: 0.15 }\n ],\n style: {\n lineWidth: (d) => {\n if (d.species === 'Setosa') return 1;\n if (d.species === 'Versicolor') return 2;\n return 3;\n },\n stroke: '#333',\n fillOpacity: 0.75,\n },\n axis: {\n y: { title: '萼片长度 (cm)' },\n x: { title: '鸢尾花品种' }\n }\n});\n\nchart.render();", + "duration": 29979, + "retrievedSkillIds": [ + "g2-mark-line-basic", + "g2-comp-space-flex", + "g2-mark-beeswarm", + "g2-scale-band", + "g2-mark-link" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2778, + "expectedLength": 604, + "similarity": 0.406923322104045, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 400,\n});\n\nchart.options({\n type: 'point',\n data: [\n {\"species\":\"Setosa\",\"sepalLength\":4.987234234234234,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":5.234234234234234,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":4.876543210987654,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":5.123456789012345,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":4.654321098765432,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":5.345678901234567,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":4.789012345678901,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":5.432109876543211,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":4.567890123456789,\"shapeType\":\"cross\"},\n {\"species\":\"Setosa\",\"sepalLength\":5.012345678901234,\"shapeType\":\"cross\"},\n {\"species\":\"Versicolor\",\"sepalLength\":5.9,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":6.2,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":5.7,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":6.0,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":5.8,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":6.3,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":5.5,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":6.1,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":5.6,\"shapeType\":\"circle\"},\n {\"species\":\"Versicolor\",\"sepalLength\":6.4,\"shapeType\":\"circle\"},\n {\"species\":\"Virginica\",\"sepalLength\":6.5,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":7.0,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":6.8,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":7.2,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":6.3,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":7.1,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":6.9,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":7.3,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":6.7,\"shapeType\":\"diamond\"},\n {\"species\":\"Virginica\",\"sepalLength\":7.5,\"shapeType\":\"diamond\"}\n ],\n encode: {\n x: 'species',\n y: 'sepalLength',\n color: 'species',\n shape: 'shapeType',\n },\n transform: [\n { type: 'jitter', padding: 0.15 }\n ],\n style: {\n lineWidth: (d) => {\n if (d.species === 'Setosa') return 1;\n if (d.species === 'Versicolor') return 2;\n return 3;\n },\n stroke: '#333',\n fillOpacity: 0.75,\n },\n axis: {\n y: { title: '萼片长度 (cm)' },\n x: { title: '鸢尾花品种' }\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "encode", + "x", + "y", + "color", + "shape", + "transform", + "type", + "padding", + "style", + "lineWidth", + "stroke", + "fillOpacity", + "axis", + "y", + "title", + "x", + "title" + ], + "stringLiterals": [ + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType", + "species", + "sepalLength", + "shapeType" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "type.point" + ] + } + } + }, + { + "id": "case-146", + "query": "根据描述绘制图表,使用 G2 创建一个弦图(chord diagram),展示多个国家之间的能源贸易流动关系,每条记录包含来源国、目标国和能源量数值,启用元素高亮交互和自定义工具提示。\n参考数据:{\"value\":{\"links\":[{\"source\":\"沙特阿拉伯\",\"target\":\"中国\",\"value\":850},{\"source\":\"沙特阿拉伯\",\"target\":\"美国\",\"value\":620},{\"source\":\"俄罗斯\",\"target\":\"中国\",\"value\":730},{\"source\":\"俄罗斯\",\"target\":\"德国\",\"value\":480},{\"source\":\"美国\",\"target\":\"中国\",\"value\":350},{\"source\":\"美国\",\"target\":\"日本\",\"value\":420},{\"source\":\"中国\",\"target\":\"印度\",\"value\":280},{\"source\":\"中国\",\"target\":\"巴西\",\"value\":190}]}}", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'chord',\n autoFit: true,\n data: {\n value: {\n links: [\n { source: '沙特阿拉伯', target: '中国', value: 850 },\n { source: '沙特阿拉伯', target: '美国', value: 620 },\n { source: '俄罗斯', target: '中国', value: 730 },\n { source: '俄罗斯', target: '德国', value: 480 },\n { source: '美国', target: '中国', value: 350 },\n { source: '美国', target: '日本', value: 420 },\n { source: '中国', target: '印度', value: 280 },\n { source: '中国', target: '巴西', value: 190 },\n ],\n },\n },\n layout: { nodeWidthRatio: 0.06 },\n scale: {\n color: {\n type: 'ordinal',\n range: ['#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4', '#FFEAA7', '#DDA0DD'],\n },\n },\n style: {\n labelFontSize: 12,\n labelFontWeight: 'bold',\n labelFill: '#333',\n linkFillOpacity: 0.65,\n },\n tooltip: {\n items: [\n { field: 'source', name: '出口国' },\n { field: 'target', name: '进口国' },\n { field: 'value', name: '能源量(百万吨)' },\n ],\n },\n interaction: [\n {\n type: 'elementHighlight',\n background: true,\n },\n ],\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 600,\n});\n\n// 准备数据:从 links 中提取唯一节点\nconst links = [\n { source: '沙特阿拉伯', target: '中国', value: 850 },\n { source: '沙特阿拉伯', target: '美国', value: 620 },\n { source: '俄罗斯', target: '中国', value: 730 },\n { source: '俄罗斯', target: '德国', value: 480 },\n { source: '美国', target: '中国', value: 350 },\n { source: '美国', target: '日本', value: 420 },\n { source: '中国', target: '印度', value: 280 },\n { source: '中国', target: '巴西', value: 190 }\n];\n\nconst nodeKeys = new Set();\nlinks.forEach(link => {\n nodeKeys.add(link.source);\n nodeKeys.add(link.target);\n});\nconst nodes = Array.from(nodeKeys).map(key => ({ key }));\n\nchart.options({\n type: 'chord',\n data: {\n value: { nodes, links }\n },\n encode: {\n source: 'source',\n target: 'target',\n value: 'value',\n },\n style: {\n node: { opacity: 1, lineWidth: 1 },\n link: { opacity: 0.6, lineWidth: 1 },\n },\n nodeLabels: [\n { \n text: 'key', \n position: 'outside',\n fontSize: 12,\n fontWeight: 'bold'\n }\n ],\n tooltip: {\n node: {\n title: '国家',\n items: [(d) => ({ name: d.key, value: d.value })],\n },\n link: {\n title: '能源贸易',\n items: [(d) => ({ name: `${d.source} → ${d.target}`, value: d.value })],\n },\n },\n state: {\n active: {\n link: { opacity: 1, stroke: '#000', lineWidth: 2 },\n node: { stroke: '#000', lineWidth: 2 },\n },\n inactive: {\n link: { opacity: 0.1 },\n node: { opacity: 0.3 },\n },\n },\n});\n\nchart.render();", + "duration": 24959, + "retrievedSkillIds": [ + "g2-mark-chord", + "g2-mark-sankey", + "g2-mark-arc-donut", + "g2-coord-theta", + "g2-mark-area-stacked" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1570, + "expectedLength": 1212, + "similarity": 0.6166148850213369, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 800,\n height: 600,\n});\n\n// 准备数据:从 links 中提取唯一节点\nconst links = [\n { source: '沙特阿拉伯', target: '中国', value: 850 },\n { source: '沙特阿拉伯', target: '美国', value: 620 },\n { source: '俄罗斯', target: '中国', value: 730 },\n { source: '俄罗斯', target: '德国', value: 480 },\n { source: '美国', target: '中国', value: 350 },\n { source: '美国', target: '日本', value: 420 },\n { source: '中国', target: '印度', value: 280 },\n { source: '中国', target: '巴西', value: 190 }\n];\n\nconst nodeKeys = new Set();\nlinks.forEach(link => {\n nodeKeys.add(link.source);\n nodeKeys.add(link.target);\n});\nconst nodes = Array.from(nodeKeys).map(key => ({ key }));\n\nchart.options({\n type: 'chord',\n data: {\n value: { nodes, links }\n },\n encode: {\n source: 'source',\n target: 'target',\n value: 'value',\n },\n style: {\n node: { opacity: 1, lineWidth: 1 },\n link: { opacity: 0.6, lineWidth: 1 },\n },\n nodeLabels: [\n { \n text: 'key', \n position: 'outside',\n fontSize: 12,\n fontWeight: 'bold'\n }\n ],\n tooltip: {\n node: {\n title: '国家',\n items: [(d) => ({ name: d.key, value: d.value })],\n },\n link: {\n title: '能源贸易',\n items: [(d) => ({ name: `${d.source} → ${d.target}`, value: d.value })],\n },\n },\n state: {\n active: {\n link: { opacity: 1, stroke: '#000', lineWidth: 2 },\n node: { stroke: '#000', lineWidth: 2 },\n },\n inactive: {\n link: { opacity: 0.1 },\n node: { opacity: 0.3 },\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "Set", + "forEach", + "add", + "add", + "map", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "source", + "target", + "value", + "type", + "data", + "value", + "encode", + "source", + "target", + "value", + "style", + "node", + "opacity", + "lineWidth", + "link", + "opacity", + "lineWidth", + "nodeLabels", + "text", + "position", + "fontSize", + "fontWeight", + "tooltip", + "node", + "title", + "items", + "name", + "value", + "link", + "title", + "items", + "name", + "value", + "state", + "active", + "link", + "opacity", + "stroke", + "lineWidth", + "node", + "stroke", + "lineWidth", + "inactive", + "link", + "opacity", + "node", + "opacity" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-147", + "query": "根据描述绘制图表,使用箱线图展示多组实验的速度数据分布情况,每个实验包含多次运行记录,通过箱线图呈现各组数据的统计特征,包括中位数、四分位数及异常值等。参考数据:[{\"Expt\":1,\"Run\":1,\"Speed\":850},{\"Expt\":1,\"Run\":2,\"Speed\":740},{\"Expt\":1,\"Run\":3,\"Speed\":900},{\"Expt\":1,\"Run\":4,\"Speed\":1070},{\"Expt\":1,\"Run\":5,\"Speed\":930},{\"Expt\":1,\"Run\":6,\"Speed\":850},{\"Expt\":1,\"Run\":7,\"Speed\":950},{\"Expt\":1,\"Run\":8,\"Speed\":980},{\"Expt\":1,\"Run\":9,\"Speed\":980},{\"Expt\":1,\"Run\":10,\"Speed\":880}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'boxplot',\n data: {\n type: 'inline',\n value: [\n {\n \"Expt\": 1,\n \"Run\": 1,\n \"Speed\": 850\n },\n {\n \"Expt\": 1,\n \"Run\": 2,\n \"Speed\": 740\n },\n {\n \"Expt\": 1,\n \"Run\": 3,\n \"Speed\": 900\n },\n {\n \"Expt\": 1,\n \"Run\": 4,\n \"Speed\": 1070\n },\n {\n \"Expt\": 1,\n \"Run\": 5,\n \"Speed\": 930\n },\n {\n \"Expt\": 1,\n \"Run\": 6,\n \"Speed\": 850\n },\n {\n \"Expt\": 1,\n \"Run\": 7,\n \"Speed\": 950\n },\n {\n \"Expt\": 1,\n \"Run\": 8,\n \"Speed\": 980\n },\n {\n \"Expt\": 1,\n \"Run\": 9,\n \"Speed\": 980\n },\n {\n \"Expt\": 1,\n \"Run\": 10,\n \"Speed\": 880\n },\n {\n \"Expt\": 1,\n \"Run\": 11,\n \"Speed\": 1000\n },\n {\n \"Expt\": 1,\n \"Run\": 12,\n \"Speed\": 980\n },\n {\n \"Expt\": 1,\n \"Run\": 13,\n \"Speed\": 930\n },\n {\n \"Expt\": 1,\n \"Run\": 14,\n \"Speed\": 650\n },\n {\n \"Expt\": 1,\n \"Run\": 15,\n \"Speed\": 760\n },\n {\n \"Expt\": 1,\n \"Run\": 16,\n \"Speed\": 810\n },\n {\n \"Expt\": 1,\n \"Run\": 17,\n \"Speed\": 1000\n },\n {\n \"Expt\": 1,\n \"Run\": 18,\n \"Speed\": 1000\n },\n {\n \"Expt\": 1,\n \"Run\": 19,\n \"Speed\": 960\n },\n {\n \"Expt\": 1,\n \"Run\": 20,\n \"Speed\": 960\n },\n {\n \"Expt\": 2,\n \"Run\": 1,\n \"Speed\": 960\n },\n {\n \"Expt\": 2,\n \"Run\": 2,\n \"Speed\": 940\n },\n {\n \"Expt\": 2,\n \"Run\": 3,\n \"Speed\": 960\n },\n {\n \"Expt\": 2,\n \"Run\": 4,\n \"Speed\": 940\n },\n {\n \"Expt\": 2,\n \"Run\": 5,\n \"Speed\": 880\n },\n {\n \"Expt\": 2,\n \"Run\": 6,\n \"Speed\": 800\n },\n {\n \"Expt\": 2,\n \"Run\": 7,\n \"Speed\": 850\n },\n {\n \"Expt\": 2,\n \"Run\": 8,\n \"Speed\": 880\n },\n {\n \"Expt\": 2,\n \"Run\": 9,\n \"Speed\": 900\n },\n {\n \"Expt\": 2,\n \"Run\": 10,\n \"Speed\": 840\n },\n {\n \"Expt\": 2,\n \"Run\": 11,\n \"Speed\": 830\n },\n {\n \"Expt\": 2,\n \"Run\": 12,\n \"Speed\": 790\n },\n {\n \"Expt\": 2,\n \"Run\": 13,\n \"Speed\": 810\n },\n {\n \"Expt\": 2,\n \"Run\": 14,\n \"Speed\": 880\n },\n {\n \"Expt\": 2,\n \"Run\": 15,\n \"Speed\": 880\n },\n {\n \"Expt\": 2,\n \"Run\": 16,\n \"Speed\": 830\n },\n {\n \"Expt\": 2,\n \"Run\": 17,\n \"Speed\": 800\n },\n {\n \"Expt\": 2,\n \"Run\": 18,\n \"Speed\": 790\n },\n {\n \"Expt\": 2,\n \"Run\": 19,\n \"Speed\": 760\n },\n {\n \"Expt\": 2,\n \"Run\": 20,\n \"Speed\": 800\n },\n {\n \"Expt\": 3,\n \"Run\": 1,\n \"Speed\": 880\n },\n {\n \"Expt\": 3,\n \"Run\": 2,\n \"Speed\": 880\n },\n {\n \"Expt\": 3,\n \"Run\": 3,\n \"Speed\": 880\n },\n {\n \"Expt\": 3,\n \"Run\": 4,\n \"Speed\": 860\n },\n {\n \"Expt\": 3,\n \"Run\": 5,\n \"Speed\": 720\n },\n {\n \"Expt\": 3,\n \"Run\": 6,\n \"Speed\": 720\n },\n {\n \"Expt\": 3,\n \"Run\": 7,\n \"Speed\": 620\n },\n {\n \"Expt\": 3,\n \"Run\": 8,\n \"Speed\": 860\n },\n {\n \"Expt\": 3,\n \"Run\": 9,\n \"Speed\": 970\n },\n {\n \"Expt\": 3,\n \"Run\": 10,\n \"Speed\": 950\n },\n {\n \"Expt\": 3,\n \"Run\": 11,\n \"Speed\": 880\n },\n {\n \"Expt\": 3,\n \"Run\": 12,\n \"Speed\": 910\n },\n {\n \"Expt\": 3,\n \"Run\": 13,\n \"Speed\": 850\n },\n {\n \"Expt\": 3,\n \"Run\": 14,\n \"Speed\": 870\n },\n {\n \"Expt\": 3,\n \"Run\": 15,\n \"Speed\": 840\n },\n {\n \"Expt\": 3,\n \"Run\": 16,\n \"Speed\": 840\n },\n {\n \"Expt\": 3,\n \"Run\": 17,\n \"Speed\": 850\n },\n {\n \"Expt\": 3,\n \"Run\": 18,\n \"Speed\": 840\n },\n {\n \"Expt\": 3,\n \"Run\": 19,\n \"Speed\": 840\n },\n {\n \"Expt\": 3,\n \"Run\": 20,\n \"Speed\": 840\n },\n {\n \"Expt\": 4,\n \"Run\": 1,\n \"Speed\": 890\n },\n {\n \"Expt\": 4,\n \"Run\": 2,\n \"Speed\": 810\n },\n {\n \"Expt\": 4,\n \"Run\": 3,\n \"Speed\": 810\n },\n {\n \"Expt\": 4,\n \"Run\": 4,\n \"Speed\": 820\n },\n {\n \"Expt\": 4,\n \"Run\": 5,\n \"Speed\": 800\n },\n {\n \"Expt\": 4,\n \"Run\": 6,\n \"Speed\": 770\n },\n {\n \"Expt\": 4,\n \"Run\": 7,\n \"Speed\": 760\n },\n {\n \"Expt\": 4,\n \"Run\": 8,\n \"Speed\": 740\n },\n {\n \"Expt\": 4,\n \"Run\": 9,\n \"Speed\": 750\n },\n {\n \"Expt\": 4,\n \"Run\": 10,\n \"Speed\": 760\n },\n {\n \"Expt\": 4,\n \"Run\": 11,\n \"Speed\": 910\n },\n {\n \"Expt\": 4,\n \"Run\": 12,\n \"Speed\": 920\n },\n {\n \"Expt\": 4,\n \"Run\": 13,\n \"Speed\": 890\n },\n {\n \"Expt\": 4,\n \"Run\": 14,\n \"Speed\": 860\n },\n {\n \"Expt\": 4,\n \"Run\": 15,\n \"Speed\": 880\n },\n {\n \"Expt\": 4,\n \"Run\": 16,\n \"Speed\": 720\n },\n {\n \"Expt\": 4,\n \"Run\": 17,\n \"Speed\": 840\n },\n {\n \"Expt\": 4,\n \"Run\": 18,\n \"Speed\": 850\n },\n {\n \"Expt\": 4,\n \"Run\": 19,\n \"Speed\": 850\n },\n {\n \"Expt\": 4,\n \"Run\": 20,\n \"Speed\": 780\n },\n {\n \"Expt\": 5,\n \"Run\": 1,\n \"Speed\": 890\n },\n {\n \"Expt\": 5,\n \"Run\": 2,\n \"Speed\": 840\n },\n {\n \"Expt\": 5,\n \"Run\": 3,\n \"Speed\": 780\n },\n {\n \"Expt\": 5,\n \"Run\": 4,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 5,\n \"Speed\": 760\n },\n {\n \"Expt\": 5,\n \"Run\": 6,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 7,\n \"Speed\": 790\n },\n {\n \"Expt\": 5,\n \"Run\": 8,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 9,\n \"Speed\": 820\n },\n {\n \"Expt\": 5,\n \"Run\": 10,\n \"Speed\": 850\n },\n {\n \"Expt\": 5,\n \"Run\": 11,\n \"Speed\": 870\n },\n {\n \"Expt\": 5,\n \"Run\": 12,\n \"Speed\": 870\n },\n {\n \"Expt\": 5,\n \"Run\": 13,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 14,\n \"Speed\": 740\n },\n {\n \"Expt\": 5,\n \"Run\": 15,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 16,\n \"Speed\": 940\n },\n {\n \"Expt\": 5,\n \"Run\": 17,\n \"Speed\": 950\n },\n {\n \"Expt\": 5,\n \"Run\": 18,\n \"Speed\": 800\n },\n {\n \"Expt\": 5,\n \"Run\": 19,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 20,\n \"Speed\": 870\n }\n ],\n },\n encode: {\n x: 'Expt',\n y: 'Speed',\n },\n scale: {\n x: {\n paddingInner: 0.1, // 较小的间距,箱体更宽\n paddingOuter: 0.05,\n },\n },\n style: {\n boxFill: '#4e79a7',\n boxStroke: '#2f4b7c',\n pointFill: '#e15759',\n pointStroke: '#c42e32',\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nchart.options({\n type: 'boxplot',\n data: [\n { Expt: 1, Run: 1, Speed: 850 },\n { Expt: 1, Run: 2, Speed: 740 },\n { Expt: 1, Run: 3, Speed: 900 },\n { Expt: 1, Run: 4, Speed: 1070 },\n { Expt: 1, Run: 5, Speed: 930 },\n { Expt: 1, Run: 6, Speed: 850 },\n { Expt: 1, Run: 7, Speed: 950 },\n { Expt: 1, Run: 8, Speed: 980 },\n { Expt: 1, Run: 9, Speed: 980 },\n { Expt: 1, Run: 10, Speed: 880 },\n { Expt: 2, Run: 1, Speed: 800 },\n { Expt: 2, Run: 2, Speed: 820 },\n { Expt: 2, Run: 3, Speed: 790 },\n { Expt: 2, Run: 4, Speed: 850 },\n { Expt: 2, Run: 5, Speed: 880 },\n { Expt: 2, Run: 6, Speed: 840 },\n { Expt: 2, Run: 7, Speed: 860 },\n { Expt: 2, Run: 8, Speed: 830 },\n { Expt: 2, Run: 9, Speed: 810 },\n { Expt: 2, Run: 10, Speed: 890 },\n { Expt: 3, Run: 1, Speed: 750 },\n { Expt: 3, Run: 2, Speed: 780 },\n { Expt: 3, Run: 3, Speed: 760 },\n { Expt: 3, Run: 4, Speed: 740 },\n { Expt: 3, Run: 5, Speed: 770 },\n { Expt: 3, Run: 6, Speed: 790 },\n { Expt: 3, Run: 7, Speed: 720 },\n { Expt: 3, Run: 8, Speed: 800 },\n { Expt: 3, Run: 9, Speed: 810 },\n { Expt: 3, Run: 10, Speed: 765 },\n ],\n encode: {\n x: 'Expt',\n y: 'Speed',\n color: 'Expt',\n },\n axis: {\n x: { title: '实验组 (Expt)' },\n y: { title: '速度 (Speed)' },\n },\n legend: {\n color: { title: '实验组' },\n },\n});\n\nchart.render();", + "duration": 17248, + "retrievedSkillIds": [ + "g2-mark-boxplot", + "g2-mark-box-boxplot", + "g2-mark-distribution-curve", + "g2-mark-violin", + "g2-mark-histogram" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1500, + "expectedLength": 6522, + "similarity": 0.6856037506630392, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nchart.options({\n type: 'boxplot',\n data: [\n { Expt: 1, Run: 1, Speed: 850 },\n { Expt: 1, Run: 2, Speed: 740 },\n { Expt: 1, Run: 3, Speed: 900 },\n { Expt: 1, Run: 4, Speed: 1070 },\n { Expt: 1, Run: 5, Speed: 930 },\n { Expt: 1, Run: 6, Speed: 850 },\n { Expt: 1, Run: 7, Speed: 950 },\n { Expt: 1, Run: 8, Speed: 980 },\n { Expt: 1, Run: 9, Speed: 980 },\n { Expt: 1, Run: 10, Speed: 880 },\n { Expt: 2, Run: 1, Speed: 800 },\n { Expt: 2, Run: 2, Speed: 820 },\n { Expt: 2, Run: 3, Speed: 790 },\n { Expt: 2, Run: 4, Speed: 850 },\n { Expt: 2, Run: 5, Speed: 880 },\n { Expt: 2, Run: 6, Speed: 840 },\n { Expt: 2, Run: 7, Speed: 860 },\n { Expt: 2, Run: 8, Speed: 830 },\n { Expt: 2, Run: 9, Speed: 810 },\n { Expt: 2, Run: 10, Speed: 890 },\n { Expt: 3, Run: 1, Speed: 750 },\n { Expt: 3, Run: 2, Speed: 780 },\n { Expt: 3, Run: 3, Speed: 760 },\n { Expt: 3, Run: 4, Speed: 740 },\n { Expt: 3, Run: 5, Speed: 770 },\n { Expt: 3, Run: 6, Speed: 790 },\n { Expt: 3, Run: 7, Speed: 720 },\n { Expt: 3, Run: 8, Speed: 800 },\n { Expt: 3, Run: 9, Speed: 810 },\n { Expt: 3, Run: 10, Speed: 765 },\n ],\n encode: {\n x: 'Expt',\n y: 'Speed',\n color: 'Expt',\n },\n axis: {\n x: { title: '实验组 (Expt)' },\n y: { title: '速度 (Speed)' },\n },\n legend: {\n color: { title: '实验组' },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "encode", + "x", + "y", + "color", + "axis", + "x", + "title", + "y", + "title", + "legend", + "color", + "title" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode" + ] + } + } + }, + { + "id": "case-148", + "query": "根据描述绘制图表,创建一个词云图,使用150个包含'text'和'value'字段的对象作为数据源,其中文本为'词1'到'词150',值为20到99之间的随机整数;通过矩形螺旋布局渲染词云,设置字体大小范围、间距、字体族、透明度、描边等样式,关闭坐标轴和图例,配置工具提示显示词条名称和对应的随机频次值,最后调用render方法渲染图表。参考数据:\n[{\"text\":\"词1\",\"value\":92},{\"text\":\"词2\",\"value\":65},{\"text\":\"词3\",\"value\":28},{\"text\":\"词4\",\"value\":81},{\"text\":\"词5\",\"value\":42},{\"text\":\"词6\",\"value\":88},{\"text\":\"词7\",\"value\":38},{\"text\":\"词8\",\"value\":55},{\"text\":\"词9\",\"value\":70},{\"text\":\"词10\",\"value\":26}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({ container: 'container', width: 600, height: 600 });\nchart.options({\n type: 'wordCloud',\n data: Array.from({ length: 150 }, (_, i) => ({\n text: `词${i + 1}`,\n value: Math.floor(20 + Math.random() * 80)\n })),\n layout: {\n spiral: 'rectangular',\n fontSize: [10, 40],\n padding: [6, 8, 10, 12]\n },\n encode: { color: 'text', size: 'value' },\n style: { fontFamily: 'SimSun', opacity: 0.9, stroke: '#ffffff', lineWidth: 1 },\n axis: false,\n legend: false,\n tooltip: {\n items: [{ field: 'text', name: '词条' }, { field: 'value', name: '随机频次' }]\n }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = Array.from({ length: 150 }, (_, i) => ({\n text: `词${i + 1}`,\n value: Math.floor(Math.random() * (99 - 20 + 1)) + 20\n}));\n\nconst chart = new Chart({ container: 'container', autoFit: true, height: 500 });\n\nchart.options({\n type: 'wordCloud',\n data,\n encode: {\n text: 'text',\n color: 'text',\n fontSize: {\n field: 'value',\n range: [14, 56],\n },\n },\n layout: {\n spiral: 'rectangular',\n padding: 4,\n },\n style: {\n fontFamily: 'Impact, sans-serif',\n fontWeight: 'bold',\n fillOpacity: 0.85,\n stroke: '#333',\n lineWidth: 1,\n },\n axis: false,\n legend: false,\n tooltip: {\n items: [\n { field: 'text', name: '词条名称' },\n { field: 'value', name: '出现频次' },\n ],\n },\n});\n\nchart.render();", + "duration": 7422, + "retrievedSkillIds": [ + "g2-mark-wordcloud", + "g2-mark-partition", + "g2-scale-linear", + "g2-scale-sequential", + "g2-mark-tree" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 789, + "expectedLength": 608, + "similarity": 0.7602765208647562, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = Array.from({ length: 150 }, (_, i) => ({\n text: `词${i + 1}`,\n value: Math.floor(Math.random() * (99 - 20 + 1)) + 20\n}));\n\nconst chart = new Chart({ container: 'container', autoFit: true, height: 500 });\n\nchart.options({\n type: 'wordCloud',\n data,\n encode: {\n text: 'text',\n color: 'text',\n fontSize: {\n field: 'value',\n range: [14, 56],\n },\n },\n layout: {\n spiral: 'rectangular',\n padding: 4,\n },\n style: {\n fontFamily: 'Impact, sans-serif',\n fontWeight: 'bold',\n fillOpacity: 0.85,\n stroke: '#333',\n lineWidth: 1,\n },\n axis: false,\n legend: false,\n tooltip: {\n items: [\n { field: 'text', name: '词条名称' },\n { field: 'value', name: '出现频次' },\n ],\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "floor", + "random", + "Chart", + "options", + "render" + ], + "objectKeys": [ + "length", + "text", + "value", + "container", + "autoFit", + "height", + "type", + "encode", + "text", + "color", + "fontSize", + "field", + "range", + "layout", + "spiral", + "padding", + "style", + "fontFamily", + "fontWeight", + "fillOpacity", + "stroke", + "lineWidth", + "axis", + "legend", + "tooltip", + "items", + "field", + "name", + "field", + "name" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode" + ] + } + } + }, + { + "id": "case-149", + "query": "根据描述绘制图表,使用G2创建一个极坐标折线图,对比'华为 Mate'和'中兴 Grand Memo'在五个性能维度(易用性、功能、拍照、跑分、续航)上的得分表现。数据按性能指标分组,颜色区分设备类型,Y轴范围0-100,启用交互提示和网格背景样式。参考数据:\n[{\"performance\":\"易用性\",\"type\":\"华为 Mate\",\"score\":80},{\"performance\":\"功能\",\"type\":\"华为 Mate\",\"score\":90},{\"performance\":\"拍照\",\"type\":\"华为 Mate\",\"score\":80},{\"performance\":\"跑分\",\"type\":\"华为 Mate\",\"score\":70},{\"performance\":\"续航\",\"type\":\"华为 Mate\",\"score\":90},{\"performance\":\"易用性\",\"type\":\"中兴 Grand Memo\",\"score\":70},{\"performance\":\"功能\",\"type\":\"中兴 Grand Memo\",\"score\":82},{\"performance\":\"拍照\",\"type\":\"中兴 Grand Memo\",\"score\":81},{\"performance\":\"跑分\",\"type\":\"中兴 Grand Memo\",\"score\":82},{\"performance\":\"续航\",\"type\":\"中兴 Grand Memo\",\"score\":78}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'line',\n coordinate: {\n type: 'polar',\n },\n autoFit: true,\n data: [\n { performance: '易用性', type: '华为 Mate', score: 80 },\n { performance: '功能', type: '华为 Mate', score: 90 },\n { performance: '拍照', type: '华为 Mate', score: 80 },\n { performance: '跑分', type: '华为 Mate', score: 70 },\n { performance: '续航', type: '华为 Mate', score: 90 },\n { performance: '易用性', type: '中兴 Grand Memo', score: 70 },\n { performance: '功能', type: '中兴 Grand Memo', score: 82 },\n { performance: '拍照', type: '中兴 Grand Memo', score: 81 },\n { performance: '跑分', type: '中兴 Grand Memo', score: 82 },\n { performance: '续航', type: '中兴 Grand Memo', score: 78 },\n ],\n encode: { x: 'performance', y: 'score', color: 'type' },\n scale: {\n x: { padding: 0.5, align: 0 },\n y: {\n domainMin: 0,\n domainMax: 100,\n tickCount: 5,\n label: false,\n },\n },\n style: {\n fillOpacity: 0.5,\n lineWidth: 2,\n },\n axis: {\n x: { grid: true, tick: false, gridLineDash: [0, 0] },\n y: {\n tick: false,\n grid: true,\n title: false,\n zIndex: 1,\n gridLineDash: [0, 0],\n gridAreaFill: (_dataum, index, _data) => {\n return index % 2 === 1 ? 'rgba(0, 0, 0, 0.04)' : '';\n },\n },\n },\n interaction: {\n tooltip: { crosshairsLineDash: [4, 4] },\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'view',\n data: [\n { performance: '易用性', type: '华为 Mate', score: 80 },\n { performance: '功能', type: '华为 Mate', score: 90 },\n { performance: '拍照', type: '华为 Mate', score: 80 },\n { performance: '跑分', type: '华为 Mate', score: 70 },\n { performance: '续航', type: '华为 Mate', score: 90 },\n { performance: '易用性', type: '中兴 Grand Memo', score: 70 },\n { performance: '功能', type: '中兴 Grand Memo', score: 82 },\n { performance: '拍照', type: '中兴 Grand Memo', score: 81 },\n { performance: '跑分', type: '中兴 Grand Memo', score: 82 },\n { performance: '续航', type: '中兴 Grand Memo', score: 78 },\n ],\n coordinate: { type: 'polar' },\n scale: {\n x: { domain: ['易用性', '功能', '拍照', '跑分', '续航'] },\n y: { domain: [0, 100], nice: true },\n },\n axis: {\n x: { grid: true, title: false },\n y: { grid: true, tickCount: 5 },\n },\n children: [\n {\n type: 'line',\n encode: {\n x: 'performance',\n y: 'score',\n color: 'type',\n },\n style: {\n lineWidth: 2,\n },\n },\n {\n type: 'point',\n encode: {\n x: 'performance',\n y: 'score',\n color: 'type',\n shape: 'circle',\n },\n style: {\n r: 4,\n },\n },\n ],\n tooltip: {\n items: [\n { field: 'type', name: '设备' },\n { field: 'score', name: '得分' },\n ],\n },\n legend: {\n color: { position: 'bottom' },\n },\n});\n\nchart.render();", + "duration": 13061, + "retrievedSkillIds": [ + "g2-scale-linear", + "g2-mark-line-basic", + "g2-mark-interval-basic", + "g2-scale-point", + "g2-mark-density" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1552, + "expectedLength": 1459, + "similarity": 0.8067325878784274, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'view',\n data: [\n { performance: '易用性', type: '华为 Mate', score: 80 },\n { performance: '功能', type: '华为 Mate', score: 90 },\n { performance: '拍照', type: '华为 Mate', score: 80 },\n { performance: '跑分', type: '华为 Mate', score: 70 },\n { performance: '续航', type: '华为 Mate', score: 90 },\n { performance: '易用性', type: '中兴 Grand Memo', score: 70 },\n { performance: '功能', type: '中兴 Grand Memo', score: 82 },\n { performance: '拍照', type: '中兴 Grand Memo', score: 81 },\n { performance: '跑分', type: '中兴 Grand Memo', score: 82 },\n { performance: '续航', type: '中兴 Grand Memo', score: 78 },\n ],\n coordinate: { type: 'polar' },\n scale: {\n x: { domain: ['易用性', '功能', '拍照', '跑分', '续航'] },\n y: { domain: [0, 100], nice: true },\n },\n axis: {\n x: { grid: true, title: false },\n y: { grid: true, tickCount: 5 },\n },\n children: [\n {\n type: 'line',\n encode: {\n x: 'performance',\n y: 'score',\n color: 'type',\n },\n style: {\n lineWidth: 2,\n },\n },\n {\n type: 'point',\n encode: {\n x: 'performance',\n y: 'score',\n color: 'type',\n shape: 'circle',\n },\n style: {\n r: 4,\n },\n },\n ],\n tooltip: {\n items: [\n { field: 'type', name: '设备' },\n { field: 'score', name: '得分' },\n ],\n },\n legend: {\n color: { position: 'bottom' },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "performance", + "type", + "score", + "performance", + "type", + "score", + "performance", + "type", + "score", + "performance", + "type", + "score", + "performance", + "type", + "score", + "performance", + "type", + "score", + "performance", + "type", + "score", + "performance", + "type", + "score", + "performance", + "type", + "score", + "performance", + "type", + "score", + "coordinate", + "type", + "scale", + "x", + "domain", + "y", + "domain", + "nice", + "axis", + "x", + "grid", + "title", + "y", + "grid", + "tickCount", + "children", + "type", + "encode", + "x", + "y", + "color", + "style", + "lineWidth", + "type", + "encode", + "x", + "y", + "color", + "shape", + "style", + "r", + "tooltip", + "items", + "field", + "name", + "field", + "name", + "legend", + "color", + "position" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale", + "view.children", + "type.view", + "type.line", + "type.point", + "x6.shape.circle" + ] + } + } + }, + { + "id": "case-150", + "query": "根据描述绘制图表,使用 G2 创建一个组合图表,展示时间序列上的股票价格(开盘、收盘、最高、最低)与情绪指数的联动关系。图表包含 K 线图(通过 link 表示高低区间、interval 表示开盘收盘柱体)和一条独立的情绪指数折线图(使用右侧 y 轴),支持 brushX 交互进行横向区域选择。颜色根据涨跌动态区分。参考数据:\n[{\"date\":\"2024-01-01\",\"open\":100,\"close\":110,\"high\":115,\"low\":95,\"sentiment\":0.7},{\"date\":\"2024-01-02\",\"open\":110,\"close\":105,\"high\":112,\"low\":100,\"sentiment\":-0.3},{\"date\":\"2024-01-03\",\"open\":105,\"close\":108,\"high\":109,\"low\":102,\"sentiment\":0.2}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { date: '2024-01-01', open: 100, close: 110, high: 115, low: 95, sentiment: 0.7 },\n { date: '2024-01-02', open: 110, close: 105, high: 112, low: 100, sentiment: -0.3 },\n { date: '2024-01-03', open: 105, close: 108, high: 109, low: 102, sentiment: 0.2 },\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'date',\n color: d => d.close >= d.open ? '上涨' : '下跌'\n },\n scale: {\n color: {\n domain: ['上涨', '下跌'],\n range: ['#e41a1c', '#4daf4a']\n },\n x: { compare: (a, b) => new Date(a).getTime() - new Date(b).getTime() }\n },\n children: [\n {\n type: 'link',\n encode: { y: ['low', 'high'] },\n style: { lineWidth: 1 }\n },\n {\n type: 'interval',\n encode: { y: ['open', 'close'] },\n style: { fillOpacity: 1, stroke: '#333', lineWidth: 1 },\n axis: { y: { title: '价格' } }\n },\n {\n type: 'line',\n data: data.map(d => ({ date: d.date, value: d.sentiment })),\n encode: { x: 'date', y: 'value', color: '#ff7f00' },\n scale: { y: { independent: true, nice: true, domain: [-1, 1] } },\n axis: { y: { title: '情绪指数', position: 'right', grid: null } },\n style: { lineWidth: 2, stroke: '#ff7f00' },\n tooltip: { items: [{ field: 'value', name: '情绪指数' }] }\n }\n ],\n interaction: [{ type: 'brushXFilter' }]\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"date\":\"2024-01-01\",\"open\":100,\"close\":110,\"high\":115,\"low\":95,\"sentiment\":0.7},\n {\"date\":\"2024-01-02\",\"open\":110,\"close\":105,\"high\":112,\"low\":100,\"sentiment\":-0.3},\n {\"date\":\"2024-01-03\",\"open\":105,\"close\":108,\"high\":109,\"low\":102,\"sentiment\":0.2}\n];\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'date',\n },\n interaction: [{ type: 'brushX' }],\n children: [\n {\n type: 'link',\n encode: {\n y: 'low',\n y1: 'high',\n color: (d) => d.open > d.close ? '下跌' : '上涨',\n },\n scale: {\n color: { domain: ['下跌', '上涨'], range: ['#4daf4a', '#e41a1c'] },\n },\n },\n {\n type: 'interval',\n encode: {\n y: 'open',\n y1: 'close',\n color: (d) => d.open > d.close ? '下跌' : '上涨',\n },\n scale: {\n color: { domain: ['下跌', '上涨'], range: ['#4daf4a', '#e41a1c'] },\n },\n style: { fillOpacity: 1 },\n },\n {\n type: 'line',\n encode: {\n y: 'sentiment',\n },\n scale: {\n y: { key: 'sentiment', independent: true },\n },\n axis: {\n y: { position: 'right', title: '情绪指数' },\n },\n style: {\n stroke: '#1890ff',\n lineWidth: 2,\n },\n },\n ],\n});\n\nchart.render();", + "duration": 23964, + "retrievedSkillIds": [ + "g2-mark-k-chart", + "g2-mark-line-basic", + "g2-mark-line-multi", + "g2-mark-rangex", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1364, + "expectedLength": 1463, + "similarity": 0.6845842416692619, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"date\":\"2024-01-01\",\"open\":100,\"close\":110,\"high\":115,\"low\":95,\"sentiment\":0.7},\n {\"date\":\"2024-01-02\",\"open\":110,\"close\":105,\"high\":112,\"low\":100,\"sentiment\":-0.3},\n {\"date\":\"2024-01-03\",\"open\":105,\"close\":108,\"high\":109,\"low\":102,\"sentiment\":0.2}\n];\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'date',\n },\n interaction: [{ type: 'brushX' }],\n children: [\n {\n type: 'link',\n encode: {\n y: 'low',\n y1: 'high',\n color: (d) => d.open > d.close ? '下跌' : '上涨',\n },\n scale: {\n color: { domain: ['下跌', '上涨'], range: ['#4daf4a', '#e41a1c'] },\n },\n },\n {\n type: 'interval',\n encode: {\n y: 'open',\n y1: 'close',\n color: (d) => d.open > d.close ? '下跌' : '上涨',\n },\n scale: {\n color: { domain: ['下跌', '上涨'], range: ['#4daf4a', '#e41a1c'] },\n },\n style: { fillOpacity: 1 },\n },\n {\n type: 'line',\n encode: {\n y: 'sentiment',\n },\n scale: {\n y: { key: 'sentiment', independent: true },\n },\n axis: {\n y: { position: 'right', title: '情绪指数' },\n },\n style: {\n stroke: '#1890ff',\n lineWidth: 2,\n },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "encode", + "x", + "interaction", + "type", + "children", + "type", + "encode", + "y", + "y1", + "color", + "scale", + "color", + "domain", + "range", + "type", + "encode", + "y", + "y1", + "color", + "scale", + "color", + "domain", + "range", + "style", + "fillOpacity", + "type", + "encode", + "y", + "scale", + "y", + "key", + "independent", + "axis", + "y", + "position", + "title", + "style", + "stroke", + "lineWidth" + ], + "stringLiterals": [ + "date", + "open", + "close", + "high", + "low", + "sentiment", + "date", + "open", + "close", + "high", + "low", + "sentiment", + "date", + "open", + "close", + "high", + "low", + "sentiment" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "view.children", + "type.view", + "type.interval", + "type.line", + "interaction" + ] + } + } + }, + { + "id": "case-151", + "query": "根据描述绘制图表,使用 G2 创建一个横向的条形图,展示不同项目阶段中各项任务的时间周期。每个任务以条形显示其起止时间,并根据所属阶段进行颜色区分,用于可视化项目进度安排。参考数据:[{\"phase\":\"设计\",\"task\":\"架构设计\",\"start\":0,\"end\":7},{\"phase\":\"设计\",\"task\":\"UI定稿\",\"start\":5,\"end\":10},{\"phase\":\"开发\",\"task\":\"核心模块\",\"start\":8,\"end\":20},{\"phase\":\"开发\",\"task\":\"API集成\",\"start\":12,\"end\":25},{\"phase\":\"测试\",\"task\":\"单元测试\",\"start\":18,\"end\":26},{\"phase\":\"上线\",\"task\":\"灰度发布\",\"start\":24,\"end\":28}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'view',\n autoFit: true,\n children: [\n {\n type: 'interval',\n data: [\n { phase: '设计', task: '架构设计', start: 0, end: 7 },\n { phase: '设计', task: 'UI定稿', start: 5, end: 10 },\n { phase: '开发', task: '核心模块', start: 8, end: 20 },\n { phase: '开发', task: 'API集成', start: 12, end: 25 },\n { phase: '测试', task: '单元测试', start: 18, end: 26 },\n { phase: '上线', task: '灰度发布', start: 24, end: 28 },\n ],\n encode: {\n x: 'task',\n y: 'start',\n y1: 'end',\n color: 'phase'\n },\n coordinate: { transform: [{ type: 'transpose' }] },\n style: { radius: 4, fillOpacity: 0.8, columnWidthRatio: 0.5 }\n }\n ],\n scale: { y: { type: 'linear', tickCount: 6 } },\n legend: {\n color: {\n position: 'right',\n layout: {\n justifyContent: 'center'\n }\n }\n },\n axis: {\n x: { title: '任务与负责人' },\n y: { title: '项目周期(周)' }\n }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { phase: '设计', task: '架构设计', start: 0, end: 7 },\n { phase: '设计', task: 'UI定稿', start: 5, end: 10 },\n { phase: '开发', task: '核心模块', start: 8, end: 20 },\n { phase: '开发', task: 'API集成', start: 12, end: 25 },\n { phase: '测试', task: '单元测试', start: 18, end: 26 },\n { phase: '上线', task: '灰度发布', start: 24, end: 28 },\n ],\n encode: {\n x: 'task',\n y: 'start',\n y1: 'end',\n color: 'phase',\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n axis: {\n x: { title: '任务' },\n y: { title: '时间周期' },\n },\n legend: {\n color: { title: '项目阶段' },\n },\n});\n\nchart.render();", + "duration": 5731, + "retrievedSkillIds": [ + "g2-mark-gantt", + "g2-comp-slider", + "g2-scale-time", + "g2-interaction-element-point-move", + "g2-coord-helix" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 778, + "expectedLength": 1080, + "similarity": 0.9092198581560282, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { phase: '设计', task: '架构设计', start: 0, end: 7 },\n { phase: '设计', task: 'UI定稿', start: 5, end: 10 },\n { phase: '开发', task: '核心模块', start: 8, end: 20 },\n { phase: '开发', task: 'API集成', start: 12, end: 25 },\n { phase: '测试', task: '单元测试', start: 18, end: 26 },\n { phase: '上线', task: '灰度发布', start: 24, end: 28 },\n ],\n encode: {\n x: 'task',\n y: 'start',\n y1: 'end',\n color: 'phase',\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n axis: {\n x: { title: '任务' },\n y: { title: '时间周期' },\n },\n legend: {\n color: { title: '项目阶段' },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "phase", + "task", + "start", + "end", + "phase", + "task", + "start", + "end", + "phase", + "task", + "start", + "end", + "phase", + "task", + "start", + "end", + "phase", + "task", + "start", + "end", + "phase", + "task", + "start", + "end", + "encode", + "x", + "y", + "y1", + "color", + "coordinate", + "transform", + "type", + "axis", + "x", + "title", + "y", + "title", + "legend", + "color", + "title" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval" + ] + } + } + }, + { + "id": "case-152", + "query": "根据描述绘制图表,使用极坐标系展示多组数据在不同项目上的得分情况,通过平滑面积图和线条图展现两组数据的分布与趋势。参考数据:[{\"item\":\"Design\",\"type\":\"a\",\"score\":70},{\"item\":\"Design\",\"type\":\"b\",\"score\":30},{\"item\":\"Development\",\"type\":\"a\",\"score\":60},{\"item\":\"Development\",\"type\":\"b\",\"score\":70},{\"item\":\"Marketing\",\"type\":\"a\",\"score\":50},{\"item\":\"Marketing\",\"type\":\"b\",\"score\":60},{\"item\":\"Users\",\"type\":\"a\",\"score\":40},{\"item\":\"Users\",\"type\":\"b\",\"score\":50},{\"item\":\"Test\",\"type\":\"a\",\"score\":60},{\"item\":\"Test\",\"type\":\"b\",\"score\":70}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'view',\n autoFit: true,\n data: [\n { item: 'Design', type: 'a', score: 70 },\n { item: 'Design', type: 'b', score: 30 },\n { item: 'Development', type: 'a', score: 60 },\n { item: 'Development', type: 'b', score: 70 },\n { item: 'Marketing', type: 'a', score: 50 },\n { item: 'Marketing', type: 'b', score: 60 },\n { item: 'Users', type: 'a', score: 40 },\n { item: 'Users', type: 'b', score: 50 },\n { item: 'Test', type: 'a', score: 60 },\n { item: 'Test', type: 'b', score: 70 },\n { item: 'Language', type: 'a', score: 70 },\n { item: 'Language', type: 'b', score: 50 },\n { item: 'Technology', type: 'a', score: 50 },\n { item: 'Technology', type: 'b', score: 40 },\n { item: 'Support', type: 'a', score: 30 },\n { item: 'Support', type: 'b', score: 40 },\n { item: 'Sales', type: 'a', score: 60 },\n { item: 'Sales', type: 'b', score: 40 },\n { item: 'UX', type: 'a', score: 50 },\n { item: 'UX', type: 'b', score: 60 },\n ],\n scale: { x: { padding: 0.5, align: 0 }, y: { tickCount: 5 } },\n coordinate: { type: 'polar' },\n axis: { x: { grid: true }, y: { zIndex: 1, title: false } },\n interaction: { tooltip: { crosshairsLineDash: [4, 4] } },\n children: [\n {\n type: 'area',\n encode: { x: 'item', y: 'score', color: 'type', shape: 'smooth' },\n scale: { y: { domainMax: 80 } },\n style: { fillOpacity: 0.5 },\n },\n {\n type: 'line',\n encode: { x: 'item', y: 'score', color: 'type', shape: 'smooth' },\n style: { lineWidth: 2 },\n },\n ],\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'view',\n data: [\n {\"item\":\"Design\",\"type\":\"a\",\"score\":70},\n {\"item\":\"Design\",\"type\":\"b\",\"score\":30},\n {\"item\":\"Development\",\"type\":\"a\",\"score\":60},\n {\"item\":\"Development\",\"type\":\"b\",\"score\":70},\n {\"item\":\"Marketing\",\"type\":\"a\",\"score\":50},\n {\"item\":\"Marketing\",\"type\":\"b\",\"score\":60},\n {\"item\":\"Users\",\"type\":\"a\",\"score\":40},\n {\"item\":\"Users\",\"type\":\"b\",\"score\":50},\n {\"item\":\"Test\",\"type\":\"a\",\"score\":60},\n {\"item\":\"Test\",\"type\":\"b\",\"score\":70}\n ],\n coordinate: { type: 'polar' },\n children: [\n {\n type: 'area',\n encode: {\n x: 'item',\n y: 'score',\n color: 'type',\n shape: 'smooth',\n },\n style: {\n fillOpacity: 0.4,\n },\n },\n {\n type: 'line',\n encode: {\n x: 'item',\n y: 'score',\n color: 'type',\n shape: 'smooth',\n },\n style: {\n lineWidth: 2,\n },\n },\n ],\n});\n\nchart.render();", + "duration": 17173, + "retrievedSkillIds": [ + "g2-concept-chart-selection", + "g2-mark-area-basic", + "g2-mark-area-stacked", + "g2-comp-space-flex", + "g2-mark-line-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1088, + "expectedLength": 1667, + "similarity": 0.7877560926281727, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'view',\n data: [\n {\"item\":\"Design\",\"type\":\"a\",\"score\":70},\n {\"item\":\"Design\",\"type\":\"b\",\"score\":30},\n {\"item\":\"Development\",\"type\":\"a\",\"score\":60},\n {\"item\":\"Development\",\"type\":\"b\",\"score\":70},\n {\"item\":\"Marketing\",\"type\":\"a\",\"score\":50},\n {\"item\":\"Marketing\",\"type\":\"b\",\"score\":60},\n {\"item\":\"Users\",\"type\":\"a\",\"score\":40},\n {\"item\":\"Users\",\"type\":\"b\",\"score\":50},\n {\"item\":\"Test\",\"type\":\"a\",\"score\":60},\n {\"item\":\"Test\",\"type\":\"b\",\"score\":70}\n ],\n coordinate: { type: 'polar' },\n children: [\n {\n type: 'area',\n encode: {\n x: 'item',\n y: 'score',\n color: 'type',\n shape: 'smooth',\n },\n style: {\n fillOpacity: 0.4,\n },\n },\n {\n type: 'line',\n encode: {\n x: 'item',\n y: 'score',\n color: 'type',\n shape: 'smooth',\n },\n style: {\n lineWidth: 2,\n },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "coordinate", + "type", + "children", + "type", + "encode", + "x", + "y", + "color", + "shape", + "style", + "fillOpacity", + "type", + "encode", + "x", + "y", + "color", + "shape", + "style", + "lineWidth" + ], + "stringLiterals": [ + "item", + "type", + "score", + "item", + "type", + "score", + "item", + "type", + "score", + "item", + "type", + "score", + "item", + "type", + "score", + "item", + "type", + "score", + "item", + "type", + "score", + "item", + "type", + "score", + "item", + "type", + "score", + "item", + "type", + "score" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "view.children", + "type.view", + "type.line" + ] + } + } + }, + { + "id": "case-153", + "query": "根据描述绘制图表,使用提供的数据绘制K线图,展示股票价格的变化情况,包括开盘价、收盘价、最高价和最低价,根据收盘价与开盘价的关系对颜色进行编码,并添加了提示信息。参考数据:[{\"date\":\"2024-01-01\",\"open\":100,\"close\":105,\"high\":110,\"low\":98},{\"date\":\"2024-01-02\",\"open\":105,\"close\":103,\"high\":107,\"low\":99},{\"date\":\"2024-01-03\",\"open\":103,\"close\":108,\"high\":109,\"low\":101},{\"date\":\"2024-01-04\",\"open\":108,\"close\":104,\"high\":111,\"low\":102}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const data = [\n { date: '2024-01-01', open: 100, close: 105, high: 110, low: 98 },\n { date: '2024-01-02', open: 105, close: 103, high: 107, low: 99 },\n { date: '2024-01-03', open: 103, close: 108, high: 109, low: 101 },\n { date: '2024-01-04', open: 108, close: 104, high: 111, low: 102 },\n];\n\nconst chart = new Chart({ container: 'container', autoFit: true });\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'date',\n color: (d) => (d.close > d.open ? '上涨' : d.close < d.open ? '下跌' : '平盘')\n },\n scale: {\n color: {\n domain: ['上涨', '下跌', '平盘'],\n range: ['#e41a1c', '#4daf4a', '#999999']\n },\n },\n children: [\n { type: 'link', encode: { y: ['low', 'high'] }, style: { lineWidth: 1.2 } },\n {\n type: 'interval',\n encode: { y: ['open', 'close'] },\n style: { fillOpacity: 1, stroke: (d) => (d.open === d.close ? '#333' : void 0) }\n }\n ],\n axis: { y: { title: '价格(元)' }, x: { labelAutoRotate: true } },\n tooltip: {\n items: [\n { field: 'open', name: '开盘' },\n { field: 'close', name: '收盘' },\n { field: 'high', name: '最高' },\n { field: 'low', name: '最低' }\n ]\n }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"date\":\"2024-01-01\",\"open\":100,\"close\":105,\"high\":110,\"low\":98},\n {\"date\":\"2024-01-02\",\"open\":105,\"close\":103,\"high\":107,\"low\":99},\n {\"date\":\"2024-01-03\",\"open\":103,\"close\":108,\"high\":109,\"low\":101},\n {\"date\":\"2024-01-04\",\"open\":108,\"close\":104,\"high\":111,\"low\":102}\n];\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'date',\n color: (d) => (d.close > d.open ? '上涨' : '下跌'),\n },\n scale: {\n color: { domain: ['下跌', '上涨'], range: ['#4daf4a', '#e41a1c'] },\n },\n tooltip: {\n items: [\n { field: 'open', name: '开盘价' },\n { field: 'close', name: '收盘价' },\n { field: 'high', name: '最高价' },\n { field: 'low', name: '最低价' },\n ],\n },\n children: [\n {\n type: 'link',\n encode: { y: ['low', 'high'] },\n },\n {\n type: 'interval',\n encode: { y: ['open', 'close'] },\n style: { fillOpacity: 1 },\n },\n ],\n});\n\nchart.render();", + "duration": 16671, + "retrievedSkillIds": [ + "g2-mark-k-chart", + "g2-mark-line-multi", + "g2-mark-line-basic", + "g2-mark-bullet", + "g2-mark-contourline" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1019, + "expectedLength": 1161, + "similarity": 0.7126651929163346, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nconst data = [\n {\"date\":\"2024-01-01\",\"open\":100,\"close\":105,\"high\":110,\"low\":98},\n {\"date\":\"2024-01-02\",\"open\":105,\"close\":103,\"high\":107,\"low\":99},\n {\"date\":\"2024-01-03\",\"open\":103,\"close\":108,\"high\":109,\"low\":101},\n {\"date\":\"2024-01-04\",\"open\":108,\"close\":104,\"high\":111,\"low\":102}\n];\n\nchart.options({\n type: 'view',\n data,\n encode: {\n x: 'date',\n color: (d) => (d.close > d.open ? '上涨' : '下跌'),\n },\n scale: {\n color: { domain: ['下跌', '上涨'], range: ['#4daf4a', '#e41a1c'] },\n },\n tooltip: {\n items: [\n { field: 'open', name: '开盘价' },\n { field: 'close', name: '收盘价' },\n { field: 'high', name: '最高价' },\n { field: 'low', name: '最低价' },\n ],\n },\n children: [\n {\n type: 'link',\n encode: { y: ['low', 'high'] },\n },\n {\n type: 'interval',\n encode: { y: ['open', 'close'] },\n style: { fillOpacity: 1 },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "encode", + "x", + "color", + "scale", + "color", + "domain", + "range", + "tooltip", + "items", + "field", + "name", + "field", + "name", + "field", + "name", + "field", + "name", + "children", + "type", + "encode", + "y", + "type", + "encode", + "y", + "style", + "fillOpacity" + ], + "stringLiterals": [ + "date", + "open", + "close", + "high", + "low", + "date", + "open", + "close", + "high", + "low", + "date", + "open", + "close", + "high", + "low", + "date", + "open", + "close", + "high", + "low" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "view.children", + "type.view", + "type.interval" + ] + } + } + }, + { + "id": "case-154", + "query": "根据描述绘制图表,使用 G2 绘制一个水波图,展示数值占比情况,样式配置包括波浪形状、渐变填充、背景色、边框距离等,并在图表中央显示文本内容及样式。参考数据:[]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'liquid',\n data: 0.55,\n style: {\n shape: 'rect',\n fill: 'l(0) 0:#fff7e6 1:#ffa940',\n backgroundFill: '#fefefe',\n outlineBorder: 3,\n outlineDistance: 6,\n waveLength: 100,\n waveCount: 6,\n contentText: '进行中\\n55%',\n contentFill: '#333',\n contentFontSize: 20,\n contentFontWeight: 'normal',\n contentTextAlign: 'center',\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container', width: 400, height: 400 });\n\nchart.options({\n type: 'liquid',\n data: 0.65,\n style: {\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n fill: 'linear-gradient(180deg, #5B8FF9 0%, #5AD8A6 100%)',\n fillOpacity: 0.85,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 32,\n fontWeight: 'bold',\n fill: '#fff',\n formatter: (v) => `${(v * 100).toFixed(0)}%`,\n },\n },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "duration": 9613, + "retrievedSkillIds": [ + "g2-mark-liquid", + "g2-comp-legend-config", + "g2-mark-interval-basic", + "g2-mark-arc-donut", + "g2-mark-area-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 618, + "expectedLength": 510, + "similarity": 0.5691456582633053, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container', width: 400, height: 400 });\n\nchart.options({\n type: 'liquid',\n data: 0.65,\n style: {\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n fill: 'linear-gradient(180deg, #5B8FF9 0%, #5AD8A6 100%)',\n fillOpacity: 0.85,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 32,\n fontWeight: 'bold',\n fill: '#fff',\n formatter: (v) => `${(v * 100).toFixed(0)}%`,\n },\n },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "gradient", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "style", + "outlineBorder", + "outlineDistance", + "waveLength", + "fill", + "fillOpacity", + "background", + "fill", + "text", + "style", + "fontSize", + "fontWeight", + "fill", + "formatter", + "axis", + "legend", + "tooltip" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "x6.background" + ] + } + } + }, + { + "id": "case-155", + "query": "根据描述绘制图表,使用 G2 创建一个直方图,对300个随机生成的数值进行分箱统计(15个区间),显示每个区间内的数据计数,并根据计数值设置不同颜色(大于30为红色,否则为灰色),启用元素高亮交互。\n参考数据:\n[{\"value\":42.31},{\"value\":12.45},{\"value\":87.63},{\"value\":5.21},{\"value\":63.89},{\"value\":30.12},{\"value\":9.87},{\"value\":76.44},{\"value\":23.56},{\"value\":55.01}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst data = Array.from({ length: 300 }, () => ({\n value: Math.random() ** 2 * 100\n}));\n\nconst chart = new Chart({ container: 'container', autoFit: true });\nchart.options({\n type: 'rect',\n data: data,\n encode: { x: 'value', y: 'count' },\n transform: [{ type: 'binX', y: 'count', thresholds: 15 }],\n scale: { y: { nice: true } },\n axis: { x: { title: '测量值' } },\n style: {\n fill: (d) => d.value > 30 ? '#F66D6D' : '#CED4DA',\n stroke: '#333',\n lineWidth: 0.5\n },\n interaction: { elementHighlight:true }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\n// 生成300个随机数值(0-100之间)\nconst data = Array.from({ length: 300 }, () => ({\n value: Math.random() * 100,\n}));\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'value',\n y: 'count',\n color: (d) => d.y > 30 ? 'high' : 'low',\n },\n transform: [\n {\n type: 'binX',\n y: 'count',\n thresholds: 15,\n },\n ],\n scale: {\n color: {\n domain: ['low', 'high'],\n range: ['#999999', '#ff4d4f'],\n },\n },\n style: {\n inset: 0.5,\n },\n interaction: {\n elementHighlight: true,\n },\n});\n\nchart.render();", + "duration": 17030, + "retrievedSkillIds": [ + "g2-transform-binx", + "g2-mark-histogram", + "g2-mark-box-boxplot", + "g2-palette-category10", + "g2-palette-category20" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 670, + "expectedLength": 573, + "similarity": 0.824659034374926, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\n// 生成300个随机数值(0-100之间)\nconst data = Array.from({ length: 300 }, () => ({\n value: Math.random() * 100,\n}));\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n x: 'value',\n y: 'count',\n color: (d) => d.y > 30 ? 'high' : 'low',\n },\n transform: [\n {\n type: 'binX',\n y: 'count',\n thresholds: 15,\n },\n ],\n scale: {\n color: {\n domain: ['low', 'high'],\n range: ['#999999', '#ff4d4f'],\n },\n },\n style: {\n inset: 0.5,\n },\n interaction: {\n elementHighlight: true,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "random", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "length", + "value", + "type", + "encode", + "x", + "y", + "color", + "transform", + "type", + "y", + "thresholds", + "scale", + "color", + "domain", + "range", + "style", + "inset", + "interaction", + "elementHighlight" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "type.interval", + "interaction" + ] + } + } + }, + { + "id": "case-156", + "query": "根据描述绘制图表,使用 G2 创建一个类型为 'interval' 的图表,配置极坐标(theta),对 Y 轴进行堆叠(stackY),以 'sold' 为数值字段,'genre' 为颜色分类字段,渲染一个堆叠的极坐标柱状图(通常表现为环形图),展示不同游戏类型的销量分布。参考数据:\n[{\"genre\":\"Sports\",\"sold\":275},{\"genre\":\"Strategy\",\"sold\":115},{\"genre\":\"Action\",\"sold\":120},{\"genre\":\"Shooter\",\"sold\":350},{\"genre\":\"Other\",\"sold\":150}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nchart.options({\n type: 'interval',\n data: [\n { genre: 'Sports', sold: 275 },\n { genre: 'Strategy', sold: 115 },\n { genre: 'Action', sold: 120 },\n { genre: 'Shooter', sold: 350 },\n { genre: 'Other', sold: 150 },\n ],\n labels: [{\n text: (d, i, data) => {\n const total = data.reduce((acc, curr) => acc + curr.sold, 0);\n const percent = ((d.sold / total) * 100).toFixed(2);\n return `${percent}%`;\n },\n }],\n encode: { y: 'sold', color: 'genre' },\n coordinate: { type: 'theta' },\n transform: [{ type: 'stackY' }],\n style: {\n stroke: '#fff',\n lineWidth: 5\n }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"genre\":\"Sports\",\"sold\":275},\n {\"genre\":\"Strategy\",\"sold\":115},\n {\"genre\":\"Action\",\"sold\":120},\n {\"genre\":\"Shooter\",\"sold\":350},\n {\"genre\":\"Other\",\"sold\":150}\n ],\n encode: {\n y: 'sold',\n color: 'genre',\n },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n innerRadius: 0.6,\n outerRadius: 0.8\n },\n});\n\nchart.render();", + "duration": 10489, + "retrievedSkillIds": [ + "g2-mark-arc-pie", + "g2-mark-interval-basic", + "g2-mark-arc-donut", + "g2-mark-tree", + "g2-mark-interval-stacked" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 538, + "expectedLength": 734, + "similarity": 0.6858035714285715, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data: [\n {\"genre\":\"Sports\",\"sold\":275},\n {\"genre\":\"Strategy\",\"sold\":115},\n {\"genre\":\"Action\",\"sold\":120},\n {\"genre\":\"Shooter\",\"sold\":350},\n {\"genre\":\"Other\",\"sold\":150}\n ],\n encode: {\n y: 'sold',\n color: 'genre',\n },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n innerRadius: 0.6,\n outerRadius: 0.8\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "encode", + "y", + "color", + "transform", + "type", + "coordinate", + "type", + "innerRadius", + "outerRadius" + ], + "stringLiterals": [ + "genre", + "sold", + "genre", + "sold", + "genre", + "sold", + "genre", + "sold", + "genre", + "sold" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval" + ] + } + } + }, + { + "id": "case-157", + "query": "根据描述绘制图表,创建一个液体填充图表,用于展示目标完成度等单指标达成情况,通过三角形水波图形和文字标注直观显示数值比例。参考数据:[0.6]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'liquid',\n data: 0.6,\n style: {\n shape: 'triangle',\n fill: 'l(270) 0:#fffbe6 1:#faad14',\n backgroundFill: '#fffaf0',\n outlineBorder: 4,\n outlineDistance: 10,\n waveLength: 140,\n waveCount: 3,\n contentText: 'Goal\\n60%',\n contentFill: '#000',\n contentFontSize: 20,\n contentFontWeight: 'bold',\n shadowColor: 'rgba(250, 173, 20, 0.4)',\n shadowBlur: 10,\n shadowOffsetX: 0,\n shadowOffsetY: 3,\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ \n container: 'container', \n width: 400, \n height: 400 \n});\n\nchart.options({\n type: 'liquid',\n data: 0.6,\n style: {\n shape: 'triangle',\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n fill: '#5B8FF9',\n fillOpacity: 0.85,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 32,\n fontWeight: 'bold',\n fill: '#fff',\n formatter: (v) => `${(v * 100).toFixed(0)}%`,\n },\n },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "duration": 16949, + "retrievedSkillIds": [ + "g2-mark-liquid", + "g2-mark-interval-basic", + "g2-mark-bullet", + "g2-mark-arc-donut", + "g2-mark-bi-directional-bar" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 608, + "expectedLength": 591, + "similarity": 0.5946444644464447, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ \n container: 'container', \n width: 400, \n height: 400 \n});\n\nchart.options({\n type: 'liquid',\n data: 0.6,\n style: {\n shape: 'triangle',\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n fill: '#5B8FF9',\n fillOpacity: 0.85,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 32,\n fontWeight: 'bold',\n fill: '#fff',\n formatter: (v) => `${(v * 100).toFixed(0)}%`,\n },\n },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "style", + "shape", + "outlineBorder", + "outlineDistance", + "waveLength", + "fill", + "fillOpacity", + "background", + "fill", + "text", + "style", + "fontSize", + "fontWeight", + "fill", + "formatter", + "axis", + "legend", + "tooltip" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "x6.background" + ] + } + } + }, + { + "id": "case-158", + "query": "根据描述绘制图表,使用 G2 绘制一个折线图,展示某股票的收盘价随时间的变化趋势,包含日期坐标轴和价格轴。\n参考数据:[{\"date\":\"2007-04-23\",\"close\":93.24},{\"date\":\"2007-04-24\",\"close\":95.35},{\"date\":\"2007-04-25\",\"close\":98.84},{\"date\":\"2007-04-26\",\"close\":99.92},{\"date\":\"2007-04-29\",\"close\":99.8},{\"date\":\"2007-05-01\",\"close\":99.47},{\"date\":\"2007-05-02\",\"close\":100.39},{\"date\":\"2007-05-03\",\"close\":100.4},{\"date\":\"2007-05-04\",\"close\":100.81},{\"date\":\"2007-05-07\",\"close\":103.92}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n});\n\nchart.options({\n type: 'line',\n autoFit: true,\n data: {\n type: 'inline',\n value: [\n {\n \"date\": \"2007-04-23\",\n \"close\": 93.24\n },\n {\n \"date\": \"2007-04-24\",\n \"close\": 95.35\n },\n {\n \"date\": \"2007-04-25\",\n \"close\": 98.84\n },\n {\n \"date\": \"2007-04-26\",\n \"close\": 99.92\n },\n {\n \"date\": \"2007-04-29\",\n \"close\": 99.8\n },\n {\n \"date\": \"2007-05-01\",\n \"close\": 99.47\n },\n {\n \"date\": \"2007-05-02\",\n \"close\": 100.39\n },\n {\n \"date\": \"2007-05-03\",\n \"close\": 100.4\n },\n {\n \"date\": \"2007-05-04\",\n \"close\": 100.81\n },\n {\n \"date\": \"2007-05-07\",\n \"close\": 103.92\n },\n {\n \"date\": \"2007-05-08\",\n \"close\": 105.06\n },\n {\n \"date\": \"2007-05-09\",\n \"close\": 106.88\n },\n {\n \"date\": \"2007-05-09\",\n \"close\": 107.34\n },\n {\n \"date\": \"2007-05-10\",\n \"close\": 108.74\n },\n {\n \"date\": \"2007-05-13\",\n \"close\": 109.36\n },\n {\n \"date\": \"2007-05-14\",\n \"close\": 107.52\n },\n {\n \"date\": \"2007-05-15\",\n \"close\": 107.34\n },\n {\n \"date\": \"2007-05-16\",\n \"close\": 109.44\n },\n {\n \"date\": \"2007-05-17\",\n \"close\": 110.02\n },\n {\n \"date\": \"2007-05-20\",\n \"close\": 111.98\n },\n {\n \"date\": \"2007-05-21\",\n \"close\": 113.54\n },\n {\n \"date\": \"2007-05-22\",\n \"close\": 112.89\n },\n {\n \"date\": \"2007-05-23\",\n \"close\": 110.69\n },\n {\n \"date\": \"2007-05-24\",\n \"close\": 113.62\n },\n {\n \"date\": \"2007-05-28\",\n \"close\": 114.35\n },\n {\n \"date\": \"2007-05-29\",\n \"close\": 118.77\n },\n {\n \"date\": \"2007-05-30\",\n \"close\": 121.19\n },\n {\n \"date\": \"2007-06-01\",\n \"close\": 118.4\n },\n {\n \"date\": \"2007-06-04\",\n \"close\": 121.33\n },\n {\n \"date\": \"2007-06-05\",\n \"close\": 122.67\n },\n {\n \"date\": \"2007-06-06\",\n \"close\": 123.64\n },\n {\n \"date\": \"2007-06-07\",\n \"close\": 124.07\n },\n {\n \"date\": \"2007-06-08\",\n \"close\": 124.49\n },\n {\n \"date\": \"2007-06-10\",\n \"close\": 120.19\n },\n {\n \"date\": \"2007-06-11\",\n \"close\": 120.38\n },\n {\n \"date\": \"2007-06-12\",\n \"close\": 117.5\n },\n {\n \"date\": \"2007-06-13\",\n \"close\": 118.75\n },\n {\n \"date\": \"2007-06-14\",\n \"close\": 120.5\n },\n {\n \"date\": \"2007-06-17\",\n \"close\": 125.09\n },\n {\n \"date\": \"2007-06-18\",\n \"close\": 123.66\n },\n {\n \"date\": \"2007-06-19\",\n \"close\": 121.55\n },\n {\n \"date\": \"2007-06-20\",\n \"close\": 123.9\n },\n {\n \"date\": \"2007-06-21\",\n \"close\": 123\n },\n {\n \"date\": \"2007-06-24\",\n \"close\": 122.34\n },\n {\n \"date\": \"2007-06-25\",\n \"close\": 119.65\n },\n {\n \"date\": \"2007-06-26\",\n \"close\": 121.89\n },\n {\n \"date\": \"2007-06-27\",\n \"close\": 120.56\n },\n {\n \"date\": \"2007-06-28\",\n \"close\": 122.04\n },\n {\n \"date\": \"2007-07-02\",\n \"close\": 121.26\n },\n {\n \"date\": \"2007-07-03\",\n \"close\": 127.17\n },\n {\n \"date\": \"2007-07-05\",\n \"close\": 132.75\n },\n {\n \"date\": \"2007-07-06\",\n \"close\": 132.3\n },\n {\n \"date\": \"2007-07-09\",\n \"close\": 130.33\n },\n {\n \"date\": \"2007-07-09\",\n \"close\": 132.35\n },\n {\n \"date\": \"2007-07-10\",\n \"close\": 132.39\n },\n {\n \"date\": \"2007-07-11\",\n \"close\": 134.07\n },\n {\n \"date\": \"2007-07-12\",\n \"close\": 137.73\n },\n {\n \"date\": \"2007-07-15\",\n \"close\": 138.1\n },\n {\n \"date\": \"2007-07-16\",\n \"close\": 138.91\n },\n {\n \"date\": \"2007-07-17\",\n \"close\": 138.12\n },\n {\n \"date\": \"2007-07-18\",\n \"close\": 140\n },\n {\n \"date\": \"2007-07-19\",\n \"close\": 143.75\n },\n {\n \"date\": \"2007-07-22\",\n \"close\": 143.7\n },\n {\n \"date\": \"2007-07-23\",\n \"close\": 134.89\n },\n {\n \"date\": \"2007-07-24\",\n \"close\": 137.26\n },\n {\n \"date\": \"2007-07-25\",\n \"close\": 146\n },\n {\n \"date\": \"2007-07-26\",\n \"close\": 143.85\n },\n {\n \"date\": \"2007-07-29\",\n \"close\": 141.43\n },\n {\n \"date\": \"2007-07-30\",\n \"close\": 131.76\n },\n {\n \"date\": \"2007-08-01\",\n \"close\": 135\n },\n {\n \"date\": \"2007-08-02\",\n \"close\": 136.49\n },\n {\n \"date\": \"2007-08-03\",\n \"close\": 131.85\n },\n {\n \"date\": \"2007-08-06\",\n \"close\": 135.25\n },\n {\n \"date\": \"2007-08-07\",\n \"close\": 135.03\n },\n {\n \"date\": \"2007-08-08\",\n \"close\": 134.01\n },\n {\n \"date\": \"2007-08-09\",\n \"close\": 126.39\n },\n {\n \"date\": \"2007-08-09\",\n \"close\": 125\n },\n {\n \"date\": \"2007-08-12\",\n \"close\": 127.79\n },\n {\n \"date\": \"2007-08-13\",\n \"close\": 124.03\n },\n {\n \"date\": \"2007-08-14\",\n \"close\": 119.9\n },\n {\n \"date\": \"2007-08-15\",\n \"close\": 117.05\n },\n {\n \"date\": \"2007-08-16\",\n \"close\": 122.06\n },\n {\n \"date\": \"2007-08-19\",\n \"close\": 122.22\n },\n {\n \"date\": \"2007-08-20\",\n \"close\": 127.57\n },\n {\n \"date\": \"2007-08-21\",\n \"close\": 132.51\n },\n {\n \"date\": \"2007-08-22\",\n \"close\": 131.07\n },\n {\n \"date\": \"2007-08-23\",\n \"close\": 135.3\n },\n {\n \"date\": \"2007-08-26\",\n \"close\": 132.25\n },\n {\n \"date\": \"2007-08-27\",\n \"close\": 126.82\n },\n {\n \"date\": \"2007-08-28\",\n \"close\": 134.08\n },\n {\n \"date\": \"2007-08-29\",\n \"close\": 136.25\n },\n {\n \"date\": \"2007-08-30\",\n \"close\": 138.48\n },\n {\n \"date\": \"2007-09-04\",\n \"close\": 144.16\n },\n {\n \"date\": \"2007-09-05\",\n \"close\": 136.76\n },\n {\n \"date\": \"2007-09-06\",\n \"close\": 135.01\n },\n {\n \"date\": \"2007-09-07\",\n \"close\": 131.77\n },\n {\n \"date\": \"2007-09-09\",\n \"close\": 136.71\n },\n {\n \"date\": \"2007-09-10\",\n \"close\": 135.49\n },\n {\n \"date\": \"2007-09-11\",\n \"close\": 136.85\n },\n {\n \"date\": \"2007-09-12\",\n \"close\": 137.2\n },\n {\n \"date\": \"2007-09-13\",\n \"close\": 138.81\n },\n {\n \"date\": \"2007-09-16\",\n \"close\": 138.41\n },\n {\n \"date\": \"2007-09-17\",\n \"close\": 140.92\n },\n {\n \"date\": \"2007-09-18\",\n \"close\": 140.77\n },\n {\n \"date\": \"2007-09-19\",\n \"close\": 140.31\n },\n {\n \"date\": \"2007-09-20\",\n \"close\": 144.15\n },\n {\n \"date\": \"2007-09-23\",\n \"close\": 148.28\n },\n {\n \"date\": \"2007-09-24\",\n \"close\": 153.18\n },\n {\n \"date\": \"2007-09-25\",\n \"close\": 152.77\n },\n {\n \"date\": \"2007-09-26\",\n \"close\": 154.5\n },\n {\n \"date\": \"2007-09-27\",\n \"close\": 153.47\n },\n {\n \"date\": \"2007-10-01\",\n \"close\": 156.34\n },\n {\n \"date\": \"2007-10-02\",\n \"close\": 158.45\n },\n {\n \"date\": \"2007-10-03\",\n \"close\": 157.92\n },\n {\n \"date\": \"2007-10-04\",\n \"close\": 156.24\n },\n {\n \"date\": \"2007-10-05\",\n \"close\": 161.45\n },\n {\n \"date\": \"2007-10-08\",\n \"close\": 167.91\n },\n {\n \"date\": \"2007-10-09\",\n \"close\": 167.86\n },\n {\n \"date\": \"2007-10-09\",\n \"close\": 166.79\n },\n {\n \"date\": \"2007-10-10\",\n \"close\": 162.23\n },\n {\n \"date\": \"2007-10-11\",\n \"close\": 167.25\n },\n {\n \"date\": \"2007-10-14\",\n \"close\": 166.98\n },\n {\n \"date\": \"2007-10-15\",\n \"close\": 169.58\n },\n {\n \"date\": \"2007-10-16\",\n \"close\": 172.75\n },\n {\n \"date\": \"2007-10-17\",\n \"close\": 173.5\n },\n {\n \"date\": \"2007-10-18\",\n \"close\": 170.42\n },\n {\n \"date\": \"2007-10-21\",\n \"close\": 174.36\n },\n {\n \"date\": \"2007-10-22\",\n \"close\": 186.16\n },\n {\n \"date\": \"2007-10-23\",\n \"close\": 185.93\n },\n {\n \"date\": \"2007-10-24\",\n \"close\": 182.78\n },\n {\n \"date\": \"2007-10-25\",\n \"close\": 184.7\n },\n {\n \"date\": \"2007-10-28\",\n \"close\": 185.09\n },\n {\n \"date\": \"2007-10-29\",\n \"close\": 187\n },\n {\n \"date\": \"2007-10-30\",\n \"close\": 189.95\n },\n {\n \"date\": \"2007-11-01\",\n \"close\": 187.44\n },\n {\n \"date\": \"2007-11-02\",\n \"close\": 187.87\n },\n {\n \"date\": \"2007-11-05\",\n \"close\": 186.18\n },\n {\n \"date\": \"2007-11-06\",\n \"close\": 191.79\n },\n {\n \"date\": \"2007-11-07\",\n \"close\": 186.3\n },\n {\n \"date\": \"2007-11-08\",\n \"close\": 175.47\n },\n {\n \"date\": \"2007-11-09\",\n \"close\": 165.37\n },\n {\n \"date\": \"2007-11-11\",\n \"close\": 153.76\n },\n {\n \"date\": \"2007-11-12\",\n \"close\": 169.96\n },\n {\n \"date\": \"2007-11-13\",\n \"close\": 166.11\n },\n {\n \"date\": \"2007-11-14\",\n \"close\": 164.3\n },\n {\n \"date\": \"2007-11-15\",\n \"close\": 166.39\n },\n {\n \"date\": \"2007-11-18\",\n \"close\": 163.95\n },\n {\n \"date\": \"2007-11-19\",\n \"close\": 168.85\n },\n {\n \"date\": \"2007-11-20\",\n \"close\": 168.46\n },\n {\n \"date\": \"2007-11-22\",\n \"close\": 171.54\n },\n {\n \"date\": \"2007-11-25\",\n \"close\": 172.54\n },\n {\n \"date\": \"2007-11-26\",\n \"close\": 174.81\n },\n {\n \"date\": \"2007-11-27\",\n \"close\": 180.22\n },\n {\n \"date\": \"2007-11-28\",\n \"close\": 184.29\n },\n {\n \"date\": \"2007-11-29\",\n \"close\": 182.22\n },\n {\n \"date\": \"2007-12-03\",\n \"close\": 178.86\n },\n {\n \"date\": \"2007-12-04\",\n \"close\": 179.81\n },\n {\n \"date\": \"2007-12-05\",\n \"close\": 185.5\n },\n {\n \"date\": \"2007-12-06\",\n \"close\": 189.95\n },\n {\n \"date\": \"2007-12-07\",\n \"close\": 194.3\n },\n {\n \"date\": \"2007-12-09\",\n \"close\": 194.21\n },\n {\n \"date\": \"2007-12-10\",\n \"close\": 188.54\n },\n {\n \"date\": \"2007-12-11\",\n \"close\": 190.86\n },\n {\n \"date\": \"2007-12-12\",\n \"close\": 191.83\n },\n {\n \"date\": \"2007-12-13\",\n \"close\": 190.39\n },\n {\n \"date\": \"2007-12-16\",\n \"close\": 184.4\n },\n {\n \"date\": \"2007-12-17\",\n \"close\": 182.98\n },\n {\n \"date\": \"2007-12-18\",\n \"close\": 183.12\n },\n {\n \"date\": \"2007-12-19\",\n \"close\": 187.21\n },\n {\n \"date\": \"2007-12-20\",\n \"close\": 193.91\n },\n {\n \"date\": \"2007-12-23\",\n \"close\": 198.8\n },\n {\n \"date\": \"2007-12-25\",\n \"close\": 198.95\n },\n {\n \"date\": \"2007-12-26\",\n \"close\": 198.57\n },\n {\n \"date\": \"2007-12-27\",\n \"close\": 199.83\n },\n {\n \"date\": \"2007-12-30\",\n \"close\": 198.08\n },\n {\n \"date\": \"2008-01-02\",\n \"close\": 194.84\n },\n {\n \"date\": \"2008-01-03\",\n \"close\": 194.93\n },\n {\n \"date\": \"2008-01-04\",\n \"close\": 180.05\n },\n {\n \"date\": \"2008-01-07\",\n \"close\": 177.64\n },\n {\n \"date\": \"2008-01-08\",\n \"close\": 171.25\n },\n {\n \"date\": \"2008-01-09\",\n \"close\": 179.4\n },\n {\n \"date\": \"2008-01-09\",\n \"close\": 178.02\n },\n {\n \"date\": \"2008-01-10\",\n \"close\": 172.69\n },\n {\n \"date\": \"2008-01-13\",\n \"close\": 178.78\n },\n {\n \"date\": \"2008-01-14\",\n \"close\": 169.04\n },\n {\n \"date\": \"2008-01-15\",\n \"close\": 159.64\n },\n {\n \"date\": \"2008-01-16\",\n \"close\": 160.89\n },\n {\n \"date\": \"2008-01-17\",\n \"close\": 161.36\n },\n {\n \"date\": \"2008-01-21\",\n \"close\": 155.64\n },\n {\n \"date\": \"2008-01-22\",\n \"close\": 139.07\n },\n {\n \"date\": \"2008-01-23\",\n \"close\": 135.6\n },\n {\n \"date\": \"2008-01-24\",\n \"close\": 130.01\n },\n {\n \"date\": \"2008-01-27\",\n \"close\": 130.01\n },\n {\n \"date\": \"2008-01-28\",\n \"close\": 131.54\n },\n {\n \"date\": \"2008-01-29\",\n \"close\": 132.18\n },\n {\n \"date\": \"2008-01-30\",\n \"close\": 135.36\n },\n {\n \"date\": \"2008-02-01\",\n \"close\": 133.75\n },\n {\n \"date\": \"2008-02-04\",\n \"close\": 131.65\n },\n {\n \"date\": \"2008-02-05\",\n \"close\": 129.36\n },\n {\n \"date\": \"2008-02-06\",\n \"close\": 122\n },\n {\n \"date\": \"2008-02-07\",\n \"close\": 121.24\n },\n {\n \"date\": \"2008-02-08\",\n \"close\": 125.48\n },\n {\n \"date\": \"2008-02-10\",\n \"close\": 129.45\n },\n {\n \"date\": \"2008-02-11\",\n \"close\": 124.86\n },\n {\n \"date\": \"2008-02-12\",\n \"close\": 129.4\n },\n {\n \"date\": \"2008-02-13\",\n \"close\": 127.46\n },\n {\n \"date\": \"2008-02-14\",\n \"close\": 124.63\n },\n {\n \"date\": \"2008-02-18\",\n \"close\": 122.18\n },\n {\n \"date\": \"2008-02-19\",\n \"close\": 123.82\n },\n {\n \"date\": \"2008-02-20\",\n \"close\": 121.54\n },\n {\n \"date\": \"2008-02-21\",\n \"close\": 119.46\n },\n {\n \"date\": \"2008-02-24\",\n \"close\": 119.74\n },\n {\n \"date\": \"2008-02-25\",\n \"close\": 119.15\n },\n {\n \"date\": \"2008-02-26\",\n \"close\": 122.96\n },\n {\n \"date\": \"2008-02-27\",\n \"close\": 129.91\n },\n {\n \"date\": \"2008-02-28\",\n \"close\": 125.02\n },\n {\n \"date\": \"2008-03-03\",\n \"close\": 121.73\n },\n {\n \"date\": \"2008-03-04\",\n \"close\": 124.62\n },\n {\n \"date\": \"2008-03-05\",\n \"close\": 124.49\n },\n {\n \"date\": \"2008-03-06\",\n \"close\": 120.93\n },\n {\n \"date\": \"2008-03-07\",\n \"close\": 122.25\n },\n {\n \"date\": \"2008-03-09\",\n \"close\": 119.69\n },\n {\n \"date\": \"2008-03-10\",\n \"close\": 127.35\n },\n {\n \"date\": \"2008-03-11\",\n \"close\": 126.03\n },\n {\n \"date\": \"2008-03-12\",\n \"close\": 127.94\n },\n {\n \"date\": \"2008-03-13\",\n \"close\": 126.61\n },\n {\n \"date\": \"2008-03-16\",\n \"close\": 126.73\n },\n {\n \"date\": \"2008-03-17\",\n \"close\": 132.82\n },\n {\n \"date\": \"2008-03-18\",\n \"close\": 129.67\n },\n {\n \"date\": \"2008-03-19\",\n \"close\": 133.27\n },\n {\n \"date\": \"2008-03-23\",\n \"close\": 139.53\n },\n {\n \"date\": \"2008-03-24\",\n \"close\": 140.98\n },\n {\n \"date\": \"2008-03-25\",\n \"close\": 145.06\n },\n {\n \"date\": \"2008-03-26\",\n \"close\": 140.25\n },\n {\n \"date\": \"2008-03-27\",\n \"close\": 143.01\n },\n {\n \"date\": \"2008-03-30\",\n \"close\": 143.5\n },\n {\n \"date\": \"2008-04-01\",\n \"close\": 149.53\n },\n {\n \"date\": \"2008-04-02\",\n \"close\": 147.49\n },\n {\n \"date\": \"2008-04-03\",\n \"close\": 151.61\n },\n {\n \"date\": \"2008-04-04\",\n \"close\": 153.08\n },\n {\n \"date\": \"2008-04-07\",\n \"close\": 155.89\n },\n {\n \"date\": \"2008-04-08\",\n \"close\": 152.84\n },\n {\n \"date\": \"2008-04-09\",\n \"close\": 151.44\n },\n {\n \"date\": \"2008-04-09\",\n \"close\": 154.55\n },\n {\n \"date\": \"2008-04-10\",\n \"close\": 147.14\n },\n {\n \"date\": \"2008-04-13\",\n \"close\": 147.78\n },\n {\n \"date\": \"2008-04-14\",\n \"close\": 148.38\n },\n {\n \"date\": \"2008-04-15\",\n \"close\": 153.7\n },\n {\n \"date\": \"2008-04-16\",\n \"close\": 154.49\n },\n {\n \"date\": \"2008-04-17\",\n \"close\": 161.04\n },\n {\n \"date\": \"2008-04-20\",\n \"close\": 168.16\n },\n {\n \"date\": \"2008-04-21\",\n \"close\": 160.2\n },\n {\n \"date\": \"2008-04-22\",\n \"close\": 162.89\n },\n {\n \"date\": \"2008-04-23\",\n \"close\": 168.94\n },\n {\n \"date\": \"2008-04-24\",\n \"close\": 169.73\n },\n {\n \"date\": \"2008-04-27\",\n \"close\": 172.24\n },\n {\n \"date\": \"2008-04-28\",\n \"close\": 175.05\n },\n {\n \"date\": \"2008-04-29\",\n \"close\": 173.95\n },\n {\n \"date\": \"2008-05-01\",\n \"close\": 180\n },\n {\n \"date\": \"2008-05-02\",\n \"close\": 180.94\n },\n {\n \"date\": \"2008-05-05\",\n \"close\": 184.73\n },\n {\n \"date\": \"2008-05-06\",\n \"close\": 186.66\n },\n {\n \"date\": \"2008-05-07\",\n \"close\": 182.59\n },\n {\n \"date\": \"2008-05-08\",\n \"close\": 185.06\n },\n {\n \"date\": \"2008-05-09\",\n \"close\": 183.45\n },\n {\n \"date\": \"2008-05-11\",\n \"close\": 188.16\n },\n {\n \"date\": \"2008-05-12\",\n \"close\": 189.96\n },\n {\n \"date\": \"2008-05-13\",\n \"close\": 186.26\n },\n {\n \"date\": \"2008-05-14\",\n \"close\": 189.73\n },\n {\n \"date\": \"2008-05-15\",\n \"close\": 187.62\n },\n {\n \"date\": \"2008-05-18\",\n \"close\": 183.6\n },\n {\n \"date\": \"2008-05-19\",\n \"close\": 185.9\n },\n {\n \"date\": \"2008-05-20\",\n \"close\": 178.19\n },\n {\n \"date\": \"2008-05-21\",\n \"close\": 177.05\n },\n {\n \"date\": \"2008-05-22\",\n \"close\": 181.17\n },\n {\n \"date\": \"2008-05-26\",\n \"close\": 186.43\n },\n {\n \"date\": \"2008-05-27\",\n \"close\": 187.01\n },\n {\n \"date\": \"2008-05-28\",\n \"close\": 186.69\n },\n {\n \"date\": \"2008-05-29\",\n \"close\": 188.75\n },\n {\n \"date\": \"2008-06-02\",\n \"close\": 186.1\n },\n {\n \"date\": \"2008-06-03\",\n \"close\": 185.37\n },\n {\n \"date\": \"2008-06-04\",\n \"close\": 185.19\n },\n {\n \"date\": \"2008-06-05\",\n \"close\": 189.43\n },\n {\n \"date\": \"2008-06-06\",\n \"close\": 185.64\n },\n {\n \"date\": \"2008-06-09\",\n \"close\": 181.61\n },\n {\n \"date\": \"2008-06-09\",\n \"close\": 185.64\n },\n {\n \"date\": \"2008-06-10\",\n \"close\": 180.81\n },\n {\n \"date\": \"2008-06-11\",\n \"close\": 173.26\n },\n {\n \"date\": \"2008-06-12\",\n \"close\": 172.37\n },\n {\n \"date\": \"2008-06-15\",\n \"close\": 176.84\n },\n {\n \"date\": \"2008-06-16\",\n \"close\": 181.43\n },\n {\n \"date\": \"2008-06-17\",\n \"close\": 178.75\n },\n {\n \"date\": \"2008-06-18\",\n \"close\": 180.9\n },\n {\n \"date\": \"2008-06-19\",\n \"close\": 175.27\n },\n {\n \"date\": \"2008-06-22\",\n \"close\": 173.16\n },\n {\n \"date\": \"2008-06-23\",\n \"close\": 173.25\n },\n {\n \"date\": \"2008-06-24\",\n \"close\": 177.39\n },\n {\n \"date\": \"2008-06-25\",\n \"close\": 168.26\n },\n {\n \"date\": \"2008-06-26\",\n \"close\": 170.09\n },\n {\n \"date\": \"2008-06-29\",\n \"close\": 167.44\n },\n {\n \"date\": \"2008-07-01\",\n \"close\": 174.68\n },\n {\n \"date\": \"2008-07-02\",\n \"close\": 168.18\n },\n {\n \"date\": \"2008-07-03\",\n \"close\": 170.12\n },\n {\n \"date\": \"2008-07-07\",\n \"close\": 175.16\n },\n {\n \"date\": \"2008-07-08\",\n \"close\": 179.55\n },\n {\n \"date\": \"2008-07-09\",\n \"close\": 174.25\n },\n {\n \"date\": \"2008-07-09\",\n \"close\": 176.63\n },\n {\n \"date\": \"2008-07-10\",\n \"close\": 172.58\n },\n {\n \"date\": \"2008-07-13\",\n \"close\": 173.88\n },\n {\n \"date\": \"2008-07-14\",\n \"close\": 169.64\n },\n {\n \"date\": \"2008-07-15\",\n \"close\": 172.81\n },\n {\n \"date\": \"2008-07-16\",\n \"close\": 171.81\n },\n {\n \"date\": \"2008-07-17\",\n \"close\": 165.15\n },\n {\n \"date\": \"2008-07-20\",\n \"close\": 166.29\n },\n {\n \"date\": \"2008-07-21\",\n \"close\": 162.02\n },\n {\n \"date\": \"2008-07-22\",\n \"close\": 166.26\n },\n {\n \"date\": \"2008-07-23\",\n \"close\": 159.03\n },\n {\n \"date\": \"2008-07-24\",\n \"close\": 162.12\n },\n {\n \"date\": \"2008-07-27\",\n \"close\": 154.4\n },\n {\n \"date\": \"2008-07-28\",\n \"close\": 157.08\n },\n {\n \"date\": \"2008-07-29\",\n \"close\": 159.88\n },\n {\n \"date\": \"2008-07-30\",\n \"close\": 158.95\n },\n {\n \"date\": \"2008-08-01\",\n \"close\": 156.66\n },\n {\n \"date\": \"2008-08-04\",\n \"close\": 153.23\n },\n {\n \"date\": \"2008-08-05\",\n \"close\": 160.64\n },\n {\n \"date\": \"2008-08-06\",\n \"close\": 164.19\n },\n {\n \"date\": \"2008-08-07\",\n \"close\": 163.57\n },\n {\n \"date\": \"2008-08-08\",\n \"close\": 169.55\n },\n {\n \"date\": \"2008-08-10\",\n \"close\": 173.56\n },\n {\n \"date\": \"2008-08-11\",\n \"close\": 176.73\n },\n {\n \"date\": \"2008-08-12\",\n \"close\": 179.3\n },\n {\n \"date\": \"2008-08-13\",\n \"close\": 179.32\n },\n {\n \"date\": \"2008-08-14\",\n \"close\": 175.74\n },\n {\n \"date\": \"2008-08-17\",\n \"close\": 175.39\n },\n {\n \"date\": \"2008-08-18\",\n \"close\": 173.53\n },\n {\n \"date\": \"2008-08-19\",\n \"close\": 175.84\n },\n {\n \"date\": \"2008-08-20\",\n \"close\": 174.29\n },\n {\n \"date\": \"2008-08-21\",\n \"close\": 176.79\n },\n {\n \"date\": \"2008-08-24\",\n \"close\": 172.55\n },\n {\n \"date\": \"2008-08-25\",\n \"close\": 173.64\n },\n {\n \"date\": \"2008-08-26\",\n \"close\": 174.67\n },\n {\n \"date\": \"2008-08-27\",\n \"close\": 173.74\n },\n {\n \"date\": \"2008-08-28\",\n \"close\": 169.53\n },\n {\n \"date\": \"2008-09-02\",\n \"close\": 166.19\n },\n {\n \"date\": \"2008-09-03\",\n \"close\": 166.96\n },\n {\n \"date\": \"2008-09-04\",\n \"close\": 161.22\n },\n {\n \"date\": \"2008-09-05\",\n \"close\": 160.18\n },\n {\n \"date\": \"2008-09-08\",\n \"close\": 157.92\n },\n {\n \"date\": \"2008-09-09\",\n \"close\": 151.68\n },\n {\n \"date\": \"2008-09-09\",\n \"close\": 151.61\n },\n {\n \"date\": \"2008-09-10\",\n \"close\": 152.65\n },\n {\n \"date\": \"2008-09-11\",\n \"close\": 148.94\n },\n {\n \"date\": \"2008-09-14\",\n \"close\": 140.36\n },\n {\n \"date\": \"2008-09-15\",\n \"close\": 139.88\n },\n {\n \"date\": \"2008-09-16\",\n \"close\": 127.83\n },\n {\n \"date\": \"2008-09-17\",\n \"close\": 134.09\n },\n {\n \"date\": \"2008-09-18\",\n \"close\": 140.91\n },\n {\n \"date\": \"2008-09-21\",\n \"close\": 131.05\n },\n {\n \"date\": \"2008-09-22\",\n \"close\": 126.84\n },\n {\n \"date\": \"2008-09-23\",\n \"close\": 128.71\n },\n {\n \"date\": \"2008-09-24\",\n \"close\": 131.93\n },\n {\n \"date\": \"2008-09-25\",\n \"close\": 128.24\n },\n {\n \"date\": \"2008-09-28\",\n \"close\": 105.26\n },\n {\n \"date\": \"2008-09-29\",\n \"close\": 113.66\n },\n {\n \"date\": \"2008-10-01\",\n \"close\": 109.12\n },\n {\n \"date\": \"2008-10-02\",\n \"close\": 100.1\n },\n {\n \"date\": \"2008-10-03\",\n \"close\": 97.07\n },\n {\n \"date\": \"2008-10-06\",\n \"close\": 98.14\n },\n {\n \"date\": \"2008-10-07\",\n \"close\": 89.16\n },\n {\n \"date\": \"2008-10-08\",\n \"close\": 89.79\n },\n {\n \"date\": \"2008-10-09\",\n \"close\": 88.74\n },\n {\n \"date\": \"2008-10-09\",\n \"close\": 96.8\n },\n {\n \"date\": \"2008-10-12\",\n \"close\": 110.26\n },\n {\n \"date\": \"2008-10-13\",\n \"close\": 104.08\n },\n {\n \"date\": \"2008-10-14\",\n \"close\": 97.95\n },\n {\n \"date\": \"2008-10-15\",\n \"close\": 101.89\n },\n {\n \"date\": \"2008-10-16\",\n \"close\": 97.4\n },\n {\n \"date\": \"2008-10-19\",\n \"close\": 98.44\n },\n {\n \"date\": \"2008-10-20\",\n \"close\": 91.49\n },\n {\n \"date\": \"2008-10-21\",\n \"close\": 96.87\n },\n {\n \"date\": \"2008-10-22\",\n \"close\": 98.23\n },\n {\n \"date\": \"2008-10-23\",\n \"close\": 96.38\n },\n {\n \"date\": \"2008-10-26\",\n \"close\": 92.09\n },\n {\n \"date\": \"2008-10-27\",\n \"close\": 99.91\n },\n {\n \"date\": \"2008-10-28\",\n \"close\": 104.55\n },\n {\n \"date\": \"2008-10-29\",\n \"close\": 111.04\n },\n {\n \"date\": \"2008-10-30\",\n \"close\": 107.59\n },\n {\n \"date\": \"2008-11-03\",\n \"close\": 106.96\n },\n {\n \"date\": \"2008-11-04\",\n \"close\": 110.99\n },\n {\n \"date\": \"2008-11-05\",\n \"close\": 103.3\n },\n {\n \"date\": \"2008-11-06\",\n \"close\": 99.1\n },\n {\n \"date\": \"2008-11-07\",\n \"close\": 98.24\n },\n {\n \"date\": \"2008-11-09\",\n \"close\": 95.88\n },\n {\n \"date\": \"2008-11-10\",\n \"close\": 94.77\n },\n {\n \"date\": \"2008-11-11\",\n \"close\": 90.12\n },\n {\n \"date\": \"2008-11-12\",\n \"close\": 96.44\n },\n {\n \"date\": \"2008-11-13\",\n \"close\": 90.24\n },\n {\n \"date\": \"2008-11-16\",\n \"close\": 88.14\n },\n {\n \"date\": \"2008-11-17\",\n \"close\": 89.91\n },\n {\n \"date\": \"2008-11-18\",\n \"close\": 86.29\n },\n {\n \"date\": \"2008-11-19\",\n \"close\": 80.49\n },\n {\n \"date\": \"2008-11-20\",\n \"close\": 82.58\n },\n {\n \"date\": \"2008-11-23\",\n \"close\": 92.95\n },\n {\n \"date\": \"2008-11-24\",\n \"close\": 90.8\n },\n {\n \"date\": \"2008-11-25\",\n \"close\": 95\n },\n {\n \"date\": \"2008-11-26\",\n \"close\": 95\n },\n {\n \"date\": \"2008-11-27\",\n \"close\": 92.67\n },\n {\n \"date\": \"2008-12-01\",\n \"close\": 88.93\n },\n {\n \"date\": \"2008-12-02\",\n \"close\": 92.47\n },\n {\n \"date\": \"2008-12-03\",\n \"close\": 95.9\n },\n {\n \"date\": \"2008-12-04\",\n \"close\": 91.41\n },\n {\n \"date\": \"2008-12-05\",\n \"close\": 94\n },\n {\n \"date\": \"2008-12-08\",\n \"close\": 99.72\n },\n {\n \"date\": \"2008-12-09\",\n \"close\": 100.06\n },\n {\n \"date\": \"2008-12-09\",\n \"close\": 98.21\n },\n {\n \"date\": \"2008-12-10\",\n \"close\": 95\n },\n {\n \"date\": \"2008-12-11\",\n \"close\": 98.27\n },\n {\n \"date\": \"2008-12-14\",\n \"close\": 94.75\n },\n {\n \"date\": \"2008-12-15\",\n \"close\": 95.43\n },\n {\n \"date\": \"2008-12-16\",\n \"close\": 89.16\n },\n {\n \"date\": \"2008-12-17\",\n \"close\": 89.43\n },\n {\n \"date\": \"2008-12-18\",\n \"close\": 90\n },\n {\n \"date\": \"2008-12-21\",\n \"close\": 85.74\n },\n {\n \"date\": \"2008-12-22\",\n \"close\": 86.38\n },\n {\n \"date\": \"2008-12-23\",\n \"close\": 85.04\n },\n {\n \"date\": \"2008-12-24\",\n \"close\": 85.04\n },\n {\n \"date\": \"2008-12-25\",\n \"close\": 85.81\n },\n {\n \"date\": \"2008-12-28\",\n \"close\": 86.61\n },\n {\n \"date\": \"2008-12-29\",\n \"close\": 86.29\n },\n {\n \"date\": \"2008-12-30\",\n \"close\": 85.35\n },\n {\n \"date\": \"2009-01-01\",\n \"close\": 85.35\n },\n {\n \"date\": \"2009-01-02\",\n \"close\": 90.75\n },\n {\n \"date\": \"2009-01-05\",\n \"close\": 94.58\n },\n {\n \"date\": \"2009-01-06\",\n \"close\": 93.02\n },\n {\n \"date\": \"2009-01-07\",\n \"close\": 91.01\n },\n {\n \"date\": \"2009-01-08\",\n \"close\": 92.7\n },\n {\n \"date\": \"2009-01-09\",\n \"close\": 90.58\n },\n {\n \"date\": \"2009-01-11\",\n \"close\": 88.66\n },\n {\n \"date\": \"2009-01-12\",\n \"close\": 87.71\n },\n {\n \"date\": \"2009-01-13\",\n \"close\": 85.33\n },\n {\n \"date\": \"2009-01-14\",\n \"close\": 83.38\n },\n {\n \"date\": \"2009-01-15\",\n \"close\": 82.33\n },\n {\n \"date\": \"2009-01-19\",\n \"close\": 78.2\n },\n {\n \"date\": \"2009-01-20\",\n \"close\": 82.83\n },\n {\n \"date\": \"2009-01-21\",\n \"close\": 88.36\n },\n {\n \"date\": \"2009-01-22\",\n \"close\": 88.36\n },\n {\n \"date\": \"2009-01-25\",\n \"close\": 89.64\n },\n {\n \"date\": \"2009-01-26\",\n \"close\": 90.73\n },\n {\n \"date\": \"2009-01-27\",\n \"close\": 94.2\n },\n {\n \"date\": \"2009-01-28\",\n \"close\": 93\n },\n {\n \"date\": \"2009-01-29\",\n \"close\": 90.13\n },\n {\n \"date\": \"2009-02-02\",\n \"close\": 91.51\n },\n {\n \"date\": \"2009-02-03\",\n \"close\": 92.98\n },\n {\n \"date\": \"2009-02-04\",\n \"close\": 93.55\n },\n {\n \"date\": \"2009-02-05\",\n \"close\": 96.46\n },\n {\n \"date\": \"2009-02-06\",\n \"close\": 99.72\n },\n {\n \"date\": \"2009-02-09\",\n \"close\": 102.51\n },\n {\n \"date\": \"2009-02-09\",\n \"close\": 97.83\n },\n {\n \"date\": \"2009-02-10\",\n \"close\": 96.82\n },\n {\n \"date\": \"2009-02-11\",\n \"close\": 99.27\n },\n {\n \"date\": \"2009-02-12\",\n \"close\": 99.16\n },\n {\n \"date\": \"2009-02-16\",\n \"close\": 94.53\n },\n {\n \"date\": \"2009-02-17\",\n \"close\": 94.37\n },\n {\n \"date\": \"2009-02-18\",\n \"close\": 90.64\n },\n {\n \"date\": \"2009-02-19\",\n \"close\": 91.2\n },\n {\n \"date\": \"2009-02-22\",\n \"close\": 86.95\n },\n {\n \"date\": \"2009-02-23\",\n \"close\": 90.25\n },\n {\n \"date\": \"2009-02-24\",\n \"close\": 91.16\n },\n {\n \"date\": \"2009-02-25\",\n \"close\": 89.19\n },\n {\n \"date\": \"2009-02-26\",\n \"close\": 89.31\n },\n {\n \"date\": \"2009-03-02\",\n \"close\": 87.94\n },\n {\n \"date\": \"2009-03-03\",\n \"close\": 88.37\n },\n {\n \"date\": \"2009-03-04\",\n \"close\": 91.17\n },\n {\n \"date\": \"2009-03-05\",\n \"close\": 88.84\n },\n {\n \"date\": \"2009-03-06\",\n \"close\": 85.3\n },\n {\n \"date\": \"2009-03-09\",\n \"close\": 83.11\n },\n {\n \"date\": \"2009-03-09\",\n \"close\": 88.63\n },\n {\n \"date\": \"2009-03-10\",\n \"close\": 92.68\n },\n {\n \"date\": \"2009-03-11\",\n \"close\": 96.35\n },\n {\n \"date\": \"2009-03-12\",\n \"close\": 95.93\n },\n {\n \"date\": \"2009-03-15\",\n \"close\": 95.42\n },\n {\n \"date\": \"2009-03-16\",\n \"close\": 99.66\n },\n {\n \"date\": \"2009-03-17\",\n \"close\": 101.52\n },\n {\n \"date\": \"2009-03-18\",\n \"close\": 101.62\n },\n {\n \"date\": \"2009-03-19\",\n \"close\": 101.59\n },\n {\n \"date\": \"2009-03-22\",\n \"close\": 107.66\n },\n {\n \"date\": \"2009-03-23\",\n \"close\": 106.5\n },\n {\n \"date\": \"2009-03-24\",\n \"close\": 106.49\n },\n {\n \"date\": \"2009-03-25\",\n \"close\": 109.87\n },\n {\n \"date\": \"2009-03-26\",\n \"close\": 106.85\n },\n {\n \"date\": \"2009-03-29\",\n \"close\": 104.49\n },\n {\n \"date\": \"2009-03-30\",\n \"close\": 105.12\n },\n {\n \"date\": \"2009-04-01\",\n \"close\": 108.69\n },\n {\n \"date\": \"2009-04-02\",\n \"close\": 112.71\n },\n {\n \"date\": \"2009-04-03\",\n \"close\": 115.99\n },\n {\n \"date\": \"2009-04-06\",\n \"close\": 118.45\n },\n {\n \"date\": \"2009-04-07\",\n \"close\": 115\n },\n {\n \"date\": \"2009-04-08\",\n \"close\": 116.32\n },\n {\n \"date\": \"2009-04-09\",\n \"close\": 119.57\n },\n {\n \"date\": \"2009-04-09\",\n \"close\": 119.57\n },\n {\n \"date\": \"2009-04-12\",\n \"close\": 120.22\n },\n {\n \"date\": \"2009-04-13\",\n \"close\": 118.31\n },\n {\n \"date\": \"2009-04-14\",\n \"close\": 117.64\n },\n {\n \"date\": \"2009-04-15\",\n \"close\": 121.45\n },\n {\n \"date\": \"2009-04-16\",\n \"close\": 123.42\n },\n {\n \"date\": \"2009-04-19\",\n \"close\": 120.5\n },\n {\n \"date\": \"2009-04-20\",\n \"close\": 121.76\n },\n {\n \"date\": \"2009-04-21\",\n \"close\": 121.51\n },\n {\n \"date\": \"2009-04-22\",\n \"close\": 125.4\n },\n {\n \"date\": \"2009-04-23\",\n \"close\": 123.9\n },\n {\n \"date\": \"2009-04-26\",\n \"close\": 124.73\n },\n {\n \"date\": \"2009-04-27\",\n \"close\": 123.9\n },\n {\n \"date\": \"2009-04-28\",\n \"close\": 125.14\n },\n {\n \"date\": \"2009-04-29\",\n \"close\": 125.83\n },\n {\n \"date\": \"2009-05-01\",\n \"close\": 127.24\n },\n {\n \"date\": \"2009-05-04\",\n \"close\": 132.07\n },\n {\n \"date\": \"2009-05-05\",\n \"close\": 132.71\n },\n {\n \"date\": \"2009-05-06\",\n \"close\": 132.5\n },\n {\n \"date\": \"2009-05-07\",\n \"close\": 129.06\n },\n {\n \"date\": \"2009-05-08\",\n \"close\": 129.19\n },\n {\n \"date\": \"2009-05-10\",\n \"close\": 129.57\n },\n {\n \"date\": \"2009-05-11\",\n \"close\": 124.42\n },\n {\n \"date\": \"2009-05-12\",\n \"close\": 119.49\n },\n {\n \"date\": \"2009-05-13\",\n \"close\": 122.95\n },\n {\n \"date\": \"2009-05-14\",\n \"close\": 122.42\n },\n {\n \"date\": \"2009-05-17\",\n \"close\": 126.65\n },\n {\n \"date\": \"2009-05-18\",\n \"close\": 127.45\n },\n {\n \"date\": \"2009-05-19\",\n \"close\": 125.87\n },\n {\n \"date\": \"2009-05-20\",\n \"close\": 124.18\n },\n {\n \"date\": \"2009-05-21\",\n \"close\": 122.5\n },\n {\n \"date\": \"2009-05-25\",\n \"close\": 130.78\n },\n {\n \"date\": \"2009-05-26\",\n \"close\": 133.05\n },\n {\n \"date\": \"2009-05-27\",\n \"close\": 135.07\n },\n {\n \"date\": \"2009-05-28\",\n \"close\": 135.81\n },\n {\n \"date\": \"2009-06-01\",\n \"close\": 139.35\n },\n {\n \"date\": \"2009-06-02\",\n \"close\": 139.49\n },\n {\n \"date\": \"2009-06-03\",\n \"close\": 140.95\n },\n {\n \"date\": \"2009-06-04\",\n \"close\": 143.74\n },\n {\n \"date\": \"2009-06-05\",\n \"close\": 144.67\n },\n {\n \"date\": \"2009-06-08\",\n \"close\": 143.85\n },\n {\n \"date\": \"2009-06-09\",\n \"close\": 142.72\n },\n {\n \"date\": \"2009-06-09\",\n \"close\": 140.25\n },\n {\n \"date\": \"2009-06-10\",\n \"close\": 139.95\n },\n {\n \"date\": \"2009-06-11\",\n \"close\": 136.97\n },\n {\n \"date\": \"2009-06-14\",\n \"close\": 136.09\n },\n {\n \"date\": \"2009-06-15\",\n \"close\": 136.35\n },\n {\n \"date\": \"2009-06-16\",\n \"close\": 135.58\n },\n {\n \"date\": \"2009-06-17\",\n \"close\": 135.88\n },\n {\n \"date\": \"2009-06-18\",\n \"close\": 139.48\n },\n {\n \"date\": \"2009-06-21\",\n \"close\": 137.37\n },\n {\n \"date\": \"2009-06-22\",\n \"close\": 134.01\n },\n {\n \"date\": \"2009-06-23\",\n \"close\": 136.22\n },\n {\n \"date\": \"2009-06-24\",\n \"close\": 139.86\n },\n {\n \"date\": \"2009-06-25\",\n \"close\": 142.44\n },\n {\n \"date\": \"2009-06-28\",\n \"close\": 141.97\n },\n {\n \"date\": \"2009-06-29\",\n \"close\": 142.43\n },\n {\n \"date\": \"2009-07-01\",\n \"close\": 142.83\n },\n {\n \"date\": \"2009-07-02\",\n \"close\": 140.02\n },\n {\n \"date\": \"2009-07-03\",\n \"close\": 140.02\n },\n {\n \"date\": \"2009-07-06\",\n \"close\": 138.61\n },\n {\n \"date\": \"2009-07-07\",\n \"close\": 135.4\n },\n {\n \"date\": \"2009-07-08\",\n \"close\": 137.22\n },\n {\n \"date\": \"2009-07-09\",\n \"close\": 136.36\n },\n {\n \"date\": \"2009-07-09\",\n \"close\": 138.52\n },\n {\n \"date\": \"2009-07-12\",\n \"close\": 142.34\n },\n {\n \"date\": \"2009-07-13\",\n \"close\": 142.27\n },\n {\n \"date\": \"2009-07-14\",\n \"close\": 146.88\n },\n {\n \"date\": \"2009-07-15\",\n \"close\": 147.52\n },\n {\n \"date\": \"2009-07-16\",\n \"close\": 151.75\n },\n {\n \"date\": \"2009-07-19\",\n \"close\": 152.91\n },\n {\n \"date\": \"2009-07-20\",\n \"close\": 151.51\n },\n {\n \"date\": \"2009-07-21\",\n \"close\": 156.74\n },\n {\n \"date\": \"2009-07-22\",\n \"close\": 157.82\n },\n {\n \"date\": \"2009-07-23\",\n \"close\": 159.99\n },\n {\n \"date\": \"2009-07-26\",\n \"close\": 160.1\n },\n {\n \"date\": \"2009-07-27\",\n \"close\": 160\n },\n {\n \"date\": \"2009-07-28\",\n \"close\": 160.03\n },\n {\n \"date\": \"2009-07-29\",\n \"close\": 162.79\n },\n {\n \"date\": \"2009-07-30\",\n \"close\": 163.39\n },\n {\n \"date\": \"2009-08-03\",\n \"close\": 166.43\n },\n {\n \"date\": \"2009-08-04\",\n \"close\": 165.55\n },\n {\n \"date\": \"2009-08-05\",\n \"close\": 165.11\n },\n {\n \"date\": \"2009-08-06\",\n \"close\": 163.91\n },\n {\n \"date\": \"2009-08-07\",\n \"close\": 165.51\n },\n {\n \"date\": \"2009-08-09\",\n \"close\": 164.72\n },\n {\n \"date\": \"2009-08-11\",\n \"close\": 165.31\n },\n {\n \"date\": \"2009-08-12\",\n \"close\": 168.42\n },\n {\n \"date\": \"2009-08-13\",\n \"close\": 166.78\n },\n {\n \"date\": \"2009-08-16\",\n \"close\": 159.59\n },\n {\n \"date\": \"2009-08-17\",\n \"close\": 164\n },\n {\n \"date\": \"2009-08-18\",\n \"close\": 164.6\n },\n {\n \"date\": \"2009-08-19\",\n \"close\": 166.33\n },\n {\n \"date\": \"2009-08-20\",\n \"close\": 169.22\n },\n {\n \"date\": \"2009-08-23\",\n \"close\": 169.06\n },\n {\n \"date\": \"2009-08-24\",\n \"close\": 169.4\n },\n {\n \"date\": \"2009-08-25\",\n \"close\": 167.41\n },\n {\n \"date\": \"2009-08-26\",\n \"close\": 169.45\n },\n {\n \"date\": \"2009-08-27\",\n \"close\": 170.05\n },\n {\n \"date\": \"2009-08-30\",\n \"close\": 168.21\n },\n {\n \"date\": \"2009-09-01\",\n \"close\": 165.3\n },\n {\n \"date\": \"2009-09-02\",\n \"close\": 165.18\n },\n {\n \"date\": \"2009-09-03\",\n \"close\": 166.55\n },\n {\n \"date\": \"2009-09-04\",\n \"close\": 170.31\n },\n {\n \"date\": \"2009-09-08\",\n \"close\": 172.93\n },\n {\n \"date\": \"2009-09-09\",\n \"close\": 171.14\n },\n {\n \"date\": \"2009-09-09\",\n \"close\": 172.56\n },\n {\n \"date\": \"2009-09-10\",\n \"close\": 172.16\n },\n {\n \"date\": \"2009-09-13\",\n \"close\": 173.72\n },\n {\n \"date\": \"2009-09-14\",\n \"close\": 175.16\n },\n {\n \"date\": \"2009-09-15\",\n \"close\": 181.87\n },\n {\n \"date\": \"2009-09-16\",\n \"close\": 184.55\n },\n {\n \"date\": \"2009-09-17\",\n \"close\": 185.02\n },\n {\n \"date\": \"2009-09-20\",\n \"close\": 184.02\n },\n {\n \"date\": \"2009-09-21\",\n \"close\": 184.48\n },\n {\n \"date\": \"2009-09-22\",\n \"close\": 185.5\n },\n {\n \"date\": \"2009-09-23\",\n \"close\": 183.82\n },\n {\n \"date\": \"2009-09-24\",\n \"close\": 182.37\n },\n {\n \"date\": \"2009-09-27\",\n \"close\": 186.15\n },\n {\n \"date\": \"2009-09-28\",\n \"close\": 185.38\n },\n {\n \"date\": \"2009-09-29\",\n \"close\": 185.35\n },\n {\n \"date\": \"2009-10-01\",\n \"close\": 180.86\n },\n {\n \"date\": \"2009-10-02\",\n \"close\": 184.9\n },\n {\n \"date\": \"2009-10-05\",\n \"close\": 186.02\n },\n {\n \"date\": \"2009-10-06\",\n \"close\": 190.01\n },\n {\n \"date\": \"2009-10-07\",\n \"close\": 190.25\n },\n {\n \"date\": \"2009-10-08\",\n \"close\": 189.27\n },\n {\n \"date\": \"2009-10-09\",\n \"close\": 190.47\n },\n {\n \"date\": \"2009-10-11\",\n \"close\": 190.81\n },\n {\n \"date\": \"2009-10-12\",\n \"close\": 190.02\n },\n {\n \"date\": \"2009-10-13\",\n \"close\": 191.29\n },\n {\n \"date\": \"2009-10-14\",\n \"close\": 190.56\n },\n {\n \"date\": \"2009-10-15\",\n \"close\": 188.05\n },\n {\n \"date\": \"2009-10-18\",\n \"close\": 189.86\n },\n {\n \"date\": \"2009-10-19\",\n \"close\": 198.76\n },\n {\n \"date\": \"2009-10-20\",\n \"close\": 204.92\n },\n {\n \"date\": \"2009-10-21\",\n \"close\": 205.2\n },\n {\n \"date\": \"2009-10-22\",\n \"close\": 203.94\n },\n {\n \"date\": \"2009-10-25\",\n \"close\": 202.48\n },\n {\n \"date\": \"2009-10-26\",\n \"close\": 197.37\n },\n {\n \"date\": \"2009-10-27\",\n \"close\": 192.4\n },\n {\n \"date\": \"2009-10-28\",\n \"close\": 196.35\n },\n {\n \"date\": \"2009-10-29\",\n \"close\": 188.5\n },\n {\n \"date\": \"2009-11-02\",\n \"close\": 189.31\n },\n {\n \"date\": \"2009-11-03\",\n \"close\": 188.75\n },\n {\n \"date\": \"2009-11-04\",\n \"close\": 190.81\n },\n {\n \"date\": \"2009-11-05\",\n \"close\": 194.03\n },\n {\n \"date\": \"2009-11-06\",\n \"close\": 194.34\n },\n {\n \"date\": \"2009-11-09\",\n \"close\": 201.46\n },\n {\n \"date\": \"2009-11-09\",\n \"close\": 202.98\n },\n {\n \"date\": \"2009-11-10\",\n \"close\": 203.25\n },\n {\n \"date\": \"2009-11-11\",\n \"close\": 201.99\n },\n {\n \"date\": \"2009-11-12\",\n \"close\": 204.45\n },\n {\n \"date\": \"2009-11-15\",\n \"close\": 206.63\n },\n {\n \"date\": \"2009-11-16\",\n \"close\": 207\n },\n {\n \"date\": \"2009-11-17\",\n \"close\": 205.96\n },\n {\n \"date\": \"2009-11-18\",\n \"close\": 200.51\n },\n {\n \"date\": \"2009-11-19\",\n \"close\": 199.92\n },\n {\n \"date\": \"2009-11-22\",\n \"close\": 205.88\n },\n {\n \"date\": \"2009-11-23\",\n \"close\": 204.44\n },\n {\n \"date\": \"2009-11-24\",\n \"close\": 204.19\n },\n {\n \"date\": \"2009-11-25\",\n \"close\": 204.19\n },\n {\n \"date\": \"2009-11-26\",\n \"close\": 200.59\n },\n {\n \"date\": \"2009-11-29\",\n \"close\": 199.91\n },\n {\n \"date\": \"2009-12-01\",\n \"close\": 196.97\n },\n {\n \"date\": \"2009-12-02\",\n \"close\": 196.23\n },\n {\n \"date\": \"2009-12-03\",\n \"close\": 196.48\n },\n {\n \"date\": \"2009-12-04\",\n \"close\": 193.32\n },\n {\n \"date\": \"2009-12-07\",\n \"close\": 188.95\n },\n {\n \"date\": \"2009-12-08\",\n \"close\": 189.87\n },\n {\n \"date\": \"2009-12-09\",\n \"close\": 197.8\n },\n {\n \"date\": \"2009-12-09\",\n \"close\": 196.43\n },\n {\n \"date\": \"2009-12-10\",\n \"close\": 194.67\n },\n {\n \"date\": \"2009-12-13\",\n \"close\": 196.98\n },\n {\n \"date\": \"2009-12-14\",\n \"close\": 194.17\n },\n {\n \"date\": \"2009-12-15\",\n \"close\": 195.03\n },\n {\n \"date\": \"2009-12-16\",\n \"close\": 191.86\n },\n {\n \"date\": \"2009-12-17\",\n \"close\": 195.43\n },\n {\n \"date\": \"2009-12-20\",\n \"close\": 198.23\n },\n {\n \"date\": \"2009-12-21\",\n \"close\": 200.36\n },\n {\n \"date\": \"2009-12-22\",\n \"close\": 202.1\n },\n {\n \"date\": \"2009-12-23\",\n \"close\": 209.04\n },\n {\n \"date\": \"2009-12-24\",\n \"close\": 209.04\n },\n {\n \"date\": \"2009-12-27\",\n \"close\": 211.61\n },\n {\n \"date\": \"2009-12-28\",\n \"close\": 209.1\n },\n {\n \"date\": \"2009-12-29\",\n \"close\": 211.64\n },\n {\n \"date\": \"2009-12-30\",\n \"close\": 210.73\n },\n {\n \"date\": \"2010-01-01\",\n \"close\": 210.73\n },\n {\n \"date\": \"2010-01-04\",\n \"close\": 214.01\n },\n {\n \"date\": \"2010-01-05\",\n \"close\": 214.38\n },\n {\n \"date\": \"2010-01-06\",\n \"close\": 210.97\n },\n {\n \"date\": \"2010-01-07\",\n \"close\": 210.58\n },\n {\n \"date\": \"2010-01-08\",\n \"close\": 211.98\n },\n {\n \"date\": \"2010-01-10\",\n \"close\": 210.11\n },\n {\n \"date\": \"2010-01-11\",\n \"close\": 207.72\n },\n {\n \"date\": \"2010-01-12\",\n \"close\": 210.65\n },\n {\n \"date\": \"2010-01-13\",\n \"close\": 209.43\n },\n {\n \"date\": \"2010-01-14\",\n \"close\": 205.93\n },\n {\n \"date\": \"2010-01-17\",\n \"close\": 205.93\n },\n {\n \"date\": \"2010-01-18\",\n \"close\": 215.04\n },\n {\n \"date\": \"2010-01-19\",\n \"close\": 211.72\n },\n {\n \"date\": \"2010-01-20\",\n \"close\": 208.07\n },\n {\n \"date\": \"2010-01-21\",\n \"close\": 197.75\n },\n {\n \"date\": \"2010-01-24\",\n \"close\": 203.08\n },\n {\n \"date\": \"2010-01-25\",\n \"close\": 205.94\n },\n {\n \"date\": \"2010-01-26\",\n \"close\": 207.88\n },\n {\n \"date\": \"2010-01-27\",\n \"close\": 199.29\n },\n {\n \"date\": \"2010-01-28\",\n \"close\": 192.06\n },\n {\n \"date\": \"2010-02-01\",\n \"close\": 194.73\n },\n {\n \"date\": \"2010-02-02\",\n \"close\": 195.86\n },\n {\n \"date\": \"2010-02-03\",\n \"close\": 199.23\n },\n {\n \"date\": \"2010-02-04\",\n \"close\": 192.05\n },\n {\n \"date\": \"2010-02-05\",\n \"close\": 195.46\n },\n {\n \"date\": \"2010-02-08\",\n \"close\": 194.12\n },\n {\n \"date\": \"2010-02-09\",\n \"close\": 196.19\n },\n {\n \"date\": \"2010-02-09\",\n \"close\": 195.12\n },\n {\n \"date\": \"2010-02-10\",\n \"close\": 198.67\n },\n {\n \"date\": \"2010-02-11\",\n \"close\": 200.38\n },\n {\n \"date\": \"2010-02-14\",\n \"close\": 200.38\n },\n {\n \"date\": \"2010-02-15\",\n \"close\": 203.4\n },\n {\n \"date\": \"2010-02-16\",\n \"close\": 202.55\n },\n {\n \"date\": \"2010-02-17\",\n \"close\": 202.93\n },\n {\n \"date\": \"2010-02-18\",\n \"close\": 201.67\n },\n {\n \"date\": \"2010-02-21\",\n \"close\": 200.42\n },\n {\n \"date\": \"2010-02-22\",\n \"close\": 197.06\n },\n {\n \"date\": \"2010-02-23\",\n \"close\": 200.66\n },\n {\n \"date\": \"2010-02-24\",\n \"close\": 202\n },\n {\n \"date\": \"2010-02-25\",\n \"close\": 204.62\n },\n {\n \"date\": \"2010-03-01\",\n \"close\": 208.99\n },\n {\n \"date\": \"2010-03-02\",\n \"close\": 208.85\n },\n {\n \"date\": \"2010-03-03\",\n \"close\": 209.33\n },\n {\n \"date\": \"2010-03-04\",\n \"close\": 210.71\n },\n {\n \"date\": \"2010-03-05\",\n \"close\": 218.95\n },\n {\n \"date\": \"2010-03-08\",\n \"close\": 219.08\n },\n {\n \"date\": \"2010-03-09\",\n \"close\": 223.02\n },\n {\n \"date\": \"2010-03-09\",\n \"close\": 224.84\n },\n {\n \"date\": \"2010-03-10\",\n \"close\": 225.5\n },\n {\n \"date\": \"2010-03-11\",\n \"close\": 226.6\n },\n {\n \"date\": \"2010-03-14\",\n \"close\": 223.84\n },\n {\n \"date\": \"2010-03-15\",\n \"close\": 224.45\n },\n {\n \"date\": \"2010-03-16\",\n \"close\": 224.12\n },\n {\n \"date\": \"2010-03-17\",\n \"close\": 224.65\n },\n {\n \"date\": \"2010-03-18\",\n \"close\": 222.25\n },\n {\n \"date\": \"2010-03-21\",\n \"close\": 224.75\n },\n {\n \"date\": \"2010-03-22\",\n \"close\": 228.36\n },\n {\n \"date\": \"2010-03-23\",\n \"close\": 229.37\n },\n {\n \"date\": \"2010-03-24\",\n \"close\": 226.65\n },\n {\n \"date\": \"2010-03-25\",\n \"close\": 230.9\n },\n {\n \"date\": \"2010-03-28\",\n \"close\": 232.39\n },\n {\n \"date\": \"2010-03-29\",\n \"close\": 235.84\n },\n {\n \"date\": \"2010-03-30\",\n \"close\": 235\n },\n {\n \"date\": \"2010-04-01\",\n \"close\": 235.97\n },\n {\n \"date\": \"2010-04-02\",\n \"close\": 235.97\n },\n {\n \"date\": \"2010-04-05\",\n \"close\": 238.49\n },\n {\n \"date\": \"2010-04-06\",\n \"close\": 239.54\n },\n {\n \"date\": \"2010-04-07\",\n \"close\": 240.6\n },\n {\n \"date\": \"2010-04-08\",\n \"close\": 239.95\n },\n {\n \"date\": \"2010-04-09\",\n \"close\": 241.79\n },\n {\n \"date\": \"2010-04-11\",\n \"close\": 242.29\n },\n {\n \"date\": \"2010-04-12\",\n \"close\": 242.43\n },\n {\n \"date\": \"2010-04-13\",\n \"close\": 245.69\n },\n {\n \"date\": \"2010-04-14\",\n \"close\": 248.92\n },\n {\n \"date\": \"2010-04-15\",\n \"close\": 247.4\n },\n {\n \"date\": \"2010-04-18\",\n \"close\": 247.07\n },\n {\n \"date\": \"2010-04-19\",\n \"close\": 244.59\n },\n {\n \"date\": \"2010-04-20\",\n \"close\": 259.22\n },\n {\n \"date\": \"2010-04-21\",\n \"close\": 266.47\n },\n {\n \"date\": \"2010-04-22\",\n \"close\": 270.83\n },\n {\n \"date\": \"2010-04-25\",\n \"close\": 269.5\n },\n {\n \"date\": \"2010-04-26\",\n \"close\": 262.04\n },\n {\n \"date\": \"2010-04-27\",\n \"close\": 261.6\n },\n {\n \"date\": \"2010-04-28\",\n \"close\": 268.64\n },\n {\n \"date\": \"2010-04-29\",\n \"close\": 261.09\n },\n {\n \"date\": \"2010-05-03\",\n \"close\": 266.35\n },\n {\n \"date\": \"2010-05-04\",\n \"close\": 258.68\n },\n {\n \"date\": \"2010-05-05\",\n \"close\": 255.98\n },\n {\n \"date\": \"2010-05-06\",\n \"close\": 246.25\n },\n {\n \"date\": \"2010-05-07\",\n \"close\": 235.86\n },\n {\n \"date\": \"2010-05-09\",\n \"close\": 253.99\n },\n {\n \"date\": \"2010-05-10\",\n \"close\": 256.52\n },\n {\n \"date\": \"2010-05-11\",\n \"close\": 262.09\n },\n {\n \"date\": \"2010-05-12\",\n \"close\": 258.36\n },\n {\n \"date\": \"2010-05-13\",\n \"close\": 253.82\n },\n {\n \"date\": \"2010-05-16\",\n \"close\": 254.22\n },\n {\n \"date\": \"2010-05-17\",\n \"close\": 252.36\n },\n {\n \"date\": \"2010-05-18\",\n \"close\": 248.34\n },\n {\n \"date\": \"2010-05-19\",\n \"close\": 237.76\n },\n {\n \"date\": \"2010-05-20\",\n \"close\": 242.32\n },\n {\n \"date\": \"2010-05-23\",\n \"close\": 246.76\n },\n {\n \"date\": \"2010-05-24\",\n \"close\": 245.22\n },\n {\n \"date\": \"2010-05-25\",\n \"close\": 244.11\n },\n {\n \"date\": \"2010-05-26\",\n \"close\": 253.35\n },\n {\n \"date\": \"2010-05-27\",\n \"close\": 256.88\n },\n {\n \"date\": \"2010-05-30\",\n \"close\": 256.88\n },\n {\n \"date\": \"2010-06-01\",\n \"close\": 260.83\n },\n {\n \"date\": \"2010-06-02\",\n \"close\": 263.95\n },\n {\n \"date\": \"2010-06-03\",\n \"close\": 263.12\n },\n {\n \"date\": \"2010-06-04\",\n \"close\": 255.96\n },\n {\n \"date\": \"2010-06-07\",\n \"close\": 250.94\n },\n {\n \"date\": \"2010-06-08\",\n \"close\": 249.33\n },\n {\n \"date\": \"2010-06-09\",\n \"close\": 243.2\n },\n {\n \"date\": \"2010-06-09\",\n \"close\": 250.51\n },\n {\n \"date\": \"2010-06-10\",\n \"close\": 253.51\n },\n {\n \"date\": \"2010-06-13\",\n \"close\": 254.28\n },\n {\n \"date\": \"2010-06-14\",\n \"close\": 259.69\n },\n {\n \"date\": \"2010-06-15\",\n \"close\": 267.25\n },\n {\n \"date\": \"2010-06-16\",\n \"close\": 271.87\n },\n {\n \"date\": \"2010-06-17\",\n \"close\": 274.07\n },\n {\n \"date\": \"2010-06-20\",\n \"close\": 270.17\n },\n {\n \"date\": \"2010-06-21\",\n \"close\": 273.85\n },\n {\n \"date\": \"2010-06-22\",\n \"close\": 270.97\n },\n {\n \"date\": \"2010-06-23\",\n \"close\": 269\n },\n {\n \"date\": \"2010-06-24\",\n \"close\": 266.7\n },\n {\n \"date\": \"2010-06-27\",\n \"close\": 268.3\n },\n {\n \"date\": \"2010-06-28\",\n \"close\": 256.17\n },\n {\n \"date\": \"2010-06-29\",\n \"close\": 251.53\n },\n {\n \"date\": \"2010-07-01\",\n \"close\": 248.48\n },\n {\n \"date\": \"2010-07-02\",\n \"close\": 246.94\n },\n {\n \"date\": \"2010-07-05\",\n \"close\": 246.94\n },\n {\n \"date\": \"2010-07-06\",\n \"close\": 248.63\n },\n {\n \"date\": \"2010-07-07\",\n \"close\": 258.66\n },\n {\n \"date\": \"2010-07-08\",\n \"close\": 258.09\n },\n {\n \"date\": \"2010-07-09\",\n \"close\": 259.62\n },\n {\n \"date\": \"2010-07-11\",\n \"close\": 257.28\n },\n {\n \"date\": \"2010-07-12\",\n \"close\": 251.8\n },\n {\n \"date\": \"2010-07-13\",\n \"close\": 252.73\n },\n {\n \"date\": \"2010-07-14\",\n \"close\": 251.45\n },\n {\n \"date\": \"2010-07-15\",\n \"close\": 249.9\n },\n {\n \"date\": \"2010-07-18\",\n \"close\": 245.58\n },\n {\n \"date\": \"2010-07-19\",\n \"close\": 251.89\n },\n {\n \"date\": \"2010-07-20\",\n \"close\": 254.24\n },\n {\n \"date\": \"2010-07-21\",\n \"close\": 259.02\n },\n {\n \"date\": \"2010-07-22\",\n \"close\": 259.94\n },\n {\n \"date\": \"2010-07-25\",\n \"close\": 259.28\n },\n {\n \"date\": \"2010-07-26\",\n \"close\": 264.08\n },\n {\n \"date\": \"2010-07-27\",\n \"close\": 260.96\n },\n {\n \"date\": \"2010-07-28\",\n \"close\": 258.11\n },\n {\n \"date\": \"2010-07-29\",\n \"close\": 257.25\n },\n {\n \"date\": \"2010-08-02\",\n \"close\": 261.85\n },\n {\n \"date\": \"2010-08-03\",\n \"close\": 261.93\n },\n {\n \"date\": \"2010-08-04\",\n \"close\": 262.98\n },\n {\n \"date\": \"2010-08-05\",\n \"close\": 261.7\n },\n {\n \"date\": \"2010-08-06\",\n \"close\": 260.09\n },\n {\n \"date\": \"2010-08-09\",\n \"close\": 261.75\n },\n {\n \"date\": \"2010-08-09\",\n \"close\": 259.41\n },\n {\n \"date\": \"2010-08-10\",\n \"close\": 250.19\n },\n {\n \"date\": \"2010-08-11\",\n \"close\": 251.79\n },\n {\n \"date\": \"2010-08-12\",\n \"close\": 249.1\n },\n {\n \"date\": \"2010-08-15\",\n \"close\": 247.64\n },\n {\n \"date\": \"2010-08-16\",\n \"close\": 251.97\n },\n {\n \"date\": \"2010-08-17\",\n \"close\": 253.07\n },\n {\n \"date\": \"2010-08-18\",\n \"close\": 249.88\n },\n {\n \"date\": \"2010-08-19\",\n \"close\": 249.64\n },\n {\n \"date\": \"2010-08-22\",\n \"close\": 245.8\n },\n {\n \"date\": \"2010-08-23\",\n \"close\": 239.93\n },\n {\n \"date\": \"2010-08-24\",\n \"close\": 242.89\n },\n {\n \"date\": \"2010-08-25\",\n \"close\": 240.28\n },\n {\n \"date\": \"2010-08-26\",\n \"close\": 241.62\n },\n {\n \"date\": \"2010-08-29\",\n \"close\": 242.5\n },\n {\n \"date\": \"2010-08-30\",\n \"close\": 243.1\n },\n {\n \"date\": \"2010-09-01\",\n \"close\": 250.33\n },\n {\n \"date\": \"2010-09-02\",\n \"close\": 252.17\n },\n {\n \"date\": \"2010-09-03\",\n \"close\": 258.77\n },\n {\n \"date\": \"2010-09-06\",\n \"close\": 258.77\n },\n {\n \"date\": \"2010-09-07\",\n \"close\": 257.81\n },\n {\n \"date\": \"2010-09-08\",\n \"close\": 262.92\n },\n {\n \"date\": \"2010-09-09\",\n \"close\": 263.07\n },\n {\n \"date\": \"2010-09-09\",\n \"close\": 263.41\n },\n {\n \"date\": \"2010-09-12\",\n \"close\": 267.04\n },\n {\n \"date\": \"2010-09-13\",\n \"close\": 268.06\n },\n {\n \"date\": \"2010-09-14\",\n \"close\": 270.22\n },\n {\n \"date\": \"2010-09-15\",\n \"close\": 276.57\n },\n {\n \"date\": \"2010-09-16\",\n \"close\": 275.37\n },\n {\n \"date\": \"2010-09-19\",\n \"close\": 283.23\n },\n {\n \"date\": \"2010-09-20\",\n \"close\": 283.77\n },\n {\n \"date\": \"2010-09-21\",\n \"close\": 287.75\n },\n {\n \"date\": \"2010-09-22\",\n \"close\": 288.92\n },\n {\n \"date\": \"2010-09-23\",\n \"close\": 292.32\n },\n {\n \"date\": \"2010-09-26\",\n \"close\": 291.16\n },\n {\n \"date\": \"2010-09-27\",\n \"close\": 286.86\n },\n {\n \"date\": \"2010-09-28\",\n \"close\": 287.37\n },\n {\n \"date\": \"2010-09-29\",\n \"close\": 283.75\n },\n {\n \"date\": \"2010-10-01\",\n \"close\": 282.52\n },\n {\n \"date\": \"2010-10-04\",\n \"close\": 278.64\n },\n {\n \"date\": \"2010-10-05\",\n \"close\": 288.94\n },\n {\n \"date\": \"2010-10-06\",\n \"close\": 289.19\n },\n {\n \"date\": \"2010-10-07\",\n \"close\": 289.22\n },\n {\n \"date\": \"2010-10-08\",\n \"close\": 294.07\n },\n {\n \"date\": \"2010-10-10\",\n \"close\": 295.36\n },\n {\n \"date\": \"2010-10-11\",\n \"close\": 298.54\n },\n {\n \"date\": \"2010-10-12\",\n \"close\": 300.14\n },\n {\n \"date\": \"2010-10-13\",\n \"close\": 302.31\n },\n {\n \"date\": \"2010-10-14\",\n \"close\": 314.74\n },\n {\n \"date\": \"2010-10-17\",\n \"close\": 318\n },\n {\n \"date\": \"2010-10-18\",\n \"close\": 309.49\n },\n {\n \"date\": \"2010-10-19\",\n \"close\": 310.53\n },\n {\n \"date\": \"2010-10-20\",\n \"close\": 309.52\n },\n {\n \"date\": \"2010-10-21\",\n \"close\": 307.47\n },\n {\n \"date\": \"2010-10-24\",\n \"close\": 308.84\n },\n {\n \"date\": \"2010-10-25\",\n \"close\": 308.05\n },\n {\n \"date\": \"2010-10-26\",\n \"close\": 307.83\n },\n {\n \"date\": \"2010-10-27\",\n \"close\": 305.24\n },\n {\n \"date\": \"2010-10-28\",\n \"close\": 300.98\n },\n {\n \"date\": \"2010-11-01\",\n \"close\": 304.18\n },\n {\n \"date\": \"2010-11-02\",\n \"close\": 309.36\n },\n {\n \"date\": \"2010-11-03\",\n \"close\": 312.8\n },\n {\n \"date\": \"2010-11-04\",\n \"close\": 318.27\n },\n {\n \"date\": \"2010-11-05\",\n \"close\": 317.13\n },\n {\n \"date\": \"2010-11-08\",\n \"close\": 318.62\n },\n {\n \"date\": \"2010-11-09\",\n \"close\": 316.08\n },\n {\n \"date\": \"2010-11-09\",\n \"close\": 318.03\n },\n {\n \"date\": \"2010-11-10\",\n \"close\": 316.66\n },\n {\n \"date\": \"2010-11-11\",\n \"close\": 308.03\n },\n {\n \"date\": \"2010-11-14\",\n \"close\": 307.04\n },\n {\n \"date\": \"2010-11-15\",\n \"close\": 301.59\n },\n {\n \"date\": \"2010-11-16\",\n \"close\": 300.5\n },\n {\n \"date\": \"2010-11-17\",\n \"close\": 308.43\n },\n {\n \"date\": \"2010-11-18\",\n \"close\": 306.73\n },\n {\n \"date\": \"2010-11-21\",\n \"close\": 313.36\n },\n {\n \"date\": \"2010-11-22\",\n \"close\": 308.73\n },\n {\n \"date\": \"2010-11-23\",\n \"close\": 314.8\n },\n {\n \"date\": \"2010-11-25\",\n \"close\": 315\n },\n {\n \"date\": \"2010-11-28\",\n \"close\": 316.87\n },\n {\n \"date\": \"2010-11-29\",\n \"close\": 311.15\n },\n {\n \"date\": \"2010-12-01\",\n \"close\": 316.4\n },\n {\n \"date\": \"2010-12-02\",\n \"close\": 318.15\n },\n {\n \"date\": \"2010-12-03\",\n \"close\": 317.44\n },\n {\n \"date\": \"2010-12-06\",\n \"close\": 320.15\n },\n {\n \"date\": \"2010-12-07\",\n \"close\": 318.21\n },\n {\n \"date\": \"2010-12-08\",\n \"close\": 321.01\n },\n {\n \"date\": \"2010-12-09\",\n \"close\": 319.76\n },\n {\n \"date\": \"2010-12-09\",\n \"close\": 320.56\n },\n {\n \"date\": \"2010-12-12\",\n \"close\": 321.67\n },\n {\n \"date\": \"2010-12-13\",\n \"close\": 320.29\n },\n {\n \"date\": \"2010-12-14\",\n \"close\": 320.36\n },\n {\n \"date\": \"2010-12-15\",\n \"close\": 321.25\n },\n {\n \"date\": \"2010-12-16\",\n \"close\": 320.61\n },\n {\n \"date\": \"2010-12-19\",\n \"close\": 322.21\n },\n {\n \"date\": \"2010-12-20\",\n \"close\": 324.2\n },\n {\n \"date\": \"2010-12-21\",\n \"close\": 325.16\n },\n {\n \"date\": \"2010-12-22\",\n \"close\": 323.6\n },\n {\n \"date\": \"2010-12-26\",\n \"close\": 324.68\n },\n {\n \"date\": \"2010-12-27\",\n \"close\": 325.47\n },\n {\n \"date\": \"2010-12-28\",\n \"close\": 325.29\n },\n {\n \"date\": \"2010-12-29\",\n \"close\": 323.66\n },\n {\n \"date\": \"2010-12-30\",\n \"close\": 322.56\n },\n {\n \"date\": \"2011-01-03\",\n \"close\": 329.57\n },\n {\n \"date\": \"2011-01-04\",\n \"close\": 331.29\n },\n {\n \"date\": \"2011-01-05\",\n \"close\": 334\n },\n {\n \"date\": \"2011-01-06\",\n \"close\": 333.73\n },\n {\n \"date\": \"2011-01-07\",\n \"close\": 336.12\n },\n {\n \"date\": \"2011-01-09\",\n \"close\": 342.46\n },\n {\n \"date\": \"2011-01-10\",\n \"close\": 341.64\n },\n {\n \"date\": \"2011-01-11\",\n \"close\": 344.42\n },\n {\n \"date\": \"2011-01-12\",\n \"close\": 345.68\n },\n {\n \"date\": \"2011-01-13\",\n \"close\": 348.48\n },\n {\n \"date\": \"2011-01-17\",\n \"close\": 340.65\n },\n {\n \"date\": \"2011-01-18\",\n \"close\": 338.84\n },\n {\n \"date\": \"2011-01-19\",\n \"close\": 332.68\n },\n {\n \"date\": \"2011-01-20\",\n \"close\": 326.72\n },\n {\n \"date\": \"2011-01-23\",\n \"close\": 337.45\n },\n {\n \"date\": \"2011-01-24\",\n \"close\": 341.4\n },\n {\n \"date\": \"2011-01-25\",\n \"close\": 343.85\n },\n {\n \"date\": \"2011-01-26\",\n \"close\": 343.21\n },\n {\n \"date\": \"2011-01-27\",\n \"close\": 336.1\n },\n {\n \"date\": \"2011-01-30\",\n \"close\": 339.32\n },\n {\n \"date\": \"2011-02-01\",\n \"close\": 345.03\n },\n {\n \"date\": \"2011-02-02\",\n \"close\": 344.32\n },\n {\n \"date\": \"2011-02-03\",\n \"close\": 343.44\n },\n {\n \"date\": \"2011-02-04\",\n \"close\": 346.5\n },\n {\n \"date\": \"2011-02-07\",\n \"close\": 351.88\n },\n {\n \"date\": \"2011-02-08\",\n \"close\": 355.2\n },\n {\n \"date\": \"2011-02-09\",\n \"close\": 358.16\n },\n {\n \"date\": \"2011-02-09\",\n \"close\": 354.54\n },\n {\n \"date\": \"2011-02-10\",\n \"close\": 356.85\n },\n {\n \"date\": \"2011-02-13\",\n \"close\": 359.18\n },\n {\n \"date\": \"2011-02-14\",\n \"close\": 359.9\n },\n {\n \"date\": \"2011-02-15\",\n \"close\": 363.13\n },\n {\n \"date\": \"2011-02-16\",\n \"close\": 358.3\n },\n {\n \"date\": \"2011-02-17\",\n \"close\": 350.56\n },\n {\n \"date\": \"2011-02-21\",\n \"close\": 338.61\n },\n {\n \"date\": \"2011-02-22\",\n \"close\": 342.62\n },\n {\n \"date\": \"2011-02-23\",\n \"close\": 342.88\n },\n {\n \"date\": \"2011-02-24\",\n \"close\": 348.16\n },\n {\n \"date\": \"2011-02-27\",\n \"close\": 353.21\n },\n {\n \"date\": \"2011-03-01\",\n \"close\": 349.31\n },\n {\n \"date\": \"2011-03-02\",\n \"close\": 352.12\n },\n {\n \"date\": \"2011-03-03\",\n \"close\": 359.56\n },\n {\n \"date\": \"2011-03-04\",\n \"close\": 360\n },\n {\n \"date\": \"2011-03-07\",\n \"close\": 355.36\n },\n {\n \"date\": \"2011-03-08\",\n \"close\": 355.76\n },\n {\n \"date\": \"2011-03-09\",\n \"close\": 352.47\n },\n {\n \"date\": \"2011-03-09\",\n \"close\": 346.67\n },\n {\n \"date\": \"2011-03-10\",\n \"close\": 351.99\n },\n {\n \"date\": \"2011-03-13\",\n \"close\": 353.56\n },\n {\n \"date\": \"2011-03-14\",\n \"close\": 345.43\n },\n {\n \"date\": \"2011-03-15\",\n \"close\": 330.01\n },\n {\n \"date\": \"2011-03-16\",\n \"close\": 334.64\n },\n {\n \"date\": \"2011-03-17\",\n \"close\": 330.67\n },\n {\n \"date\": \"2011-03-20\",\n \"close\": 339.3\n },\n {\n \"date\": \"2011-03-21\",\n \"close\": 341.2\n },\n {\n \"date\": \"2011-03-22\",\n \"close\": 339.19\n },\n {\n \"date\": \"2011-03-23\",\n \"close\": 344.97\n },\n {\n \"date\": \"2011-03-24\",\n \"close\": 351.54\n },\n {\n \"date\": \"2011-03-27\",\n \"close\": 350.44\n },\n {\n \"date\": \"2011-03-28\",\n \"close\": 350.96\n },\n {\n \"date\": \"2011-03-29\",\n \"close\": 348.63\n },\n {\n \"date\": \"2011-03-30\",\n \"close\": 348.51\n },\n {\n \"date\": \"2011-04-01\",\n \"close\": 344.56\n },\n {\n \"date\": \"2011-04-04\",\n \"close\": 341.19\n },\n {\n \"date\": \"2011-04-05\",\n \"close\": 338.89\n },\n {\n \"date\": \"2011-04-06\",\n \"close\": 338.04\n },\n {\n \"date\": \"2011-04-07\",\n \"close\": 338.08\n },\n {\n \"date\": \"2011-04-08\",\n \"close\": 335.06\n },\n {\n \"date\": \"2011-04-10\",\n \"close\": 330.8\n },\n {\n \"date\": \"2011-04-11\",\n \"close\": 332.4\n },\n {\n \"date\": \"2011-04-12\",\n \"close\": 336.13\n },\n {\n \"date\": \"2011-04-13\",\n \"close\": 332.42\n },\n {\n \"date\": \"2011-04-14\",\n \"close\": 327.46\n },\n {\n \"date\": \"2011-04-17\",\n \"close\": 331.85\n },\n {\n \"date\": \"2011-04-18\",\n \"close\": 337.86\n },\n {\n \"date\": \"2011-04-19\",\n \"close\": 342.41\n },\n {\n \"date\": \"2011-04-20\",\n \"close\": 350.7\n },\n {\n \"date\": \"2011-04-24\",\n \"close\": 353.01\n },\n {\n \"date\": \"2011-04-25\",\n \"close\": 350.42\n },\n {\n \"date\": \"2011-04-26\",\n \"close\": 350.15\n },\n {\n \"date\": \"2011-04-27\",\n \"close\": 346.75\n },\n {\n \"date\": \"2011-04-28\",\n \"close\": 350.13\n },\n {\n \"date\": \"2011-05-02\",\n \"close\": 346.28\n },\n {\n \"date\": \"2011-05-03\",\n \"close\": 348.2\n },\n {\n \"date\": \"2011-05-04\",\n \"close\": 349.57\n },\n {\n \"date\": \"2011-05-05\",\n \"close\": 346.75\n },\n {\n \"date\": \"2011-05-06\",\n \"close\": 346.66\n },\n {\n \"date\": \"2011-05-09\",\n \"close\": 347.6\n },\n {\n \"date\": \"2011-05-09\",\n \"close\": 349.45\n },\n {\n \"date\": \"2011-05-10\",\n \"close\": 347.23\n },\n {\n \"date\": \"2011-05-11\",\n \"close\": 346.57\n },\n {\n \"date\": \"2011-05-12\",\n \"close\": 340.5\n },\n {\n \"date\": \"2011-05-15\",\n \"close\": 333.3\n },\n {\n \"date\": \"2011-05-16\",\n \"close\": 336.14\n },\n {\n \"date\": \"2011-05-17\",\n \"close\": 339.87\n },\n {\n \"date\": \"2011-05-18\",\n \"close\": 340.53\n },\n {\n \"date\": \"2011-05-19\",\n \"close\": 335.22\n },\n {\n \"date\": \"2011-05-22\",\n \"close\": 334.4\n },\n {\n \"date\": \"2011-05-23\",\n \"close\": 332.19\n },\n {\n \"date\": \"2011-05-24\",\n \"close\": 336.78\n },\n {\n \"date\": \"2011-05-25\",\n \"close\": 335\n },\n {\n \"date\": \"2011-05-26\",\n \"close\": 337.41\n },\n {\n \"date\": \"2011-05-30\",\n \"close\": 347.83\n },\n {\n \"date\": \"2011-06-01\",\n \"close\": 345.51\n },\n {\n \"date\": \"2011-06-02\",\n \"close\": 346.1\n },\n {\n \"date\": \"2011-06-03\",\n \"close\": 343.44\n },\n {\n \"date\": \"2011-06-06\",\n \"close\": 338.04\n },\n {\n \"date\": \"2011-06-07\",\n \"close\": 332.04\n },\n {\n \"date\": \"2011-06-08\",\n \"close\": 332.24\n },\n {\n \"date\": \"2011-06-09\",\n \"close\": 331.49\n },\n {\n \"date\": \"2011-06-09\",\n \"close\": 325.9\n },\n {\n \"date\": \"2011-06-12\",\n \"close\": 326.6\n },\n {\n \"date\": \"2011-06-13\",\n \"close\": 332.44\n },\n {\n \"date\": \"2011-06-14\",\n \"close\": 326.75\n },\n {\n \"date\": \"2011-06-15\",\n \"close\": 325.16\n },\n {\n \"date\": \"2011-06-16\",\n \"close\": 320.26\n },\n {\n \"date\": \"2011-06-19\",\n \"close\": 315.32\n },\n {\n \"date\": \"2011-06-20\",\n \"close\": 325.3\n },\n {\n \"date\": \"2011-06-21\",\n \"close\": 322.61\n },\n {\n \"date\": \"2011-06-22\",\n \"close\": 331.23\n },\n {\n \"date\": \"2011-06-23\",\n \"close\": 326.35\n },\n {\n \"date\": \"2011-06-26\",\n \"close\": 332.04\n },\n {\n \"date\": \"2011-06-27\",\n \"close\": 335.26\n },\n {\n \"date\": \"2011-06-28\",\n \"close\": 334.04\n },\n {\n \"date\": \"2011-06-29\",\n \"close\": 335.67\n },\n {\n \"date\": \"2011-07-01\",\n \"close\": 343.26\n },\n {\n \"date\": \"2011-07-05\",\n \"close\": 349.43\n },\n {\n \"date\": \"2011-07-06\",\n \"close\": 351.76\n },\n {\n \"date\": \"2011-07-07\",\n \"close\": 357.2\n },\n {\n \"date\": \"2011-07-08\",\n \"close\": 359.71\n },\n {\n \"date\": \"2011-07-10\",\n \"close\": 354\n },\n {\n \"date\": \"2011-07-11\",\n \"close\": 353.75\n },\n {\n \"date\": \"2011-07-12\",\n \"close\": 358.02\n },\n {\n \"date\": \"2011-07-13\",\n \"close\": 357.77\n },\n {\n \"date\": \"2011-07-14\",\n \"close\": 364.92\n },\n {\n \"date\": \"2011-07-17\",\n \"close\": 373.8\n },\n {\n \"date\": \"2011-07-18\",\n \"close\": 376.85\n },\n {\n \"date\": \"2011-07-19\",\n \"close\": 386.9\n },\n {\n \"date\": \"2011-07-20\",\n \"close\": 387.29\n },\n {\n \"date\": \"2011-07-21\",\n \"close\": 393.3\n },\n {\n \"date\": \"2011-07-24\",\n \"close\": 398.5\n },\n {\n \"date\": \"2011-07-25\",\n \"close\": 403.41\n },\n {\n \"date\": \"2011-07-26\",\n \"close\": 392.59\n },\n {\n \"date\": \"2011-07-27\",\n \"close\": 391.82\n },\n {\n \"date\": \"2011-07-28\",\n \"close\": 390.48\n },\n {\n \"date\": \"2011-08-01\",\n \"close\": 396.75\n },\n {\n \"date\": \"2011-08-02\",\n \"close\": 388.91\n },\n {\n \"date\": \"2011-08-03\",\n \"close\": 392.57\n },\n {\n \"date\": \"2011-08-04\",\n \"close\": 377.37\n },\n {\n \"date\": \"2011-08-05\",\n \"close\": 373.62\n },\n {\n \"date\": \"2011-08-08\",\n \"close\": 353.21\n },\n {\n \"date\": \"2011-08-09\",\n \"close\": 374.01\n },\n {\n \"date\": \"2011-08-09\",\n \"close\": 363.69\n },\n {\n \"date\": \"2011-08-10\",\n \"close\": 373.7\n },\n {\n \"date\": \"2011-08-11\",\n \"close\": 376.99\n },\n {\n \"date\": \"2011-08-14\",\n \"close\": 383.41\n },\n {\n \"date\": \"2011-08-15\",\n \"close\": 380.48\n },\n {\n \"date\": \"2011-08-16\",\n \"close\": 380.44\n },\n {\n \"date\": \"2011-08-17\",\n \"close\": 366.05\n },\n {\n \"date\": \"2011-08-18\",\n \"close\": 356.03\n },\n {\n \"date\": \"2011-08-21\",\n \"close\": 356.44\n },\n {\n \"date\": \"2011-08-22\",\n \"close\": 373.6\n },\n {\n \"date\": \"2011-08-23\",\n \"close\": 376.18\n },\n {\n \"date\": \"2011-08-24\",\n \"close\": 373.72\n },\n {\n \"date\": \"2011-08-25\",\n \"close\": 383.58\n },\n {\n \"date\": \"2011-08-28\",\n \"close\": 389.97\n },\n {\n \"date\": \"2011-08-29\",\n \"close\": 389.99\n },\n {\n \"date\": \"2011-08-30\",\n \"close\": 384.83\n },\n {\n \"date\": \"2011-09-01\",\n \"close\": 381.03\n },\n {\n \"date\": \"2011-09-02\",\n \"close\": 374.05\n },\n {\n \"date\": \"2011-09-06\",\n \"close\": 379.74\n },\n {\n \"date\": \"2011-09-07\",\n \"close\": 383.93\n },\n {\n \"date\": \"2011-09-08\",\n \"close\": 384.14\n },\n {\n \"date\": \"2011-09-09\",\n \"close\": 377.48\n },\n {\n \"date\": \"2011-09-11\",\n \"close\": 379.94\n },\n {\n \"date\": \"2011-09-12\",\n \"close\": 384.62\n },\n {\n \"date\": \"2011-09-13\",\n \"close\": 389.3\n },\n {\n \"date\": \"2011-09-14\",\n \"close\": 392.96\n },\n {\n \"date\": \"2011-09-15\",\n \"close\": 400.5\n },\n {\n \"date\": \"2011-09-18\",\n \"close\": 411.63\n },\n {\n \"date\": \"2011-09-19\",\n \"close\": 413.45\n },\n {\n \"date\": \"2011-09-20\",\n \"close\": 412.14\n },\n {\n \"date\": \"2011-09-21\",\n \"close\": 401.82\n },\n {\n \"date\": \"2011-09-22\",\n \"close\": 404.3\n },\n {\n \"date\": \"2011-09-25\",\n \"close\": 403.17\n },\n {\n \"date\": \"2011-09-26\",\n \"close\": 399.26\n },\n {\n \"date\": \"2011-09-27\",\n \"close\": 397.01\n },\n {\n \"date\": \"2011-09-28\",\n \"close\": 390.57\n },\n {\n \"date\": \"2011-09-29\",\n \"close\": 381.32\n },\n {\n \"date\": \"2011-10-03\",\n \"close\": 374.6\n },\n {\n \"date\": \"2011-10-04\",\n \"close\": 372.5\n },\n {\n \"date\": \"2011-10-05\",\n \"close\": 378.25\n },\n {\n \"date\": \"2011-10-06\",\n \"close\": 377.37\n },\n {\n \"date\": \"2011-10-07\",\n \"close\": 369.8\n },\n {\n \"date\": \"2011-10-09\",\n \"close\": 388.81\n },\n {\n \"date\": \"2011-10-10\",\n \"close\": 400.29\n },\n {\n \"date\": \"2011-10-11\",\n \"close\": 402.19\n },\n {\n \"date\": \"2011-10-12\",\n \"close\": 408.43\n },\n {\n \"date\": \"2011-10-13\",\n \"close\": 422\n },\n {\n \"date\": \"2011-10-16\",\n \"close\": 419.99\n },\n {\n \"date\": \"2011-10-17\",\n \"close\": 422.24\n },\n {\n \"date\": \"2011-10-18\",\n \"close\": 398.62\n },\n {\n \"date\": \"2011-10-19\",\n \"close\": 395.31\n },\n {\n \"date\": \"2011-10-20\",\n \"close\": 392.87\n },\n {\n \"date\": \"2011-10-23\",\n \"close\": 405.77\n },\n {\n \"date\": \"2011-10-24\",\n \"close\": 397.77\n },\n {\n \"date\": \"2011-10-25\",\n \"close\": 400.6\n },\n {\n \"date\": \"2011-10-26\",\n \"close\": 404.69\n },\n {\n \"date\": \"2011-10-27\",\n \"close\": 404.95\n },\n {\n \"date\": \"2011-10-30\",\n \"close\": 404.78\n },\n {\n \"date\": \"2011-11-01\",\n \"close\": 396.51\n },\n {\n \"date\": \"2011-11-02\",\n \"close\": 397.41\n },\n {\n \"date\": \"2011-11-03\",\n \"close\": 403.07\n },\n {\n \"date\": \"2011-11-04\",\n \"close\": 400.24\n },\n {\n \"date\": \"2011-11-07\",\n \"close\": 399.73\n },\n {\n \"date\": \"2011-11-08\",\n \"close\": 406.23\n },\n {\n \"date\": \"2011-11-09\",\n \"close\": 395.28\n },\n {\n \"date\": \"2011-11-09\",\n \"close\": 385.22\n },\n {\n \"date\": \"2011-11-10\",\n \"close\": 384.62\n },\n {\n \"date\": \"2011-11-13\",\n \"close\": 379.26\n },\n {\n \"date\": \"2011-11-14\",\n \"close\": 388.83\n },\n {\n \"date\": \"2011-11-15\",\n \"close\": 384.77\n },\n {\n \"date\": \"2011-11-16\",\n \"close\": 377.41\n },\n {\n \"date\": \"2011-11-17\",\n \"close\": 374.94\n },\n {\n \"date\": \"2011-11-20\",\n \"close\": 369.01\n },\n {\n \"date\": \"2011-11-21\",\n \"close\": 376.51\n },\n {\n \"date\": \"2011-11-22\",\n \"close\": 366.99\n },\n {\n \"date\": \"2011-11-24\",\n \"close\": 363.57\n },\n {\n \"date\": \"2011-11-27\",\n \"close\": 376.12\n },\n {\n \"date\": \"2011-11-28\",\n \"close\": 373.2\n },\n {\n \"date\": \"2011-11-29\",\n \"close\": 382.2\n },\n {\n \"date\": \"2011-12-01\",\n \"close\": 387.93\n },\n {\n \"date\": \"2011-12-02\",\n \"close\": 389.7\n },\n {\n \"date\": \"2011-12-05\",\n \"close\": 393.01\n },\n {\n \"date\": \"2011-12-06\",\n \"close\": 390.95\n },\n {\n \"date\": \"2011-12-07\",\n \"close\": 389.09\n },\n {\n \"date\": \"2011-12-08\",\n \"close\": 390.66\n },\n {\n \"date\": \"2011-12-09\",\n \"close\": 393.62\n },\n {\n \"date\": \"2011-12-11\",\n \"close\": 391.84\n },\n {\n \"date\": \"2011-12-12\",\n \"close\": 388.81\n },\n {\n \"date\": \"2011-12-13\",\n \"close\": 380.19\n },\n {\n \"date\": \"2011-12-14\",\n \"close\": 378.94\n },\n {\n \"date\": \"2011-12-15\",\n \"close\": 381.02\n },\n {\n \"date\": \"2011-12-18\",\n \"close\": 382.21\n },\n {\n \"date\": \"2011-12-19\",\n \"close\": 395.95\n },\n {\n \"date\": \"2011-12-20\",\n \"close\": 396.44\n },\n {\n \"date\": \"2011-12-21\",\n \"close\": 398.55\n },\n {\n \"date\": \"2011-12-22\",\n \"close\": 403.43\n },\n {\n \"date\": \"2011-12-26\",\n \"close\": 406.53\n },\n {\n \"date\": \"2011-12-27\",\n \"close\": 402.64\n },\n {\n \"date\": \"2011-12-28\",\n \"close\": 405.12\n },\n {\n \"date\": \"2011-12-29\",\n \"close\": 405\n },\n {\n \"date\": \"2012-01-03\",\n \"close\": 411.23\n },\n {\n \"date\": \"2012-01-04\",\n \"close\": 413.44\n },\n {\n \"date\": \"2012-01-05\",\n \"close\": 418.03\n },\n {\n \"date\": \"2012-01-06\",\n \"close\": 422.4\n },\n {\n \"date\": \"2012-01-09\",\n \"close\": 421.73\n },\n {\n \"date\": \"2012-01-09\",\n \"close\": 423.24\n },\n {\n \"date\": \"2012-01-10\",\n \"close\": 422.55\n },\n {\n \"date\": \"2012-01-11\",\n \"close\": 421.39\n },\n {\n \"date\": \"2012-01-12\",\n \"close\": 419.81\n },\n {\n \"date\": \"2012-01-16\",\n \"close\": 424.7\n },\n {\n \"date\": \"2012-01-17\",\n \"close\": 429.11\n },\n {\n \"date\": \"2012-01-18\",\n \"close\": 427.75\n },\n {\n \"date\": \"2012-01-19\",\n \"close\": 420.3\n },\n {\n \"date\": \"2012-01-22\",\n \"close\": 427.41\n },\n {\n \"date\": \"2012-01-23\",\n \"close\": 420.41\n },\n {\n \"date\": \"2012-01-24\",\n \"close\": 446.66\n },\n {\n \"date\": \"2012-01-25\",\n \"close\": 444.63\n },\n {\n \"date\": \"2012-01-26\",\n \"close\": 447.28\n },\n {\n \"date\": \"2012-01-29\",\n \"close\": 453.01\n },\n {\n \"date\": \"2012-01-30\",\n \"close\": 456.48\n },\n {\n \"date\": \"2012-02-01\",\n \"close\": 456.19\n },\n {\n \"date\": \"2012-02-02\",\n \"close\": 455.12\n },\n {\n \"date\": \"2012-02-03\",\n \"close\": 459.68\n },\n {\n \"date\": \"2012-02-06\",\n \"close\": 463.97\n },\n {\n \"date\": \"2012-02-07\",\n \"close\": 468.83\n },\n {\n \"date\": \"2012-02-08\",\n \"close\": 476.68\n },\n {\n \"date\": \"2012-02-09\",\n \"close\": 493.17\n },\n {\n \"date\": \"2012-02-09\",\n \"close\": 493.42\n },\n {\n \"date\": \"2012-02-12\",\n \"close\": 502.6\n },\n {\n \"date\": \"2012-02-13\",\n \"close\": 509.46\n },\n {\n \"date\": \"2012-02-14\",\n \"close\": 497.67\n },\n {\n \"date\": \"2012-02-15\",\n \"close\": 502.21\n },\n {\n \"date\": \"2012-02-16\",\n \"close\": 502.12\n },\n {\n \"date\": \"2012-02-20\",\n \"close\": 514.85\n },\n {\n \"date\": \"2012-02-21\",\n \"close\": 513.04\n },\n {\n \"date\": \"2012-02-22\",\n \"close\": 516.39\n },\n {\n \"date\": \"2012-02-23\",\n \"close\": 522.41\n },\n {\n \"date\": \"2012-02-26\",\n \"close\": 525.76\n },\n {\n \"date\": \"2012-02-27\",\n \"close\": 535.41\n },\n {\n \"date\": \"2012-02-28\",\n \"close\": 542.44\n },\n {\n \"date\": \"2012-03-01\",\n \"close\": 544.47\n },\n {\n \"date\": \"2012-03-02\",\n \"close\": 545.18\n },\n {\n \"date\": \"2012-03-05\",\n \"close\": 533.16\n },\n {\n \"date\": \"2012-03-06\",\n \"close\": 530.26\n },\n {\n \"date\": \"2012-03-07\",\n \"close\": 530.69\n },\n {\n \"date\": \"2012-03-08\",\n \"close\": 541.99\n },\n {\n \"date\": \"2012-03-09\",\n \"close\": 545.17\n },\n {\n \"date\": \"2012-03-11\",\n \"close\": 552\n },\n {\n \"date\": \"2012-03-12\",\n \"close\": 568.1\n },\n {\n \"date\": \"2012-03-13\",\n \"close\": 589.58\n },\n {\n \"date\": \"2012-03-14\",\n \"close\": 585.56\n },\n {\n \"date\": \"2012-03-15\",\n \"close\": 585.57\n },\n {\n \"date\": \"2012-03-18\",\n \"close\": 601.1\n },\n {\n \"date\": \"2012-03-19\",\n \"close\": 605.96\n },\n {\n \"date\": \"2012-03-20\",\n \"close\": 602.5\n },\n {\n \"date\": \"2012-03-21\",\n \"close\": 599.34\n },\n {\n \"date\": \"2012-03-22\",\n \"close\": 596.05\n },\n {\n \"date\": \"2012-03-25\",\n \"close\": 606.98\n },\n {\n \"date\": \"2012-03-26\",\n \"close\": 614.48\n },\n {\n \"date\": \"2012-03-27\",\n \"close\": 617.62\n },\n {\n \"date\": \"2012-03-28\",\n \"close\": 609.86\n },\n {\n \"date\": \"2012-03-29\",\n \"close\": 599.55\n },\n {\n \"date\": \"2012-04-02\",\n \"close\": 618.63\n },\n {\n \"date\": \"2012-04-03\",\n \"close\": 629.32\n },\n {\n \"date\": \"2012-04-04\",\n \"close\": 624.31\n },\n {\n \"date\": \"2012-04-05\",\n \"close\": 633.68\n },\n {\n \"date\": \"2012-04-09\",\n \"close\": 636.23\n },\n {\n \"date\": \"2012-04-09\",\n \"close\": 628.44\n },\n {\n \"date\": \"2012-04-10\",\n \"close\": 626.2\n },\n {\n \"date\": \"2012-04-11\",\n \"close\": 622.77\n },\n {\n \"date\": \"2012-04-12\",\n \"close\": 605.23\n },\n {\n \"date\": \"2012-04-15\",\n \"close\": 580.13\n },\n {\n \"date\": \"2012-04-16\",\n \"close\": 609.7\n },\n {\n \"date\": \"2012-04-17\",\n \"close\": 608.34\n },\n {\n \"date\": \"2012-04-18\",\n \"close\": 587.44\n },\n {\n \"date\": \"2012-04-19\",\n \"close\": 572.98\n },\n {\n \"date\": \"2012-04-22\",\n \"close\": 571.7\n },\n {\n \"date\": \"2012-04-23\",\n \"close\": 560.28\n },\n {\n \"date\": \"2012-04-24\",\n \"close\": 610\n },\n {\n \"date\": \"2012-04-25\",\n \"close\": 607.7\n },\n {\n \"date\": \"2012-04-26\",\n \"close\": 603\n },\n {\n \"date\": \"2012-04-29\",\n \"close\": 583.98\n },\n {\n \"date\": \"2012-05-01\",\n \"close\": 582.13\n }\n ],\n },\n encode: { x: 'date', y: 'close' },\n animate: false,\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n {\"date\":\"2007-04-23\",\"close\":93.24},\n {\"date\":\"2007-04-24\",\"close\":95.35},\n {\"date\":\"2007-04-25\",\"close\":98.84},\n {\"date\":\"2007-04-26\",\"close\":99.92},\n {\"date\":\"2007-04-29\",\"close\":99.8},\n {\"date\":\"2007-05-01\",\"close\":99.47},\n {\"date\":\"2007-05-02\",\"close\":100.39},\n {\"date\":\"2007-05-03\",\"close\":100.4},\n {\"date\":\"2007-05-04\",\"close\":100.81},\n {\"date\":\"2007-05-07\",\"close\":103.92}\n];\n\nchart.options({\n type: 'line',\n data,\n encode: {\n x: 'date',\n y: 'close',\n },\n style: {\n lineWidth: 2,\n },\n axis: {\n x: {\n title: '日期',\n },\n y: {\n title: '收盘价',\n },\n },\n});\n\nchart.render();", + "duration": 7911, + "retrievedSkillIds": [ + "g2-mark-k-chart", + "g2-mark-line-multi", + "g2-mark-line-basic", + "g2-mark-bullet", + "g2-mark-link" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 762, + "expectedLength": 75442, + "similarity": 0.5335396724743586, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nconst data = [\n {\"date\":\"2007-04-23\",\"close\":93.24},\n {\"date\":\"2007-04-24\",\"close\":95.35},\n {\"date\":\"2007-04-25\",\"close\":98.84},\n {\"date\":\"2007-04-26\",\"close\":99.92},\n {\"date\":\"2007-04-29\",\"close\":99.8},\n {\"date\":\"2007-05-01\",\"close\":99.47},\n {\"date\":\"2007-05-02\",\"close\":100.39},\n {\"date\":\"2007-05-03\",\"close\":100.4},\n {\"date\":\"2007-05-04\",\"close\":100.81},\n {\"date\":\"2007-05-07\",\"close\":103.92}\n];\n\nchart.options({\n type: 'line',\n data,\n encode: {\n x: 'date',\n y: 'close',\n },\n style: {\n lineWidth: 2,\n },\n axis: {\n x: {\n title: '日期',\n },\n y: {\n title: '收盘价',\n },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "style", + "lineWidth", + "axis", + "x", + "title", + "y", + "title" + ], + "stringLiterals": [ + "date", + "close", + "date", + "close", + "date", + "close", + "date", + "close", + "date", + "close", + "date", + "close", + "date", + "close", + "date", + "close", + "date", + "close", + "date", + "close" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "type.line" + ] + } + } + }, + { + "id": "case-159", + "query": "根据描述绘制图表,使用 G2 创建一个热力图,展示多个学生在不同科目上的成绩分布情况。通过颜色深浅表示分数高低,并在每个单元格内显示具体分数值。参考数据:[{\"student\":\"张三\",\"subject\":\"语文\",\"score\":76},{\"student\":\"张三\",\"subject\":\"数学\",\"score\":93},{\"student\":\"张三\",\"subject\":\"英语\",\"score\":82},{\"student\":\"张三\",\"subject\":\"物理\",\"score\":67},{\"student\":\"张三\",\"subject\":\"化学\",\"score\":54},{\"student\":\"张三\",\"subject\":\"生物\",\"score\":98},{\"student\":\"李四\",\"subject\":\"语文\",\"score\":88},{\"student\":\"李四\",\"subject\":\"数学\",\"score\":57},{\"student\":\"李四\",\"subject\":\"英语\",\"score\":99},{\"student\":\"李四\",\"subject\":\"物理\",\"score\":71}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n});\n\nconst students = [\n '张三',\n '李四',\n '王五',\n '赵六',\n '钱七',\n '孙八',\n '周九',\n '吴十',\n];\nconst subjects = ['语文', '数学', '英语', '物理', '化学', '生物'];\n\n// 生成成绩数据\nconst data = [];\nstudents.forEach((student) => {\n subjects.forEach((subject) => {\n // 随机生成50-100之间的成绩\n const score = Math.floor(Math.random() * 51) + 50;\n data.push({\n student,\n subject,\n score,\n });\n });\n});\n\nchart.options({\n type: 'view',\n autoFit: true,\n data,\n coordinate: {\n type: 'cartesian',\n },\n children: [\n {\n type: 'cell',\n encode: {\n x: 'subject',\n y: 'student',\n color: 'score',\n },\n style: {\n inset: 1,\n },\n labels: [\n {\n text: 'score',\n style: {\n fill: (d) => (d.score > 85 ? '#fff' : '#000'),\n textAlign: 'center',\n },\n },\n ],\n },\n ],\n legend: {\n color: {\n position: 'right',\n flipPage: false,\n title: '分数',\n },\n },\n scale: {\n color: {\n domain: [60, 70, 80, 90],\n range: ['#F4664A', '#FAAD14', '#30BF78', '#0891B2', '#5B8FF9'],\n },\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"student\":\"张三\",\"subject\":\"语文\",\"score\":76},\n {\"student\":\"张三\",\"subject\":\"数学\",\"score\":93},\n {\"student\":\"张三\",\"subject\":\"英语\",\"score\":82},\n {\"student\":\"张三\",\"subject\":\"物理\",\"score\":67},\n {\"student\":\"张三\",\"subject\":\"化学\",\"score\":54},\n {\"student\":\"张三\",\"subject\":\"生物\",\"score\":98},\n {\"student\":\"李四\",\"subject\":\"语文\",\"score\":88},\n {\"student\":\"李四\",\"subject\":\"数学\",\"score\":57},\n {\"student\":\"李四\",\"subject\":\"英语\",\"score\":99},\n {\"student\":\"李四\",\"subject\":\"物理\",\"score\":71}\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 400,\n});\n\nchart.options({\n type: 'cell',\n data,\n encode: {\n x: 'subject',\n y: 'student',\n color: 'score',\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'YlOrRd',\n domain: [50, 100],\n },\n },\n style: {\n inset: 2,\n },\n labels: [\n {\n text: 'score',\n style: {\n fontSize: 14,\n fontWeight: 'bold',\n },\n transform: [\n { type: 'contrastReverse' },\n ],\n },\n ],\n axis: {\n x: { title: '科目' },\n y: { title: '学生' },\n },\n});\n\nchart.render();", + "duration": 10137, + "retrievedSkillIds": [ + "g2-mark-cell-heatmap", + "g2-mark-heatmap", + "g2-comp-facet-circle", + "g2-concept-chart-selection", + "g2-transform-groupx" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1127, + "expectedLength": 1248, + "similarity": 0.4927295511506038, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"student\":\"张三\",\"subject\":\"语文\",\"score\":76},\n {\"student\":\"张三\",\"subject\":\"数学\",\"score\":93},\n {\"student\":\"张三\",\"subject\":\"英语\",\"score\":82},\n {\"student\":\"张三\",\"subject\":\"物理\",\"score\":67},\n {\"student\":\"张三\",\"subject\":\"化学\",\"score\":54},\n {\"student\":\"张三\",\"subject\":\"生物\",\"score\":98},\n {\"student\":\"李四\",\"subject\":\"语文\",\"score\":88},\n {\"student\":\"李四\",\"subject\":\"数学\",\"score\":57},\n {\"student\":\"李四\",\"subject\":\"英语\",\"score\":99},\n {\"student\":\"李四\",\"subject\":\"物理\",\"score\":71}\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 400,\n});\n\nchart.options({\n type: 'cell',\n data,\n encode: {\n x: 'subject',\n y: 'student',\n color: 'score',\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'YlOrRd',\n domain: [50, 100],\n },\n },\n style: {\n inset: 2,\n },\n labels: [\n {\n text: 'score',\n style: {\n fontSize: 14,\n fontWeight: 'bold',\n },\n transform: [\n { type: 'contrastReverse' },\n ],\n },\n ],\n axis: {\n x: { title: '科目' },\n y: { title: '学生' },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "encode", + "x", + "y", + "color", + "scale", + "color", + "type", + "palette", + "domain", + "style", + "inset", + "labels", + "text", + "style", + "fontSize", + "fontWeight", + "transform", + "type", + "axis", + "x", + "title", + "y", + "title" + ], + "stringLiterals": [ + "student", + "subject", + "score", + "student", + "subject", + "score", + "student", + "subject", + "score", + "student", + "subject", + "score", + "student", + "subject", + "score", + "student", + "subject", + "score", + "student", + "subject", + "score", + "student", + "subject", + "score", + "student", + "subject", + "score", + "student", + "subject", + "score" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "x6.labels" + ] + } + } + }, + { + "id": "case-160", + "query": "根据描述绘制图表,使用 G2 创建一个横向甘特图,展示多个任务的开始时间和结束时间,任务名称在Y轴、时间跨度在X轴,每个任务用颜色区分,并设置基于持续时间的进入动画。\n参考数据:\n[{\"name\":\"event planning\",\"startTime\":1,\"endTime\":4},{\"name\":\"layout logistics\",\"startTime\":3,\"endTime\":13},{\"name\":\"select vendors\",\"startTime\":5,\"endTime\":8},{\"name\":\"hire venue\",\"startTime\":9,\"endTime\":13},{\"name\":\"hire caterer\",\"startTime\":10,\"endTime\":14},{\"name\":\"hire event decorators\",\"startTime\":12,\"endTime\":17},{\"name\":\"rehearsal\",\"startTime\":14,\"endTime\":16},{\"name\":\"event celebration\",\"startTime\":17,\"endTime\":18}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n type: 'interval',\n autoFit: true,\n data: [\n { name: 'event planning', startTime: 1, endTime: 4 },\n { name: 'layout logistics', startTime: 3, endTime: 13 },\n { name: 'select vendors', startTime: 5, endTime: 8 },\n { name: 'hire venue', startTime: 9, endTime: 13 },\n { name: 'hire caterer', startTime: 10, endTime: 14 },\n { name: 'hire event decorators', startTime: 12, endTime: 17 },\n { name: 'rehearsal', startTime: 14, endTime: 16 },\n { name: 'event celebration', startTime: 17, endTime: 18 },\n ],\n encode: {\n x: 'name',\n y: ['endTime', 'startTime'],\n color: 'name',\n enterDuration: (d) => d.endTime - d.startTime,\n enterDelay: 'startTime',\n },\n scale: { enterDuration: { zero: true, range: [0, 3000] } },\n coordinate: { transform: [{ type: 'transpose' }] },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { name: 'event planning', startTime: 1, endTime: 4 },\n { name: 'layout logistics', startTime: 3, endTime: 13 },\n { name: 'select vendors', startTime: 5, endTime: 8 },\n { name: 'hire venue', startTime: 9, endTime: 13 },\n { name: 'hire caterer', startTime: 10, endTime: 14 },\n { name: 'hire event decorators', startTime: 12, endTime: 17 },\n { name: 'rehearsal', startTime: 14, endTime: 16 },\n { name: 'event celebration', startTime: 17, endTime: 18 }\n ],\n encode: {\n x: 'name',\n y: 'startTime',\n y1: 'endTime',\n color: 'name',\n enterDuration: (d) => (d.endTime - d.startTime) * 200,\n enterDelay: (d) => d.startTime * 100,\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n labels: [\n { text: 'name', position: 'inside', fill: '#fff', transform: [{ type: 'contrastReverse' }] }\n ],\n});\n\nchart.render();", + "duration": 13922, + "retrievedSkillIds": [ + "g2-mark-gantt", + "g2-animation-keyframe", + "g2-scale-time", + "g2-comp-timing-keyframe", + "g2-interaction-brushx-filter" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1035, + "expectedLength": 932, + "similarity": 0.9619091665232604, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { name: 'event planning', startTime: 1, endTime: 4 },\n { name: 'layout logistics', startTime: 3, endTime: 13 },\n { name: 'select vendors', startTime: 5, endTime: 8 },\n { name: 'hire venue', startTime: 9, endTime: 13 },\n { name: 'hire caterer', startTime: 10, endTime: 14 },\n { name: 'hire event decorators', startTime: 12, endTime: 17 },\n { name: 'rehearsal', startTime: 14, endTime: 16 },\n { name: 'event celebration', startTime: 17, endTime: 18 }\n ],\n encode: {\n x: 'name',\n y: 'startTime',\n y1: 'endTime',\n color: 'name',\n enterDuration: (d) => (d.endTime - d.startTime) * 200,\n enterDelay: (d) => d.startTime * 100,\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n labels: [\n { text: 'name', position: 'inside', fill: '#fff', transform: [{ type: 'contrastReverse' }] }\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "name", + "startTime", + "endTime", + "name", + "startTime", + "endTime", + "name", + "startTime", + "endTime", + "name", + "startTime", + "endTime", + "name", + "startTime", + "endTime", + "name", + "startTime", + "endTime", + "name", + "startTime", + "endTime", + "name", + "startTime", + "endTime", + "encode", + "x", + "y", + "y1", + "color", + "enterDuration", + "enterDelay", + "coordinate", + "transform", + "type", + "labels", + "text", + "position", + "fill", + "transform", + "type" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-161", + "query": "根据描述绘制图表,使用打包图展示品牌在不同地区市场的覆盖情况,通过圆形的嵌套结构体现层级关系,内层为大区,外层为国家或子区域。颜色区分不同的大洲区域,鼠标悬停可查看具体覆盖门店数量。参考数据:[{\"name\":\"北美\",\"value\":400,\"children\":[{\"name\":\"美国\",\"value\":320},{\"name\":\"加拿大\",\"value\":80}]},{\"name\":\"欧洲\",\"value\":380,\"children\":[{\"name\":\"德国\",\"value\":150},{\"name\":\"法国\",\"value\":120},{\"name\":\"英国\",\"value\":110}]},{\"name\":\"亚太\",\"value\":520,\"children\":[{\"name\":\"中国\",\"value\":300,\"children\":[{\"name\":\"华北\",\"value\":100},{\"name\":\"华东\",\"value\":120},{\"name\":\"华南\",\"value\":80}]},{\"name\":\"日本\",\"value\":120},{\"name\":\"印度\",\"value\":100}]},{\"name\":\"其他\",\"value\":100}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({\n container: 'container',\n theme: 'light',\n autoFit: true,\n});\n\nchart.options({\n type: 'pack',\n width: 600,\n height: 600,\n data: {\n value: {\n name: '品牌市场覆盖',\n children: [\n { name: '北美', value: 400, children: [\n { name: '美国', value: 320 },\n { name: '加拿大', value: 80 }\n ]},\n { name: '欧洲', value: 380, children: [\n { name: '德国', value: 150 },\n { name: '法国', value: 120 },\n { name: '英国', value: 110 }\n ]},\n { name: '亚太', value: 520, children: [\n { name: '中国', value: 300, children: [\n { name: '华北', value: 100 },\n { name: '华东', value: 120 },\n { name: '华南', value: 80 }\n ]},\n { name: '日本', value: 120 },\n { name: '印度', value: 100 }\n ]},\n { name: '其他', value: 100 }\n ]\n }\n },\n encode: {\n value: 'value',\n color: (d) => d.parent ? d.parent.data.name : 'Region',\n },\n scale: {\n color: {\n palette: 'tableau10',\n domain: ['亚太', '欧洲', '北美', '其他']\n }\n },\n style: {\n labelText: (d) => d.depth === 1 ? `${d.data.name}\n${d.data.value}` : d.depth === 2 && d.r > 18 ? d.data.name : '',\n labelFontSize: 10,\n labelLineHeight: 14,\n labelFontWeight: '500',\n stroke: '#f0f0f0',\n strokeWidth: 2\n },\n legend: false,\n tooltip: { items: [{ name: '覆盖门店数', field: 'value' }] }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '全球市场',\n value: 1400,\n children: [\n {\n name: '北美',\n value: 400,\n children: [\n { name: '美国', value: 320 },\n { name: '加拿大', value: 80 }\n ]\n },\n {\n name: '欧洲',\n value: 380,\n children: [\n { name: '德国', value: 150 },\n { name: '法国', value: 120 },\n { name: '英国', value: 110 }\n ]\n },\n {\n name: '亚太',\n value: 520,\n children: [\n {\n name: '中国',\n value: 300,\n children: [\n { name: '华北', value: 100 },\n { name: '华东', value: 120 },\n { name: '华南', value: 80 }\n ]\n },\n { name: '日本', value: 120 },\n { name: '印度', value: 100 }\n ]\n },\n {\n name: '其他',\n value: 100\n }\n ]\n};\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 640\n});\n\nchart.options({\n type: 'pack',\n data: { value: data },\n encode: {\n value: 'value',\n color: (d) => d.path?.[1] || d.data?.name\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A']\n }\n },\n style: {\n stroke: '#fff',\n lineWidth: 2,\n fillOpacity: 0.85\n },\n labels: [\n {\n text: (d) => {\n if (d.height > 0 && d.depth > 0) return '';\n return `${d.data?.name}\\n${d.value}家`;\n },\n position: 'inside',\n fontSize: 11,\n textAlign: 'center',\n transform: [{ type: 'contrastReverse' }]\n }\n ],\n tooltip: {\n items: [\n { field: (d) => d.data?.name, name: '区域' },\n { field: 'value', name: '门店数量' }\n ]\n },\n legend: {\n color: {\n title: '大洲区域',\n itemLabelText: (d) => d.label\n }\n }\n});\n\nchart.render();", + "duration": 37744, + "retrievedSkillIds": [ + "g2-mark-pack", + "g2-mark-arc-donut", + "g2-mark-area-stacked", + "g2-mark-partition", + "g2-mark-boxplot" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1751, + "expectedLength": 1433, + "similarity": 0.6901032493167325, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = {\n name: '全球市场',\n value: 1400,\n children: [\n {\n name: '北美',\n value: 400,\n children: [\n { name: '美国', value: 320 },\n { name: '加拿大', value: 80 }\n ]\n },\n {\n name: '欧洲',\n value: 380,\n children: [\n { name: '德国', value: 150 },\n { name: '法国', value: 120 },\n { name: '英国', value: 110 }\n ]\n },\n {\n name: '亚太',\n value: 520,\n children: [\n {\n name: '中国',\n value: 300,\n children: [\n { name: '华北', value: 100 },\n { name: '华东', value: 120 },\n { name: '华南', value: 80 }\n ]\n },\n { name: '日本', value: 120 },\n { name: '印度', value: 100 }\n ]\n },\n {\n name: '其他',\n value: 100\n }\n ]\n};\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 640\n});\n\nchart.options({\n type: 'pack',\n data: { value: data },\n encode: {\n value: 'value',\n color: (d) => d.path?.[1] || d.data?.name\n },\n scale: {\n color: {\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A']\n }\n },\n style: {\n stroke: '#fff',\n lineWidth: 2,\n fillOpacity: 0.85\n },\n labels: [\n {\n text: (d) => {\n if (d.height > 0 && d.depth > 0) return '';\n return `${d.data?.name}\\n${d.value}家`;\n },\n position: 'inside',\n fontSize: 11,\n textAlign: 'center',\n transform: [{ type: 'contrastReverse' }]\n }\n ],\n tooltip: {\n items: [\n { field: (d) => d.data?.name, name: '区域' },\n { field: 'value', name: '门店数量' }\n ]\n },\n legend: {\n color: {\n title: '大洲区域',\n itemLabelText: (d) => d.label\n }\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "name", + "value", + "children", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "children", + "name", + "value", + "children", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "container", + "width", + "height", + "type", + "data", + "value", + "encode", + "value", + "color", + "scale", + "color", + "range", + "style", + "stroke", + "lineWidth", + "fillOpacity", + "labels", + "text", + "position", + "fontSize", + "textAlign", + "transform", + "type", + "tooltip", + "items", + "field", + "name", + "field", + "name", + "legend", + "color", + "title", + "itemLabelText" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "view.children", + "x6.labels" + ] + } + } + }, + { + "id": "case-162", + "query": "根据描述绘制图表,使用给定的数据创建一个环形饼图,展示各项消费占比情况,并对‘Food’项设置透明度。图表通过弧形标签显示具体数值百分比,未启用图例。参考数据:[{\"item\":\"Food\",\"value\":35},{\"item\":\"Transport\",\"value\":15},{\"item\":\"Housing\",\"value\":30},{\"item\":\"Entertainment\",\"value\":8},{\"item\":\"Other\",\"value\":12}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({ container: 'container', theme: 'classic' });\nchart.options({\n type: 'interval',\n autoFit: true,\n data: [\n { item: 'Food', value: 35 },\n { item: 'Transport', value: 15 },\n { item: 'Housing', value: 30 },\n { item: 'Entertainment', value: 8 },\n { item: 'Other', value: 12 }\n ],\n encode: { y: 'value', color: 'item' },\n transform: [{ type: 'stackY' }],\n coordinate: { type: 'theta' },\n labels: [{ text: (d) => d.value + '%', style: { fontSize: 12, fontWeight: 600 } }],\n style: { fillOpacity: (d) => d.item === 'Food' ? 0.5 : 1, stroke: '#fff' },\n legend: false\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { item: 'Food', value: 35 },\n { item: 'Transport', value: 15 },\n { item: 'Housing', value: 30 },\n { item: 'Entertainment', value: 8 },\n { item: 'Other', value: 12 },\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 480,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n y: 'value',\n color: 'item',\n },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n innerRadius: 0.6,\n outerRadius: 0.85,\n },\n style: {\n fillOpacity: (d) => d.item === 'Food' ? 0.5 : 1,\n },\n labels: [\n {\n text: (d, i, arr) => {\n const total = arr.reduce((sum, item) => sum + item.value, 0);\n return `${d.item}\\n${((d.value / total) * 100).toFixed(0)}%`;\n },\n position: 'outside',\n connector: true,\n },\n ],\n legend: false,\n});\n\nchart.render();", + "duration": 12528, + "retrievedSkillIds": [ + "g2-mark-arc-donut", + "g2-coord-theta", + "g2-mark-arc-pie", + "g2-mark-rose", + "g2-concept-chart-selection" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 892, + "expectedLength": 628, + "similarity": 0.6715663523636134, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n { item: 'Food', value: 35 },\n { item: 'Transport', value: 15 },\n { item: 'Housing', value: 30 },\n { item: 'Entertainment', value: 8 },\n { item: 'Other', value: 12 },\n];\n\nconst chart = new Chart({\n container: 'container',\n width: 480,\n height: 480,\n});\n\nchart.options({\n type: 'interval',\n data,\n encode: {\n y: 'value',\n color: 'item',\n },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n innerRadius: 0.6,\n outerRadius: 0.85,\n },\n style: {\n fillOpacity: (d) => d.item === 'Food' ? 0.5 : 1,\n },\n labels: [\n {\n text: (d, i, arr) => {\n const total = arr.reduce((sum, item) => sum + item.value, 0);\n return `${d.item}\\n${((d.value / total) * 100).toFixed(0)}%`;\n },\n position: 'outside',\n connector: true,\n },\n ],\n legend: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "reduce", + "toFixed", + "render" + ], + "objectKeys": [ + "item", + "value", + "item", + "value", + "item", + "value", + "item", + "value", + "item", + "value", + "container", + "width", + "height", + "type", + "encode", + "y", + "color", + "transform", + "type", + "coordinate", + "type", + "innerRadius", + "outerRadius", + "style", + "fillOpacity", + "5", + "labels", + "text", + "position", + "connector", + "legend" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-163", + "query": "根据描述绘制图表,使用 G2 创建一个箱线图(boxplot),基于实验数据展示各实验组的速度分布统计图。\n参考数据:\n[{\"Expt\":1,\"Run\":1,\"Speed\":850},{\"Expt\":1,\"Run\":2,\"Speed\":740},{\"Expt\":1,\"Run\":3,\"Speed\":900},{\"Expt\":1,\"Run\":4,\"Speed\":1070},{\"Expt\":1,\"Run\":5,\"Speed\":930},{\"Expt\":1,\"Run\":6,\"Speed\":850},{\"Expt\":1,\"Run\":7,\"Speed\":950},{\"Expt\":1,\"Run\":8,\"Speed\":980},{\"Expt\":1,\"Run\":9,\"Speed\":980},{\"Expt\":1,\"Run\":10,\"Speed\":880}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"inset\": 6,\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": {\n \"type\": \"inline\",\n \"value\": [\n {\n \"Expt\": 1,\n \"Run\": 1,\n \"Speed\": 850\n },\n {\n \"Expt\": 1,\n \"Run\": 2,\n \"Speed\": 740\n },\n {\n \"Expt\": 1,\n \"Run\": 3,\n \"Speed\": 900\n },\n {\n \"Expt\": 1,\n \"Run\": 4,\n \"Speed\": 1070\n },\n {\n \"Expt\": 1,\n \"Run\": 5,\n \"Speed\": 930\n },\n {\n \"Expt\": 1,\n \"Run\": 6,\n \"Speed\": 850\n },\n {\n \"Expt\": 1,\n \"Run\": 7,\n \"Speed\": 950\n },\n {\n \"Expt\": 1,\n \"Run\": 8,\n \"Speed\": 980\n },\n {\n \"Expt\": 1,\n \"Run\": 9,\n \"Speed\": 980\n },\n {\n \"Expt\": 1,\n \"Run\": 10,\n \"Speed\": 880\n },\n {\n \"Expt\": 1,\n \"Run\": 11,\n \"Speed\": 1000\n },\n {\n \"Expt\": 1,\n \"Run\": 12,\n \"Speed\": 980\n },\n {\n \"Expt\": 1,\n \"Run\": 13,\n \"Speed\": 930\n },\n {\n \"Expt\": 1,\n \"Run\": 14,\n \"Speed\": 650\n },\n {\n \"Expt\": 1,\n \"Run\": 15,\n \"Speed\": 760\n },\n {\n \"Expt\": 1,\n \"Run\": 16,\n \"Speed\": 810\n },\n {\n \"Expt\": 1,\n \"Run\": 17,\n \"Speed\": 1000\n },\n {\n \"Expt\": 1,\n \"Run\": 18,\n \"Speed\": 1000\n },\n {\n \"Expt\": 1,\n \"Run\": 19,\n \"Speed\": 960\n },\n {\n \"Expt\": 1,\n \"Run\": 20,\n \"Speed\": 960\n },\n {\n \"Expt\": 2,\n \"Run\": 1,\n \"Speed\": 960\n },\n {\n \"Expt\": 2,\n \"Run\": 2,\n \"Speed\": 940\n },\n {\n \"Expt\": 2,\n \"Run\": 3,\n \"Speed\": 960\n },\n {\n \"Expt\": 2,\n \"Run\": 4,\n \"Speed\": 940\n },\n {\n \"Expt\": 2,\n \"Run\": 5,\n \"Speed\": 880\n },\n {\n \"Expt\": 2,\n \"Run\": 6,\n \"Speed\": 800\n },\n {\n \"Expt\": 2,\n \"Run\": 7,\n \"Speed\": 850\n },\n {\n \"Expt\": 2,\n \"Run\": 8,\n \"Speed\": 880\n },\n {\n \"Expt\": 2,\n \"Run\": 9,\n \"Speed\": 900\n },\n {\n \"Expt\": 2,\n \"Run\": 10,\n \"Speed\": 840\n },\n {\n \"Expt\": 2,\n \"Run\": 11,\n \"Speed\": 830\n },\n {\n \"Expt\": 2,\n \"Run\": 12,\n \"Speed\": 790\n },\n {\n \"Expt\": 2,\n \"Run\": 13,\n \"Speed\": 810\n },\n {\n \"Expt\": 2,\n \"Run\": 14,\n \"Speed\": 880\n },\n {\n \"Expt\": 2,\n \"Run\": 15,\n \"Speed\": 880\n },\n {\n \"Expt\": 2,\n \"Run\": 16,\n \"Speed\": 830\n },\n {\n \"Expt\": 2,\n \"Run\": 17,\n \"Speed\": 800\n },\n {\n \"Expt\": 2,\n \"Run\": 18,\n \"Speed\": 790\n },\n {\n \"Expt\": 2,\n \"Run\": 19,\n \"Speed\": 760\n },\n {\n \"Expt\": 2,\n \"Run\": 20,\n \"Speed\": 800\n },\n {\n \"Expt\": 3,\n \"Run\": 1,\n \"Speed\": 880\n },\n {\n \"Expt\": 3,\n \"Run\": 2,\n \"Speed\": 880\n },\n {\n \"Expt\": 3,\n \"Run\": 3,\n \"Speed\": 880\n },\n {\n \"Expt\": 3,\n \"Run\": 4,\n \"Speed\": 860\n },\n {\n \"Expt\": 3,\n \"Run\": 5,\n \"Speed\": 720\n },\n {\n \"Expt\": 3,\n \"Run\": 6,\n \"Speed\": 720\n },\n {\n \"Expt\": 3,\n \"Run\": 7,\n \"Speed\": 620\n },\n {\n \"Expt\": 3,\n \"Run\": 8,\n \"Speed\": 860\n },\n {\n \"Expt\": 3,\n \"Run\": 9,\n \"Speed\": 970\n },\n {\n \"Expt\": 3,\n \"Run\": 10,\n \"Speed\": 950\n },\n {\n \"Expt\": 3,\n \"Run\": 11,\n \"Speed\": 880\n },\n {\n \"Expt\": 3,\n \"Run\": 12,\n \"Speed\": 910\n },\n {\n \"Expt\": 3,\n \"Run\": 13,\n \"Speed\": 850\n },\n {\n \"Expt\": 3,\n \"Run\": 14,\n \"Speed\": 870\n },\n {\n \"Expt\": 3,\n \"Run\": 15,\n \"Speed\": 840\n },\n {\n \"Expt\": 3,\n \"Run\": 16,\n \"Speed\": 840\n },\n {\n \"Expt\": 3,\n \"Run\": 17,\n \"Speed\": 850\n },\n {\n \"Expt\": 3,\n \"Run\": 18,\n \"Speed\": 840\n },\n {\n \"Expt\": 3,\n \"Run\": 19,\n \"Speed\": 840\n },\n {\n \"Expt\": 3,\n \"Run\": 20,\n \"Speed\": 840\n },\n {\n \"Expt\": 4,\n \"Run\": 1,\n \"Speed\": 890\n },\n {\n \"Expt\": 4,\n \"Run\": 2,\n \"Speed\": 810\n },\n {\n \"Expt\": 4,\n \"Run\": 3,\n \"Speed\": 810\n },\n {\n \"Expt\": 4,\n \"Run\": 4,\n \"Speed\": 820\n },\n {\n \"Expt\": 4,\n \"Run\": 5,\n \"Speed\": 800\n },\n {\n \"Expt\": 4,\n \"Run\": 6,\n \"Speed\": 770\n },\n {\n \"Expt\": 4,\n \"Run\": 7,\n \"Speed\": 760\n },\n {\n \"Expt\": 4,\n \"Run\": 8,\n \"Speed\": 740\n },\n {\n \"Expt\": 4,\n \"Run\": 9,\n \"Speed\": 750\n },\n {\n \"Expt\": 4,\n \"Run\": 10,\n \"Speed\": 760\n },\n {\n \"Expt\": 4,\n \"Run\": 11,\n \"Speed\": 910\n },\n {\n \"Expt\": 4,\n \"Run\": 12,\n \"Speed\": 920\n },\n {\n \"Expt\": 4,\n \"Run\": 13,\n \"Speed\": 890\n },\n {\n \"Expt\": 4,\n \"Run\": 14,\n \"Speed\": 860\n },\n {\n \"Expt\": 4,\n \"Run\": 15,\n \"Speed\": 880\n },\n {\n \"Expt\": 4,\n \"Run\": 16,\n \"Speed\": 720\n },\n {\n \"Expt\": 4,\n \"Run\": 17,\n \"Speed\": 840\n },\n {\n \"Expt\": 4,\n \"Run\": 18,\n \"Speed\": 850\n },\n {\n \"Expt\": 4,\n \"Run\": 19,\n \"Speed\": 850\n },\n {\n \"Expt\": 4,\n \"Run\": 20,\n \"Speed\": 780\n },\n {\n \"Expt\": 5,\n \"Run\": 1,\n \"Speed\": 890\n },\n {\n \"Expt\": 5,\n \"Run\": 2,\n \"Speed\": 840\n },\n {\n \"Expt\": 5,\n \"Run\": 3,\n \"Speed\": 780\n },\n {\n \"Expt\": 5,\n \"Run\": 4,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 5,\n \"Speed\": 760\n },\n {\n \"Expt\": 5,\n \"Run\": 6,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 7,\n \"Speed\": 790\n },\n {\n \"Expt\": 5,\n \"Run\": 8,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 9,\n \"Speed\": 820\n },\n {\n \"Expt\": 5,\n \"Run\": 10,\n \"Speed\": 850\n },\n {\n \"Expt\": 5,\n \"Run\": 11,\n \"Speed\": 870\n },\n {\n \"Expt\": 5,\n \"Run\": 12,\n \"Speed\": 870\n },\n {\n \"Expt\": 5,\n \"Run\": 13,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 14,\n \"Speed\": 740\n },\n {\n \"Expt\": 5,\n \"Run\": 15,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 16,\n \"Speed\": 940\n },\n {\n \"Expt\": 5,\n \"Run\": 17,\n \"Speed\": 950\n },\n {\n \"Expt\": 5,\n \"Run\": 18,\n \"Speed\": 800\n },\n {\n \"Expt\": 5,\n \"Run\": 19,\n \"Speed\": 810\n },\n {\n \"Expt\": 5,\n \"Run\": 20,\n \"Speed\": 870\n }\n ]\n },\n \"encode\": {\n \"x\": \"Expt\",\n \"y\": \"Speed\"\n },\n \"tooltip\": {\n \"items\": [\n {\n \"name\": \"min\",\n \"channel\": \"y\"\n },\n {\n \"name\": \"q1\",\n \"channel\": \"y1\"\n },\n {\n \"name\": \"q2\",\n \"channel\": \"y2\"\n },\n {\n \"name\": \"q3\",\n \"channel\": \"y3\"\n },\n {\n \"name\": \"max\",\n \"color\": \"red\",\n \"channel\": \"y4\"\n }\n ]\n },\n \"type\": \"boxplot\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'boxplot',\n data: [\n {\"Expt\":1,\"Run\":1,\"Speed\":850},\n {\"Expt\":1,\"Run\":2,\"Speed\":740},\n {\"Expt\":1,\"Run\":3,\"Speed\":900},\n {\"Expt\":1,\"Run\":4,\"Speed\":1070},\n {\"Expt\":1,\"Run\":5,\"Speed\":930},\n {\"Expt\":1,\"Run\":6,\"Speed\":850},\n {\"Expt\":1,\"Run\":7,\"Speed\":950},\n {\"Expt\":1,\"Run\":8,\"Speed\":980},\n {\"Expt\":1,\"Run\":9,\"Speed\":980},\n {\"Expt\":1,\"Run\":10,\"Speed\":880}\n ],\n encode: {\n x: 'Expt',\n y: 'Speed',\n },\n style: {\n boxFill: '#1890ff',\n boxFillOpacity: 0.3,\n boxStroke: '#1890ff',\n medianStroke: '#ff4d4f',\n medianLineWidth: 2,\n },\n axis: {\n y: { title: '速度' },\n x: { title: '实验组' },\n },\n});\n\nchart.render();", + "duration": 7511, + "retrievedSkillIds": [ + "g2-mark-boxplot", + "g2-mark-box-boxplot", + "g2-mark-distribution-curve", + "g2-transform-binx", + "g2-mark-arc-donut" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 808, + "expectedLength": 6893, + "similarity": 0.572893949271068, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nchart.options({\n type: 'boxplot',\n data: [\n {\"Expt\":1,\"Run\":1,\"Speed\":850},\n {\"Expt\":1,\"Run\":2,\"Speed\":740},\n {\"Expt\":1,\"Run\":3,\"Speed\":900},\n {\"Expt\":1,\"Run\":4,\"Speed\":1070},\n {\"Expt\":1,\"Run\":5,\"Speed\":930},\n {\"Expt\":1,\"Run\":6,\"Speed\":850},\n {\"Expt\":1,\"Run\":7,\"Speed\":950},\n {\"Expt\":1,\"Run\":8,\"Speed\":980},\n {\"Expt\":1,\"Run\":9,\"Speed\":980},\n {\"Expt\":1,\"Run\":10,\"Speed\":880}\n ],\n encode: {\n x: 'Expt',\n y: 'Speed',\n },\n style: {\n boxFill: '#1890ff',\n boxFillOpacity: 0.3,\n boxStroke: '#1890ff',\n medianStroke: '#ff4d4f',\n medianLineWidth: 2,\n },\n axis: {\n y: { title: '速度' },\n x: { title: '实验组' },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "encode", + "x", + "y", + "style", + "boxFill", + "boxFillOpacity", + "boxStroke", + "medianStroke", + "medianLineWidth", + "axis", + "y", + "title", + "x", + "title" + ], + "stringLiterals": [ + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed", + "Expt", + "Run", + "Speed" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode" + ] + } + } + }, + { + "id": "case-164", + "query": "根据描述绘制图表,使用G2,基于提供的flat数据数组,渲染一个堆叠的极坐标(theta)环形图,对比不同产品的数值大小。参考数据:\n[{\"name\":\"产品A\",\"value\":230},{\"name\":\"产品B\",\"value\":180},{\"name\":\"产品C\",\"value\":150},{\"name\":\"产品D\",\"value\":120}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n theme: 'classic',\n autoFit: true,\n});\n\nconst simpleDataFlat = [\n { name: '产品A', value: 230 },\n { name: '产品B', value: 180 },\n { name: '产品C', value: 150 },\n { name: '产品D', value: 120 },\n];\n\nchart.options({\n type: 'interval',\n data: simpleDataFlat,\n encode: { y: 'value', color: 'name' },\n transform: [{ type: 'stackY' }],\n coordinate: { type: 'theta', innerRadius: 0.6 },\n legend: {\n color: { position: 'right' },\n },\n labels: [\n {\n text: (d, i, data) => {\n const total = data.reduce((acc, curr) => acc + curr.value, 0);\n const percent = ((d.value / total) * 100).toFixed(2);\n return `${percent}%`;\n }\n }\n ],\n interaction: {\n elementHoverScale: true,\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { name: '产品A', value: 230 },\n { name: '产品B', value: 180 },\n { name: '产品C', value: 150 },\n { name: '产品D', value: 120 },\n ],\n encode: {\n y: 'value',\n color: 'name',\n },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n innerRadius: 0.5,\n outerRadius: 0.8,\n },\n labels: [\n {\n text: (d) => `${d.name}: ${d.value}`,\n position: 'outside',\n connector: true,\n },\n ],\n legend: {\n color: { position: 'bottom', layout: { justifyContent: 'center' } },\n },\n});\n\nchart.render();", + "duration": 7936, + "retrievedSkillIds": [ + "g2-mark-arc-donut", + "g2-coord-theta", + "g2-mark-sunburst", + "g2-transform-stacky", + "g2-mark-arc-pie" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 697, + "expectedLength": 821, + "similarity": 0.7905174227936376, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { name: '产品A', value: 230 },\n { name: '产品B', value: 180 },\n { name: '产品C', value: 150 },\n { name: '产品D', value: 120 },\n ],\n encode: {\n y: 'value',\n color: 'name',\n },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n innerRadius: 0.5,\n outerRadius: 0.8,\n },\n labels: [\n {\n text: (d) => `${d.name}: ${d.value}`,\n position: 'outside',\n connector: true,\n },\n ],\n legend: {\n color: { position: 'bottom', layout: { justifyContent: 'center' } },\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "type", + "data", + "name", + "value", + "name", + "value", + "name", + "value", + "name", + "value", + "encode", + "y", + "color", + "transform", + "type", + "coordinate", + "type", + "innerRadius", + "outerRadius", + "labels", + "text", + "position", + "connector", + "legend", + "color", + "position", + "layout", + "justifyContent" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-165", + "query": "根据描述绘制图表,使用给定的数据创建一个环形图,通过堆叠 Y 轴变换和 theta 坐标系来展示两层结构的数值分布情况,并根据层级设置不同的字体大小显示标签,同时支持图例过滤交互。参考数据:[{\"item\":\"A\",\"value\":30,\"layer\":1},{\"item\":\"B\",\"value\":25,\"layer\":1},{\"item\":\"C\",\"value\":20,\"layer\":1},{\"item\":\"A1\",\"value\":10,\"layer\":2,\"parent\":\"A\"},{\"item\":\"A2\",\"value\":20,\"layer\":2,\"parent\":\"A\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "const chart = new Chart({ container: 'container', theme: 'classic' });\nchart.options({\n type: 'interval',\n autoFit: true,\n data: [\n { item: 'A', value: 30, layer: 1 },\n { item: 'B', value: 25, layer: 1 },\n { item: 'C', value: 20, layer: 1 },\n { item: 'A1', value: 10, layer: 2, parent: 'A' },\n { item: 'A2', value: 20, layer: 2, parent: 'A' }\n ],\n encode: { y: (d) => (d.layer === 2 ? d.value/2 : d.value), color: 'item' },\n transform: [{ type: 'stackY' }],\n coordinate: { type: 'theta', innerRadius: 0.4 },\n legend: { color: { title: false } },\n labels: [{ text: 'item', position: 'inside', style: { fontSize: d => d.layer === 1 ? 12 : 10 } }],\n interaction: { legendFilter: true }\n});\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"item\":\"A\",\"value\":30,\"layer\":1},\n {\"item\":\"B\",\"value\":25,\"layer\":1},\n {\"item\":\"C\",\"value\":20,\"layer\":1},\n {\"item\":\"A1\",\"value\":10,\"layer\":2,\"parent\":\"A\"},\n {\"item\":\"A2\",\"value\":20,\"layer\":2,\"parent\":\"A\"}\n];\n\nchart.options({\n type: 'interval',\n data: data,\n encode: {\n y: 'value',\n color: 'item',\n },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n outerRadius: 0.8,\n innerRadius: 0.5,\n },\n labels: [\n {\n text: 'item',\n position: 'outside',\n connector: true,\n style: {\n fontSize: (d) => d.layer === 1 ? 14 : 11,\n fontWeight: (d) => d.layer === 1 ? 'bold' : 'normal',\n },\n },\n ],\n legend: {\n color: {\n position: 'right',\n },\n },\n tooltip: {\n title: 'item',\n items: [\n { field: 'value', name: '数值' },\n { field: 'layer', name: '层级' },\n { field: 'parent', name: '父项' },\n ],\n },\n});\n\nchart.render();", + "duration": 17348, + "retrievedSkillIds": [ + "g2-mark-arc-donut", + "g2-mark-tree", + "g2-mark-arc-pie", + "g2-coord-theta", + "g2-mark-interval-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1063, + "expectedLength": 727, + "similarity": 0.6060764741177112, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 640,\n height: 480,\n});\n\nconst data = [\n {\"item\":\"A\",\"value\":30,\"layer\":1},\n {\"item\":\"B\",\"value\":25,\"layer\":1},\n {\"item\":\"C\",\"value\":20,\"layer\":1},\n {\"item\":\"A1\",\"value\":10,\"layer\":2,\"parent\":\"A\"},\n {\"item\":\"A2\",\"value\":20,\"layer\":2,\"parent\":\"A\"}\n];\n\nchart.options({\n type: 'interval',\n data: data,\n encode: {\n y: 'value',\n color: 'item',\n },\n transform: [{ type: 'stackY' }],\n coordinate: {\n type: 'theta',\n outerRadius: 0.8,\n innerRadius: 0.5,\n },\n labels: [\n {\n text: 'item',\n position: 'outside',\n connector: true,\n style: {\n fontSize: (d) => d.layer === 1 ? 14 : 11,\n fontWeight: (d) => d.layer === 1 ? 'bold' : 'normal',\n },\n },\n ],\n legend: {\n color: {\n position: 'right',\n },\n },\n tooltip: {\n title: 'item',\n items: [\n { field: 'value', name: '数值' },\n { field: 'layer', name: '层级' },\n { field: 'parent', name: '父项' },\n ],\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "encode", + "y", + "color", + "transform", + "type", + "coordinate", + "type", + "outerRadius", + "innerRadius", + "labels", + "text", + "position", + "connector", + "style", + "fontSize", + "14", + "fontWeight", + "legend", + "color", + "position", + "tooltip", + "title", + "items", + "field", + "name", + "field", + "name", + "field", + "name" + ], + "stringLiterals": [ + "item", + "value", + "layer", + "item", + "value", + "layer", + "item", + "value", + "layer", + "item", + "value", + "layer", + "parent", + "item", + "value", + "layer", + "parent" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-166", + "query": "根据描述绘制图表,使用 G2 绘制一个横向的金字塔图,展示用户在不同阶段的转化情况,并标注各阶段的数值和流失比例。每个阶段用不同颜色区分,整体呈现漏斗状的转化趋势。\n参考数据:[{\"stage\":\"用户曝光\",\"value\":120000,\"loss\":\"80%\"},{\"stage\":\"点击广告\",\"value\":32000,\"loss\":\"73.3%\"},{\"stage\":\"下载APP\",\"value\":18000,\"loss\":\"43.8%\"},{\"stage\":\"注册账号\",\"value\":9000,\"loss\":\"50%\"},{\"stage\":\"首次登录\",\"value\":4500,\"loss\":\"50%\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container', theme: 'classic' });\n\nchart.options({\n type: 'interval',\n data: [\n { stage: '用户曝光', value: 120000, loss: '80%' },\n { stage: '点击广告', value: 32000, loss: '73.3%' },\n { stage: '下载APP', value: 18000, loss: '43.8%' },\n { stage: '注册账号', value: 9000, loss: '50%' },\n { stage: '首次登录', value: 4500, loss: '50%' }\n ],\n encode: {\n x: 'stage',\n y: 'value',\n color: 'stage',\n shape: 'pyramid'\n },\n coordinate: { transform: [{ type: 'transpose' }] },\n transform: [{ type: 'symmetryY' }],\n scale: { color: { palette: 'reds' } },\n style: { labelText: (d) => `${d.stage}\\n(${d.loss}流失)` },\n labels: [\n { text: (d) => `${d.value.toLocaleString()}`, position: 'inside', transform: [{ type: 'contrastReverse' }] },\n { text: (d) => `${d.loss}流失`, offsetY: -8 }\n ],\n legend: false,\n axis: { y: { labelFormatter: '.2s' } }\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { stage: '用户曝光', value: 120000, loss: '80%' },\n { stage: '点击广告', value: 32000, loss: '73.3%' },\n { stage: '下载APP', value: 18000, loss: '43.8%' },\n { stage: '注册账号', value: 9000, loss: '50%' },\n { stage: '首次登录', value: 4500, loss: '50%' },\n ],\n encode: {\n x: 'stage',\n y: 'value',\n color: 'stage',\n shape: 'pyramid',\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n transform: [{ type: 'symmetryY' }],\n style: {\n reverse: true,\n },\n scale: {\n color: {\n palette: 'spectral',\n },\n },\n axis: false,\n legend: false,\n labels: [\n {\n text: (d) => `${d.stage}\\n${d.value.toLocaleString()}`,\n position: 'inside',\n transform: [{ type: 'contrastReverse' }],\n style: {\n fontSize: 13,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n },\n {\n text: (d) => `流失率: ${d.loss}`,\n position: 'right',\n style: {\n fontSize: 12,\n fill: '#666',\n },\n dx: 12,\n },\n ],\n});\n\nchart.render();", + "duration": 28361, + "retrievedSkillIds": [ + "g2-mark-funnel", + "g2-scale-sequential", + "g2-mark-interval-basic", + "g2-mark-arc-pie", + "g2-mark-line-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1195, + "expectedLength": 951, + "similarity": 0.8811288016278942, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { stage: '用户曝光', value: 120000, loss: '80%' },\n { stage: '点击广告', value: 32000, loss: '73.3%' },\n { stage: '下载APP', value: 18000, loss: '43.8%' },\n { stage: '注册账号', value: 9000, loss: '50%' },\n { stage: '首次登录', value: 4500, loss: '50%' },\n ],\n encode: {\n x: 'stage',\n y: 'value',\n color: 'stage',\n shape: 'pyramid',\n },\n coordinate: {\n transform: [{ type: 'transpose' }],\n },\n transform: [{ type: 'symmetryY' }],\n style: {\n reverse: true,\n },\n scale: {\n color: {\n palette: 'spectral',\n },\n },\n axis: false,\n legend: false,\n labels: [\n {\n text: (d) => `${d.stage}\\n${d.value.toLocaleString()}`,\n position: 'inside',\n transform: [{ type: 'contrastReverse' }],\n style: {\n fontSize: 13,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n },\n {\n text: (d) => `流失率: ${d.loss}`,\n position: 'right',\n style: {\n fontSize: 12,\n fill: '#666',\n },\n dx: 12,\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toLocaleString", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "stage", + "value", + "loss", + "stage", + "value", + "loss", + "stage", + "value", + "loss", + "stage", + "value", + "loss", + "stage", + "value", + "loss", + "encode", + "x", + "y", + "color", + "shape", + "coordinate", + "transform", + "type", + "transform", + "type", + "style", + "reverse", + "scale", + "color", + "palette", + "axis", + "legend", + "labels", + "text", + "position", + "transform", + "type", + "style", + "fontSize", + "fontWeight", + "textAlign", + "text", + "position", + "style", + "fontSize", + "fill", + "dx" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "coordinate", + "scale", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-167", + "query": "根据描述绘制图表,使用 G2 创建一个横向(transpose)坐标系的图表,包含三个图层:一个表示 ranges 的灰色柱状条、一个表示 measures 的蓝色柱状条(带右侧数据标签),以及一个用红色线条表示 target 值的点标记。整体用于展示不同星级分类下的 ranges、measures 和 target 三个指标的对比关系。参考数据:\n[{\"title\":\"5🌟\",\"ranges\":100,\"measures\":40,\"target\":85},{\"title\":\"4🌟\",\"ranges\":100,\"measures\":80,\"target\":40},{\"title\":\"3🌟\",\"ranges\":100,\"measures\":20,\"target\":22},{\"title\":\"0-2🌟\",\"ranges\":100,\"measures\":30,\"target\":10}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"coordinate\": {\n \"transform\": [\n {\n \"type\": \"transpose\"\n }\n ]\n },\n \"data\": [\n {\n \"title\": \"5🌟\",\n \"ranges\": 100,\n \"measures\": 40,\n \"target\": 85\n },\n {\n \"title\": \"4🌟\",\n \"ranges\": 100,\n \"measures\": 80,\n \"target\": 40\n },\n {\n \"title\": \"3🌟\",\n \"ranges\": 100,\n \"measures\": 20,\n \"target\": 22\n },\n {\n \"title\": \"0-2🌟\",\n \"ranges\": 100,\n \"measures\": 30,\n \"target\": 10\n }\n ],\n \"type\": \"view\",\n \"children\": [\n {\n \"encode\": {\n \"x\": \"title\",\n \"y\": \"ranges\",\n \"color\": \"#f0efff\"\n },\n \"style\": {\n \"maxWidth\": 30\n },\n \"axis\": {\n \"y\": {\n \"grid\": true,\n \"gridLineWidth\": 2\n },\n \"x\": {\n \"title\": false\n }\n },\n \"type\": \"interval\"\n },\n {\n \"encode\": {\n \"x\": \"title\",\n \"y\": \"measures\",\n \"color\": \"#5B8FF9\"\n },\n \"style\": {\n \"maxWidth\": 20\n },\n \"labels\": [\n {\n \"text\": \"measures\",\n \"position\": \"right\",\n \"textAlign\": \"left\",\n \"dx\": 5\n }\n ],\n \"type\": \"interval\"\n },\n {\n \"encode\": {\n \"size\": 15,\n \"x\": \"title\",\n \"y\": \"target\",\n \"shape\": \"line\",\n \"color\": \"red\"\n },\n \"tooltip\": {\n \"title\": false,\n \"items\": [\n {\n \"channel\": \"y\"\n }\n ]\n },\n \"type\": \"point\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "", + "duration": 48776, + "retrievedSkillIds": [ + "g2-mark-interval-basic", + "g2-scale-linear", + "g2-mark-arc-pie", + "g2-mark-partition", + "g2-mark-line-basic" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": true, + "issues": [ + "缺少 import/require 语句", + "缺少 Chart/Graph 实例化", + "缺少 render() 调用" + ], + "warnings": [], + "codeLength": 0, + "expectedLength": 1652, + "similarity": 0, + "extractedCode": "", + "structuralFeatures": { + "imports": [], + "functionCalls": [], + "objectKeys": [], + "stringLiterals": [], + "apiPatterns": [] + } + } + }, + { + "id": "case-168", + "query": "根据描述绘制图表,使用 G2 绘制一个自定义形状的水波图,展示特定数值的占比情况,并通过图形样式和文本显示具体百分比。参考数据:[0.65]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'liquid',\n data: 0.65,\n style: {\n shape: (x, y, r) => {\n const path = [];\n const w = r * 1.8;\n path.push(['M', x - w / 2, y]);\n path.push(['L', x, y - w / 2]);\n path.push(['L', x + w / 2, y]);\n path.push(['L', x, y + w / 2]);\n path.push(['Z']);\n return path;\n },\n fill: 'l(270) 0:#f6ffed 1:#52c41a',\n backgroundFill: '#f0fff4',\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n waveCount: 3,\n contentText: '95%',\n contentFill: '#000',\n contentFontSize: 28,\n contentFontWeight: 'bold',\n contentStroke: '#fff',\n contentLineWidth: 2,\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 400,\n height: 400,\n});\n\nchart.options({\n type: 'liquid',\n data: 0.65,\n style: {\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n fill: '#5B8FF9',\n fillOpacity: 0.85,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 28,\n fontWeight: 'bold',\n fill: '#fff',\n formatter: (v) => `${(v * 100).toFixed(0)}%`,\n },\n },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "duration": 8035, + "retrievedSkillIds": [ + "g2-mark-liquid", + "g2-mark-arc-donut", + "g2-mark-shape", + "g2-mark-interval-basic", + "g2-concept-chart-selection" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 583, + "expectedLength": 782, + "similarity": 0.5495595012198428, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n width: 400,\n height: 400,\n});\n\nchart.options({\n type: 'liquid',\n data: 0.65,\n style: {\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n fill: '#5B8FF9',\n fillOpacity: 0.85,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 28,\n fontWeight: 'bold',\n fill: '#fff',\n formatter: (v) => `${(v * 100).toFixed(0)}%`,\n },\n },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "toFixed", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "style", + "outlineBorder", + "outlineDistance", + "waveLength", + "fill", + "fillOpacity", + "background", + "fill", + "text", + "style", + "fontSize", + "fontWeight", + "fill", + "formatter", + "axis", + "legend", + "tooltip" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "x6.background" + ] + } + } + }, + { + "id": "case-169", + "query": "根据描述绘制图表,使用G2库渲染一个盒须图(box plot),展示三种鸢尾花物种(I. setosa, I. versicolor, I. virginica)在四个特征维度(SepalLength, SepalWidth, PetalLength, PetalWidth)上的分布数据,通过x轴映射特征类型,y轴映射五数概括值(bin数组),按物种分组并着色,支持自定义缩放和图例。参考数据:\n[{\"Species\":\"I. setosa\",\"type\":\"SepalLength\",\"value\":5.1,\"bin\":[4.3,4.8,5,5.2,5.8]},{\"Species\":\"I. setosa\",\"type\":\"SepalWidth\",\"value\":3.5,\"bin\":[2.3,3.2,3.4,3.7,4.4]},{\"Species\":\"I. setosa\",\"type\":\"PetalLength\",\"value\":1.4,\"bin\":[1,1.4,1.5,1.6,1.9]},{\"Species\":\"I. setosa\",\"type\":\"PetalWidth\",\"value\":0.2,\"bin\":[0.1,0.2,0.2,0.3,0.6]},{\"Species\":\"I. versicolor\",\"type\":\"SepalLength\",\"value\":7,\"bin\":[4.9,5.6,5.9,6.3,7]},{\"Species\":\"I. versicolor\",\"type\":\"SepalWidth\",\"value\":3.2,\"bin\":[2,2.5,2.8,3,3.4]},{\"Species\":\"I. versicolor\",\"type\":\"PetalLength\",\"value\":4.7,\"bin\":[3,4,4.35,4.6,5.1]},{\"Species\":\"I. versicolor\",\"type\":\"PetalWidth\",\"value\":1.4,\"bin\":[1,1.2,1.3,1.5,1.8]},{\"Species\":\"I. virginica\",\"type\":\"SepalLength\",\"value\":6.3,\"bin\":[4.9,6.2,6.5,6.9,7.9]},{\"Species\":\"I. virginica\",\"type\":\"SepalWidth\",\"value\":3.3,\"bin\":[2.2,2.8,3,3.2,3.8]}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": [\n {\n \"Species\": \"I. setosa\",\n \"type\": \"SepalLength\",\n \"value\": 5.1,\n \"bin\": [\n 4.3,\n 4.8,\n 5,\n 5.2,\n 5.8\n ]\n },\n {\n \"Species\": \"I. setosa\",\n \"type\": \"SepalWidth\",\n \"value\": 3.5,\n \"bin\": [\n 2.3,\n 3.2,\n 3.4,\n 3.7,\n 4.4\n ]\n },\n {\n \"Species\": \"I. setosa\",\n \"type\": \"PetalLength\",\n \"value\": 1.4,\n \"bin\": [\n 1,\n 1.4,\n 1.5,\n 1.6,\n 1.9\n ]\n },\n {\n \"Species\": \"I. setosa\",\n \"type\": \"PetalWidth\",\n \"value\": 0.2,\n \"bin\": [\n 0.1,\n 0.2,\n 0.2,\n 0.3,\n 0.6\n ]\n },\n {\n \"Species\": \"I. versicolor\",\n \"type\": \"SepalLength\",\n \"value\": 7,\n \"bin\": [\n 4.9,\n 5.6,\n 5.9,\n 6.3,\n 7\n ]\n },\n {\n \"Species\": \"I. versicolor\",\n \"type\": \"SepalWidth\",\n \"value\": 3.2,\n \"bin\": [\n 2,\n 2.5,\n 2.8,\n 3,\n 3.4\n ]\n },\n {\n \"Species\": \"I. versicolor\",\n \"type\": \"PetalLength\",\n \"value\": 4.7,\n \"bin\": [\n 3,\n 4,\n 4.35,\n 4.6,\n 5.1\n ]\n },\n {\n \"Species\": \"I. versicolor\",\n \"type\": \"PetalWidth\",\n \"value\": 1.4,\n \"bin\": [\n 1,\n 1.2,\n 1.3,\n 1.5,\n 1.8\n ]\n },\n {\n \"Species\": \"I. virginica\",\n \"type\": \"SepalLength\",\n \"value\": 6.3,\n \"bin\": [\n 4.9,\n 6.2,\n 6.5,\n 6.9,\n 7.9\n ]\n },\n {\n \"Species\": \"I. virginica\",\n \"type\": \"SepalWidth\",\n \"value\": 3.3,\n \"bin\": [\n 2.2,\n 2.8,\n 3,\n 3.2,\n 3.8\n ]\n },\n {\n \"Species\": \"I. virginica\",\n \"type\": \"PetalLength\",\n \"value\": 6,\n \"bin\": [\n 4.5,\n 5.1,\n 5.55,\n 5.9,\n 6.9\n ]\n },\n {\n \"Species\": \"I. virginica\",\n \"type\": \"PetalWidth\",\n \"value\": 2.5,\n \"bin\": [\n 1.4,\n 1.8,\n 2,\n 2.3,\n 2.5\n ]\n }\n ],\n \"encode\": {\n \"x\": \"type\",\n \"y\": \"bin\",\n \"series\": \"Species\",\n \"color\": \"Species\"\n },\n \"scale\": {\n \"x\": {\n \"paddingInner\": 0.2,\n \"paddingOuter\": 0.1\n },\n \"y\": {\n \"zero\": true\n },\n \"series\": {\n \"paddingInner\": 0.3,\n \"paddingOuter\": 0.1\n }\n },\n \"style\": {\n \"stroke\": \"black\"\n },\n \"tooltip\": {\n \"items\": [\n {\n \"name\": \"min\",\n \"channel\": \"y\"\n },\n {\n \"name\": \"q1\",\n \"channel\": \"y1\"\n },\n {\n \"name\": \"q2\",\n \"channel\": \"y2\"\n },\n {\n \"name\": \"q3\",\n \"channel\": \"y3\"\n },\n {\n \"name\": \"max\",\n \"channel\": \"y4\"\n }\n ]\n },\n \"type\": \"box\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"Species\":\"I. setosa\",\"type\":\"SepalLength\",\"value\":5.1,\"bin\":[4.3,4.8,5,5.2,5.8]},\n {\"Species\":\"I. setosa\",\"type\":\"SepalWidth\",\"value\":3.5,\"bin\":[2.3,3.2,3.4,3.7,4.4]},\n {\"Species\":\"I. setosa\",\"type\":\"PetalLength\",\"value\":1.4,\"bin\":[1,1.4,1.5,1.6,1.9]},\n {\"Species\":\"I. setosa\",\"type\":\"PetalWidth\",\"value\":0.2,\"bin\":[0.1,0.2,0.2,0.3,0.6]},\n {\"Species\":\"I. versicolor\",\"type\":\"SepalLength\",\"value\":7,\"bin\":[4.9,5.6,5.9,6.3,7]},\n {\"Species\":\"I. versicolor\",\"type\":\"SepalWidth\",\"value\":3.2,\"bin\":[2,2.5,2.8,3,3.4]},\n {\"Species\":\"I. versicolor\",\"type\":\"PetalLength\",\"value\":4.7,\"bin\":[3,4,4.35,4.6,5.1]},\n {\"Species\":\"I. versicolor\",\"type\":\"PetalWidth\",\"value\":1.4,\"bin\":[1,1.2,1.3,1.5,1.8]},\n {\"Species\":\"I. virginica\",\"type\":\"SepalLength\",\"value\":6.3,\"bin\":[4.9,6.2,6.5,6.9,7.9]},\n {\"Species\":\"I. virginica\",\"type\":\"SepalWidth\",\"value\":3.3,\"bin\":[2.2,2.8,3,3.2,3.8]}\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'box',\n data,\n encode: {\n x: 'type',\n y: (d) => d.bin[2],\n y1: (d) => d.bin[1],\n y2: (d) => d.bin[3],\n y3: (d) => d.bin[0],\n y4: (d) => d.bin[4],\n color: 'Species',\n series: 'Species',\n },\n transform: [\n { type: 'dodgeX' },\n ],\n scale: {\n y: { nice: true },\n color: {\n domain: ['I. setosa', 'I. versicolor', 'I. virginica'],\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16'],\n },\n },\n axis: {\n x: { title: '特征类型' },\n y: { title: '数值' },\n },\n legend: {\n color: { title: '物种' },\n },\n interaction: {\n zoom: true,\n },\n style: {\n stroke: '#333',\n lineWidth: 1.5,\n },\n});\n\nchart.render();", + "duration": 48443, + "retrievedSkillIds": [ + "g2-mark-partition", + "g2-mark-interval-basic", + "g2-mark-box-boxplot", + "g2-scale-linear", + "g2-comp-space-flex" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1697, + "expectedLength": 3843, + "similarity": 0.5155754771544245, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst data = [\n {\"Species\":\"I. setosa\",\"type\":\"SepalLength\",\"value\":5.1,\"bin\":[4.3,4.8,5,5.2,5.8]},\n {\"Species\":\"I. setosa\",\"type\":\"SepalWidth\",\"value\":3.5,\"bin\":[2.3,3.2,3.4,3.7,4.4]},\n {\"Species\":\"I. setosa\",\"type\":\"PetalLength\",\"value\":1.4,\"bin\":[1,1.4,1.5,1.6,1.9]},\n {\"Species\":\"I. setosa\",\"type\":\"PetalWidth\",\"value\":0.2,\"bin\":[0.1,0.2,0.2,0.3,0.6]},\n {\"Species\":\"I. versicolor\",\"type\":\"SepalLength\",\"value\":7,\"bin\":[4.9,5.6,5.9,6.3,7]},\n {\"Species\":\"I. versicolor\",\"type\":\"SepalWidth\",\"value\":3.2,\"bin\":[2,2.5,2.8,3,3.4]},\n {\"Species\":\"I. versicolor\",\"type\":\"PetalLength\",\"value\":4.7,\"bin\":[3,4,4.35,4.6,5.1]},\n {\"Species\":\"I. versicolor\",\"type\":\"PetalWidth\",\"value\":1.4,\"bin\":[1,1.2,1.3,1.5,1.8]},\n {\"Species\":\"I. virginica\",\"type\":\"SepalLength\",\"value\":6.3,\"bin\":[4.9,6.2,6.5,6.9,7.9]},\n {\"Species\":\"I. virginica\",\"type\":\"SepalWidth\",\"value\":3.3,\"bin\":[2.2,2.8,3,3.2,3.8]}\n];\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'box',\n data,\n encode: {\n x: 'type',\n y: (d) => d.bin[2],\n y1: (d) => d.bin[1],\n y2: (d) => d.bin[3],\n y3: (d) => d.bin[0],\n y4: (d) => d.bin[4],\n color: 'Species',\n series: 'Species',\n },\n transform: [\n { type: 'dodgeX' },\n ],\n scale: {\n y: { nice: true },\n color: {\n domain: ['I. setosa', 'I. versicolor', 'I. virginica'],\n range: ['#5B8FF9', '#5AD8A6', '#F6BD16'],\n },\n },\n axis: {\n x: { title: '特征类型' },\n y: { title: '数值' },\n },\n legend: {\n color: { title: '物种' },\n },\n interaction: {\n zoom: true,\n },\n style: {\n stroke: '#333',\n lineWidth: 1.5,\n },\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "encode", + "x", + "y", + "y1", + "y2", + "y3", + "y4", + "color", + "series", + "transform", + "type", + "scale", + "y", + "nice", + "color", + "domain", + "range", + "axis", + "x", + "title", + "y", + "title", + "legend", + "color", + "title", + "interaction", + "zoom", + "style", + "stroke", + "lineWidth" + ], + "stringLiterals": [ + "Species", + "type", + "value", + "bin", + "Species", + "type", + "value", + "bin", + "Species", + "type", + "value", + "bin", + "Species", + "type", + "value", + "bin", + "Species", + "type", + "value", + "bin", + "Species", + "type", + "value", + "bin", + "Species", + "type", + "value", + "bin", + "Species", + "type", + "value", + "bin", + "Species", + "type", + "value", + "bin", + "Species", + "type", + "value", + "bin" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "scale", + "interaction" + ] + } + } + }, + { + "id": "case-170", + "query": "根据描述绘制图表,使用极坐标绘制多个地区的箱线图,每个地区对应一组五数概括(最小值、下四分位数、中位数、上四分位数、最大值)数据,通过颜色区分不同区域,并配置坐标轴内边距、零基线、刻度数和提示信息项。参考数据:\n[{\"x\":\"Oceania\",\"y\":[1,9,16,22,24]},{\"x\":\"East Europe\",\"y\":[1,5,8,12,16]},{\"x\":\"Australia\",\"y\":[1,8,12,19,26]},{\"x\":\"South America\",\"y\":[2,8,12,21,28]},{\"x\":\"North Africa\",\"y\":[1,8,14,18,24]},{\"x\":\"North America\",\"y\":[3,10,17,28,30]},{\"x\":\"West Europe\",\"y\":[1,7,10,17,22]},{\"x\":\"West Africa\",\"y\":[1,6,8,13,16]}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container' });\n\nchart.options({\n \"autoFit\": true,\n \"coordinate\": {\n \"type\": \"polar\",\n \"innerRadius\": 0.2\n },\n \"type\": \"view\",\n \"children\": [\n {\n \"data\": [\n {\n \"x\": \"Oceania\",\n \"y\": [\n 1,\n 9,\n 16,\n 22,\n 24\n ]\n },\n {\n \"x\": \"East Europe\",\n \"y\": [\n 1,\n 5,\n 8,\n 12,\n 16\n ]\n },\n {\n \"x\": \"Australia\",\n \"y\": [\n 1,\n 8,\n 12,\n 19,\n 26\n ]\n },\n {\n \"x\": \"South America\",\n \"y\": [\n 2,\n 8,\n 12,\n 21,\n 28\n ]\n },\n {\n \"x\": \"North Africa\",\n \"y\": [\n 1,\n 8,\n 14,\n 18,\n 24\n ]\n },\n {\n \"x\": \"North America\",\n \"y\": [\n 3,\n 10,\n 17,\n 28,\n 30\n ]\n },\n {\n \"x\": \"West Europe\",\n \"y\": [\n 1,\n 7,\n 10,\n 17,\n 22\n ]\n },\n {\n \"x\": \"West Africa\",\n \"y\": [\n 1,\n 6,\n 8,\n 13,\n 16\n ]\n }\n ],\n \"encode\": {\n \"x\": \"x\",\n \"y\": \"y\",\n \"color\": \"x\"\n },\n \"scale\": {\n \"x\": {\n \"paddingInner\": 0.6,\n \"paddingOuter\": 0.3\n },\n \"y\": {\n \"zero\": true\n }\n },\n \"style\": {\n \"stroke\": \"black\"\n },\n \"axis\": {\n \"y\": {\n \"tickCount\": 5\n }\n },\n \"tooltip\": {\n \"items\": [\n {\n \"channel\": \"y\",\n \"name\": \"min\"\n },\n {\n \"channel\": \"y1\",\n \"name\": \"q1\"\n },\n {\n \"channel\": \"y2\",\n \"name\": \"q2\"\n },\n {\n \"channel\": \"y3\",\n \"name\": \"q3\"\n },\n {\n \"channel\": \"y4\",\n \"name\": \"max\"\n }\n ]\n },\n \"legend\": false,\n \"type\": \"box\"\n }\n ]\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"x\":\"Oceania\",\"y\":[1,9,16,22,24]},\n {\"x\":\"East Europe\",\"y\":[1,5,8,12,16]},\n {\"x\":\"Australia\",\"y\":[1,8,12,19,26]},\n {\"x\":\"South America\",\"y\":[2,8,12,21,28]},\n {\"x\":\"North Africa\",\"y\":[1,8,14,18,24]},\n {\"x\":\"North America\",\"y\":[3,10,17,28,30]},\n {\"x\":\"West Europe\",\"y\":[1,7,10,17,22]},\n {\"x\":\"West Africa\",\"y\":[1,6,8,13,16]}\n];\n\nchart.options({\n type: 'box',\n data: data,\n encode: {\n x: 'x',\n y: 'y',\n color: 'x'\n },\n coordinate: {\n type: 'polar',\n innerRadius: 0.2\n },\n scale: {\n x: {\n paddingInner: 0.6,\n paddingOuter: 0.3\n },\n y: {\n zero: true\n }\n },\n axis: {\n y: {\n tickCount: 5\n }\n },\n style: {\n stroke: 'black'\n },\n tooltip: {\n items: [\n { channel: 'y', name: 'min' },\n { channel: 'y1', name: 'q1' },\n { channel: 'y2', name: 'q2' },\n { channel: 'y3', name: 'q3' },\n { channel: 'y4', name: 'max' }\n ]\n },\n legend: false\n});\n\nchart.render();", + "duration": 16250, + "retrievedSkillIds": [ + "g2-mark-box-boxplot", + "g2-mark-boxplot", + "g2-mark-violin", + "g2-mark-partition", + "g2-scale-linear" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1094, + "expectedLength": 2406, + "similarity": 0.6665553518421512, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nconst data = [\n {\"x\":\"Oceania\",\"y\":[1,9,16,22,24]},\n {\"x\":\"East Europe\",\"y\":[1,5,8,12,16]},\n {\"x\":\"Australia\",\"y\":[1,8,12,19,26]},\n {\"x\":\"South America\",\"y\":[2,8,12,21,28]},\n {\"x\":\"North Africa\",\"y\":[1,8,14,18,24]},\n {\"x\":\"North America\",\"y\":[3,10,17,28,30]},\n {\"x\":\"West Europe\",\"y\":[1,7,10,17,22]},\n {\"x\":\"West Africa\",\"y\":[1,6,8,13,16]}\n];\n\nchart.options({\n type: 'box',\n data: data,\n encode: {\n x: 'x',\n y: 'y',\n color: 'x'\n },\n coordinate: {\n type: 'polar',\n innerRadius: 0.2\n },\n scale: {\n x: {\n paddingInner: 0.6,\n paddingOuter: 0.3\n },\n y: {\n zero: true\n }\n },\n axis: {\n y: {\n tickCount: 5\n }\n },\n style: {\n stroke: 'black'\n },\n tooltip: {\n items: [\n { channel: 'y', name: 'min' },\n { channel: 'y1', name: 'q1' },\n { channel: 'y2', name: 'q2' },\n { channel: 'y3', name: 'q3' },\n { channel: 'y4', name: 'max' }\n ]\n },\n legend: false\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "encode", + "x", + "y", + "color", + "coordinate", + "type", + "innerRadius", + "scale", + "x", + "paddingInner", + "paddingOuter", + "y", + "zero", + "axis", + "y", + "tickCount", + "style", + "stroke", + "tooltip", + "items", + "channel", + "name", + "channel", + "name", + "channel", + "name", + "channel", + "name", + "channel", + "name", + "legend" + ], + "stringLiterals": [ + "x", + "y", + "x", + "y", + "x", + "y", + "x", + "y", + "x", + "y", + "x", + "y", + "x", + "y", + "x", + "y" + ], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "coordinate", + "scale" + ] + } + } + }, + { + "id": "case-171", + "query": "根据描述绘制图表,使用 G2 创建一个柱状图,展示多个类别的数值对比,并为颜色图例配置了分页功能以处理较多图例项。参考数据:\n[{\"category\":\"Category A\",\"value\":40},{\"category\":\"Category B\",\"value\":35},{\"category\":\"Category C\",\"value\":30},{\"category\":\"Category D\",\"value\":25},{\"category\":\"Category E\",\"value\":20},{\"category\":\"Category F\",\"value\":18},{\"category\":\"Category G\",\"value\":15},{\"category\":\"Category H\",\"value\":12},{\"category\":\"Category I\",\"value\":10},{\"category\":\"Category J\",\"value\":8}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n height: 350,\n width: 600,\n});\n\n// 创建多个图例项的数据\nconst data = [\n { category: 'Category A', value: 40 },\n { category: 'Category B', value: 35 },\n { category: 'Category C', value: 30 },\n { category: 'Category D', value: 25 },\n { category: 'Category E', value: 20 },\n { category: 'Category F', value: 18 },\n { category: 'Category G', value: 15 },\n { category: 'Category H', value: 12 },\n { category: 'Category I', value: 10 },\n { category: 'Category J', value: 8 },\n { category: 'Category K', value: 6 },\n { category: 'Category L', value: 4 },\n];\n\nchart.options({\n type: 'interval',\n data,\n encode: { x: 'category', y: 'value', color: 'category' },\n legend: {\n color: {\n position: 'right',\n length: 150, // 限制图例高度,触发分页\n size: 120, // 控制图例宽度\n navOrientation: 'vertical', // 垂直方向分页器\n navDefaultPage: 0, // 默认显示第一页\n navLoop: true, // 启用循环翻页\n navButtonFill: '#1890ff', // 分页按钮颜色\n navPageNumFill: '#1890ff', // 页码颜色\n navFormatter: (current, total) => `${current + 1}/${total}`, // 页码格式\n },\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { category: 'Category A', value: 40 },\n { category: 'Category B', value: 35 },\n { category: 'Category C', value: 30 },\n { category: 'Category D', value: 25 },\n { category: 'Category E', value: 20 },\n { category: 'Category F', value: 18 },\n { category: 'Category G', value: 15 },\n { category: 'Category H', value: 12 },\n { category: 'Category I', value: 10 },\n { category: 'Category J', value: 8 },\n ],\n encode: {\n x: 'category',\n y: 'value',\n color: 'category',\n },\n transform: [{ type: 'sortX', by: 'y', reverse: true }],\n legend: {\n color: {\n position: 'bottom',\n maxRows: 2,\n cols: 5,\n layout: { justifyContent: 'center' },\n itemLabelFontSize: 12,\n },\n },\n labels: [\n {\n text: 'value',\n position: 'outside',\n style: { fontSize: 11 },\n },\n ],\n});\n\nchart.render();", + "duration": 16965, + "retrievedSkillIds": [ + "g2-mark-interval-grouped", + "g2-interaction-legend-highlight", + "g2-comp-legend-config", + "g2-concept-chart-selection", + "g2-mark-arc-pie" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1035, + "expectedLength": 1160, + "similarity": 0.7414978441812887, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500,\n});\n\nchart.options({\n type: 'interval',\n data: [\n { category: 'Category A', value: 40 },\n { category: 'Category B', value: 35 },\n { category: 'Category C', value: 30 },\n { category: 'Category D', value: 25 },\n { category: 'Category E', value: 20 },\n { category: 'Category F', value: 18 },\n { category: 'Category G', value: 15 },\n { category: 'Category H', value: 12 },\n { category: 'Category I', value: 10 },\n { category: 'Category J', value: 8 },\n ],\n encode: {\n x: 'category',\n y: 'value',\n color: 'category',\n },\n transform: [{ type: 'sortX', by: 'y', reverse: true }],\n legend: {\n color: {\n position: 'bottom',\n maxRows: 2,\n cols: 5,\n layout: { justifyContent: 'center' },\n itemLabelFontSize: 12,\n },\n },\n labels: [\n {\n text: 'value',\n position: 'outside',\n style: { fontSize: 11 },\n },\n ],\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "category", + "value", + "category", + "value", + "category", + "value", + "category", + "value", + "category", + "value", + "category", + "value", + "category", + "value", + "category", + "value", + "category", + "value", + "category", + "value", + "encode", + "x", + "y", + "color", + "transform", + "type", + "by", + "reverse", + "legend", + "color", + "position", + "maxRows", + "cols", + "layout", + "justifyContent", + "itemLabelFontSize", + "labels", + "text", + "position", + "style", + "fontSize" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "transform", + "type.interval", + "x6.labels" + ] + } + } + }, + { + "id": "case-172", + "query": "根据描述绘制图表,使用 G2 图表库创建一个液体图,展示单个百分比数值的填充效果。通过配置项定义了液体的形状、颜色、背景、波浪效果及文字样式,并将数据值设置为 0.68,即 68% 的填充比例。参考数据:[0.68]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n});\n\nchart.options({\n type: 'liquid',\n data: 0.68,\n style: {\n shape: 'rect',\n fill: 'l(0) 0:#52c41a 1:#135200',\n backgroundFill: '#f0f0f0',\n outlineBorder: 3,\n outlineDistance: 6,\n waveLength: 100,\n waveCount: 4,\n contentText: '68%',\n contentFill: '#fff',\n contentFontSize: 24,\n contentFontWeight: 'bold',\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container', width: 400, height: 400 });\n\nchart.options({\n type: 'liquid',\n data: 0.68,\n style: {\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n fill: '#5B8FF9',\n fillOpacity: 0.85,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 32,\n fontWeight: 'bold',\n fill: '#fff',\n },\n },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "duration": 7685, + "retrievedSkillIds": [ + "g2-scale-sequential", + "g2-comp-legend-config", + "g2-mark-interval-basic", + "g2-mark-arc-donut", + "g2-mark-liquid" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 522, + "expectedLength": 471, + "similarity": 0.6313206904383375, + "extractedCode": "import { Chart } from '@antv/g2';\n\nconst chart = new Chart({ container: 'container', width: 400, height: 400 });\n\nchart.options({\n type: 'liquid',\n data: 0.68,\n style: {\n outlineBorder: 4,\n outlineDistance: 8,\n waveLength: 128,\n fill: '#5B8FF9',\n fillOpacity: 0.85,\n background: {\n fill: '#E8F0FE',\n },\n text: {\n style: {\n fontSize: 32,\n fontWeight: 'bold',\n fill: '#fff',\n },\n },\n },\n axis: false,\n legend: false,\n tooltip: false,\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "Chart", + "options", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "type", + "data", + "style", + "outlineBorder", + "outlineDistance", + "waveLength", + "fill", + "fillOpacity", + "background", + "fill", + "text", + "style", + "fontSize", + "fontWeight", + "fill", + "axis", + "legend", + "tooltip" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "x6.background" + ] + } + } + }, + { + "id": "case-173", + "query": "根据描述绘制图表,该代码使用 G2 图表库生成等高线图,通过数学计算构建环形线条数据,每个高度级别对应一条带有波动的闭合曲线,支持颜色编码和系列分组,最终渲染为交互式折线图并显示图例与海拔标注工具提示。参考数据:\n[{\"x\":30,\"y\":25,\"level\":20,\"lineId\":\"line_20\"},{\"x\":30.347,\"y\":25.882,\"level\":20,\"lineId\":\"line_20\"},{\"x\":30.035,\"y\":26.737,\"level\":20,\"lineId\":\"line_20\"},{\"x\":29.199,\"y\":27.336,\"level\":20,\"lineId\":\"line_20\"},{\"x\":28.135,\"y\":27.566,\"level\":20,\"lineId\":\"line_20\"},{\"x\":27.07,\"y\":27.336,\"level\":20,\"lineId\":\"line_20\"},{\"x\":26.234,\"y\":26.737,\"level\":20,\"lineId\":\"line_20\"},{\"x\":25.923,\"y\":25.882,\"level\":20,\"lineId\":\"line_20\"},{\"x\":26,\"y\":25,\"level\":20,\"lineId\":\"line_20\"},{\"x\":26.234,\"y\":24.118,\"level\":20,\"lineId\":\"line_20\"}]", + "library": "g2", + "algorithm": "zvec", + "expectedCode": "import { Chart } from '@antv/g2';\n\n// 生成等高线数据\nconst generateContourLines = () => {\n const lines = [];\n const levels = [20, 40, 60, 80, 100]; // 等高线级别\n\n levels.forEach((level, index) => {\n // 为每个等高线级别生成环形线条\n const points = [];\n const centerX = 25;\n const centerY = 25;\n const baseRadius = 5 + index * 4;\n\n for (let angle = 0; angle <= 360; angle += 5) {\n const radian = (angle * Math.PI) / 180;\n const radius = baseRadius + Math.sin((angle * Math.PI) / 45) * 2; // 添加一些变化\n const x = centerX + radius * Math.cos(radian);\n const y = centerY + radius * Math.sin(radian);\n points.push({ x, y, level, lineId: `line_${level}` });\n }\n lines.push(...points);\n });\n\n return lines;\n};\n\nconst contourLines = generateContourLines();\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 400,\n});\n\nchart.options({\n type: 'line',\n data: contourLines,\n encode: {\n x: 'x',\n y: 'y',\n color: 'level',\n series: 'lineId',\n },\n style: {\n strokeWidth: 2,\n strokeOpacity: 0.8,\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'oranges',\n },\n x: { nice: true },\n y: { nice: true },\n },\n axis: {\n x: { title: '距离 (km)' },\n y: { title: '距离 (km)' },\n },\n legend: {\n color: {\n title: '海拔高度 (m)',\n layout: { justifyContent: 'center' },\n },\n },\n tooltip: {\n title: '等高线信息',\n items: [\n { field: 'level', name: '海拔', valueFormatter: (value) => `${value}m` },\n ],\n },\n});\n\nchart.render();", + "generatedCode": "import { Chart } from '@antv/g2';\n\n// 生成等高线数据(多个高度级别的闭合曲线)\nconst generateContourData = () => {\n const data = [];\n const levels = [20, 40, 60, 80, 100];\n const centerX = 25;\n const centerY = 25;\n \n levels.forEach((level, index) => {\n const baseRadius = 5 + index * 4;\n const lineId = `line_${level}`;\n \n for (let angle = 0; angle <= 360; angle += 5) {\n const radian = (angle * Math.PI) / 180;\n const radius = baseRadius + Math.sin((angle * Math.PI) / 45) * 2;\n const x = centerX + radius * Math.cos(radian);\n const y = centerY + radius * Math.sin(radian);\n \n data.push({\n x,\n y,\n level,\n lineId\n });\n }\n });\n \n return data;\n};\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500\n});\n\nchart.options({\n type: 'line',\n data: generateContourData(),\n encode: {\n x: 'x',\n y: 'y',\n color: 'level',\n series: 'lineId'\n },\n style: {\n lineWidth: 2,\n strokeOpacity: 0.8\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'oranges',\n domain: [20, 100]\n }\n },\n axis: {\n x: { \n title: '距离 (km)',\n grid: true \n },\n y: { \n title: '距离 (km)',\n grid: true \n }\n },\n legend: {\n color: { \n title: '海拔高度 (m)',\n position: 'right'\n }\n },\n tooltip: {\n title: '等高线信息',\n items: [\n { field: 'x', name: 'X坐标' },\n { field: 'y', name: 'Y坐标' },\n { \n field: 'level', \n name: '海拔',\n valueFormatter: (value) => `${value}m`\n }\n ]\n }\n});\n\nchart.render();", + "duration": 14378, + "retrievedSkillIds": [ + "g2-mark-contourline", + "g2-mark-line-basic", + "g2-mark-line-multi", + "g2-scale-linear", + "g2-mark-arc-diagram" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1588, + "expectedLength": 1530, + "similarity": 0.8860354038845863, + "extractedCode": "import { Chart } from '@antv/g2';\n\n// 生成等高线数据(多个高度级别的闭合曲线)\nconst generateContourData = () => {\n const data = [];\n const levels = [20, 40, 60, 80, 100];\n const centerX = 25;\n const centerY = 25;\n \n levels.forEach((level, index) => {\n const baseRadius = 5 + index * 4;\n const lineId = `line_${level}`;\n \n for (let angle = 0; angle <= 360; angle += 5) {\n const radian = (angle * Math.PI) / 180;\n const radius = baseRadius + Math.sin((angle * Math.PI) / 45) * 2;\n const x = centerX + radius * Math.cos(radian);\n const y = centerY + radius * Math.sin(radian);\n \n data.push({\n x,\n y,\n level,\n lineId\n });\n }\n });\n \n return data;\n};\n\nconst chart = new Chart({\n container: 'container',\n autoFit: true,\n height: 500\n});\n\nchart.options({\n type: 'line',\n data: generateContourData(),\n encode: {\n x: 'x',\n y: 'y',\n color: 'level',\n series: 'lineId'\n },\n style: {\n lineWidth: 2,\n strokeOpacity: 0.8\n },\n scale: {\n color: {\n type: 'sequential',\n palette: 'oranges',\n domain: [20, 100]\n }\n },\n axis: {\n x: { \n title: '距离 (km)',\n grid: true \n },\n y: { \n title: '距离 (km)',\n grid: true \n }\n },\n legend: {\n color: { \n title: '海拔高度 (m)',\n position: 'right'\n }\n },\n tooltip: {\n title: '等高线信息',\n items: [\n { field: 'x', name: 'X坐标' },\n { field: 'y', name: 'Y坐标' },\n { \n field: 'level', \n name: '海拔',\n valueFormatter: (value) => `${value}m`\n }\n ]\n }\n});\n\nchart.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Chart" + ], + "source": "@antv/g2" + } + ], + "functionCalls": [ + "forEach", + "sin", + "cos", + "sin", + "push", + "Chart", + "options", + "generateContourData", + "render" + ], + "objectKeys": [ + "container", + "autoFit", + "height", + "type", + "data", + "encode", + "x", + "y", + "color", + "series", + "style", + "lineWidth", + "strokeOpacity", + "scale", + "color", + "type", + "palette", + "domain", + "axis", + "x", + "title", + "grid", + "y", + "title", + "grid", + "legend", + "color", + "title", + "position", + "tooltip", + "title", + "items", + "field", + "name", + "field", + "name", + "field", + "name", + "valueFormatter" + ], + "stringLiterals": [], + "apiPatterns": [ + "chart.options", + "new Chart", + "chart.render", + "encode", + "scale", + "type.line" + ] + } + } + } + ] +} \ No newline at end of file diff --git a/eval/result/eval-zvec-g6-dataset-100-Kimi-K2.5-2026-07-08.json b/eval/result/eval-zvec-g6-dataset-100-Kimi-K2.5-2026-07-08.json new file mode 100644 index 0000000..849d5af --- /dev/null +++ b/eval/result/eval-zvec-g6-dataset-100-Kimi-K2.5-2026-07-08.json @@ -0,0 +1,13342 @@ +{ + "id": "8d65e54a-6c45-48c5-a29c-d5a1abb0be6b", + "provider": "kimi", + "model": "Kimi-K2.5", + "dataset": "g6-dataset-100.json", + "algorithm": "zvec", + "timestamp": "2026-07-08T14:10:16.434Z", + "status": "completed", + "endTime": "2026-07-08T14:29:08.494Z", + "summary": { + "totalTests": 97, + "successCount": 97, + "avgDuration": 23316.546391752578, + "avgSimilarity": 0.6666949727923264, + "highSimilarityCount": 80, + "issuesCount": 2, + "skillHitRate": 1 + }, + "results": [ + { + "id": "case-0", + "query": "根据描述绘制图表,使用 G6 构建了一个径向布局的关系图,包含 6 个节点和 5 条边,每条边具有不同的状态属性,如激活、选中、高亮等,并设置了边的样式,包括标签、箭头、徽标等。参考数据:[{\"id\":\"node1\"},{\"id\":\"node2\"},{\"id\":\"node3\"},{\"id\":\"node4\"},{\"id\":\"node5\"},{\"id\":\"node6\"},{\"id\":\"line-default\",\"source\":\"node1\",\"target\":\"node2\"},{\"id\":\"line-active\",\"source\":\"node1\",\"target\":\"node3\",\"states\":[\"active\"]},{\"id\":\"line-selected\",\"source\":\"node1\",\"target\":\"node4\",\"states\":[\"selected\"]},{\"id\":\"line-highlight\",\"source\":\"node1\",\"target\":\"node5\",\"states\":[\"highlight\"]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, iconfont } from '@antv/g6';\n\nconst style = document.createElement('style');\nstyle.innerHTML = `@import url('${iconfont.css}');`;\ndocument.head.appendChild(style);\n\nconst data = {\n nodes: [\n {\n id: 'node1',\n },\n {\n id: 'node2',\n },\n {\n id: 'node3',\n },\n {\n id: 'node4',\n },\n {\n id: 'node5',\n },\n {\n id: 'node6',\n },\n ],\n edges: [\n {\n id: 'line-default',\n source: 'node1',\n target: 'node2',\n },\n {\n id: 'line-active',\n source: 'node1',\n target: 'node3',\n states: ['active'],\n },\n {\n id: 'line-selected',\n source: 'node1',\n target: 'node4',\n states: ['selected'],\n },\n {\n id: 'line-highlight',\n source: 'node1',\n target: 'node5',\n states: ['highlight'],\n },\n {\n id: 'line-inactive',\n source: 'node1',\n target: 'node6',\n states: ['inactive'],\n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n edge: {\n type: 'cubic',\n style: {\n labelText: (d) => d.id,\n labelBackground: true,\n endArrow: true,\n badge: true,\n badgeText: '\\ue603',\n badgeFontFamily: 'iconfont',\n badgeBackgroundWidth: 12,\n badgeBackgroundHeight: 12,\n },\n },\n layout: {\n type: 'radial',\n unitRadius: 220,\n linkDistance: 220,\n },\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', data: { label: '中心节点', category: 'center' } },\n { id: 'node2', data: { label: '节点 2', category: 'leaf' } },\n { id: 'node3', data: { label: '节点 3', category: 'leaf' } },\n { id: 'node4', data: { label: '节点 4', category: 'leaf' } },\n { id: 'node5', data: { label: '节点 5', category: 'leaf' } },\n { id: 'node6', data: { label: '节点 6', category: 'leaf' } },\n ],\n edges: [\n { \n id: 'line-default', \n source: 'node1', \n target: 'node2', \n data: { label: '默认状态', type: 'default' } \n },\n { \n id: 'line-active', \n source: 'node1', \n target: 'node3', \n states: ['active'],\n data: { label: '激活状态', type: 'active' } \n },\n { \n id: 'line-selected', \n source: 'node1', \n target: 'node4', \n states: ['selected'],\n data: { label: '选中状态', type: 'selected' } \n },\n { \n id: 'line-highlight', \n source: 'node1', \n target: 'node5', \n states: ['highlight'],\n data: { label: '高亮状态', type: 'highlight' } \n },\n { \n id: 'line-disabled', \n source: 'node2', \n target: 'node6', \n states: ['disabled'],\n data: { label: '禁用状态', type: 'disabled' } \n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n width: 800,\n height: 600,\n data,\n \n layout: {\n type: 'radial',\n unitRadius: 120,\n center: [400, 300],\n preventOverlap: true,\n nodeSize: 40,\n },\n \n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: (d) => d.data.category === 'center' ? '#ff4d4f' : '#1783FF',\n stroke: '#fff',\n lineWidth: 3,\n shadowColor: 'rgba(0,0,0,0.1)',\n shadowBlur: 10,\n shadowOffsetX: 2,\n shadowOffsetY: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n labelFontWeight: 500,\n labelOffsetY: 8,\n },\n state: {\n active: {\n fill: '#52c41a',\n lineWidth: 4,\n halo: true,\n haloFill: '#52c41a',\n haloOpacity: 0.2,\n haloLineWidth: 12,\n },\n },\n },\n \n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 2,\n endArrow: {\n type: 'triangle',\n size: 8,\n fill: '#999',\n stroke: '#999',\n },\n labelText: (d) => d.data.label,\n labelFontSize: 11,\n labelFill: '#666',\n labelBackground: true,\n labelBackgroundFill: '#f5f5f5',\n labelBackgroundOpacity: 0.9,\n labelBackgroundRadius: 4,\n labelPadding: [2, 6],\n },\n state: {\n active: {\n stroke: '#52c41a',\n lineWidth: 3,\n labelFill: '#52c41a',\n endArrow: {\n type: 'triangle',\n size: 10,\n fill: '#52c41a',\n stroke: '#52c41a',\n },\n halo: true,\n haloStroke: '#52c41a',\n haloLineWidth: 8,\n haloOpacity: 0.15,\n },\n selected: {\n stroke: '#1890ff',\n lineWidth: 4,\n labelFill: '#1890ff',\n labelFontWeight: 'bold',\n endArrow: {\n type: 'diamond',\n size: 12,\n fill: '#1890ff',\n stroke: '#1890ff',\n },\n halo: true,\n haloStroke: '#1890ff',\n haloLineWidth: 10,\n haloOpacity: 0.2,\n },\n highlight: {\n stroke: '#fa8c16',\n lineWidth: 3,\n lineDash: [6, 4],\n labelFill: '#fa8c16',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n endArrow: {\n type: 'vee',\n size: 10,\n fill: '#fa8c16',\n stroke: '#fa8c16',\n },\n shadowColor: '#fa8c16',\n shadowBlur: 10,\n },\n disabled: {\n stroke: '#d9d9d9',\n lineWidth: 1,\n lineDash: [4, 4],\n labelFill: '#bfbfbf',\n opacity: 0.6,\n endArrow: {\n type: 'triangle',\n size: 6,\n fill: '#d9d9d9',\n stroke: '#d9d9d9',\n },\n },\n },\n },\n \n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n type: 'hover-activate',\n degree: 1,\n state: 'active',\n edgeState: 'active',\n nodeState: 'active',\n },\n {\n type: 'click-select',\n multiple: false,\n state: 'selected',\n edgeState: 'selected',\n nodeState: 'selected',\n },\n ],\n});\n\ngraph.render();", + "duration": 29744, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-pattern-flow-chart", + "g6-edge-line", + "g6-layout-circular", + "g6-pattern-network-graph" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 4410, + "expectedLength": 1405, + "similarity": 0.5010837805605248, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', data: { label: '中心节点', category: 'center' } },\n { id: 'node2', data: { label: '节点 2', category: 'leaf' } },\n { id: 'node3', data: { label: '节点 3', category: 'leaf' } },\n { id: 'node4', data: { label: '节点 4', category: 'leaf' } },\n { id: 'node5', data: { label: '节点 5', category: 'leaf' } },\n { id: 'node6', data: { label: '节点 6', category: 'leaf' } },\n ],\n edges: [\n { \n id: 'line-default', \n source: 'node1', \n target: 'node2', \n data: { label: '默认状态', type: 'default' } \n },\n { \n id: 'line-active', \n source: 'node1', \n target: 'node3', \n states: ['active'],\n data: { label: '激活状态', type: 'active' } \n },\n { \n id: 'line-selected', \n source: 'node1', \n target: 'node4', \n states: ['selected'],\n data: { label: '选中状态', type: 'selected' } \n },\n { \n id: 'line-highlight', \n source: 'node1', \n target: 'node5', \n states: ['highlight'],\n data: { label: '高亮状态', type: 'highlight' } \n },\n { \n id: 'line-disabled', \n source: 'node2', \n target: 'node6', \n states: ['disabled'],\n data: { label: '禁用状态', type: 'disabled' } \n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n width: 800,\n height: 600,\n data,\n \n layout: {\n type: 'radial',\n unitRadius: 120,\n center: [400, 300],\n preventOverlap: true,\n nodeSize: 40,\n },\n \n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: (d) => d.data.category === 'center' ? '#ff4d4f' : '#1783FF',\n stroke: '#fff',\n lineWidth: 3,\n shadowColor: 'rgba(0,0,0,0.1)',\n shadowBlur: 10,\n shadowOffsetX: 2,\n shadowOffsetY: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n labelFontWeight: 500,\n labelOffsetY: 8,\n },\n state: {\n active: {\n fill: '#52c41a',\n lineWidth: 4,\n halo: true,\n haloFill: '#52c41a',\n haloOpacity: 0.2,\n haloLineWidth: 12,\n },\n },\n },\n \n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 2,\n endArrow: {\n type: 'triangle',\n size: 8,\n fill: '#999',\n stroke: '#999',\n },\n labelText: (d) => d.data.label,\n labelFontSize: 11,\n labelFill: '#666',\n labelBackground: true,\n labelBackgroundFill: '#f5f5f5',\n labelBackgroundOpacity: 0.9,\n labelBackgroundRadius: 4,\n labelPadding: [2, 6],\n },\n state: {\n active: {\n stroke: '#52c41a',\n lineWidth: 3,\n labelFill: '#52c41a',\n endArrow: {\n type: 'triangle',\n size: 10,\n fill: '#52c41a',\n stroke: '#52c41a',\n },\n halo: true,\n haloStroke: '#52c41a',\n haloLineWidth: 8,\n haloOpacity: 0.15,\n },\n selected: {\n stroke: '#1890ff',\n lineWidth: 4,\n labelFill: '#1890ff',\n labelFontWeight: 'bold',\n endArrow: {\n type: 'diamond',\n size: 12,\n fill: '#1890ff',\n stroke: '#1890ff',\n },\n halo: true,\n haloStroke: '#1890ff',\n haloLineWidth: 10,\n haloOpacity: 0.2,\n },\n highlight: {\n stroke: '#fa8c16',\n lineWidth: 3,\n lineDash: [6, 4],\n labelFill: '#fa8c16',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n endArrow: {\n type: 'vee',\n size: 10,\n fill: '#fa8c16',\n stroke: '#fa8c16',\n },\n shadowColor: '#fa8c16',\n shadowBlur: 10,\n },\n disabled: {\n stroke: '#d9d9d9',\n lineWidth: 1,\n lineDash: [4, 4],\n labelFill: '#bfbfbf',\n opacity: 0.6,\n endArrow: {\n type: 'triangle',\n size: 6,\n fill: '#d9d9d9',\n stroke: '#d9d9d9',\n },\n },\n },\n },\n \n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n type: 'hover-activate',\n degree: 1,\n state: 'active',\n edgeState: 'active',\n nodeState: 'active',\n },\n {\n type: 'click-select',\n multiple: false,\n state: 'selected',\n edgeState: 'selected',\n nodeState: 'selected',\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "rgba", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "category", + "id", + "data", + "label", + "category", + "id", + "data", + "label", + "category", + "id", + "data", + "label", + "category", + "id", + "data", + "label", + "category", + "id", + "data", + "label", + "category", + "edges", + "id", + "source", + "target", + "data", + "label", + "type", + "id", + "source", + "target", + "states", + "data", + "label", + "type", + "id", + "source", + "target", + "states", + "data", + "label", + "type", + "id", + "source", + "target", + "states", + "data", + "label", + "type", + "id", + "source", + "target", + "states", + "data", + "label", + "type", + "container", + "width", + "height", + "layout", + "type", + "unitRadius", + "center", + "preventOverlap", + "nodeSize", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "shadowColor", + "shadowBlur", + "shadowOffsetX", + "shadowOffsetY", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "labelFontWeight", + "labelOffsetY", + "state", + "active", + "fill", + "lineWidth", + "halo", + "haloFill", + "haloOpacity", + "haloLineWidth", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "type", + "size", + "fill", + "stroke", + "labelText", + "labelFontSize", + "labelFill", + "labelBackground", + "labelBackgroundFill", + "labelBackgroundOpacity", + "labelBackgroundRadius", + "labelPadding", + "state", + "active", + "stroke", + "lineWidth", + "labelFill", + "endArrow", + "type", + "size", + "fill", + "stroke", + "halo", + "haloStroke", + "haloLineWidth", + "haloOpacity", + "selected", + "stroke", + "lineWidth", + "labelFill", + "labelFontWeight", + "endArrow", + "type", + "size", + "fill", + "stroke", + "halo", + "haloStroke", + "haloLineWidth", + "haloOpacity", + "highlight", + "stroke", + "lineWidth", + "lineDash", + "labelFill", + "labelFontSize", + "labelFontWeight", + "endArrow", + "type", + "size", + "fill", + "stroke", + "shadowColor", + "shadowBlur", + "disabled", + "stroke", + "lineWidth", + "lineDash", + "labelFill", + "opacity", + "endArrow", + "type", + "size", + "fill", + "stroke", + "behaviors", + "type", + "degree", + "state", + "edgeState", + "nodeState", + "type", + "multiple", + "state", + "edgeState", + "nodeState" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-1", + "query": "根据描述绘制图表,使用 G6 库创建一个图实例,设置容器、数据、网格布局和一些交互行为,并添加了一个水印插件,最后渲染图表。参考数据:[{\"id\":\"node-0\"},{\"id\":\"node-1\"},{\"id\":\"node-2\"},{\"id\":\"node-3\"},{\"id\":\"node-4\"},{\"id\":\"node-5\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [{ id: 'node-0' }, { id: 'node-1' }, { id: 'node-2' }, { id: 'node-3' }, { id: 'node-4' }, { id: 'node-5' }],\n edges: [\n { source: 'node-0', target: 'node-1' },\n { source: 'node-0', target: 'node-2' },\n { source: 'node-0', target: 'node-3' },\n { source: 'node-0', target: 'node-4' },\n { source: 'node-1', target: 'node-0' },\n { source: 'node-2', target: 'node-0' },\n { source: 'node-3', target: 'node-0' },\n { source: 'node-4', target: 'node-0' },\n { source: 'node-5', target: 'node-0' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: { type: 'grid' },\n behaviors: ['zoom-canvas', 'drag-canvas', 'drag-element'],\n plugins: [\n {\n type: 'watermark',\n text: 'G6: Graph Visualization',\n textFontSize: 14,\n textFontFamily: 'Microsoft YaHei',\n fill: 'rgba(0, 0, 0, 0.1)',\n rotate: Math.PI / 12,\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node-0', data: {} },\n { id: 'node-1', data: {} },\n { id: 'node-2', data: {} },\n { id: 'node-3', data: {} },\n { id: 'node-4', data: {} },\n { id: 'node-5', data: {} }\n ],\n edges: [\n { id: 'edge-0-1', source: 'node-0', target: 'node-1' },\n { id: 'edge-1-2', source: 'node-1', target: 'node-2' },\n { id: 'edge-2-3', source: 'node-2', target: 'node-3' },\n { id: 'edge-3-4', source: 'node-3', target: 'node-4' },\n { id: 'edge-4-5', source: 'node-4', target: 'node-5' }\n ]\n },\n layout: {\n type: 'grid',\n cols: 3,\n rowGap: 60,\n colGap: 60\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: [\n {\n type: 'watermark',\n text: 'AntV G6',\n fontSize: 14,\n fill: 'rgba(0, 0, 0, 0.15)',\n rotate: 30\n }\n ]\n});\n\ngraph.render();", + "duration": 14653, + "retrievedSkillIds": [ + "g6-core-graph-init", + "g6-pattern-network-graph", + "g6-plugin-minimap", + "g6-behavior-canvas-nav", + "g6-core-graph-api" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 962, + "expectedLength": 977, + "similarity": 0.8160393412361916, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node-0', data: {} },\n { id: 'node-1', data: {} },\n { id: 'node-2', data: {} },\n { id: 'node-3', data: {} },\n { id: 'node-4', data: {} },\n { id: 'node-5', data: {} }\n ],\n edges: [\n { id: 'edge-0-1', source: 'node-0', target: 'node-1' },\n { id: 'edge-1-2', source: 'node-1', target: 'node-2' },\n { id: 'edge-2-3', source: 'node-2', target: 'node-3' },\n { id: 'edge-3-4', source: 'node-3', target: 'node-4' },\n { id: 'edge-4-5', source: 'node-4', target: 'node-5' }\n ]\n },\n layout: {\n type: 'grid',\n cols: 3,\n rowGap: 60,\n colGap: 60\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: [\n {\n type: 'watermark',\n text: 'AntV G6',\n fontSize: 14,\n fill: 'rgba(0, 0, 0, 0.15)',\n rotate: 30\n }\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "rgba", + "render" + ], + "objectKeys": [ + "container", + "data", + "nodes", + "id", + "data", + "id", + "data", + "id", + "data", + "id", + "data", + "id", + "data", + "id", + "data", + "edges", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "layout", + "type", + "cols", + "rowGap", + "colGap", + "behaviors", + "plugins", + "type", + "text", + "fontSize", + "fill", + "rotate" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-2", + "query": "根据描述绘制图表,创建了一个可交互的图形实例,其中包含一个节点,该节点显示一段文本标签,支持点击复制文本内容,并通过工具提示展示节点信息。节点具有样式设置、文本换行和背景配置,同时支持拖拽和状态切换等交互行为。参考数据:[{\"id\":\"node1\",\"data\":{\"label\":\"Click to copy this label which is too long to be displayed\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, NodeEvent } from '@antv/g6';\n\nconst data = {\n nodes: [\n {\n id: 'node1',\n data: {\n label: 'Click to copy this label which is too long to be displayed',\n },\n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n x: 200,\n y: 200,\n size: 150,\n labelPlacement: 'center',\n labelText: (d) => d.data.label,\n labelWordWrap: true,\n labelMaxWidth: '90%',\n labelBackground: true,\n labelBackgroundFill: '#eee',\n labelBackgroundFillOpacity: 0.5,\n labelBackgroundRadius: 4,\n labelPointerEvents: 'none',\n labelBackgroundPointerEvents: 'none',\n },\n },\n behaviors: ['drag-element'],\n plugins: [\n {\n type: 'tooltip',\n getContent: (e, items) => {\n let result = `

Node Label:

`;\n items.forEach((item) => {\n result += `

${item.data.label}

`;\n });\n return result;\n },\n },\n ],\n});\n\ngraph.render();\n\ngraph.on('node:click', (e) => {\n const node = graph.getNodeData(e.target.id);\n const label = node?.data?.label;\n\n navigator.clipboard.writeText(label);\n alert('copied to clipboard!');\n});\n\ngraph.on(NodeEvent.POINTER_ENTER, (e) => {\n graph.setElementState({ [e.target.id]: 'active' });\n});\n\ngraph.on(NodeEvent.POINTER_OUT, (e) => {\n graph.setElementState({ [e.target.id]: [] });\n});\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: container,\n width: 800,\n height: 600,\n data: {\n nodes: [\n {\n id: 'node1',\n data: {\n label: 'Click to copy this label which is too long to be displayed',\n description: 'Node Information: This node supports click-to-copy functionality and displays tooltips on hover.'\n }\n }\n ],\n edges: []\n },\n node: {\n type: 'html',\n style: {\n size: [220, 90],\n innerHTML: (d) => {\n const container = document.createElement('div');\n container.style.cssText = `\n width: 100%;\n height: 100%;\n background: linear-gradient(135deg, #f0f5ff 0%, #e6f4ff 100%);\n border: 2px solid #91caff;\n border-radius: 12px;\n padding: 12px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n box-sizing: border-box;\n box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);\n transition: all 0.3s ease;\n `;\n \n const textContent = document.createElement('div');\n textContent.textContent = d.data.label;\n textContent.style.cssText = `\n font-size: 13px;\n color: #1f1f1f;\n text-align: center;\n word-wrap: break-word;\n overflow-wrap: break-word;\n max-width: 100%;\n line-height: 1.5;\n font-weight: 500;\n `;\n \n const copyHint = document.createElement('div');\n copyHint.textContent = '📋 Click to copy';\n copyHint.style.cssText = `\n font-size: 11px;\n color: #1890ff;\n margin-top: 6px;\n font-weight: 600;\n opacity: 0.8;\n `;\n \n container.appendChild(textContent);\n container.appendChild(copyHint);\n \n container.addEventListener('click', (e) => {\n e.stopPropagation();\n if (navigator.clipboard) {\n navigator.clipboard.writeText(d.data.label).then(() => {\n copyHint.textContent = '✓ Copied!';\n copyHint.style.color = '#52c41a';\n setTimeout(() => {\n copyHint.textContent = '📋 Click to copy';\n copyHint.style.color = '#1890ff';\n }, 2000);\n });\n } else {\n const textarea = document.createElement('textarea');\n textarea.value = d.data.label;\n document.body.appendChild(textarea);\n textarea.select();\n document.execCommand('copy');\n document.body.removeChild(textarea);\n copyHint.textContent = '✓ Copied!';\n copyHint.style.color = '#52c41a';\n setTimeout(() => {\n copyHint.textContent = '📋 Click to copy';\n copyHint.style.color = '#1890ff';\n }, 2000);\n }\n });\n \n container.addEventListener('mouseenter', () => {\n container.style.borderColor = '#40a9ff';\n container.style.boxShadow = '0 4px 12px rgba(24, 144, 255, 0.25)';\n container.style.transform = 'scale(1.02)';\n });\n \n container.addEventListener('mouseleave', () => {\n container.style.borderColor = '#91caff';\n container.style.boxShadow = '0 2px 8px rgba(24, 144, 255, 0.15)';\n container.style.transform = 'scale(1)';\n });\n \n return container;\n }\n },\n state: {\n selected: {\n stroke: '#1890ff',\n lineWidth: 3,\n shadowColor: '#1890ff',\n shadowBlur: 15\n },\n active: {\n stroke: '#40a9ff',\n lineWidth: 2\n }\n }\n },\n plugins: [\n {\n type: 'tooltip',\n getContent: (e, items) => {\n const item = items[0];\n return `\n
\n
\n ${item.id}\n
\n
\n ${item.data.description}\n
\n
\n `;\n },\n offset: [12, 12]\n }\n ],\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n 'click-select',\n 'hover-activate'\n ]\n});\n\ngraph.render();", + "duration": 19750, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-node-html", + "g6-node-react", + "g6-node-rect", + "g6-node-image" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 4635, + "expectedLength": 1392, + "similarity": 0.4579850925989694, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: container,\n width: 800,\n height: 600,\n data: {\n nodes: [\n {\n id: 'node1',\n data: {\n label: 'Click to copy this label which is too long to be displayed',\n description: 'Node Information: This node supports click-to-copy functionality and displays tooltips on hover.'\n }\n }\n ],\n edges: []\n },\n node: {\n type: 'html',\n style: {\n size: [220, 90],\n innerHTML: (d) => {\n const container = document.createElement('div');\n container.style.cssText = `\n width: 100%;\n height: 100%;\n background: linear-gradient(135deg, #f0f5ff 0%, #e6f4ff 100%);\n border: 2px solid #91caff;\n border-radius: 12px;\n padding: 12px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n box-sizing: border-box;\n box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);\n transition: all 0.3s ease;\n `;\n \n const textContent = document.createElement('div');\n textContent.textContent = d.data.label;\n textContent.style.cssText = `\n font-size: 13px;\n color: #1f1f1f;\n text-align: center;\n word-wrap: break-word;\n overflow-wrap: break-word;\n max-width: 100%;\n line-height: 1.5;\n font-weight: 500;\n `;\n \n const copyHint = document.createElement('div');\n copyHint.textContent = '📋 Click to copy';\n copyHint.style.cssText = `\n font-size: 11px;\n color: #1890ff;\n margin-top: 6px;\n font-weight: 600;\n opacity: 0.8;\n `;\n \n container.appendChild(textContent);\n container.appendChild(copyHint);\n \n container.addEventListener('click', (e) => {\n e.stopPropagation();\n if (navigator.clipboard) {\n navigator.clipboard.writeText(d.data.label).then(() => {\n copyHint.textContent = '✓ Copied!';\n copyHint.style.color = '#52c41a';\n setTimeout(() => {\n copyHint.textContent = '📋 Click to copy';\n copyHint.style.color = '#1890ff';\n }, 2000);\n });\n } else {\n const textarea = document.createElement('textarea');\n textarea.value = d.data.label;\n document.body.appendChild(textarea);\n textarea.select();\n document.execCommand('copy');\n document.body.removeChild(textarea);\n copyHint.textContent = '✓ Copied!';\n copyHint.style.color = '#52c41a';\n setTimeout(() => {\n copyHint.textContent = '📋 Click to copy';\n copyHint.style.color = '#1890ff';\n }, 2000);\n }\n });\n \n container.addEventListener('mouseenter', () => {\n container.style.borderColor = '#40a9ff';\n container.style.boxShadow = '0 4px 12px rgba(24, 144, 255, 0.25)';\n container.style.transform = 'scale(1.02)';\n });\n \n container.addEventListener('mouseleave', () => {\n container.style.borderColor = '#91caff';\n container.style.boxShadow = '0 2px 8px rgba(24, 144, 255, 0.15)';\n container.style.transform = 'scale(1)';\n });\n \n return container;\n }\n },\n state: {\n selected: {\n stroke: '#1890ff',\n lineWidth: 3,\n shadowColor: '#1890ff',\n shadowBlur: 15\n },\n active: {\n stroke: '#40a9ff',\n lineWidth: 2\n }\n }\n },\n plugins: [\n {\n type: 'tooltip',\n getContent: (e, items) => {\n const item = items[0];\n return `\n
\n
\n ${item.id}\n
\n
\n ${item.data.description}\n
\n
\n `;\n },\n offset: [12, 12]\n }\n ],\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n 'click-select',\n 'hover-activate'\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "createElement", + "gradient", + "rgba", + "createElement", + "createElement", + "appendChild", + "appendChild", + "addEventListener", + "stopPropagation", + "writeText", + "then", + "setTimeout", + "createElement", + "appendChild", + "select", + "execCommand", + "removeChild", + "setTimeout", + "addEventListener", + "rgba", + "scale", + "addEventListener", + "rgba", + "scale", + "rgba", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "data", + "nodes", + "id", + "data", + "label", + "description", + "Information", + "edges", + "node", + "type", + "style", + "size", + "innerHTML", + "width", + "height", + "background", + "border", + "radius", + "padding", + "display", + "direction", + "content", + "items", + "cursor", + "sizing", + "shadow", + "transition", + "size", + "color", + "align", + "wrap", + "wrap", + "width", + "height", + "weight", + "size", + "color", + "top", + "weight", + "opacity", + "state", + "selected", + "stroke", + "lineWidth", + "shadowColor", + "shadowBlur", + "active", + "stroke", + "lineWidth", + "plugins", + "type", + "getContent", + "padding", + "background", + "radius", + "shadow", + "border", + "width", + "weight", + "bottom", + "color", + "size", + "color", + "size", + "height", + "wrap", + "offset", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label" + ] + } + } + }, + { + "id": "case-3", + "query": "根据描述绘制图表,使用 G6 构建了一个水平方向的思维导图,用于展示机器学习建模方法的分类结构。数据以树形结构组织,通过转换函数将树形数据映射为图数据进行渲染。节点根据其在树中的位置被标记为居中、左侧或右侧,边采用水平三次贝塞尔曲线连接,整体布局采用横向脑图样式,并支持画布的缩放、拖拽以及节点的展开收起交互。参考数据:[{\"id\":\"Modeling Methods\",\"children\":[{\"id\":\"Classification\",\"children\":[{\"id\":\"Logistic regression\"},{\"id\":\"Linear discriminant analysis\"},{\"id\":\"Rules\"},{\"id\":\"Decision trees\"},{\"id\":\"Naive Bayes\"},{\"id\":\"K nearest neighbor\"},{\"id\":\"Probabilistic neural network\"},{\"id\":\"Support vector machine\"}]},{\"id\":\"Consensus\",\"children\":[{\"id\":\"Models diversity\",\"children\":[{\"id\":\"Different initializations\"},{\"id\":\"Different parameter choices\"},{\"id\":\"Different architectures\"},{\"id\":\"Different modeling methods\"},{\"id\":\"Different training sets\"},{\"id\":\"Different feature sets\"}]},{\"id\":\"Methods\",\"children\":[{\"id\":\"Classifier selection\"},{\"id\":\"Classifier fusion\"}]},{\"id\":\"Common\",\"children\":[{\"id\":\"Bagging\"},{\"id\":\"Boosting\"},{\"id\":\"AdaBoost\"}]}]},{\"id\":\"Regression\",\"children\":[{\"id\":\"Multiple linear regression\"},{\"id\":\"Partial least squares\"},{\"id\":\"Multi-layer feedforward neural network\"},{\"id\":\"General regression neural network\"},{\"id\":\"Support vector regression\"}]}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst getNodeSide = (graph, datum) => {\n const parentData = graph.getParentData(datum.id, 'tree');\n if (!parentData) return 'center';\n return datum.style.x > parentData.style.x ? 'right' : 'left';\n};\n\nconst data = {\n \"id\": \"Modeling Methods\",\n \"children\": [\n {\n \"id\": \"Classification\",\n \"children\": [\n {\n \"id\": \"Logistic regression\"\n },\n {\n \"id\": \"Linear discriminant analysis\"\n },\n {\n \"id\": \"Rules\"\n },\n {\n \"id\": \"Decision trees\"\n },\n {\n \"id\": \"Naive Bayes\"\n },\n {\n \"id\": \"K nearest neighbor\"\n },\n {\n \"id\": \"Probabilistic neural network\"\n },\n {\n \"id\": \"Support vector machine\"\n }\n ]\n },\n {\n \"id\": \"Consensus\",\n \"children\": [\n {\n \"id\": \"Models diversity\",\n \"children\": [\n {\n \"id\": \"Different initializations\"\n },\n {\n \"id\": \"Different parameter choices\"\n },\n {\n \"id\": \"Different architectures\"\n },\n {\n \"id\": \"Different modeling methods\"\n },\n {\n \"id\": \"Different training sets\"\n },\n {\n \"id\": \"Different feature sets\"\n }\n ]\n },\n {\n \"id\": \"Methods\",\n \"children\": [\n {\n \"id\": \"Classifier selection\"\n },\n {\n \"id\": \"Classifier fusion\"\n }\n ]\n },\n {\n \"id\": \"Common\",\n \"children\": [\n {\n \"id\": \"Bagging\"\n },\n {\n \"id\": \"Boosting\"\n },\n {\n \"id\": \"AdaBoost\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"Regression\",\n \"children\": [\n {\n \"id\": \"Multiple linear regression\"\n },\n {\n \"id\": \"Partial least squares\"\n },\n {\n \"id\": \"Multi-layer feedforward neural network\"\n },\n {\n \"id\": \"General regression neural network\"\n },\n {\n \"id\": \"Support vector regression\"\n }\n ]\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: treeToGraphData(data),\n node: {\n style: {\n labelText: (d) => d.id,\n labelBackground: true,\n labelPlacement: function (d) {\n const side = getNodeSide(this, d);\n return side === 'center' ? 'right' : side;\n },\n ports: [{ placement: 'right' }, { placement: 'left' }],\n },\n animation: {\n enter: false,\n },\n },\n edge: {\n type: 'cubic-horizontal',\n animation: {\n enter: false,\n },\n },\n layout: {\n type: 'mindmap',\n direction: 'H',\n preLayout: false,\n getHeight: () => 32,\n getWidth: () => 32,\n getVGap: () => 4,\n getHGap: () => 64,\n getSide: (d) => {\n if (d.id === 'Classification') {\n return 'left';\n }\n return 'right';\n },\n },\n behaviors: ['collapse-expand', 'drag-canvas', 'zoom-canvas'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n width: 1200,\n height: 800,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'rect',\n style: {\n size: (d) => {\n if (d.id === 'Modeling Methods') return [160, 48];\n if (['Classification', 'Consensus', 'Regression'].includes(d.id)) return [140, 40];\n return [120, 32];\n },\n radius: (d) => d.id === 'Modeling Methods' ? 24 : 16,\n fill: (d) => {\n if (d.id === 'Modeling Methods') return '#1783FF';\n if (['Classification', 'Consensus', 'Regression'].includes(d.id)) return '#E6F4FF';\n return '#F5F5F5';\n },\n stroke: (d) => {\n if (d.id === 'Modeling Methods') return '#1783FF';\n if (['Classification', 'Consensus', 'Regression'].includes(d.id)) return '#91CAFF';\n return '#D9D9D9';\n },\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: (d) => d.id === 'Modeling Methods' ? '#fff' : '#333',\n labelFontSize: (d) => d.id === 'Modeling Methods' ? 16 : 13,\n labelFontWeight: (d) => d.id === 'Modeling Methods' ? 'bold' : 'normal',\n cursor: 'pointer',\n },\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#ADC6FF',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'mindmap',\n direction: 'H',\n getWidth: (d) => {\n if (d.id === 'Modeling Methods') return 160;\n if (['Classification', 'Consensus', 'Regression'].includes(d.id)) return 140;\n return 120;\n },\n getHeight: (d) => {\n if (d.id === 'Modeling Methods') return 48;\n if (['Classification', 'Consensus', 'Regression'].includes(d.id)) return 40;\n return 32;\n },\n getHGap: () => 60,\n getVGap: () => 12,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true,\n },\n ],\n});\n\ngraph.render();", + "duration": 17339, + "retrievedSkillIds": [ + "g6-layout-mindmap", + "g6-pattern-tree-graph", + "g6-layout-force", + "g6-node-rect", + "g6-behavior-drag-element" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 3515, + "expectedLength": 3383, + "similarity": 0.5544844517184943, + "extractedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n width: 1200,\n height: 800,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'rect',\n style: {\n size: (d) => {\n if (d.id === 'Modeling Methods') return [160, 48];\n if (['Classification', 'Consensus', 'Regression'].includes(d.id)) return [140, 40];\n return [120, 32];\n },\n radius: (d) => d.id === 'Modeling Methods' ? 24 : 16,\n fill: (d) => {\n if (d.id === 'Modeling Methods') return '#1783FF';\n if (['Classification', 'Consensus', 'Regression'].includes(d.id)) return '#E6F4FF';\n return '#F5F5F5';\n },\n stroke: (d) => {\n if (d.id === 'Modeling Methods') return '#1783FF';\n if (['Classification', 'Consensus', 'Regression'].includes(d.id)) return '#91CAFF';\n return '#D9D9D9';\n },\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: (d) => d.id === 'Modeling Methods' ? '#fff' : '#333',\n labelFontSize: (d) => d.id === 'Modeling Methods' ? 16 : 13,\n labelFontWeight: (d) => d.id === 'Modeling Methods' ? 'bold' : 'normal',\n cursor: 'pointer',\n },\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#ADC6FF',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'mindmap',\n direction: 'H',\n getWidth: (d) => {\n if (d.id === 'Modeling Methods') return 160;\n if (['Classification', 'Consensus', 'Regression'].includes(d.id)) return 140;\n return 120;\n },\n getHeight: (d) => {\n if (d.id === 'Modeling Methods') return 48;\n if (['Classification', 'Consensus', 'Regression'].includes(d.id)) return 40;\n return 32;\n },\n getHGap: () => 60,\n getVGap: () => 12,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true,\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "treeToGraphData" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "treeToGraphData", + "includes", + "includes", + "includes", + "includes", + "includes", + "render" + ], + "objectKeys": [ + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "container", + "width", + "height", + "autoFit", + "data", + "node", + "type", + "style", + "size", + "radius", + "24", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "16", + "labelFontWeight", + "cursor", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "direction", + "getWidth", + "getHeight", + "getHGap", + "getVGap", + "behaviors", + "type", + "trigger", + "animation" + ], + "stringLiterals": [], + "apiPatterns": [ + "view.children", + "new Graph" + ] + } + } + }, + { + "id": "case-4", + "query": "根据描述绘制图表,使用 G6 渲染一个包含 16 个节点和 8 条边的图,每条边配置了不同的箭头类型,并以网格布局展示。参考数据:[{\"nodes\":[{\"id\":\"node1\"},{\"id\":\"node2\"},{\"id\":\"node3\"},{\"id\":\"node4\"},{\"id\":\"node5\"},{\"id\":\"node6\"},{\"id\":\"node7\"},{\"id\":\"node8\"},{\"id\":\"node9\"},{\"id\":\"node10\"}],\"edges\":[{\"id\":\"default-arrow\",\"source\":\"node1\",\"target\":\"node2\"},{\"id\":\"triangle-arrow\",\"source\":\"node3\",\"target\":\"node4\"},{\"id\":\"simple-arrow\",\"source\":\"node5\",\"target\":\"node6\"},{\"id\":\"vee-arrow\",\"source\":\"node7\",\"target\":\"node8\"},{\"id\":\"circle-arrow\",\"source\":\"node9\",\"target\":\"node10\"},{\"id\":\"rect-arrow\",\"source\":\"node11\",\"target\":\"node12\"},{\"id\":\"diamond-arrow\",\"source\":\"node13\",\"target\":\"node14\"},{\"id\":\"triangleRect-arrow\",\"source\":\"node15\",\"target\":\"node16\"}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: new Array(16).fill(0).map((_, i) => ({ id: `node${i + 1}` })),\n edges: [\n 'default-arrow',\n 'triangle-arrow',\n 'simple-arrow',\n 'vee-arrow',\n 'circle-arrow',\n 'rect-arrow',\n 'diamond-arrow',\n 'triangleRect-arrow',\n ].map((id, i) => ({\n id,\n source: `node${i * 2 + 1}`,\n target: `node${i * 2 + 2}`,\n })),\n};\n\nconst graph = new Graph({\n data,\n container: 'container',\n edge: {\n style: {\n labelText: (d) => d.id,\n labelBackground: true,\n endArrow: true,\n endArrowType: (d) => d.id.split('-')[0],\n },\n },\n layout: {\n type: 'grid',\n cols: 2,\n },\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: Array.from({ length: 16 }, (_, i) => ({\n id: `node${i + 1}`,\n data: { label: `Node ${i + 1}` }\n })),\n edges: [\n { id: 'default-arrow', source: 'node1', target: 'node2', data: { arrowType: 'default' } },\n { id: 'triangle-arrow', source: 'node3', target: 'node4', data: { arrowType: 'triangle' } },\n { id: 'simple-arrow', source: 'node5', target: 'node6', data: { arrowType: 'simple' } },\n { id: 'vee-arrow', source: 'node7', target: 'node8', data: { arrowType: 'vee' } },\n { id: 'circle-arrow', source: 'node9', target: 'node10', data: { arrowType: 'circle' } },\n { id: 'rect-arrow', source: 'node11', target: 'node12', data: { arrowType: 'rect' } },\n { id: 'diamond-arrow', source: 'node13', target: 'node14', data: { arrowType: 'diamond' } },\n { id: 'triangleRect-arrow', source: 'node15', target: 'node16', data: { arrowType: 'triangleRect' } }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12\n }\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 2,\n labelText: (d) => d.data.arrowType,\n labelFontSize: 11,\n labelFill: '#666',\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.9,\n endArrow: (d) => {\n const type = d.data.arrowType;\n switch (type) {\n case 'default':\n return true;\n case 'triangle':\n return { type: 'triangle', size: 12, fill: '#666', stroke: '#666' };\n case 'simple':\n return { type: 'triangle', size: 10, fill: 'none', stroke: '#666', lineWidth: 1.5 };\n case 'vee':\n return { type: 'vee', size: 12, fill: '#666', stroke: '#666' };\n case 'circle':\n return { type: 'circle', size: 8, fill: '#666', stroke: '#666' };\n case 'rect':\n return { type: 'rect', size: 8, fill: '#666', stroke: '#666' };\n case 'diamond':\n return { type: 'diamond', size: 10, fill: '#666', stroke: '#666' };\n case 'triangleRect':\n return { type: 'triangle-rect', size: 12, fill: '#666', stroke: '#666' };\n default:\n return true;\n }\n }\n }\n },\n layout: {\n type: 'grid',\n rows: 4,\n cols: 4,\n rowGap: 100,\n colGap: 100\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "duration": 36681, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-layout-grid", + "g6-core-graph-init", + "g6-pattern-flow-chart", + "g6-node-html" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2655, + "expectedLength": 695, + "similarity": 0.6585111719106247, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: Array.from({ length: 16 }, (_, i) => ({\n id: `node${i + 1}`,\n data: { label: `Node ${i + 1}` }\n })),\n edges: [\n { id: 'default-arrow', source: 'node1', target: 'node2', data: { arrowType: 'default' } },\n { id: 'triangle-arrow', source: 'node3', target: 'node4', data: { arrowType: 'triangle' } },\n { id: 'simple-arrow', source: 'node5', target: 'node6', data: { arrowType: 'simple' } },\n { id: 'vee-arrow', source: 'node7', target: 'node8', data: { arrowType: 'vee' } },\n { id: 'circle-arrow', source: 'node9', target: 'node10', data: { arrowType: 'circle' } },\n { id: 'rect-arrow', source: 'node11', target: 'node12', data: { arrowType: 'rect' } },\n { id: 'diamond-arrow', source: 'node13', target: 'node14', data: { arrowType: 'diamond' } },\n { id: 'triangleRect-arrow', source: 'node15', target: 'node16', data: { arrowType: 'triangleRect' } }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12\n }\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 2,\n labelText: (d) => d.data.arrowType,\n labelFontSize: 11,\n labelFill: '#666',\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.9,\n endArrow: (d) => {\n const type = d.data.arrowType;\n switch (type) {\n case 'default':\n return true;\n case 'triangle':\n return { type: 'triangle', size: 12, fill: '#666', stroke: '#666' };\n case 'simple':\n return { type: 'triangle', size: 10, fill: 'none', stroke: '#666', lineWidth: 1.5 };\n case 'vee':\n return { type: 'vee', size: 12, fill: '#666', stroke: '#666' };\n case 'circle':\n return { type: 'circle', size: 8, fill: '#666', stroke: '#666' };\n case 'rect':\n return { type: 'rect', size: 8, fill: '#666', stroke: '#666' };\n case 'diamond':\n return { type: 'diamond', size: 10, fill: '#666', stroke: '#666' };\n case 'triangleRect':\n return { type: 'triangle-rect', size: 12, fill: '#666', stroke: '#666' };\n default:\n return true;\n }\n }\n }\n },\n layout: {\n type: 'grid',\n rows: 4,\n cols: 4,\n rowGap: 100,\n colGap: 100\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "length", + "id", + "data", + "label", + "edges", + "id", + "source", + "target", + "data", + "arrowType", + "id", + "source", + "target", + "data", + "arrowType", + "id", + "source", + "target", + "data", + "arrowType", + "id", + "source", + "target", + "data", + "arrowType", + "id", + "source", + "target", + "data", + "arrowType", + "id", + "source", + "target", + "data", + "arrowType", + "id", + "source", + "target", + "data", + "arrowType", + "id", + "source", + "target", + "data", + "arrowType", + "container", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "style", + "stroke", + "lineWidth", + "labelText", + "labelFontSize", + "labelFill", + "labelBackground", + "labelBackgroundFill", + "labelBackgroundOpacity", + "endArrow", + "type", + "size", + "fill", + "stroke", + "type", + "size", + "fill", + "stroke", + "lineWidth", + "type", + "size", + "fill", + "stroke", + "type", + "size", + "fill", + "stroke", + "type", + "size", + "fill", + "stroke", + "type", + "size", + "fill", + "stroke", + "type", + "size", + "fill", + "stroke", + "default", + "layout", + "type", + "rows", + "cols", + "rowGap", + "colGap", + "behaviors" + ], + "stringLiterals": [ + "default", + "triangle", + "simple", + "vee", + "circle", + "rect", + "diamond", + "triangleRect" + ], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-5", + "query": "根据描述绘制图表,使用 G6 图表库创建一个具有左右端口的节点和水平立方贝塞尔曲线边的有向图,应用了 dagre 布局进行从左到右的层次排布,并为边设置了不同的状态样式,如实线、高亮、选中等,最后将图表渲染到指定容器中。参考数据:[{\"id\":\"node1\"},{\"id\":\"node2\"},{\"id\":\"node3\"},{\"id\":\"node4\"},{\"id\":\"node5\"},{\"id\":\"node6\"},{\"id\":\"line-default\",\"source\":\"node1\",\"target\":\"node2\"},{\"id\":\"line-active\",\"source\":\"node1\",\"target\":\"node3\",\"states\":[\"active\"]},{\"id\":\"line-selected\",\"source\":\"node1\",\"target\":\"node4\",\"states\":[\"selected\"]},{\"id\":\"line-highlight\",\"source\":\"node1\",\"target\":\"node5\",\"states\":[\"highlight\"]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n {\n id: 'node1',\n },\n {\n id: 'node2',\n },\n {\n id: 'node3',\n },\n {\n id: 'node4',\n },\n {\n id: 'node5',\n },\n {\n id: 'node6',\n },\n ],\n edges: [\n {\n id: 'line-default',\n source: 'node1',\n target: 'node2',\n },\n {\n id: 'line-active',\n source: 'node1',\n target: 'node3',\n states: ['active'],\n },\n {\n id: 'line-selected',\n source: 'node1',\n target: 'node4',\n states: ['selected'],\n },\n {\n id: 'line-highlight',\n source: 'node1',\n target: 'node5',\n states: ['highlight'],\n },\n {\n id: 'line-inactive',\n source: 'node1',\n target: 'node6',\n states: ['inactive'],\n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n port: true,\n ports: [{ placement: 'right' }, { placement: 'left' }],\n },\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n labelText: (d) => d.id,\n labelBackground: true,\n endArrow: true,\n },\n },\n layout: {\n type: 'antv-dagre',\n rankdir: 'LR',\n nodesep: 20,\n ranksep: 120,\n },\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst rawData = [\n {\"id\":\"node1\"},\n {\"id\":\"node2\"},\n {\"id\":\"node3\"},\n {\"id\":\"node4\"},\n {\"id\":\"node5\"},\n {\"id\":\"node6\"},\n {\"id\":\"line-default\",\"source\":\"node1\",\"target\":\"node2\"},\n {\"id\":\"line-active\",\"source\":\"node1\",\"target\":\"node3\",\"states\":[\"active\"]},\n {\"id\":\"line-selected\",\"source\":\"node1\",\"target\":\"node4\",\"states\":[\"selected\"]},\n {\"id\":\"line-highlight\",\"source\":\"node1\",\"target\":\"node5\",\"states\":[\"highlight\"]}\n];\n\nconst nodes = rawData.filter(item => !item.source).map(item => ({\n id: item.id,\n data: { label: item.id }\n}));\n\nconst edges = rawData.filter(item => item.source).map(item => ({\n id: item.id,\n source: item.source,\n target: item.target,\n states: item.states || []\n}));\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: { nodes, edges },\n \n node: {\n type: 'rect',\n style: {\n size: [120, 40],\n radius: 4,\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#333',\n ports: [\n { key: 'left', placement: 'left', r: 3, fill: '#adc6ff', stroke: '#adc6ff' },\n { key: 'right', placement: 'right', r: 3, fill: '#adc6ff', stroke: '#adc6ff' }\n ]\n }\n },\n \n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true,\n sourcePort: 'right',\n targetPort: 'left'\n },\n state: {\n selected: {\n stroke: '#1890ff',\n lineWidth: 3,\n endArrow: { fill: '#1890ff', stroke: '#1890ff' }\n },\n active: {\n stroke: '#fa8c16',\n lineWidth: 2,\n endArrow: { fill: '#fa8c16', stroke: '#fa8c16' }\n },\n highlight: {\n stroke: '#ff4d4f',\n lineWidth: 2,\n lineDash: [5, 5],\n endArrow: { fill: '#ff4d4f', stroke: '#ff4d4f' }\n }\n }\n },\n \n layout: {\n type: 'dagre',\n rankdir: 'LR',\n ranksep: 80,\n nodesep: 40,\n controlPoints: true\n },\n \n behaviors: ['drag-canvas', 'zoom-canvas', 'click-select']\n});\n\ngraph.render();", + "duration": 19599, + "retrievedSkillIds": [ + "g6-pattern-flow-chart", + "g6-edge-cubic", + "g6-core-graph-init", + "g6-layout-dagre", + "g6-edge-line" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2119, + "expectedLength": 1254, + "similarity": 0.5831562881562882, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst rawData = [\n {\"id\":\"node1\"},\n {\"id\":\"node2\"},\n {\"id\":\"node3\"},\n {\"id\":\"node4\"},\n {\"id\":\"node5\"},\n {\"id\":\"node6\"},\n {\"id\":\"line-default\",\"source\":\"node1\",\"target\":\"node2\"},\n {\"id\":\"line-active\",\"source\":\"node1\",\"target\":\"node3\",\"states\":[\"active\"]},\n {\"id\":\"line-selected\",\"source\":\"node1\",\"target\":\"node4\",\"states\":[\"selected\"]},\n {\"id\":\"line-highlight\",\"source\":\"node1\",\"target\":\"node5\",\"states\":[\"highlight\"]}\n];\n\nconst nodes = rawData.filter(item => !item.source).map(item => ({\n id: item.id,\n data: { label: item.id }\n}));\n\nconst edges = rawData.filter(item => item.source).map(item => ({\n id: item.id,\n source: item.source,\n target: item.target,\n states: item.states || []\n}));\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: { nodes, edges },\n \n node: {\n type: 'rect',\n style: {\n size: [120, 40],\n radius: 4,\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#333',\n ports: [\n { key: 'left', placement: 'left', r: 3, fill: '#adc6ff', stroke: '#adc6ff' },\n { key: 'right', placement: 'right', r: 3, fill: '#adc6ff', stroke: '#adc6ff' }\n ]\n }\n },\n \n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true,\n sourcePort: 'right',\n targetPort: 'left'\n },\n state: {\n selected: {\n stroke: '#1890ff',\n lineWidth: 3,\n endArrow: { fill: '#1890ff', stroke: '#1890ff' }\n },\n active: {\n stroke: '#fa8c16',\n lineWidth: 2,\n endArrow: { fill: '#fa8c16', stroke: '#fa8c16' }\n },\n highlight: {\n stroke: '#ff4d4f',\n lineWidth: 2,\n lineDash: [5, 5],\n endArrow: { fill: '#ff4d4f', stroke: '#ff4d4f' }\n }\n }\n },\n \n layout: {\n type: 'dagre',\n rankdir: 'LR',\n ranksep: 80,\n nodesep: 40,\n controlPoints: true\n },\n \n behaviors: ['drag-canvas', 'zoom-canvas', 'click-select']\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "filter", + "map", + "filter", + "map", + "Graph", + "render" + ], + "objectKeys": [ + "id", + "data", + "label", + "id", + "source", + "target", + "states", + "container", + "autoFit", + "data", + "node", + "type", + "style", + "size", + "radius", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "ports", + "key", + "placement", + "r", + "fill", + "stroke", + "key", + "placement", + "r", + "fill", + "stroke", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "sourcePort", + "targetPort", + "state", + "selected", + "stroke", + "lineWidth", + "endArrow", + "fill", + "stroke", + "active", + "stroke", + "lineWidth", + "endArrow", + "fill", + "stroke", + "highlight", + "stroke", + "lineWidth", + "lineDash", + "endArrow", + "fill", + "stroke", + "layout", + "type", + "rankdir", + "ranksep", + "nodesep", + "controlPoints", + "behaviors" + ], + "stringLiterals": [ + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "source", + "target", + "id", + "source", + "target", + "states", + "id", + "source", + "target", + "states", + "id", + "source", + "target", + "states" + ], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-6", + "query": "根据描述绘制图表,使用 G6 图表库创建一个有向无环图(DAG)的可视化,通过 dagre 布局算法排列节点,节点为矩形并显示 ID,边为折线,支持画布拖拽和缩放等交互操作。参考数据:[{\"id\":\"0\"},{\"id\":\"1\"},{\"id\":\"2\"},{\"id\":\"3\"},{\"id\":\"4\"},{\"id\":\"5\"},{\"id\":\"6\"},{\"id\":\"7\"},{\"id\":\"8\"},{\"id\":\"9\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0' },\n { id: '1' },\n { id: '2' },\n { id: '3' },\n { id: '4' },\n { id: '5' },\n { id: '6' },\n { id: '7' },\n { id: '8' },\n { id: '9' },\n ],\n edges: [\n { source: '0', target: '1' },\n { source: '0', target: '2' },\n { source: '1', target: '4' },\n { source: '0', target: '3' },\n { source: '3', target: '4' },\n { source: '4', target: '5' },\n { source: '4', target: '6' },\n { source: '5', target: '7' },\n { source: '5', target: '8' },\n { source: '8', target: '9' },\n { source: '2', target: '9' },\n { source: '3', target: '9' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data,\n layout: {\n type: 'antv-dagre',\n nodeSize: [60, 30],\n nodesep: 60,\n ranksep: 40,\n controlPoints: true,\n },\n node: {\n type: 'rect',\n style: {\n size: [60, 30],\n radius: 8,\n labelText: (d) => d.id,\n labelBackground: true,\n },\n },\n edge: {\n type: 'polyline',\n },\n behaviors: ['drag-element', 'drag-canvas', 'zoom-canvas'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0' },\n { id: '1' },\n { id: '2' },\n { id: '3' },\n { id: '4' },\n { id: '5' },\n { id: '6' },\n { id: '7' },\n { id: '8' },\n { id: '9' },\n ],\n edges: [\n { source: '0', target: '1' },\n { source: '0', target: '2' },\n { source: '1', target: '3' },\n { source: '1', target: '4' },\n { source: '2', target: '5' },\n { source: '3', target: '6' },\n { source: '4', target: '7' },\n { source: '5', target: '8' },\n { source: '6', target: '9' },\n { source: '7', target: '9' },\n { source: '8', target: '9' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data,\n node: {\n type: 'rect',\n style: {\n size: [80, 40],\n radius: 4,\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1.5,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#333',\n labelFontSize: 14,\n },\n },\n edge: {\n type: 'polyline',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n radius: 6,\n endArrow: true,\n endArrowSize: 8,\n },\n },\n layout: {\n type: 'dagre',\n rankdir: 'TB',\n ranksep: 60,\n nodesep: 30,\n nodeSize: [80, 40],\n },\n behaviors: ['drag-canvas', 'zoom-canvas'],\n});\n\ngraph.render();", + "duration": 11156, + "retrievedSkillIds": [ + "g6-pattern-flow-chart", + "g6-layout-dagre", + "g6-layout-circular", + "g6-layout-grid", + "g6-node-rect" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1324, + "expectedLength": 1137, + "similarity": 1, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0' },\n { id: '1' },\n { id: '2' },\n { id: '3' },\n { id: '4' },\n { id: '5' },\n { id: '6' },\n { id: '7' },\n { id: '8' },\n { id: '9' },\n ],\n edges: [\n { source: '0', target: '1' },\n { source: '0', target: '2' },\n { source: '1', target: '3' },\n { source: '1', target: '4' },\n { source: '2', target: '5' },\n { source: '3', target: '6' },\n { source: '4', target: '7' },\n { source: '5', target: '8' },\n { source: '6', target: '9' },\n { source: '7', target: '9' },\n { source: '8', target: '9' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data,\n node: {\n type: 'rect',\n style: {\n size: [80, 40],\n radius: 4,\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1.5,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#333',\n labelFontSize: 14,\n },\n },\n edge: {\n type: 'polyline',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n radius: 6,\n endArrow: true,\n endArrowSize: 8,\n },\n },\n layout: {\n type: 'dagre',\n rankdir: 'TB',\n ranksep: 60,\n nodesep: 30,\n nodeSize: [80, 40],\n },\n behaviors: ['drag-canvas', 'zoom-canvas'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "container", + "autoFit", + "node", + "type", + "style", + "size", + "radius", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "radius", + "endArrow", + "endArrowSize", + "layout", + "type", + "rankdir", + "ranksep", + "nodesep", + "nodeSize", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-7", + "query": "根据描述绘制图表,使用 G6 构建了一个图结构可视化,包含节点、连线和组合组。节点根据 combo 字段进行分组并着色,采用垂直层次布局排列,支持画布拖拽与缩放以及元素拖动。参考数据:[{\"id\":\"0\"},{\"id\":\"1\"},{\"id\":\"2\"},{\"id\":\"3\"},{\"id\":\"4\",\"combo\":\"A\"},{\"id\":\"5\",\"combo\":\"B\"},{\"id\":\"6\",\"combo\":\"A\"},{\"id\":\"7\",\"combo\":\"C\"},{\"id\":\"8\",\"combo\":\"C\"},{\"id\":\"9\",\"combo\":\"A\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"0\"\n },\n {\n \"id\": \"1\"\n },\n {\n \"id\": \"2\"\n },\n {\n \"id\": \"3\"\n },\n {\n \"id\": \"4\",\n \"combo\": \"A\"\n },\n {\n \"id\": \"5\",\n \"combo\": \"B\"\n },\n {\n \"id\": \"6\",\n \"combo\": \"A\"\n },\n {\n \"id\": \"7\",\n \"combo\": \"C\"\n },\n {\n \"id\": \"8\",\n \"combo\": \"C\"\n },\n {\n \"id\": \"9\",\n \"combo\": \"A\"\n },\n {\n \"id\": \"10\",\n \"combo\": \"B\"\n },\n {\n \"id\": \"11\",\n \"combo\": \"B\"\n }\n ],\n \"edges\": [\n {\n \"id\": \"edge-102\",\n \"source\": \"0\",\n \"target\": \"1\"\n },\n {\n \"id\": \"edge-161\",\n \"source\": \"0\",\n \"target\": \"2\"\n },\n {\n \"id\": \"edge-237\",\n \"source\": \"1\",\n \"target\": \"4\"\n },\n {\n \"id\": \"edge-253\",\n \"source\": \"0\",\n \"target\": \"3\"\n },\n {\n \"id\": \"edge-133\",\n \"source\": \"3\",\n \"target\": \"4\"\n },\n {\n \"id\": \"edge-320\",\n \"source\": \"2\",\n \"target\": \"5\"\n },\n {\n \"id\": \"edge-355\",\n \"source\": \"1\",\n \"target\": \"6\"\n },\n {\n \"id\": \"edge-823\",\n \"source\": \"1\",\n \"target\": \"7\"\n },\n {\n \"id\": \"edge-665\",\n \"source\": \"3\",\n \"target\": \"8\"\n },\n {\n \"id\": \"edge-884\",\n \"source\": \"3\",\n \"target\": \"9\"\n },\n {\n \"id\": \"edge-536\",\n \"source\": \"5\",\n \"target\": \"10\"\n },\n {\n \"id\": \"edge-401\",\n \"source\": \"5\",\n \"target\": \"11\"\n }\n ],\n \"combos\": [\n {\n \"id\": \"A\",\n \"style\": {\n \"type\": \"rect\"\n }\n },\n {\n \"id\": \"B\",\n \"style\": {\n \"type\": \"rect\"\n }\n },\n {\n \"id\": \"C\",\n \"style\": {\n \"type\": \"rect\"\n }\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'center',\n data,\n node: {\n type: 'rect',\n style: {\n size: [60, 30],\n radius: 8,\n labelText: (d) => d.id,\n labelBackground: true,\n ports: [{ placement: 'top' }, { placement: 'bottom' }],\n },\n palette: {\n field: (d) => d.combo,\n },\n },\n edge: {\n type: 'cubic-vertical',\n style: {\n endArrow: true,\n },\n },\n combo: {\n type: 'rect',\n style: {\n radius: 8,\n labelText: (d) => d.id,\n },\n },\n layout: {\n type: 'antv-dagre',\n ranksep: 50,\n nodesep: 5,\n sortByCombo: true,\n },\n behaviors: ['drag-element', 'drag-canvas', 'zoom-canvas'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst rawNodes = [\n {\"id\":\"0\"},{\"id\":\"1\"},{\"id\":\"2\"},{\"id\":\"3\"},\n {\"id\":\"4\",\"combo\":\"A\"},{\"id\":\"5\",\"combo\":\"B\"},\n {\"id\":\"6\",\"combo\":\"A\"},{\"id\":\"7\",\"combo\":\"C\"},\n {\"id\":\"8\",\"combo\":\"C\"},{\"id\":\"9\",\"combo\":\"A\"}\n];\n\nconst nodes = rawNodes.map(n => ({\n id: n.id,\n combo: n.combo,\n data: { label: `节点${n.id}` }\n}));\n\nconst combos = [\n { id: 'A', data: { label: '分组A' } },\n { id: 'B', data: { label: '分组B' } },\n { id: 'C', data: { label: '分组C' } }\n];\n\nconst edges = [\n { source: '0', target: '4' },\n { source: '1', target: '5' },\n { source: '2', target: '7' },\n { source: '3', target: '9' },\n { source: '4', target: '6' },\n { source: '5', target: '7' },\n { source: '6', target: '9' },\n { source: '7', target: '8' },\n { source: '4', target: '5' },\n { source: '5', target: '8' }\n];\n\nconst graph = new Graph({\n container,\n data: {\n nodes,\n edges,\n combos\n },\n node: {\n type: 'circle',\n style: {\n size: 32,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFontSize: 12\n },\n palette: {\n type: 'group',\n field: (d) => d.combo || 'default',\n color: ['#1783FF', '#F08F56', '#61DDAA', '#F6BD16']\n }\n },\n combo: {\n type: 'rect',\n style: {\n padding: 20,\n radius: 8,\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n labelText: (d) => d.data.label,\n labelPlacement: 'top',\n labelFontSize: 14,\n labelFontWeight: 'bold'\n }\n },\n edge: {\n style: {\n stroke: '#c0d8f0',\n lineWidth: 1.5,\n endArrow: true\n }\n },\n layout: {\n type: 'dagre',\n rankdir: 'TB',\n nodesep: 40,\n ranksep: 60\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "duration": 20147, + "retrievedSkillIds": [ + "g6-layout-combo-fishbone", + "g6-combo-overview", + "g6-pattern-tree-graph", + "g6-layout-grid", + "g6-node-rect" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1772, + "expectedLength": 2626, + "similarity": 0.5205298155298156, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst rawNodes = [\n {\"id\":\"0\"},{\"id\":\"1\"},{\"id\":\"2\"},{\"id\":\"3\"},\n {\"id\":\"4\",\"combo\":\"A\"},{\"id\":\"5\",\"combo\":\"B\"},\n {\"id\":\"6\",\"combo\":\"A\"},{\"id\":\"7\",\"combo\":\"C\"},\n {\"id\":\"8\",\"combo\":\"C\"},{\"id\":\"9\",\"combo\":\"A\"}\n];\n\nconst nodes = rawNodes.map(n => ({\n id: n.id,\n combo: n.combo,\n data: { label: `节点${n.id}` }\n}));\n\nconst combos = [\n { id: 'A', data: { label: '分组A' } },\n { id: 'B', data: { label: '分组B' } },\n { id: 'C', data: { label: '分组C' } }\n];\n\nconst edges = [\n { source: '0', target: '4' },\n { source: '1', target: '5' },\n { source: '2', target: '7' },\n { source: '3', target: '9' },\n { source: '4', target: '6' },\n { source: '5', target: '7' },\n { source: '6', target: '9' },\n { source: '7', target: '8' },\n { source: '4', target: '5' },\n { source: '5', target: '8' }\n];\n\nconst graph = new Graph({\n container,\n data: {\n nodes,\n edges,\n combos\n },\n node: {\n type: 'circle',\n style: {\n size: 32,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFontSize: 12\n },\n palette: {\n type: 'group',\n field: (d) => d.combo || 'default',\n color: ['#1783FF', '#F08F56', '#61DDAA', '#F6BD16']\n }\n },\n combo: {\n type: 'rect',\n style: {\n padding: 20,\n radius: 8,\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n labelText: (d) => d.data.label,\n labelPlacement: 'top',\n labelFontSize: 14,\n labelFontWeight: 'bold'\n }\n },\n edge: {\n style: {\n stroke: '#c0d8f0',\n lineWidth: 1.5,\n endArrow: true\n }\n },\n layout: {\n type: 'dagre',\n rankdir: 'TB',\n nodesep: 40,\n ranksep: 60\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "map", + "Graph", + "render" + ], + "objectKeys": [ + "id", + "combo", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "data", + "node", + "type", + "style", + "size", + "labelText", + "labelPlacement", + "labelFontSize", + "palette", + "type", + "field", + "color", + "combo", + "type", + "style", + "padding", + "radius", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFontSize", + "labelFontWeight", + "edge", + "style", + "stroke", + "lineWidth", + "endArrow", + "layout", + "type", + "rankdir", + "nodesep", + "ranksep", + "behaviors" + ], + "stringLiterals": [ + "id", + "id", + "id", + "id", + "id", + "combo", + "id", + "combo", + "id", + "combo", + "id", + "combo", + "id", + "combo", + "id", + "combo" + ], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-8", + "query": "根据描述绘制图表,使用 G6 渲染一个星型节点构成的图表,通过不同状态和样式配置展示节点的多种视觉效果,例如光晕、徽标、端点等。每个节点根据其 ID 展示不同的特性,并采用网格布局排列。参考数据:[{\"id\":\"default\"},{\"id\":\"halo\"},{\"id\":\"badges\"},{\"id\":\"ports\"},{\"id\":\"active\",\"states\":[\"active\"]},{\"id\":\"selected\",\"states\":[\"selected\"]},{\"id\":\"highlight\",\"states\":[\"highlight\"]},{\"id\":\"inactive\",\"states\":[\"inactive\"]},{\"id\":\"disabled\",\"states\":[\"disabled\"]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, iconfont } from '@antv/g6';\n\nconst style = document.createElement('style');\nstyle.innerHTML = `@import url('${iconfont.css}');`;\ndocument.head.appendChild(style);\n\nconst data = {\n nodes: [\n { id: 'default' },\n { id: 'halo' },\n { id: 'badges' },\n { id: 'ports' },\n {\n id: 'active',\n states: ['active'],\n },\n {\n id: 'selected',\n states: ['selected'],\n },\n {\n id: 'highlight',\n states: ['highlight'],\n },\n {\n id: 'inactive',\n states: ['inactive'],\n },\n {\n id: 'disabled',\n states: ['disabled'],\n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'star',\n style: {\n size: 40,\n labelText: (d) => d.id,\n iconFontFamily: 'iconfont',\n iconText: '\\ue602',\n halo: (d) => (d.id === 'halo' ? true : false),\n badges: (d) =>\n d.id === 'badges'\n ? [\n {\n text: 'A',\n placement: 'right-top',\n },\n {\n text: 'Important',\n placement: 'right',\n },\n {\n text: 'Notice',\n placement: 'right-bottom',\n },\n ]\n : [],\n badgeFontSize: 8,\n badgePadding: [1, 4],\n portR: 3,\n ports: (d) =>\n d.id === 'ports'\n ? [{ placement: 'left' }, { placement: 'right' }, { placement: 'top' }, { placement: 'bottom' }]\n : [],\n },\n },\n layout: {\n type: 'grid',\n },\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'default', data: { label: 'Default' } },\n { id: 'halo', data: { label: 'Halo' } },\n { id: 'badges', data: { label: 'Badges' } },\n { id: 'ports', data: { label: 'Ports' } },\n { id: 'active', data: { label: 'Active' }, states: ['active'] },\n { id: 'selected', data: { label: 'Selected' }, states: ['selected'] },\n { id: 'highlight', data: { label: 'Highlight' }, states: ['highlight'] },\n { id: 'inactive', data: { label: 'Inactive' }, states: ['inactive'] },\n { id: 'disabled', data: { label: 'Disabled' }, states: ['disabled'] },\n ],\n edges: [],\n};\n\nconst graph = new Graph({\n container,\n width: 800,\n height: 600,\n data,\n node: {\n type: 'star',\n style: {\n size: 60,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n labelOffsetY: 10,\n // Halo effect for specific node\n halo: (d) => d.id === 'halo',\n haloFill: (d) => d.id === 'halo' ? '#1783FF' : undefined,\n haloOpacity: (d) => d.id === 'halo' ? 0.2 : undefined,\n haloLineWidth: (d) => d.id === 'halo' ? 12 : undefined,\n // Badges configuration\n badges: (d) => {\n if (d.id === 'badges') {\n return [\n { text: '3', placement: 'right-top', fill: '#ff4d4f', textFill: '#fff', fontSize: 10, stroke: '#fff', lineWidth: 1 },\n { text: '★', placement: 'left-top', fill: '#faad14', textFill: '#fff', fontSize: 10, stroke: '#fff', lineWidth: 1 },\n ];\n }\n return undefined;\n },\n // Ports configuration\n ports: (d) => {\n if (d.id === 'ports') {\n return [\n { key: 'top', placement: 'top', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 1.5 },\n { key: 'bottom', placement: 'bottom', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 1.5 },\n { key: 'left', placement: 'left', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 1.5 },\n { key: 'right', placement: 'right', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 1.5 },\n ];\n }\n return undefined;\n },\n },\n state: {\n active: {\n fill: '#40a9ff',\n stroke: '#096dd9',\n lineWidth: 2,\n halo: true,\n haloFill: '#40a9ff',\n haloOpacity: 0.3,\n haloLineWidth: 8,\n cursor: 'pointer',\n },\n selected: {\n fill: '#ff7875',\n stroke: '#ff4d4f',\n lineWidth: 3,\n halo: true,\n haloFill: '#ff7875',\n haloOpacity: 0.25,\n haloLineWidth: 12,\n },\n highlight: {\n fill: '#73d13d',\n stroke: '#52c41a',\n lineWidth: 2,\n halo: true,\n haloFill: '#73d13d',\n haloOpacity: 0.3,\n haloLineWidth: 10,\n },\n inactive: {\n opacity: 0.3,\n fill: '#bfbfbf',\n stroke: '#8c8c8c',\n },\n disabled: {\n fill: '#f5f5f5',\n stroke: '#d9d9d9',\n labelFill: '#999',\n cursor: 'not-allowed',\n },\n },\n },\n layout: {\n type: 'grid',\n rows: 3,\n cols: 3,\n rowGap: 100,\n colGap: 100,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'click-select'],\n});\n\ngraph.render();", + "duration": 27597, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-node-html", + "g6-node-rect", + "g6-layout-grid", + "g6-pattern-flow-chart" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 3330, + "expectedLength": 1581, + "similarity": 0.4968971684053652, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'default', data: { label: 'Default' } },\n { id: 'halo', data: { label: 'Halo' } },\n { id: 'badges', data: { label: 'Badges' } },\n { id: 'ports', data: { label: 'Ports' } },\n { id: 'active', data: { label: 'Active' }, states: ['active'] },\n { id: 'selected', data: { label: 'Selected' }, states: ['selected'] },\n { id: 'highlight', data: { label: 'Highlight' }, states: ['highlight'] },\n { id: 'inactive', data: { label: 'Inactive' }, states: ['inactive'] },\n { id: 'disabled', data: { label: 'Disabled' }, states: ['disabled'] },\n ],\n edges: [],\n};\n\nconst graph = new Graph({\n container,\n width: 800,\n height: 600,\n data,\n node: {\n type: 'star',\n style: {\n size: 60,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n labelOffsetY: 10,\n // Halo effect for specific node\n halo: (d) => d.id === 'halo',\n haloFill: (d) => d.id === 'halo' ? '#1783FF' : undefined,\n haloOpacity: (d) => d.id === 'halo' ? 0.2 : undefined,\n haloLineWidth: (d) => d.id === 'halo' ? 12 : undefined,\n // Badges configuration\n badges: (d) => {\n if (d.id === 'badges') {\n return [\n { text: '3', placement: 'right-top', fill: '#ff4d4f', textFill: '#fff', fontSize: 10, stroke: '#fff', lineWidth: 1 },\n { text: '★', placement: 'left-top', fill: '#faad14', textFill: '#fff', fontSize: 10, stroke: '#fff', lineWidth: 1 },\n ];\n }\n return undefined;\n },\n // Ports configuration\n ports: (d) => {\n if (d.id === 'ports') {\n return [\n { key: 'top', placement: 'top', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 1.5 },\n { key: 'bottom', placement: 'bottom', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 1.5 },\n { key: 'left', placement: 'left', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 1.5 },\n { key: 'right', placement: 'right', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 1.5 },\n ];\n }\n return undefined;\n },\n },\n state: {\n active: {\n fill: '#40a9ff',\n stroke: '#096dd9',\n lineWidth: 2,\n halo: true,\n haloFill: '#40a9ff',\n haloOpacity: 0.3,\n haloLineWidth: 8,\n cursor: 'pointer',\n },\n selected: {\n fill: '#ff7875',\n stroke: '#ff4d4f',\n lineWidth: 3,\n halo: true,\n haloFill: '#ff7875',\n haloOpacity: 0.25,\n haloLineWidth: 12,\n },\n highlight: {\n fill: '#73d13d',\n stroke: '#52c41a',\n lineWidth: 2,\n halo: true,\n haloFill: '#73d13d',\n haloOpacity: 0.3,\n haloLineWidth: 10,\n },\n inactive: {\n opacity: 0.3,\n fill: '#bfbfbf',\n stroke: '#8c8c8c',\n },\n disabled: {\n fill: '#f5f5f5',\n stroke: '#d9d9d9',\n labelFill: '#999',\n cursor: 'not-allowed',\n },\n },\n },\n layout: {\n type: 'grid',\n rows: 3,\n cols: 3,\n rowGap: 100,\n colGap: 100,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'click-select'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "states", + "id", + "data", + "label", + "states", + "id", + "data", + "label", + "states", + "id", + "data", + "label", + "states", + "id", + "data", + "label", + "states", + "edges", + "width", + "height", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "labelOffsetY", + "halo", + "haloFill", + "haloOpacity", + "2", + "haloLineWidth", + "12", + "badges", + "text", + "placement", + "fill", + "textFill", + "fontSize", + "stroke", + "lineWidth", + "text", + "placement", + "fill", + "textFill", + "fontSize", + "stroke", + "lineWidth", + "ports", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "state", + "active", + "fill", + "stroke", + "lineWidth", + "halo", + "haloFill", + "haloOpacity", + "haloLineWidth", + "cursor", + "selected", + "fill", + "stroke", + "lineWidth", + "halo", + "haloFill", + "haloOpacity", + "haloLineWidth", + "highlight", + "fill", + "stroke", + "lineWidth", + "halo", + "haloFill", + "haloOpacity", + "haloLineWidth", + "inactive", + "opacity", + "fill", + "stroke", + "disabled", + "fill", + "stroke", + "labelFill", + "cursor", + "layout", + "type", + "rows", + "cols", + "rowGap", + "colGap", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label" + ] + } + } + }, + { + "id": "case-9", + "query": "根据描述绘制图表,使用 AntV G6 渲染一个网格布局的图结构,包含 5 个节点和 6 条边,支持画布滚动和通过 Ctrl 键控制的缩放交互。参考数据:[{\"id\":\"node1\"},{\"id\":\"node2\"},{\"id\":\"node3\"},{\"id\":\"node4\"},{\"id\":\"node5\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n layout: {\n type: 'grid',\n },\n data: {\n nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3' }, { id: 'node4' }, { id: 'node5' }],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node1', target: 'node3' },\n { source: 'node1', target: 'node4' },\n { source: 'node2', target: 'node3' },\n { source: 'node3', target: 'node4' },\n { source: 'node4', target: 'node5' },\n ],\n },\n behaviors: [\n 'scroll-canvas',\n {\n key: 'custom-zoom-canvas',\n type: 'zoom-canvas',\n enable: (event) => {\n return event.ctrlKey; // ctrlKey 为 true 时,是双指捏合或扩张操作,false 时是双指滑动操作\n },\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node1', data: { label: '节点1' } },\n { id: 'node2', data: { label: '节点2' } },\n { id: 'node3', data: { label: '节点3' } },\n { id: 'node4', data: { label: '节点4' } },\n { id: 'node5', data: { label: '节点5' } },\n ],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node1', target: 'node3' },\n { source: 'node2', target: 'node4' },\n { source: 'node3', target: 'node4' },\n { source: 'node4', target: 'node5' },\n { source: 'node2', target: 'node5' },\n ],\n },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#ccc',\n lineWidth: 2,\n },\n },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n rowGap: 80,\n colGap: 80,\n },\n behaviors: [\n 'scroll-canvas',\n {\n type: 'zoom-canvas',\n key: 'ctrl',\n },\n 'drag-canvas',\n ],\n});\n\ngraph.render();", + "duration": 11131, + "retrievedSkillIds": [ + "g6-behavior-canvas-nav", + "g6-layout-grid", + "g6-layout-combo-fishbone", + "g6-node-circle", + "g6-layout-force" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1199, + "expectedLength": 766, + "similarity": 0.7491187739463601, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node1', data: { label: '节点1' } },\n { id: 'node2', data: { label: '节点2' } },\n { id: 'node3', data: { label: '节点3' } },\n { id: 'node4', data: { label: '节点4' } },\n { id: 'node5', data: { label: '节点5' } },\n ],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node1', target: 'node3' },\n { source: 'node2', target: 'node4' },\n { source: 'node3', target: 'node4' },\n { source: 'node4', target: 'node5' },\n { source: 'node2', target: 'node5' },\n ],\n },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#ccc',\n lineWidth: 2,\n },\n },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n rowGap: 80,\n colGap: 80,\n },\n behaviors: [\n 'scroll-canvas',\n {\n type: 'zoom-canvas',\n key: 'ctrl',\n },\n 'drag-canvas',\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "container", + "data", + "nodes", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "rows", + "cols", + "rowGap", + "colGap", + "behaviors", + "type", + "key" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-10", + "query": "根据描述绘制图表,使用 G6 构建了一个树形结构图,展示机器学习建模方法的分类体系。数据以树形结构组织,通过 dendrogram 布局进行垂直方向排列,节点根据是否为叶子节点采用不同的标签样式,支持画布拖拽、缩放以及节点展开收起等交互行为。参考数据:[{\"id\":\"Modeling Methods\",\"children\":[{\"id\":\"Classification\",\"children\":[{\"id\":\"Logistic regression\"},{\"id\":\"Linear discriminant analysis\"},{\"id\":\"Rules\"},{\"id\":\"Decision trees\"},{\"id\":\"Naive Bayes\"},{\"id\":\"K nearest neighbor\"},{\"id\":\"Probabilistic neural network\"},{\"id\":\"Support vector machine\"}]},{\"id\":\"Consensus\",\"children\":[{\"id\":\"Models diversity\",\"children\":[{\"id\":\"Different initializations\"},{\"id\":\"Different parameter choices\"},{\"id\":\"Different architectures\"},{\"id\":\"Different modeling methods\"},{\"id\":\"Different training sets\"},{\"id\":\"Different feature sets\"}]},{\"id\":\"Methods\",\"children\":[{\"id\":\"Classifier selection\"},{\"id\":\"Classifier fusion\"}]},{\"id\":\"Common\",\"children\":[{\"id\":\"Bagging\"},{\"id\":\"Boosting\"},{\"id\":\"AdaBoost\"}]}]},{\"id\":\"Regression\",\"children\":[{\"id\":\"Multiple linear regression\"},{\"id\":\"Partial least squares\"},{\"id\":\"Multi-layer feedforward neural network\"},{\"id\":\"General regression neural network\"},{\"id\":\"Support vector regression\"}]}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\n/**\n * If the node is a leaf node\n * @param {*} d - node data\n * @returns {boolean} - whether the node is a leaf node\n */\nfunction isLeafNode(d) {\n return !d.children || d.children.length === 0;\n}\n\nconst data = {\n \"id\": \"Modeling Methods\",\n \"children\": [\n {\n \"id\": \"Classification\",\n \"children\": [\n {\n \"id\": \"Logistic regression\"\n },\n {\n \"id\": \"Linear discriminant analysis\"\n },\n {\n \"id\": \"Rules\"\n },\n {\n \"id\": \"Decision trees\"\n },\n {\n \"id\": \"Naive Bayes\"\n },\n {\n \"id\": \"K nearest neighbor\"\n },\n {\n \"id\": \"Probabilistic neural network\"\n },\n {\n \"id\": \"Support vector machine\"\n }\n ]\n },\n {\n \"id\": \"Consensus\",\n \"children\": [\n {\n \"id\": \"Models diversity\",\n \"children\": [\n {\n \"id\": \"Different initializations\"\n },\n {\n \"id\": \"Different parameter choices\"\n },\n {\n \"id\": \"Different architectures\"\n },\n {\n \"id\": \"Different modeling methods\"\n },\n {\n \"id\": \"Different training sets\"\n },\n {\n \"id\": \"Different feature sets\"\n }\n ]\n },\n {\n \"id\": \"Methods\",\n \"children\": [\n {\n \"id\": \"Classifier selection\"\n },\n {\n \"id\": \"Classifier fusion\"\n }\n ]\n },\n {\n \"id\": \"Common\",\n \"children\": [\n {\n \"id\": \"Bagging\"\n },\n {\n \"id\": \"Boosting\"\n },\n {\n \"id\": \"AdaBoost\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"Regression\",\n \"children\": [\n {\n \"id\": \"Multiple linear regression\"\n },\n {\n \"id\": \"Partial least squares\"\n },\n {\n \"id\": \"Multi-layer feedforward neural network\"\n },\n {\n \"id\": \"General regression neural network\"\n },\n {\n \"id\": \"Support vector regression\"\n }\n ]\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: treeToGraphData(data),\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'collapse-expand'],\n node: {\n style: (d) => {\n const style = {\n labelText: d.id,\n labelPlacement: 'right',\n labelOffsetX: 2,\n labelBackground: true,\n ports: [{ placement: 'top' }, { placement: 'bottom' }],\n };\n if (isLeafNode(d)) {\n Object.assign(style, {\n labelTransform: [\n ['rotate', 90],\n ['translate', 18],\n ],\n labelBaseline: 'center',\n labelTextAlign: 'left',\n });\n }\n return style;\n },\n animation: {\n enter: false,\n },\n },\n edge: {\n type: 'cubic-vertical',\n animation: {\n enter: false,\n },\n },\n layout: {\n type: 'dendrogram',\n direction: 'TB', // H / V / LR / RL / TB / BT\n nodeSep: 50,\n rankSep: 120,\n },\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'Modeling Methods',\n data: { label: 'Modeling Methods' },\n children: [\n {\n id: 'Classification',\n data: { label: 'Classification' },\n children: [\n { id: 'Logistic regression', data: { label: 'Logistic regression' } },\n { id: 'Linear discriminant analysis', data: { label: 'Linear discriminant analysis' } },\n { id: 'Rules', data: { label: 'Rules' } },\n { id: 'Decision trees', data: { label: 'Decision trees' } },\n { id: 'Naive Bayes', data: { label: 'Naive Bayes' } },\n { id: 'K nearest neighbor', data: { label: 'K nearest neighbor' } },\n { id: 'Probabilistic neural network', data: { label: 'Probabilistic neural network' } },\n { id: 'Support vector machine', data: { label: 'Support vector machine' } },\n ],\n },\n {\n id: 'Consensus',\n data: { label: 'Consensus' },\n children: [\n {\n id: 'Models diversity',\n data: { label: 'Models diversity' },\n children: [\n { id: 'Different initializations', data: { label: 'Different initializations' } },\n { id: 'Different parameter choices', data: { label: 'Different parameter choices' } },\n { id: 'Different architectures', data: { label: 'Different architectures' } },\n { id: 'Different modeling methods', data: { label: 'Different modeling methods' } },\n { id: 'Different training sets', data: { label: 'Different training sets' } },\n { id: 'Different feature sets', data: { label: 'Different feature sets' } },\n ],\n },\n {\n id: 'Methods',\n data: { label: 'Methods' },\n children: [\n { id: 'Classifier selection', data: { label: 'Classifier selection' } },\n { id: 'Classifier fusion', data: { label: 'Classifier fusion' } },\n ],\n },\n {\n id: 'Common',\n data: { label: 'Common' },\n children: [\n { id: 'Bagging', data: { label: 'Bagging' } },\n { id: 'Boosting', data: { label: 'Boosting' } },\n { id: 'AdaBoost', data: { label: 'AdaBoost' } },\n ],\n },\n ],\n },\n {\n id: 'Regression',\n data: { label: 'Regression' },\n children: [\n { id: 'Multiple linear regression', data: { label: 'Multiple linear regression' } },\n { id: 'Partial least squares', data: { label: 'Partial least squares' } },\n { id: 'Multi-layer feedforward neural network', data: { label: 'Multi-layer feedforward neural network' } },\n { id: 'General regression neural network', data: { label: 'General regression neural network' } },\n { id: 'Support vector regression', data: { label: 'Support vector regression' } },\n ],\n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n width: 1200,\n height: 800,\n autoFit: 'view',\n \n data: treeToGraphData(treeData),\n\n node: {\n type: 'rect',\n style: {\n size: (d) => {\n const isLeaf = !d.children || d.children.length === 0;\n return isLeaf ? [140, 32] : [160, 40];\n },\n radius: (d) => {\n const isLeaf = !d.children || d.children.length === 0;\n return isLeaf ? 4 : 8;\n },\n fill: (d) => {\n const isLeaf = !d.children || d.children.length === 0;\n if (d.id === 'Modeling Methods') return '#1783FF';\n if (isLeaf) return '#f6ffed';\n return '#e6f4ff';\n },\n stroke: (d) => {\n const isLeaf = !d.children || d.children.length === 0;\n if (d.id === 'Modeling Methods') return '#1783FF';\n if (isLeaf) return '#73d13d';\n return '#1890ff';\n },\n lineWidth: 1.5,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: (d) => {\n const isLeaf = !d.children || d.children.length === 0;\n if (d.id === 'Modeling Methods') return '#fff';\n return isLeaf ? '#389e0d' : '#0958d9';\n },\n labelFontSize: (d) => {\n const isLeaf = !d.children || d.children.length === 0;\n return isLeaf ? 12 : 13;\n },\n labelFontWeight: (d) => {\n const isLeaf = !d.children || d.children.length === 0;\n return isLeaf ? 'normal' : 'bold';\n },\n cursor: 'pointer',\n },\n state: {\n collapsed: {\n fill: '#fff2e8',\n stroke: '#ffa940',\n },\n },\n },\n\n edge: {\n type: 'cubic-vertical',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n endArrow: {\n size: 6,\n fill: '#adc6ff',\n },\n },\n },\n\n layout: {\n type: 'dendrogram',\n direction: 'TB',\n getWidth: () => 160,\n getHeight: () => 40,\n getVGap: () => 60,\n getHGap: () => 20,\n },\n\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true,\n },\n ],\n});\n\ngraph.render();", + "duration": 16262, + "retrievedSkillIds": [ + "g6-pattern-tree-graph", + "g6-layout-mindmap", + "g6-node-rect", + "g6-layout-grid", + "g6-layout-force" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 4959, + "expectedLength": 3445, + "similarity": 0.6161997494283146, + "extractedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'Modeling Methods',\n data: { label: 'Modeling Methods' },\n children: [\n {\n id: 'Classification',\n data: { label: 'Classification' },\n children: [\n { id: 'Logistic regression', data: { label: 'Logistic regression' } },\n { id: 'Linear discriminant analysis', data: { label: 'Linear discriminant analysis' } },\n { id: 'Rules', data: { label: 'Rules' } },\n { id: 'Decision trees', data: { label: 'Decision trees' } },\n { id: 'Naive Bayes', data: { label: 'Naive Bayes' } },\n { id: 'K nearest neighbor', data: { label: 'K nearest neighbor' } },\n { id: 'Probabilistic neural network', data: { label: 'Probabilistic neural network' } },\n { id: 'Support vector machine', data: { label: 'Support vector machine' } },\n ],\n },\n {\n id: 'Consensus',\n data: { label: 'Consensus' },\n children: [\n {\n id: 'Models diversity',\n data: { label: 'Models diversity' },\n children: [\n { id: 'Different initializations', data: { label: 'Different initializations' } },\n { id: 'Different parameter choices', data: { label: 'Different parameter choices' } },\n { id: 'Different architectures', data: { label: 'Different architectures' } },\n { id: 'Different modeling methods', data: { label: 'Different modeling methods' } },\n { id: 'Different training sets', data: { label: 'Different training sets' } },\n { id: 'Different feature sets', data: { label: 'Different feature sets' } },\n ],\n },\n {\n id: 'Methods',\n data: { label: 'Methods' },\n children: [\n { id: 'Classifier selection', data: { label: 'Classifier selection' } },\n { id: 'Classifier fusion', data: { label: 'Classifier fusion' } },\n ],\n },\n {\n id: 'Common',\n data: { label: 'Common' },\n children: [\n { id: 'Bagging', data: { label: 'Bagging' } },\n { id: 'Boosting', data: { label: 'Boosting' } },\n { id: 'AdaBoost', data: { label: 'AdaBoost' } },\n ],\n },\n ],\n },\n {\n id: 'Regression',\n data: { label: 'Regression' },\n children: [\n { id: 'Multiple linear regression', data: { label: 'Multiple linear regression' } },\n { id: 'Partial least squares', data: { label: 'Partial least squares' } },\n { id: 'Multi-layer feedforward neural network', data: { label: 'Multi-layer feedforward neural network' } },\n { id: 'General regression neural network', data: { label: 'General regression neural network' } },\n { id: 'Support vector regression', data: { label: 'Support vector regression' } },\n ],\n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n width: 1200,\n height: 800,\n autoFit: 'view',\n \n data: treeToGraphData(treeData),\n\n node: {\n type: 'rect',\n style: {\n size: (d) => {\n const isLeaf = !d.children || d.children.length === 0;\n return isLeaf ? [140, 32] : [160, 40];\n },\n radius: (d) => {\n const isLeaf = !d.children || d.children.length === 0;\n return isLeaf ? 4 : 8;\n },\n fill: (d) => {\n const isLeaf = !d.children || d.children.length === 0;\n if (d.id === 'Modeling Methods') return '#1783FF';\n if (isLeaf) return '#f6ffed';\n return '#e6f4ff';\n },\n stroke: (d) => {\n const isLeaf = !d.children || d.children.length === 0;\n if (d.id === 'Modeling Methods') return '#1783FF';\n if (isLeaf) return '#73d13d';\n return '#1890ff';\n },\n lineWidth: 1.5,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: (d) => {\n const isLeaf = !d.children || d.children.length === 0;\n if (d.id === 'Modeling Methods') return '#fff';\n return isLeaf ? '#389e0d' : '#0958d9';\n },\n labelFontSize: (d) => {\n const isLeaf = !d.children || d.children.length === 0;\n return isLeaf ? 12 : 13;\n },\n labelFontWeight: (d) => {\n const isLeaf = !d.children || d.children.length === 0;\n return isLeaf ? 'normal' : 'bold';\n },\n cursor: 'pointer',\n },\n state: {\n collapsed: {\n fill: '#fff2e8',\n stroke: '#ffa940',\n },\n },\n },\n\n edge: {\n type: 'cubic-vertical',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n endArrow: {\n size: 6,\n fill: '#adc6ff',\n },\n },\n },\n\n layout: {\n type: 'dendrogram',\n direction: 'TB',\n getWidth: () => 160,\n getHeight: () => 40,\n getVGap: () => 60,\n getHGap: () => 20,\n },\n\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true,\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "treeToGraphData" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "treeToGraphData", + "render" + ], + "objectKeys": [ + "id", + "data", + "label", + "children", + "id", + "data", + "label", + "children", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "children", + "id", + "data", + "label", + "children", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "children", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "children", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "children", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "container", + "width", + "height", + "autoFit", + "data", + "node", + "type", + "style", + "size", + "radius", + "4", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "12", + "labelFontWeight", + "cursor", + "state", + "collapsed", + "fill", + "stroke", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "size", + "fill", + "layout", + "type", + "direction", + "getWidth", + "getHeight", + "getVGap", + "getHGap", + "behaviors", + "type", + "trigger", + "animation" + ], + "stringLiterals": [], + "apiPatterns": [ + "view.children", + "new Graph", + "x6.label" + ] + } + } + }, + { + "id": "case-11", + "query": "根据描述绘制图表,使用 G6 创建一个包含节点、边和组合的图结构,并定义了两种不同的折叠展开交互行为,分别通过双击和单击触发不同组合的折叠展开操作。参考数据:[{\"id\":\"node1\",\"combo\":\"combo1\",\"style\":{\"x\":300,\"y\":100}},{\"id\":\"node2\",\"combo\":\"combo1\",\"style\":{\"x\":300,\"y\":150}},{\"id\":\"node3\",\"combo\":\"combo2\",\"style\":{\"x\":100,\"y\":100}},{\"id\":\"node4\",\"combo\":\"combo2\",\"style\":{\"x\":50,\"y\":150}},{\"id\":\"node5\",\"combo\":\"combo2\",\"style\":{\"x\":150,\"y\":150}},{\"source\":\"node1\",\"target\":\"node2\"},{\"source\":\"node3\",\"target\":\"node4\"},{\"source\":\"node3\",\"target\":\"node5\"},{\"id\":\"combo1\",\"style\":{\"labelText\":\"双击折叠\",\"collapsed\":true}},{\"id\":\"combo2\",\"style\":{\"labelText\":\"单击折叠\",\"collapsed\":false}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 300, y: 100 } },\n { id: 'node2', combo: 'combo1', style: { x: 300, y: 150 } },\n { id: 'node3', combo: 'combo2', style: { x: 100, y: 100 } },\n { id: 'node4', combo: 'combo2', style: { x: 50, y: 150 } },\n { id: 'node5', combo: 'combo2', style: { x: 150, y: 150 } },\n ],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node3', target: 'node4' },\n { source: 'node3', target: 'node5' },\n ],\n combos: [\n { id: 'combo1', style: { labelText: '双击折叠', collapsed: true } },\n { id: 'combo2', style: { labelText: '单击折叠', collapsed: false } },\n ],\n },\n behaviors: [\n {\n type: 'collapse-expand',\n trigger: 'dblclick',\n enable: (event) => event.targetType === 'combo' && event.target.id === 'combo1',\n },\n {\n type: 'collapse-expand',\n trigger: 'click',\n enable: (event) => event.targetType === 'combo' && event.target.id === 'combo2',\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 300, y: 100 } },\n { id: 'node2', combo: 'combo1', style: { x: 300, y: 150 } },\n { id: 'node3', combo: 'combo2', style: { x: 100, y: 100 } },\n { id: 'node4', combo: 'combo2', style: { x: 50, y: 150 } },\n { id: 'node5', combo: 'combo2', style: { x: 150, y: 150 } },\n ],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node3', target: 'node4' },\n { source: 'node3', target: 'node5' },\n ],\n combos: [\n { id: 'combo1', style: { labelText: '双击折叠', collapsed: true } },\n { id: 'combo2', style: { labelText: '单击折叠', collapsed: false } },\n ],\n};\n\nconst graph = new Graph({\n container,\n data,\n layout: {\n type: 'preset',\n },\n node: {\n type: 'circle',\n style: {\n size: 20,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 1,\n },\n },\n combo: {\n type: 'rect',\n style: {\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n radius: 8,\n padding: 20,\n labelText: (d) => d.style?.labelText || '',\n labelPlacement: 'top',\n labelFill: '#1d39c4',\n labelFontWeight: 600,\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n type: 'collapse-expand',\n trigger: 'dblclick',\n enable: (event) => event.target.id === 'combo1',\n animation: true,\n },\n {\n type: 'collapse-expand',\n trigger: 'click',\n enable: (event) => event.target.id === 'combo2',\n animation: true,\n },\n ],\n});\n\ngraph.render();", + "duration": 59597, + "retrievedSkillIds": [ + "g6-combo-overview", + "g6-edge-polyline", + "g6-node-react", + "g6-pattern-tree-graph", + "g6-behavior-lasso-collapse" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1693, + "expectedLength": 1126, + "similarity": 0.8919710106290496, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 300, y: 100 } },\n { id: 'node2', combo: 'combo1', style: { x: 300, y: 150 } },\n { id: 'node3', combo: 'combo2', style: { x: 100, y: 100 } },\n { id: 'node4', combo: 'combo2', style: { x: 50, y: 150 } },\n { id: 'node5', combo: 'combo2', style: { x: 150, y: 150 } },\n ],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node3', target: 'node4' },\n { source: 'node3', target: 'node5' },\n ],\n combos: [\n { id: 'combo1', style: { labelText: '双击折叠', collapsed: true } },\n { id: 'combo2', style: { labelText: '单击折叠', collapsed: false } },\n ],\n};\n\nconst graph = new Graph({\n container,\n data,\n layout: {\n type: 'preset',\n },\n node: {\n type: 'circle',\n style: {\n size: 20,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 1,\n },\n },\n combo: {\n type: 'rect',\n style: {\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n radius: 8,\n padding: 20,\n labelText: (d) => d.style?.labelText || '',\n labelPlacement: 'top',\n labelFill: '#1d39c4',\n labelFontWeight: 600,\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n type: 'collapse-expand',\n trigger: 'dblclick',\n enable: (event) => event.target.id === 'combo1',\n animation: true,\n },\n {\n type: 'collapse-expand',\n trigger: 'click',\n enable: (event) => event.target.id === 'combo2',\n animation: true,\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "combo", + "style", + "x", + "y", + "id", + "combo", + "style", + "x", + "y", + "id", + "combo", + "style", + "x", + "y", + "id", + "combo", + "style", + "x", + "y", + "id", + "combo", + "style", + "x", + "y", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "combos", + "id", + "style", + "labelText", + "collapsed", + "id", + "style", + "labelText", + "collapsed", + "layout", + "type", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "combo", + "type", + "style", + "fill", + "stroke", + "lineWidth", + "radius", + "padding", + "labelText", + "labelPlacement", + "labelFill", + "labelFontWeight", + "behaviors", + "type", + "trigger", + "enable", + "animation", + "type", + "trigger", + "enable", + "animation" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-12", + "query": "根据描述绘制图表,使用 G6 渲染一个包含节点、边和组合的图形结构,支持折叠展开和元素拖拽交互。参考数据:[{\"id\":\"node1\",\"combo\":\"combo1\",\"style\":{\"x\":350,\"y\":200}},{\"id\":\"node2\",\"combo\":\"combo1\",\"style\":{\"x\":350,\"y\":250}},{\"id\":\"node3\",\"combo\":\"combo3\",\"style\":{\"x\":100,\"y\":200}},{\"source\":\"node1\",\"target\":\"node2\"},{\"source\":\"node1\",\"target\":\"node3\"},{\"source\":\"combo1\",\"target\":\"node3\"},{\"id\":\"combo1\",\"combo\":\"combo2\"},{\"id\":\"combo2\"},{\"id\":\"combo3\",\"style\":{\"collapsed\":true}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 350, y: 200 } },\n { id: 'node2', combo: 'combo1', style: { x: 350, y: 250 } },\n { id: 'node3', combo: 'combo3', style: { x: 100, y: 200 } },\n ],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node1', target: 'node3' },\n { source: 'combo1', target: 'node3' },\n ],\n combos: [{ id: 'combo1', combo: 'combo2' }, { id: 'combo2' }, { id: 'combo3', style: { collapsed: true } }],\n },\n behaviors: ['collapse-expand', 'drag-element'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 350, y: 200 } },\n { id: 'node2', combo: 'combo1', style: { x: 350, y: 250 } },\n { id: 'node3', combo: 'combo3', style: { x: 100, y: 200 } },\n ],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node1', target: 'node3' },\n { source: 'combo1', target: 'node3' },\n ],\n combos: [\n { id: 'combo1', combo: 'combo2' },\n { id: 'combo2' },\n { id: 'combo3', style: { collapsed: true } },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data,\n node: {\n type: 'circle',\n style: {\n size: 24,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFontSize: 12,\n },\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true,\n },\n },\n combo: {\n type: 'rect',\n style: {\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n radius: 8,\n padding: 20,\n labelText: (d) => d.id,\n labelPlacement: 'top',\n labelFill: '#1d39c4',\n labelFontWeight: 600,\n collapsedSize: [60, 40],\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n type: 'collapse-expand',\n trigger: 'dblclick',\n },\n ],\n});\n\ngraph.render();", + "duration": 19814, + "retrievedSkillIds": [ + "g6-behavior-drag-element", + "g6-pattern-tree-graph", + "g6-combo-overview", + "g6-edge-polyline", + "g6-behavior-canvas-nav" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1412, + "expectedLength": 660, + "similarity": 0.8016009329940628, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 350, y: 200 } },\n { id: 'node2', combo: 'combo1', style: { x: 350, y: 250 } },\n { id: 'node3', combo: 'combo3', style: { x: 100, y: 200 } },\n ],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node1', target: 'node3' },\n { source: 'combo1', target: 'node3' },\n ],\n combos: [\n { id: 'combo1', combo: 'combo2' },\n { id: 'combo2' },\n { id: 'combo3', style: { collapsed: true } },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data,\n node: {\n type: 'circle',\n style: {\n size: 24,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFontSize: 12,\n },\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true,\n },\n },\n combo: {\n type: 'rect',\n style: {\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n radius: 8,\n padding: 20,\n labelText: (d) => d.id,\n labelPlacement: 'top',\n labelFill: '#1d39c4',\n labelFontWeight: 600,\n collapsedSize: [60, 40],\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n type: 'collapse-expand',\n trigger: 'dblclick',\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "combo", + "style", + "x", + "y", + "id", + "combo", + "style", + "x", + "y", + "id", + "combo", + "style", + "x", + "y", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "combos", + "id", + "combo", + "id", + "id", + "style", + "collapsed", + "container", + "autoFit", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFontSize", + "edge", + "style", + "stroke", + "lineWidth", + "endArrow", + "combo", + "type", + "style", + "fill", + "stroke", + "lineWidth", + "radius", + "padding", + "labelText", + "labelPlacement", + "labelFill", + "labelFontWeight", + "collapsedSize", + "behaviors", + "type", + "trigger" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-13", + "query": "根据描述绘制图表,使用 G6 图表库创建一个包含节点和边的图形,设置了节点的位置和文本标签,边支持显示标签和处理平行边的转换,同时启用了元素拖拽交互。通过导入的数据渲染了一个具有特定布局的图结构。参考数据:[{\"id\":\"A\",\"style\":{\"x\":50,\"y\":350}},{\"id\":\"B\",\"style\":{\"x\":250,\"y\":150}},{\"id\":\"C\",\"style\":{\"x\":450,\"y\":350}},{\"source\":\"A\",\"target\":\"C\"},{\"source\":\"C\",\"target\":\"A\"},{\"id\":\"edge:A-B0\",\"source\":\"A\",\"target\":\"B\",\"data\":{\"label\":\"A->B:0\"}},{\"id\":\"edge:A-B1\",\"source\":\"A\",\"target\":\"B\",\"data\":{\"label\":\"A->B:1\"}},{\"id\":\"edge:A-B2\",\"source\":\"A\",\"target\":\"B\",\"data\":{\"label\":\"A->B:2\"}},{\"id\":\"edge:A-B3\",\"source\":\"A\",\"target\":\"B\",\"data\":{\"label\":\"A->B:3\"}},{\"id\":\"edge:A-B4\",\"source\":\"A\",\"target\":\"B\",\"data\":{\"label\":\"A->B:4\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'A', style: { x: 50, y: 350 } },\n { id: 'B', style: { x: 250, y: 150 } },\n { id: 'C', style: { x: 450, y: 350 } },\n ],\n edges: [\n { source: 'A', target: 'C' },\n { source: 'C', target: 'A' },\n ...Array.from({ length: 10 }).map((_, i) => ({\n id: `edge:A-B${i}`,\n source: 'A',\n target: 'B',\n data: {\n label: `A->B:${i}`,\n },\n })),\n ...Array.from({ length: 5 }).map((_, i) => ({\n id: `edge:B-C${i}`,\n source: 'B',\n target: 'C',\n data: {\n label: `B->C:${i}`,\n },\n })),\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'center',\n data,\n node: {\n style: {\n ports: [{ placement: 'center' }],\n labelText: (d) => d.id,\n },\n },\n edge: {\n style: {\n labelText: (d) => d?.data?.label || `${d.source}->${d.target}`,\n },\n },\n behaviors: ['drag-element'],\n transforms: ['process-parallel-edges'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'A', style: { x: 50, y: 350 } },\n { id: 'B', style: { x: 250, y: 150 } },\n { id: 'C', style: { x: 450, y: 350 } }\n ],\n edges: [\n { source: 'A', target: 'C' },\n { source: 'C', target: 'A' },\n { id: 'edge:A-B0', source: 'A', target: 'B', data: { label: 'A->B:0' } },\n { id: 'edge:A-B1', source: 'A', target: 'B', data: { label: 'A->B:1' } },\n { id: 'edge:A-B2', source: 'A', target: 'B', data: { label: 'A->B:2' } },\n { id: 'edge:A-B3', source: 'A', target: 'B', data: { label: 'A->B:3' } },\n { id: 'edge:A-B4', source: 'A', target: 'B', data: { label: 'A->B:4' } }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff'\n }\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true,\n labelText: (d) => d.data?.label || '',\n labelFill: '#666',\n labelFontSize: 12\n }\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element'\n ]\n});\n\ngraph.render();", + "duration": 18748, + "retrievedSkillIds": [ + "g6-behavior-drag-element", + "g6-node-circle", + "g6-node-rect", + "g6-layout-mindmap", + "g6-core-graph-init" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1223, + "expectedLength": 1019, + "similarity": 0.9505128205128205, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'A', style: { x: 50, y: 350 } },\n { id: 'B', style: { x: 250, y: 150 } },\n { id: 'C', style: { x: 450, y: 350 } }\n ],\n edges: [\n { source: 'A', target: 'C' },\n { source: 'C', target: 'A' },\n { id: 'edge:A-B0', source: 'A', target: 'B', data: { label: 'A->B:0' } },\n { id: 'edge:A-B1', source: 'A', target: 'B', data: { label: 'A->B:1' } },\n { id: 'edge:A-B2', source: 'A', target: 'B', data: { label: 'A->B:2' } },\n { id: 'edge:A-B3', source: 'A', target: 'B', data: { label: 'A->B:3' } },\n { id: 'edge:A-B4', source: 'A', target: 'B', data: { label: 'A->B:4' } }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff'\n }\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true,\n labelText: (d) => d.data?.label || '',\n labelFill: '#666',\n labelFontSize: 12\n }\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element'\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "edges", + "source", + "target", + "source", + "target", + "id", + "edge", + "source", + "target", + "data", + "label", + "B", + "id", + "edge", + "source", + "target", + "data", + "label", + "B", + "id", + "edge", + "source", + "target", + "data", + "label", + "B", + "id", + "edge", + "source", + "target", + "data", + "label", + "B", + "id", + "edge", + "source", + "target", + "data", + "label", + "B", + "container", + "node", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "edge", + "style", + "stroke", + "lineWidth", + "endArrow", + "labelText", + "labelFill", + "labelFontSize", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-14", + "query": "根据描述绘制图表,创建了一个包含10个节点和5条边的图结构,并为节点和边配置了退出动画效果,使用线性缓动函数持续1秒改变透明度,最后渲染该图形。参考数据:[{\"id\":\"node-0\",\"style\":{\"x\":50,\"y\":25}},{\"id\":\"node-1\",\"style\":{\"x\":200,\"y\":25}},{\"id\":\"node-2\",\"style\":{\"x\":50,\"y\":75}},{\"id\":\"node-3\",\"style\":{\"x\":200,\"y\":75}},{\"id\":\"node-4\",\"style\":{\"x\":50,\"y\":125}},{\"id\":\"node-5\",\"style\":{\"x\":200,\"y\":125}},{\"id\":\"node-6\",\"style\":{\"x\":50,\"y\":175}},{\"id\":\"node-7\",\"style\":{\"x\":200,\"y\":175}},{\"id\":\"node-8\",\"style\":{\"x\":50,\"y\":225}},{\"id\":\"node-9\",\"style\":{\"x\":200,\"y\":225}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: Array.from({ length: 10 }, (_, i) => ({\n id: `node-${i}`,\n style: { x: i % 2 === 0 ? 50 : 200, y: 25 + 50 * Math.floor(i / 2) },\n })),\n edges: Array.from({ length: 5 }, (_, i) => ({\n id: `edge-${i}`,\n source: `node-${i * 2}`,\n target: `node-${i * 2 + 1}`,\n })),\n },\n node: {\n animation: {\n exit: [\n {\n fields: ['opacity'],\n duration: 1000,\n easing: 'linear',\n },\n ],\n },\n },\n edge: {\n animation: {\n exit: [\n {\n fields: ['opacity'],\n duration: 1000,\n easing: 'linear',\n },\n ],\n },\n },\n});\n\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-0', style: { x: 50, y: 25 } },\n { id: 'node-1', style: { x: 200, y: 25 } },\n { id: 'node-2', style: { x: 50, y: 75 } },\n { id: 'node-3', style: { x: 200, y: 75 } },\n { id: 'node-4', style: { x: 50, y: 125 } },\n { id: 'node-5', style: { x: 200, y: 125 } },\n { id: 'node-6', style: { x: 50, y: 175 } },\n { id: 'node-7', style: { x: 200, y: 175 } },\n { id: 'node-8', style: { x: 50, y: 225 } },\n { id: 'node-9', style: { x: 200, y: 225 } }\n ],\n edges: [\n { source: 'node-0', target: 'node-1' },\n { source: 'node-2', target: 'node-3' },\n { source: 'node-4', target: 'node-5' },\n { source: 'node-6', target: 'node-7' },\n { source: 'node-8', target: 'node-9' }\n ]\n};\n\nconst graph = new Graph({\n container,\n data,\n node: {\n style: {\n size: 20,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n },\n animation: {\n exit: [\n {\n fields: ['opacity'],\n from: { opacity: 1 },\n to: { opacity: 0 },\n duration: 1000,\n easing: 'linear',\n },\n ],\n },\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 2,\n },\n animation: {\n exit: [\n {\n fields: ['opacity'],\n from: { opacity: 1 },\n to: { opacity: 0 },\n duration: 1000,\n easing: 'linear',\n },\n ],\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas'],\n});\n\ngraph.render();", + "duration": 9805, + "retrievedSkillIds": [ + "g6-core-transforms-animation", + "g6-core-data-structure", + "g6-behavior-drag-element", + "g6-node-circle", + "g6-behavior-canvas-nav" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1519, + "expectedLength": 767, + "similarity": 0.821364734299517, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-0', style: { x: 50, y: 25 } },\n { id: 'node-1', style: { x: 200, y: 25 } },\n { id: 'node-2', style: { x: 50, y: 75 } },\n { id: 'node-3', style: { x: 200, y: 75 } },\n { id: 'node-4', style: { x: 50, y: 125 } },\n { id: 'node-5', style: { x: 200, y: 125 } },\n { id: 'node-6', style: { x: 50, y: 175 } },\n { id: 'node-7', style: { x: 200, y: 175 } },\n { id: 'node-8', style: { x: 50, y: 225 } },\n { id: 'node-9', style: { x: 200, y: 225 } }\n ],\n edges: [\n { source: 'node-0', target: 'node-1' },\n { source: 'node-2', target: 'node-3' },\n { source: 'node-4', target: 'node-5' },\n { source: 'node-6', target: 'node-7' },\n { source: 'node-8', target: 'node-9' }\n ]\n};\n\nconst graph = new Graph({\n container,\n data,\n node: {\n style: {\n size: 20,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n },\n animation: {\n exit: [\n {\n fields: ['opacity'],\n from: { opacity: 1 },\n to: { opacity: 0 },\n duration: 1000,\n easing: 'linear',\n },\n ],\n },\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 2,\n },\n animation: {\n exit: [\n {\n fields: ['opacity'],\n from: { opacity: 1 },\n to: { opacity: 0 },\n duration: 1000,\n easing: 'linear',\n },\n ],\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "node", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "animation", + "exit", + "fields", + "from", + "opacity", + "to", + "opacity", + "duration", + "easing", + "edge", + "style", + "stroke", + "lineWidth", + "animation", + "exit", + "fields", + "from", + "opacity", + "to", + "opacity", + "duration", + "easing", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-15", + "query": "根据描述绘制图表,创建了一个带有呼吸动画效果的自定义圆形节点,并使用网格布局展示四个节点的图形。参考数据:[{\"id\":\"node-0\"},{\"id\":\"node-1\"},{\"id\":\"node-2\"},{\"id\":\"node-3\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Circle, ExtensionCategory, Graph, register } from '@antv/g6';\n\nclass BreathingCircle extends Circle {\n onCreate() {\n const halo = this.shapeMap.halo;\n halo.animate([{ lineWidth: 0 }, { lineWidth: 20 }], {\n duration: 1000,\n iterations: Infinity,\n direction: 'alternate',\n });\n }\n}\n\nregister(ExtensionCategory.NODE, 'breathing-circle', BreathingCircle);\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [{ id: 'node-0' }, { id: 'node-1' }, { id: 'node-2' }, { id: 'node-3' }],\n },\n node: {\n type: 'breathing-circle',\n style: {\n size: 50,\n halo: true,\n },\n palette: ['#3875f6', '#efb041', '#ec5b56', '#72c240'],\n },\n layout: {\n type: 'grid',\n },\n});\n\ngraph.render();\n", + "generatedCode": "import { Circle, ExtensionCategory, Graph, register } from '@antv/g6';\n\nclass BreathingCircle extends Circle {\n onCreate() {\n const halo = this.shapeMap.halo;\n if (halo) {\n halo.animate([{ lineWidth: 0 }, { lineWidth: 20 }], {\n duration: 1000,\n iterations: Infinity,\n direction: 'alternate',\n });\n }\n }\n}\n\nregister(ExtensionCategory.NODE, 'breathing-circle', BreathingCircle);\n\nconst graph = new Graph({\n container: container,\n data: {\n nodes: [\n { id: 'node-0' },\n { id: 'node-1' },\n { id: 'node-2' },\n { id: 'node-3' },\n ],\n },\n node: {\n type: 'breathing-circle',\n style: {\n size: 50,\n halo: true,\n },\n palette: ['#3875f6', '#efb041', '#ec5b56', '#72c240'],\n },\n layout: {\n type: 'grid',\n },\n behaviors: ['drag-canvas', 'zoom-canvas'],\n});\n\ngraph.render();", + "duration": 9035, + "retrievedSkillIds": [ + "g6-pattern-tree-graph", + "g6-node-circle", + "g6-node-rect", + "g6-layout-mindmap", + "g6-core-custom-element" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 859, + "expectedLength": 754, + "similarity": 0.9760613550450712, + "extractedCode": "import { Circle, ExtensionCategory, Graph, register } from '@antv/g6';\n\nclass BreathingCircle extends Circle {\n onCreate() {\n const halo = this.shapeMap.halo;\n if (halo) {\n halo.animate([{ lineWidth: 0 }, { lineWidth: 20 }], {\n duration: 1000,\n iterations: Infinity,\n direction: 'alternate',\n });\n }\n }\n}\n\nregister(ExtensionCategory.NODE, 'breathing-circle', BreathingCircle);\n\nconst graph = new Graph({\n container: container,\n data: {\n nodes: [\n { id: 'node-0' },\n { id: 'node-1' },\n { id: 'node-2' },\n { id: 'node-3' },\n ],\n },\n node: {\n type: 'breathing-circle',\n style: {\n size: 50,\n halo: true,\n },\n palette: ['#3875f6', '#efb041', '#ec5b56', '#72c240'],\n },\n layout: {\n type: 'grid',\n },\n behaviors: ['drag-canvas', 'zoom-canvas'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Circle", + "ExtensionCategory", + "Graph", + "register" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "onCreate", + "animate", + "register", + "Graph", + "render" + ], + "objectKeys": [ + "lineWidth", + "lineWidth", + "duration", + "iterations", + "direction", + "container", + "data", + "nodes", + "id", + "id", + "id", + "id", + "node", + "type", + "style", + "size", + "halo", + "palette", + "layout", + "type", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "node.animate" + ] + } + } + }, + { + "id": "case-16", + "query": "根据描述绘制图表,使用 G6 创建了一个图实例并渲染,图中包含了节点、边和组合结构,支持折叠展开和元素聚焦交互。参考数据:[{\"nodes\":[{\"id\":\"node1\",\"combo\":\"combo1\",\"style\":{\"x\":110,\"y\":150}},{\"id\":\"node2\",\"combo\":\"combo1\",\"style\":{\"x\":190,\"y\":150}},{\"id\":\"node3\",\"combo\":\"combo2\",\"style\":{\"x\":150,\"y\":260}}],\"edges\":[{\"source\":\"node1\",\"target\":\"node2\"}],\"combos\":[{\"id\":\"combo1\",\"combo\":\"combo2\"},{\"id\":\"combo2\"}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 110, y: 150 } },\n { id: 'node2', combo: 'combo1', style: { x: 190, y: 150 } },\n { id: 'node3', combo: 'combo2', style: { x: 150, y: 260 } },\n ],\n edges: [{ source: 'node1', target: 'node2' }],\n combos: [{ id: 'combo1', combo: 'combo2' }, { id: 'combo2' }],\n};\n\nconst graph = new Graph({\n container: 'container',\n node: {\n style: { labelText: (d) => d.id },\n },\n data,\n behaviors: ['collapse-expand', 'focus-element'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 110, y: 150 } },\n { id: 'node2', combo: 'combo1', style: { x: 190, y: 150 } },\n { id: 'node3', combo: 'combo2', style: { x: 150, y: 260 } }\n ],\n edges: [\n { source: 'node1', target: 'node2' }\n ],\n combos: [\n { id: 'combo1', combo: 'combo2' },\n { id: 'combo2' }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n width: 800,\n height: 600,\n autoFit: 'view',\n data,\n node: {\n type: 'circle',\n style: {\n size: 30,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFill: '#333'\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true\n }\n },\n combo: {\n type: 'rect',\n style: {\n fill: '#e6f4ff',\n stroke: '#1890ff',\n lineWidth: 2,\n radius: 4,\n labelText: (d) => d.id,\n labelPlacement: 'top',\n labelFill: '#1890ff',\n labelFontWeight: 'bold',\n padding: [20, 20, 20, 20]\n }\n },\n layout: {\n type: 'combo-combined',\n spacing: 20\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true\n },\n {\n type: 'focus-element',\n animation: {\n duration: 500,\n easing: 'ease-in-out'\n }\n }\n ]\n});\n\ngraph.render();", + "duration": 14704, + "retrievedSkillIds": [ + "g6-pattern-tree-graph", + "g6-node-react", + "g6-node-circle", + "g6-behavior-create-edge-focus", + "g6-core-graph-init" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1500, + "expectedLength": 565, + "similarity": 0.8175199981922538, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 110, y: 150 } },\n { id: 'node2', combo: 'combo1', style: { x: 190, y: 150 } },\n { id: 'node3', combo: 'combo2', style: { x: 150, y: 260 } }\n ],\n edges: [\n { source: 'node1', target: 'node2' }\n ],\n combos: [\n { id: 'combo1', combo: 'combo2' },\n { id: 'combo2' }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n width: 800,\n height: 600,\n autoFit: 'view',\n data,\n node: {\n type: 'circle',\n style: {\n size: 30,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFill: '#333'\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true\n }\n },\n combo: {\n type: 'rect',\n style: {\n fill: '#e6f4ff',\n stroke: '#1890ff',\n lineWidth: 2,\n radius: 4,\n labelText: (d) => d.id,\n labelPlacement: 'top',\n labelFill: '#1890ff',\n labelFontWeight: 'bold',\n padding: [20, 20, 20, 20]\n }\n },\n layout: {\n type: 'combo-combined',\n spacing: 20\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true\n },\n {\n type: 'focus-element',\n animation: {\n duration: 500,\n easing: 'ease-in-out'\n }\n }\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "combo", + "style", + "x", + "y", + "id", + "combo", + "style", + "x", + "y", + "id", + "combo", + "style", + "x", + "y", + "edges", + "source", + "target", + "combos", + "id", + "combo", + "id", + "container", + "width", + "height", + "autoFit", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "combo", + "type", + "style", + "fill", + "stroke", + "lineWidth", + "radius", + "labelText", + "labelPlacement", + "labelFill", + "labelFontWeight", + "padding", + "layout", + "type", + "spacing", + "behaviors", + "type", + "trigger", + "animation", + "type", + "animation", + "duration", + "easing" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-17", + "query": "根据描述绘制图表,使用 G6 创建一个基于网格布局的图结构,包含 5 个节点和 6 条边,并启用了画布纵向滚动交互。节点之间通过边连接形成简单网络关系,适用于展示基础图结构。参考数据:[{\"id\":\"node1\"},{\"id\":\"node2\"},{\"id\":\"node3\"},{\"id\":\"node4\"},{\"id\":\"node5\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n layout: {\n type: 'grid',\n },\n data: {\n nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3' }, { id: 'node4' }, { id: 'node5' }],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node1', target: 'node3' },\n { source: 'node1', target: 'node4' },\n { source: 'node2', target: 'node3' },\n { source: 'node3', target: 'node4' },\n { source: 'node4', target: 'node5' },\n ],\n },\n behaviors: [{ type: 'scroll-canvas', direction: 'y' }],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', data: { label: '节点1' } },\n { id: 'node2', data: { label: '节点2' } },\n { id: 'node3', data: { label: '节点3' } },\n { id: 'node4', data: { label: '节点4' } },\n { id: 'node5', data: { label: '节点5' } },\n ],\n edges: [\n { source: 'node1', target: 'node2', data: {} },\n { source: 'node1', target: 'node3', data: {} },\n { source: 'node2', target: 'node4', data: {} },\n { source: 'node3', target: 'node4', data: {} },\n { source: 'node3', target: 'node5', data: {} },\n { source: 'node4', target: 'node5', data: {} },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'grid',\n rows: 2,\n rowGap: 80,\n colGap: 80,\n },\n behaviors: [\n 'scroll-canvas',\n 'zoom-canvas',\n ],\n});\n\ngraph.render();", + "duration": 16426, + "retrievedSkillIds": [ + "g6-layout-grid", + "g6-pattern-network-graph", + "g6-layout-force", + "g6-layout-mindmap", + "g6-node-circle" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1171, + "expectedLength": 598, + "similarity": 0.7250184552289816, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', data: { label: '节点1' } },\n { id: 'node2', data: { label: '节点2' } },\n { id: 'node3', data: { label: '节点3' } },\n { id: 'node4', data: { label: '节点4' } },\n { id: 'node5', data: { label: '节点5' } },\n ],\n edges: [\n { source: 'node1', target: 'node2', data: {} },\n { source: 'node1', target: 'node3', data: {} },\n { source: 'node2', target: 'node4', data: {} },\n { source: 'node3', target: 'node4', data: {} },\n { source: 'node3', target: 'node5', data: {} },\n { source: 'node4', target: 'node5', data: {} },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'grid',\n rows: 2,\n rowGap: 80,\n colGap: 80,\n },\n behaviors: [\n 'scroll-canvas',\n 'zoom-canvas',\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "edges", + "source", + "target", + "data", + "source", + "target", + "data", + "source", + "target", + "data", + "source", + "target", + "data", + "source", + "target", + "data", + "source", + "target", + "data", + "container", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "rows", + "rowGap", + "colGap", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-18", + "query": "根据描述绘制图表,使用 G6 渲染一个包含两个节点和一条边的图形,边为折线类型,并支持节点拖拽交互。参考数据:[{\"id\":\"node-1\",\"style\":{\"x\":200,\"y\":200}},{\"id\":\"node-2\",\"style\":{\"x\":350,\"y\":120}},{\"id\":\"edge-1\",\"source\":\"node-1\",\"target\":\"node-2\",\"controlPoints\":[[300,190]]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', style: { x: 200, y: 200 } },\n { id: 'node-2', style: { x: 350, y: 120 } },\n ],\n edges: [\n {\n id: 'edge-1',\n source: 'node-1',\n target: 'node-2',\n controlPoints: [[300, 190]],\n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n edge: {\n type: 'polyline',\n style: {\n controlPoints: (d) => d.controlPoints,\n },\n },\n behaviors: [{ type: 'drag-element' }],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', style: { x: 200, y: 200 } },\n { id: 'node-2', style: { x: 350, y: 120 } },\n ],\n edges: [\n { id: 'edge-1', source: 'node-1', target: 'node-2', controlPoints: [[300, 190]] },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n width: 600,\n height: 400,\n data,\n node: {\n type: 'circle',\n style: {\n size: 30,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n },\n },\n edge: {\n type: 'polyline',\n style: {\n stroke: '#999',\n lineWidth: 2,\n radius: 8,\n endArrow: true,\n },\n },\n layout: false,\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "duration": 15105, + "retrievedSkillIds": [ + "g6-edge-polyline", + "g6-behavior-drag-element", + "g6-edge-line", + "g6-pattern-flow-chart", + "g6-node-circle" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 817, + "expectedLength": 524, + "similarity": 0.8801983952736417, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', style: { x: 200, y: 200 } },\n { id: 'node-2', style: { x: 350, y: 120 } },\n ],\n edges: [\n { id: 'edge-1', source: 'node-1', target: 'node-2', controlPoints: [[300, 190]] },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n width: 600,\n height: 400,\n data,\n node: {\n type: 'circle',\n style: {\n size: 30,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n },\n },\n edge: {\n type: 'polyline',\n style: {\n stroke: '#999',\n lineWidth: 2,\n radius: 8,\n endArrow: true,\n },\n },\n layout: false,\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "edges", + "id", + "source", + "target", + "controlPoints", + "container", + "width", + "height", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "radius", + "endArrow", + "layout", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-19", + "query": "根据描述绘制图表,使用 G6 图表库创建一个圆形布局的关系图,包含 34 个节点和多条边,节点显示其 ID,支持画布拖拽与元素拖拽交互。参考数据:[{\"id\":\"0\"},{\"id\":\"1\"},{\"id\":\"2\"},{\"id\":\"3\"},{\"id\":\"4\"},{\"id\":\"5\"},{\"id\":\"6\"},{\"id\":\"7\"},{\"id\":\"8\"},{\"id\":\"9\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"0\"\n },\n {\n \"id\": \"1\"\n },\n {\n \"id\": \"2\"\n },\n {\n \"id\": \"3\"\n },\n {\n \"id\": \"4\"\n },\n {\n \"id\": \"5\"\n },\n {\n \"id\": \"6\"\n },\n {\n \"id\": \"7\"\n },\n {\n \"id\": \"8\"\n },\n {\n \"id\": \"9\"\n },\n {\n \"id\": \"10\"\n },\n {\n \"id\": \"11\"\n },\n {\n \"id\": \"12\"\n },\n {\n \"id\": \"13\"\n },\n {\n \"id\": \"14\"\n },\n {\n \"id\": \"15\"\n },\n {\n \"id\": \"16\"\n },\n {\n \"id\": \"17\"\n },\n {\n \"id\": \"18\"\n },\n {\n \"id\": \"19\"\n },\n {\n \"id\": \"20\"\n },\n {\n \"id\": \"21\"\n },\n {\n \"id\": \"22\"\n },\n {\n \"id\": \"23\"\n },\n {\n \"id\": \"24\"\n },\n {\n \"id\": \"25\"\n },\n {\n \"id\": \"26\"\n },\n {\n \"id\": \"27\"\n },\n {\n \"id\": \"28\"\n },\n {\n \"id\": \"29\"\n },\n {\n \"id\": \"30\"\n },\n {\n \"id\": \"31\"\n },\n {\n \"id\": \"32\"\n },\n {\n \"id\": \"33\"\n }\n ],\n \"edges\": [\n {\n \"source\": \"0\",\n \"target\": \"1\"\n },\n {\n \"source\": \"0\",\n \"target\": \"2\"\n },\n {\n \"source\": \"0\",\n \"target\": \"3\"\n },\n {\n \"source\": \"0\",\n \"target\": \"4\"\n },\n {\n \"source\": \"0\",\n \"target\": \"5\"\n },\n {\n \"source\": \"0\",\n \"target\": \"7\"\n },\n {\n \"source\": \"0\",\n \"target\": \"8\"\n },\n {\n \"source\": \"0\",\n \"target\": \"9\"\n },\n {\n \"source\": \"0\",\n \"target\": \"10\"\n },\n {\n \"source\": \"0\",\n \"target\": \"11\"\n },\n {\n \"source\": \"0\",\n \"target\": \"13\"\n },\n {\n \"source\": \"0\",\n \"target\": \"14\"\n },\n {\n \"source\": \"0\",\n \"target\": \"15\"\n },\n {\n \"source\": \"0\",\n \"target\": \"16\"\n },\n {\n \"source\": \"2\",\n \"target\": \"3\"\n },\n {\n \"source\": \"4\",\n \"target\": \"5\"\n },\n {\n \"source\": \"4\",\n \"target\": \"6\"\n },\n {\n \"source\": \"5\",\n \"target\": \"6\"\n },\n {\n \"source\": \"7\",\n \"target\": \"13\"\n },\n {\n \"source\": \"8\",\n \"target\": \"14\"\n },\n {\n \"source\": \"9\",\n \"target\": \"10\"\n },\n {\n \"source\": \"10\",\n \"target\": \"22\"\n },\n {\n \"source\": \"10\",\n \"target\": \"14\"\n },\n {\n \"source\": \"10\",\n \"target\": \"12\"\n },\n {\n \"source\": \"10\",\n \"target\": \"24\"\n },\n {\n \"source\": \"10\",\n \"target\": \"21\"\n },\n {\n \"source\": \"10\",\n \"target\": \"20\"\n },\n {\n \"source\": \"11\",\n \"target\": \"24\"\n },\n {\n \"source\": \"11\",\n \"target\": \"22\"\n },\n {\n \"source\": \"11\",\n \"target\": \"14\"\n },\n {\n \"source\": \"12\",\n \"target\": \"13\"\n },\n {\n \"source\": \"16\",\n \"target\": \"17\"\n },\n {\n \"source\": \"16\",\n \"target\": \"18\"\n },\n {\n \"source\": \"16\",\n \"target\": \"21\"\n },\n {\n \"source\": \"16\",\n \"target\": \"22\"\n },\n {\n \"source\": \"17\",\n \"target\": \"18\"\n },\n {\n \"source\": \"17\",\n \"target\": \"20\"\n },\n {\n \"source\": \"18\",\n \"target\": \"19\"\n },\n {\n \"source\": \"19\",\n \"target\": \"20\"\n },\n {\n \"source\": \"19\",\n \"target\": \"33\"\n },\n {\n \"source\": \"19\",\n \"target\": \"22\"\n },\n {\n \"source\": \"19\",\n \"target\": \"23\"\n },\n {\n \"source\": \"20\",\n \"target\": \"21\"\n },\n {\n \"source\": \"21\",\n \"target\": \"22\"\n },\n {\n \"source\": \"22\",\n \"target\": \"24\"\n },\n {\n \"source\": \"22\",\n \"target\": \"25\"\n },\n {\n \"source\": \"22\",\n \"target\": \"26\"\n },\n {\n \"source\": \"22\",\n \"target\": \"23\"\n },\n {\n \"source\": \"22\",\n \"target\": \"28\"\n },\n {\n \"source\": \"22\",\n \"target\": \"30\"\n },\n {\n \"source\": \"22\",\n \"target\": \"31\"\n },\n {\n \"source\": \"22\",\n \"target\": \"32\"\n },\n {\n \"source\": \"22\",\n \"target\": \"33\"\n },\n {\n \"source\": \"23\",\n \"target\": \"28\"\n },\n {\n \"source\": \"23\",\n \"target\": \"27\"\n },\n {\n \"source\": \"23\",\n \"target\": \"29\"\n },\n {\n \"source\": \"23\",\n \"target\": \"30\"\n },\n {\n \"source\": \"23\",\n \"target\": \"31\"\n },\n {\n \"source\": \"23\",\n \"target\": \"33\"\n },\n {\n \"source\": \"32\",\n \"target\": \"33\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data,\n node: {\n style: {\n labelText: (d) => d.id,\n labelFill: '#fff',\n labelPlacement: 'center',\n },\n },\n layout: {\n type: 'circular',\n },\n behaviors: ['drag-canvas', 'drag-element'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = Array.from({ length: 34 }, (_, i) => ({\n id: `${i}`,\n data: { label: `${i}` }\n}));\n\nconst edges = [];\nconst edgeSet = new Set();\n\nfor (let i = 0; i < 34; i++) {\n const numEdges = 2 + Math.floor(Math.random() * 2);\n for (let j = 0; j < numEdges; j++) {\n const target = Math.floor(Math.random() * 34);\n if (target !== i) {\n const key = `${i}-${target}`;\n const reverseKey = `${target}-${i}`;\n if (!edgeSet.has(key) && !edgeSet.has(reverseKey)) {\n edgeSet.add(key);\n edges.push({ source: `${i}`, target: `${target}` });\n }\n }\n }\n}\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: 32,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n },\n edge: {\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'circular',\n radius: 250,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n ],\n});\n\ngraph.render();", + "duration": 12192, + "retrievedSkillIds": [ + "g6-behavior-drag-element", + "g6-layout-mindmap", + "g6-node-circle", + "g6-pattern-tree-graph", + "g6-layout-grid" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1207, + "expectedLength": 5078, + "similarity": 0.4199705232129698, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = Array.from({ length: 34 }, (_, i) => ({\n id: `${i}`,\n data: { label: `${i}` }\n}));\n\nconst edges = [];\nconst edgeSet = new Set();\n\nfor (let i = 0; i < 34; i++) {\n const numEdges = 2 + Math.floor(Math.random() * 2);\n for (let j = 0; j < numEdges; j++) {\n const target = Math.floor(Math.random() * 34);\n if (target !== i) {\n const key = `${i}-${target}`;\n const reverseKey = `${target}-${i}`;\n if (!edgeSet.has(key) && !edgeSet.has(reverseKey)) {\n edgeSet.add(key);\n edges.push({ source: `${i}`, target: `${target}` });\n }\n }\n }\n}\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: 32,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n },\n edge: {\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'circular',\n radius: 250,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Set", + "floor", + "random", + "floor", + "random", + "has", + "has", + "add", + "push", + "Graph", + "render" + ], + "objectKeys": [ + "length", + "id", + "data", + "label", + "source", + "target", + "container", + "autoFit", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "radius", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-20", + "query": "根据描述绘制图表,使用 G6 构建了一个力导向图,通过 D3 力导向算法对节点和边进行布局。节点大小根据数据中的 size 属性设置,部分边的距离和作用力强度根据节点类型动态调整,叶节点具有排斥力更强的多体力配置,同时支持节点拖拽交互。参考数据:[{\"id\":\"node0\",\"size\":50},{\"id\":\"node1\",\"size\":30},{\"id\":\"node2\",\"size\":30},{\"id\":\"node3\",\"size\":30},{\"id\":\"node4\",\"size\":30,\"isLeaf\":true},{\"id\":\"node5\",\"size\":30,\"isLeaf\":true},{\"id\":\"node6\",\"size\":15,\"isLeaf\":true},{\"id\":\"node7\",\"size\":15,\"isLeaf\":true},{\"id\":\"node8\",\"size\":15,\"isLeaf\":true},{\"id\":\"node9\",\"size\":15,\"isLeaf\":true}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node0', size: 50 },\n { id: 'node1', size: 30 },\n { id: 'node2', size: 30 },\n { id: 'node3', size: 30 },\n { id: 'node4', size: 30, isLeaf: true },\n { id: 'node5', size: 30, isLeaf: true },\n { id: 'node6', size: 15, isLeaf: true },\n { id: 'node7', size: 15, isLeaf: true },\n { id: 'node8', size: 15, isLeaf: true },\n { id: 'node9', size: 15, isLeaf: true },\n { id: 'node10', size: 15, isLeaf: true },\n { id: 'node11', size: 15, isLeaf: true },\n { id: 'node12', size: 15, isLeaf: true },\n { id: 'node13', size: 15, isLeaf: true },\n { id: 'node14', size: 15, isLeaf: true },\n { id: 'node15', size: 15, isLeaf: true },\n { id: 'node16', size: 15, isLeaf: true },\n ],\n edges: [\n { source: 'node0', target: 'node1' },\n { source: 'node0', target: 'node2' },\n { source: 'node0', target: 'node3' },\n { source: 'node0', target: 'node4' },\n { source: 'node0', target: 'node5' },\n { source: 'node1', target: 'node6' },\n { source: 'node1', target: 'node7' },\n { source: 'node2', target: 'node8' },\n { source: 'node2', target: 'node9' },\n { source: 'node2', target: 'node10' },\n { source: 'node2', target: 'node11' },\n { source: 'node2', target: 'node12' },\n { source: 'node2', target: 'node13' },\n { source: 'node3', target: 'node14' },\n { source: 'node3', target: 'node15' },\n { source: 'node3', target: 'node16' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n size: (d) => d.size,\n },\n },\n layout: {\n type: 'd3-force',\n link: {\n distance: (d) => {\n if (d.source.id === 'node0') {\n return 100;\n }\n return 30;\n },\n strength: (d) => {\n if (d.source.id === 'node1' || d.source.id === 'node2' || d.source.id === 'node3') {\n return 0.7;\n }\n return 0.1;\n },\n },\n manyBody: {\n strength: (d) => {\n if (d.isLeaf) {\n return -50;\n }\n return -10;\n },\n },\n },\n behaviors: ['drag-element-force'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst rawNodes = [\n { id: 'node0', size: 50 },\n { id: 'node1', size: 30 },\n { id: 'node2', size: 30 },\n { id: 'node3', size: 30 },\n { id: 'node4', size: 30, isLeaf: true },\n { id: 'node5', size: 30, isLeaf: true },\n { id: 'node6', size: 15, isLeaf: true },\n { id: 'node7', size: 15, isLeaf: true },\n { id: 'node8', size: 15, isLeaf: true },\n { id: 'node9', size: 15, isLeaf: true }\n];\n\nconst edges = [];\nconst edgeSet = new Set();\n\nconst addEdge = (source, target) => {\n const key = `${source}-${target}`;\n const reverseKey = `${target}-${source}`;\n if (!edgeSet.has(key) && !edgeSet.has(reverseKey)) {\n edgeSet.add(key);\n edges.push({ source, target });\n }\n};\n\naddEdge('node0', 'node1');\naddEdge('node0', 'node2');\naddEdge('node0', 'node3');\naddEdge('node1', 'node4');\naddEdge('node1', 'node5');\naddEdge('node2', 'node6');\naddEdge('node2', 'node7');\naddEdge('node3', 'node8');\naddEdge('node3', 'node9');\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: rawNodes.map(n => ({\n id: n.id,\n data: { ...n }\n })),\n edges\n },\n node: {\n type: 'circle',\n style: {\n size: (d) => d.data.size,\n fill: (d) => d.data.isLeaf ? '#52c41a' : '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFontSize: 12\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#aaa',\n lineWidth: 1,\n endArrow: true\n }\n },\n layout: {\n type: 'd3-force',\n link: {\n distance: (d) => {\n const sourceIsLeaf = d.source.data?.isLeaf;\n const targetIsLeaf = d.target.data?.isLeaf;\n if (sourceIsLeaf || targetIsLeaf) return 60;\n return 100;\n },\n strength: (d) => {\n const sourceIsLeaf = d.source.data?.isLeaf;\n const targetIsLeaf = d.target.data?.isLeaf;\n if (sourceIsLeaf || targetIsLeaf) return 0.3;\n return 0.8;\n }\n },\n manyBody: {\n strength: (d) => {\n if (d.data?.isLeaf) return -400;\n return -200;\n },\n distanceMax: 500\n },\n collide: {\n radius: (d) => (d.data?.size || 30) / 2 + 2,\n strength: 0.8\n },\n center: {\n x: 0,\n y: 0,\n strength: 0.05\n },\n alpha: 0.6,\n alphaDecay: 0.02\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element-force']\n});\n\ngraph.render();", + "duration": 25667, + "retrievedSkillIds": [ + "g6-layout-force", + "g6-behavior-drag-element", + "g6-layout-grid", + "g6-node-rect", + "g6-node-circle" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2407, + "expectedLength": 2155, + "similarity": 0.695533213285314, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst rawNodes = [\n { id: 'node0', size: 50 },\n { id: 'node1', size: 30 },\n { id: 'node2', size: 30 },\n { id: 'node3', size: 30 },\n { id: 'node4', size: 30, isLeaf: true },\n { id: 'node5', size: 30, isLeaf: true },\n { id: 'node6', size: 15, isLeaf: true },\n { id: 'node7', size: 15, isLeaf: true },\n { id: 'node8', size: 15, isLeaf: true },\n { id: 'node9', size: 15, isLeaf: true }\n];\n\nconst edges = [];\nconst edgeSet = new Set();\n\nconst addEdge = (source, target) => {\n const key = `${source}-${target}`;\n const reverseKey = `${target}-${source}`;\n if (!edgeSet.has(key) && !edgeSet.has(reverseKey)) {\n edgeSet.add(key);\n edges.push({ source, target });\n }\n};\n\naddEdge('node0', 'node1');\naddEdge('node0', 'node2');\naddEdge('node0', 'node3');\naddEdge('node1', 'node4');\naddEdge('node1', 'node5');\naddEdge('node2', 'node6');\naddEdge('node2', 'node7');\naddEdge('node3', 'node8');\naddEdge('node3', 'node9');\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: rawNodes.map(n => ({\n id: n.id,\n data: { ...n }\n })),\n edges\n },\n node: {\n type: 'circle',\n style: {\n size: (d) => d.data.size,\n fill: (d) => d.data.isLeaf ? '#52c41a' : '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFontSize: 12\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#aaa',\n lineWidth: 1,\n endArrow: true\n }\n },\n layout: {\n type: 'd3-force',\n link: {\n distance: (d) => {\n const sourceIsLeaf = d.source.data?.isLeaf;\n const targetIsLeaf = d.target.data?.isLeaf;\n if (sourceIsLeaf || targetIsLeaf) return 60;\n return 100;\n },\n strength: (d) => {\n const sourceIsLeaf = d.source.data?.isLeaf;\n const targetIsLeaf = d.target.data?.isLeaf;\n if (sourceIsLeaf || targetIsLeaf) return 0.3;\n return 0.8;\n }\n },\n manyBody: {\n strength: (d) => {\n if (d.data?.isLeaf) return -400;\n return -200;\n },\n distanceMax: 500\n },\n collide: {\n radius: (d) => (d.data?.size || 30) / 2 + 2,\n strength: 0.8\n },\n center: {\n x: 0,\n y: 0,\n strength: 0.05\n },\n alpha: 0.6,\n alphaDecay: 0.02\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element-force']\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Set", + "has", + "has", + "add", + "push", + "addEdge", + "addEdge", + "addEdge", + "addEdge", + "addEdge", + "addEdge", + "addEdge", + "addEdge", + "addEdge", + "Graph", + "map", + "render" + ], + "objectKeys": [ + "id", + "size", + "id", + "size", + "id", + "size", + "id", + "size", + "id", + "size", + "isLeaf", + "id", + "size", + "isLeaf", + "id", + "size", + "isLeaf", + "id", + "size", + "isLeaf", + "id", + "size", + "isLeaf", + "id", + "size", + "isLeaf", + "container", + "data", + "nodes", + "id", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "layout", + "type", + "link", + "distance", + "strength", + "manyBody", + "strength", + "distanceMax", + "collide", + "radius", + "strength", + "center", + "x", + "y", + "strength", + "alpha", + "alphaDecay", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph" + ] + } + } + }, + { + "id": "case-21", + "query": "根据描述绘制图表,使用 G6 图表库创建一个网格布局的关系图,包含节点和边的数据定义,并启用了画布缩放、拖拽等交互行为,同时添加了一个工具栏插件用于执行新建、分享、撤销等操作。参考数据:[{\"id\":\"node-0\"},{\"id\":\"node-1\"},{\"id\":\"node-2\"},{\"id\":\"node-3\"},{\"id\":\"node-4\"},{\"id\":\"node-5\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\n// Use your own iconfont.\nconst iconFont = document.createElement('script');\niconFont.src = '//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js';\ndocument.head.appendChild(iconFont);\n\nconst data = {\n nodes: [{ id: 'node-0' }, { id: 'node-1' }, { id: 'node-2' }, { id: 'node-3' }, { id: 'node-4' }, { id: 'node-5' }],\n edges: [\n { source: 'node-0', target: 'node-1' },\n { source: 'node-0', target: 'node-2' },\n { source: 'node-0', target: 'node-3' },\n { source: 'node-0', target: 'node-4' },\n { source: 'node-1', target: 'node-0' },\n { source: 'node-2', target: 'node-0' },\n { source: 'node-3', target: 'node-0' },\n { source: 'node-4', target: 'node-0' },\n { source: 'node-5', target: 'node-0' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'grid',\n },\n behaviors: ['zoom-canvas', 'drag-canvas', 'drag-element'],\n plugins: [\n {\n type: 'toolbar',\n position: 'right-top',\n onClick: (item) => {\n alert('item clicked:' + item);\n },\n getItems: () => {\n return [\n { id: 'icon-xinjian', value: 'new' },\n { id: 'icon-fenxiang', value: 'share' },\n { id: 'icon-chexiao', value: 'undo' },\n ];\n },\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-0', data: { label: '节点 0' } },\n { id: 'node-1', data: { label: '节点 1' } },\n { id: 'node-2', data: { label: '节点 2' } },\n { id: 'node-3', data: { label: '节点 3' } },\n { id: 'node-4', data: { label: '节点 4' } },\n { id: 'node-5', data: { label: '节点 5' } },\n ],\n edges: [\n { id: 'edge-0', source: 'node-0', target: 'node-1' },\n { id: 'edge-1', source: 'node-0', target: 'node-2' },\n { id: 'edge-2', source: 'node-1', target: 'node-3' },\n { id: 'edge-3', source: 'node-2', target: 'node-4' },\n { id: 'edge-4', source: 'node-3', target: 'node-5' },\n { id: 'edge-5', source: 'node-4', target: 'node-5' },\n ],\n};\n\nconst graph = new Graph({\n container,\n data,\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n rowGap: 80,\n colGap: 80,\n },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFontSize: 12,\n labelFill: '#333',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#b0c4de',\n lineWidth: 2,\n endArrow: true,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: [\n {\n type: 'toolbar',\n position: 'top-right',\n items: [\n { id: 'new', label: '新建', icon: '➕' },\n { id: 'share', label: '分享', icon: '🔗' },\n { id: 'undo', label: '撤销', icon: '↩️' },\n ],\n onClick: (item, graph) => {\n if (item.id === 'new') {\n const nodeId = `node-${graph.getNodeData().length}`;\n graph.addNodeData([\n { \n id: nodeId, \n data: { label: `节点 ${nodeId}` },\n style: { x: 100, y: 100 }\n }\n ]);\n graph.render();\n } else if (item.id === 'share') {\n console.log('执行分享操作');\n } else if (item.id === 'undo') {\n console.log('执行撤销操作');\n }\n },\n },\n ],\n});\n\ngraph.render();", + "duration": 49780, + "retrievedSkillIds": [ + "g6-behavior-canvas-nav", + "g6-layout-grid", + "g6-layout-mindmap", + "g6-node-react", + "g6-pattern-network-graph" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2077, + "expectedLength": 1305, + "similarity": 0.5390818759936408, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-0', data: { label: '节点 0' } },\n { id: 'node-1', data: { label: '节点 1' } },\n { id: 'node-2', data: { label: '节点 2' } },\n { id: 'node-3', data: { label: '节点 3' } },\n { id: 'node-4', data: { label: '节点 4' } },\n { id: 'node-5', data: { label: '节点 5' } },\n ],\n edges: [\n { id: 'edge-0', source: 'node-0', target: 'node-1' },\n { id: 'edge-1', source: 'node-0', target: 'node-2' },\n { id: 'edge-2', source: 'node-1', target: 'node-3' },\n { id: 'edge-3', source: 'node-2', target: 'node-4' },\n { id: 'edge-4', source: 'node-3', target: 'node-5' },\n { id: 'edge-5', source: 'node-4', target: 'node-5' },\n ],\n};\n\nconst graph = new Graph({\n container,\n data,\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n rowGap: 80,\n colGap: 80,\n },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFontSize: 12,\n labelFill: '#333',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#b0c4de',\n lineWidth: 2,\n endArrow: true,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: [\n {\n type: 'toolbar',\n position: 'top-right',\n items: [\n { id: 'new', label: '新建', icon: '➕' },\n { id: 'share', label: '分享', icon: '🔗' },\n { id: 'undo', label: '撤销', icon: '↩️' },\n ],\n onClick: (item, graph) => {\n if (item.id === 'new') {\n const nodeId = `node-${graph.getNodeData().length}`;\n graph.addNodeData([\n { \n id: nodeId, \n data: { label: `节点 ${nodeId}` },\n style: { x: 100, y: 100 }\n }\n ]);\n graph.render();\n } else if (item.id === 'share') {\n console.log('执行分享操作');\n } else if (item.id === 'undo') {\n console.log('执行撤销操作');\n }\n },\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "getNodeData", + "addNodeData", + "render", + "log", + "log", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "edges", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "layout", + "type", + "rows", + "cols", + "rowGap", + "colGap", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFontSize", + "labelFill", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "behaviors", + "plugins", + "type", + "position", + "items", + "id", + "label", + "icon", + "id", + "label", + "icon", + "id", + "label", + "icon", + "onClick", + "id", + "data", + "label", + "style", + "x", + "y" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-22", + "query": "根据描述绘制图表,使用 G6 创建一个基于网格布局的图结构可视化,包含节点和边的数据,并配置了时间轴插件用于展示时间相关数据。通过拖拽画布、缩放等交互方式增强用户体验。参考数据:[{\"time\":\"2023-08-01T00:00:00.000Z\",\"value\":10,\"label\":\"2023/8/1 上午12:00:00\"},{\"time\":\"2023-08-02T00:00:00.000Z\",\"value\":2,\"label\":\"2023/8/2 上午12:00:00\"},{\"time\":\"2023-08-03T00:00:00.000Z\",\"value\":3,\"label\":\"2023/8/3 上午12:00:00\"},{\"time\":\"2023-08-04T00:00:00.000Z\",\"value\":4,\"label\":\"2023/8/4 上午12:00:00\"},{\"time\":\"2023-08-05T00:00:00.000Z\",\"value\":15,\"label\":\"2023/8/5 上午12:00:00\"},{\"time\":\"2023-08-06T00:00:00.000Z\",\"value\":10,\"label\":\"2023/8/6 上午12:00:00\"},{\"time\":\"2023-08-07T00:00:00.000Z\",\"value\":5,\"label\":\"2023/8/7 上午12:00:00\"},{\"time\":\"2023-08-08T00:00:00.000Z\",\"value\":0,\"label\":\"2023/8/8 上午12:00:00\"},{\"time\":\"2023-08-09T00:00:00.000Z\",\"value\":3,\"label\":\"2023/8/9 上午12:00:00\"},{\"time\":\"2023-08-10T00:00:00.000Z\",\"value\":1,\"label\":\"2023/8/10 上午12:00:00\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst startTime = new Date('2023-08-01').getTime();\nconst diff = 3600 * 24 * 1000;\nconst timebarData = [10, 2, 3, 4, 15, 10, 5, 0, 3, 1].map((value, index) => ({\n time: new Date(startTime + index * diff),\n value,\n label: new Date(startTime + index * diff).toLocaleString(),\n}));\nconst graphData = {\n nodes: new Array(49).fill(0).map((_, index) => ({\n id: `node-${index}`,\n data: {\n timestamp: startTime + (index % 10) * diff,\n value: index % 20,\n label: new Date(startTime + (index % 10) * diff).toLocaleString(),\n },\n })),\n edges: new Array(49).fill(0).map((_, i) => ({\n id: `edge-${i}`,\n source: `node-${i % 30}`,\n target: `node-${(i % 20) + 29}`,\n data: {\n edgeType: 'e1',\n },\n })),\n};\n\nconst graph = new Graph({\n container: 'container',\n data: graphData,\n behaviors: ['drag-canvas', 'drag-element', 'zoom-canvas'],\n layout: {\n type: 'grid',\n cols: 7,\n },\n plugins: [\n {\n type: 'timebar',\n key: 'timebar',\n data: timebarData,\n width: 450,\n height: 100,\n loop: true,\n timebarType: 'chart',\n },\n ],\n autoFit: 'view',\n padding: [10, 0, 160, 0],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst timeData = [\n {\"time\":\"2023-08-01T00:00:00.000Z\",\"value\":10,\"label\":\"2023/8/1\"},\n {\"time\":\"2023-08-02T00:00:00.000Z\",\"value\":2,\"label\":\"2023/8/2\"},\n {\"time\":\"2023-08-03T00:00:00.000Z\",\"value\":3,\"label\":\"2023/8/3\"},\n {\"time\":\"2023-08-04T00:00:00.000Z\",\"value\":4,\"label\":\"2023/8/4\"},\n {\"time\":\"2023-08-05T00:00:00.000Z\",\"value\":15,\"label\":\"2023/8/5\"},\n {\"time\":\"2023-08-06T00:00:00.000Z\",\"value\":10,\"label\":\"2023/8/6\"},\n {\"time\":\"2023-08-07T00:00:00.000Z\",\"value\":5,\"label\":\"2023/8/7\"},\n {\"time\":\"2023-08-08T00:00:00.000Z\",\"value\":0,\"label\":\"2023/8/8\"},\n {\"time\":\"2023-08-09T00:00:00.000Z\",\"value\":3,\"label\":\"2023/8/9\"},\n {\"time\":\"2023-08-10T00:00:00.000Z\",\"value\":1,\"label\":\"2023/8/10\"}\n];\n\nconst timestamps = timeData.map(d => new Date(d.time).getTime());\n\nconst nodes = timeData.map((d, i) => ({\n id: `node-${i}`,\n data: {\n label: d.label,\n timestamp: new Date(d.time).getTime(),\n value: d.value\n }\n}));\n\nconst edges = [];\nfor (let i = 0; i < nodes.length - 1; i++) {\n edges.push({\n id: `edge-${i}`,\n source: `node-${i}`,\n target: `node-${i+1}`,\n data: { timestamp: nodes[i].data.timestamp }\n });\n}\n\nconst graph = new Graph({\n container: container,\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: (d) => 20 + d.data.value * 2,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFontSize: 11,\n labelFill: '#333'\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#91d5ff',\n lineWidth: 2\n }\n },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 5,\n rowGap: 80,\n colGap: 100\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: [\n {\n type: 'timebar',\n data: timestamps,\n getTime: (datum) => datum.data.timestamp,\n values: [timestamps[0], timestamps[timestamps.length - 1]],\n elementTypes: ['node', 'edge'],\n mode: 'modify',\n timebarType: 'chart',\n position: 'bottom',\n width: 600,\n height: 80,\n labelFormatter: (t) => new Date(t).toLocaleDateString('zh-CN')\n }\n ]\n});\n\ngraph.render();", + "duration": 11516, + "retrievedSkillIds": [ + "g6-layout-grid", + "g6-plugin-timebar-gridline", + "g6-plugin-minimap", + "g6-behavior-canvas-nav", + "g6-node-circle" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2213, + "expectedLength": 1208, + "similarity": 0.5495837897042717, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst timeData = [\n {\"time\":\"2023-08-01T00:00:00.000Z\",\"value\":10,\"label\":\"2023/8/1\"},\n {\"time\":\"2023-08-02T00:00:00.000Z\",\"value\":2,\"label\":\"2023/8/2\"},\n {\"time\":\"2023-08-03T00:00:00.000Z\",\"value\":3,\"label\":\"2023/8/3\"},\n {\"time\":\"2023-08-04T00:00:00.000Z\",\"value\":4,\"label\":\"2023/8/4\"},\n {\"time\":\"2023-08-05T00:00:00.000Z\",\"value\":15,\"label\":\"2023/8/5\"},\n {\"time\":\"2023-08-06T00:00:00.000Z\",\"value\":10,\"label\":\"2023/8/6\"},\n {\"time\":\"2023-08-07T00:00:00.000Z\",\"value\":5,\"label\":\"2023/8/7\"},\n {\"time\":\"2023-08-08T00:00:00.000Z\",\"value\":0,\"label\":\"2023/8/8\"},\n {\"time\":\"2023-08-09T00:00:00.000Z\",\"value\":3,\"label\":\"2023/8/9\"},\n {\"time\":\"2023-08-10T00:00:00.000Z\",\"value\":1,\"label\":\"2023/8/10\"}\n];\n\nconst timestamps = timeData.map(d => new Date(d.time).getTime());\n\nconst nodes = timeData.map((d, i) => ({\n id: `node-${i}`,\n data: {\n label: d.label,\n timestamp: new Date(d.time).getTime(),\n value: d.value\n }\n}));\n\nconst edges = [];\nfor (let i = 0; i < nodes.length - 1; i++) {\n edges.push({\n id: `edge-${i}`,\n source: `node-${i}`,\n target: `node-${i+1}`,\n data: { timestamp: nodes[i].data.timestamp }\n });\n}\n\nconst graph = new Graph({\n container: container,\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: (d) => 20 + d.data.value * 2,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFontSize: 11,\n labelFill: '#333'\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#91d5ff',\n lineWidth: 2\n }\n },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 5,\n rowGap: 80,\n colGap: 100\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: [\n {\n type: 'timebar',\n data: timestamps,\n getTime: (datum) => datum.data.timestamp,\n values: [timestamps[0], timestamps[timestamps.length - 1]],\n elementTypes: ['node', 'edge'],\n mode: 'modify',\n timebarType: 'chart',\n position: 'bottom',\n width: 600,\n height: 80,\n labelFormatter: (t) => new Date(t).toLocaleDateString('zh-CN')\n }\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "map", + "Date", + "getTime", + "map", + "Date", + "getTime", + "push", + "Graph", + "Date", + "toLocaleDateString", + "render" + ], + "objectKeys": [ + "01T00", + "00", + "02T00", + "00", + "03T00", + "00", + "04T00", + "00", + "05T00", + "00", + "06T00", + "00", + "07T00", + "00", + "08T00", + "00", + "09T00", + "00", + "10T00", + "00", + "id", + "data", + "label", + "timestamp", + "value", + "id", + "source", + "target", + "data", + "timestamp", + "container", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFontSize", + "labelFill", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "rows", + "cols", + "rowGap", + "colGap", + "behaviors", + "plugins", + "type", + "data", + "getTime", + "values", + "elementTypes", + "mode", + "timebarType", + "position", + "width", + "height", + "labelFormatter" + ], + "stringLiterals": [ + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label" + ], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-23", + "query": "根据描述绘制图表,使用 G6 构建了一个横向缩进布局的树图,用于展示机器学习建模方法的层级结构。节点根据其在树中的位置显示在左侧或右侧,并自动适配画布大小。支持画布拖拽、缩放以及节点展开收起等交互操作。参考数据:[{\"id\":\"Modeling Methods\",\"children\":[{\"id\":\"Classification\",\"children\":[{\"id\":\"Logistic regression\"},{\"id\":\"Linear discriminant analysis\"},{\"id\":\"Rules\"},{\"id\":\"Decision trees\"},{\"id\":\"Naive Bayes\"},{\"id\":\"K nearest neighbor\"},{\"id\":\"Probabilistic neural network\"},{\"id\":\"Support vector machine\"}]},{\"id\":\"Consensus\",\"children\":[{\"id\":\"Models diversity\",\"children\":[{\"id\":\"Different initializations\"},{\"id\":\"Different parameter choices\"},{\"id\":\"Different architectures\"},{\"id\":\"Different modeling methods\"},{\"id\":\"Different training sets\"},{\"id\":\"Different feature sets\"}]},{\"id\":\"Methods\",\"children\":[{\"id\":\"Classifier selection\"},{\"id\":\"Classifier fusion\"}]},{\"id\":\"Common\",\"children\":[{\"id\":\"Bagging\"},{\"id\":\"Boosting\"},{\"id\":\"AdaBoost\"}]}]},{\"id\":\"Regression\",\"children\":[{\"id\":\"Multiple linear regression\"},{\"id\":\"Partial least squares\"},{\"id\":\"Multi-layer feedforward neural network\"},{\"id\":\"General regression neural network\"},{\"id\":\"Support vector regression\"}]}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst getNodeSide = (graph, datum) => {\n const parentData = graph.getParentData(datum.id, 'tree');\n if (!parentData) return 'center';\n return datum.style.x > parentData.style.x ? 'right' : 'left';\n};\n\nconst data = {\n \"id\": \"Modeling Methods\",\n \"children\": [\n {\n \"id\": \"Classification\",\n \"children\": [\n {\n \"id\": \"Logistic regression\"\n },\n {\n \"id\": \"Linear discriminant analysis\"\n },\n {\n \"id\": \"Rules\"\n },\n {\n \"id\": \"Decision trees\"\n },\n {\n \"id\": \"Naive Bayes\"\n },\n {\n \"id\": \"K nearest neighbor\"\n },\n {\n \"id\": \"Probabilistic neural network\"\n },\n {\n \"id\": \"Support vector machine\"\n }\n ]\n },\n {\n \"id\": \"Consensus\",\n \"children\": [\n {\n \"id\": \"Models diversity\",\n \"children\": [\n {\n \"id\": \"Different initializations\"\n },\n {\n \"id\": \"Different parameter choices\"\n },\n {\n \"id\": \"Different architectures\"\n },\n {\n \"id\": \"Different modeling methods\"\n },\n {\n \"id\": \"Different training sets\"\n },\n {\n \"id\": \"Different feature sets\"\n }\n ]\n },\n {\n \"id\": \"Methods\",\n \"children\": [\n {\n \"id\": \"Classifier selection\"\n },\n {\n \"id\": \"Classifier fusion\"\n }\n ]\n },\n {\n \"id\": \"Common\",\n \"children\": [\n {\n \"id\": \"Bagging\"\n },\n {\n \"id\": \"Boosting\"\n },\n {\n \"id\": \"AdaBoost\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"Regression\",\n \"children\": [\n {\n \"id\": \"Multiple linear regression\"\n },\n {\n \"id\": \"Partial least squares\"\n },\n {\n \"id\": \"Multi-layer feedforward neural network\"\n },\n {\n \"id\": \"General regression neural network\"\n },\n {\n \"id\": \"Support vector regression\"\n }\n ]\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data: treeToGraphData(data),\n autoFit: 'view',\n node: {\n style: function (d) {\n const side = getNodeSide(this, d);\n return {\n labelText: d.id,\n labelPlacement: side === 'center' ? 'bottom' : side,\n labelBackground: true,\n ports:\n side === 'center'\n ? [{ placement: 'bottom' }]\n : side === 'right'\n ? [{ placement: 'bottom' }, { placement: 'left' }]\n : [{ placement: 'bottom' }, { placement: 'right' }],\n };\n },\n animation: {\n enter: false,\n },\n },\n edge: {\n type: 'polyline',\n style: {\n radius: 4,\n router: {\n type: 'orth',\n },\n },\n animation: {\n enter: false,\n },\n },\n layout: {\n type: 'indented',\n direction: 'H',\n indent: 80,\n preLayout: false,\n getHeight: () => 16,\n getWidth: () => 32,\n getSide: (d) => {\n if (d.id === 'Regression' || d.id === 'Classification') return 'left';\n return 'right';\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'collapse-expand'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nconst leftBranchIds = new Set([\n 'Consensus', 'Models diversity', 'Methods', 'Common',\n 'Different initializations', 'Different parameter choices',\n 'Different architectures', 'Different modeling methods',\n 'Different training sets', 'Different feature sets',\n 'Classifier selection', 'Classifier fusion',\n 'Bagging', 'Boosting', 'AdaBoost'\n]);\n\nconst graph = new Graph({\n container: container,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'rect',\n style: {\n size: (d) => {\n const isRoot = d.id === 'Modeling Methods';\n return isRoot ? [160, 44] : [140, 36];\n },\n radius: (d) => d.id === 'Modeling Methods' ? 22 : 6,\n fill: (d) => {\n if (d.id === 'Modeling Methods') return '#1783FF';\n if (leftBranchIds.has(d.id)) return '#FFF7E6';\n return '#E6F4FF';\n },\n stroke: (d) => {\n if (d.id === 'Modeling Methods') return '#1783FF';\n if (leftBranchIds.has(d.id)) return '#FFD591';\n return '#91CAFF';\n },\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: (d) => d.id === 'Modeling Methods' ? '#fff' : '#333',\n labelFontSize: (d) => d.id === 'Modeling Methods' ? 14 : 12,\n labelFontWeight: (d) => d.id === 'Modeling Methods' ? 'bold' : 'normal',\n cursor: 'pointer'\n }\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#C0D8F0',\n lineWidth: 1.5\n }\n },\n layout: {\n type: 'mindmap',\n direction: 'H',\n getSide: (d) => {\n if (d.id === 'Modeling Methods') return 'center';\n return leftBranchIds.has(d.id) ? 'left' : 'right';\n },\n getWidth: () => 140,\n getHeight: () => 36,\n getHGap: () => 50,\n getVGap: () => 10\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true\n }\n ]\n});\n\ngraph.render();", + "duration": 30693, + "retrievedSkillIds": [ + "g6-layout-mindmap", + "g6-pattern-tree-graph", + "g6-layout-force", + "g6-layout-grid", + "g6-node-rect" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 3502, + "expectedLength": 3634, + "similarity": 0.5385175938634499, + "extractedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nconst leftBranchIds = new Set([\n 'Consensus', 'Models diversity', 'Methods', 'Common',\n 'Different initializations', 'Different parameter choices',\n 'Different architectures', 'Different modeling methods',\n 'Different training sets', 'Different feature sets',\n 'Classifier selection', 'Classifier fusion',\n 'Bagging', 'Boosting', 'AdaBoost'\n]);\n\nconst graph = new Graph({\n container: container,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'rect',\n style: {\n size: (d) => {\n const isRoot = d.id === 'Modeling Methods';\n return isRoot ? [160, 44] : [140, 36];\n },\n radius: (d) => d.id === 'Modeling Methods' ? 22 : 6,\n fill: (d) => {\n if (d.id === 'Modeling Methods') return '#1783FF';\n if (leftBranchIds.has(d.id)) return '#FFF7E6';\n return '#E6F4FF';\n },\n stroke: (d) => {\n if (d.id === 'Modeling Methods') return '#1783FF';\n if (leftBranchIds.has(d.id)) return '#FFD591';\n return '#91CAFF';\n },\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: (d) => d.id === 'Modeling Methods' ? '#fff' : '#333',\n labelFontSize: (d) => d.id === 'Modeling Methods' ? 14 : 12,\n labelFontWeight: (d) => d.id === 'Modeling Methods' ? 'bold' : 'normal',\n cursor: 'pointer'\n }\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#C0D8F0',\n lineWidth: 1.5\n }\n },\n layout: {\n type: 'mindmap',\n direction: 'H',\n getSide: (d) => {\n if (d.id === 'Modeling Methods') return 'center';\n return leftBranchIds.has(d.id) ? 'left' : 'right';\n },\n getWidth: () => 140,\n getHeight: () => 36,\n getHGap: () => 50,\n getVGap: () => 10\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true\n }\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "treeToGraphData" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Set", + "Graph", + "treeToGraphData", + "has", + "has", + "has", + "render" + ], + "objectKeys": [ + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "container", + "autoFit", + "data", + "node", + "type", + "style", + "size", + "radius", + "22", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "14", + "labelFontWeight", + "cursor", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "direction", + "getSide", + "getWidth", + "getHeight", + "getHGap", + "getVGap", + "behaviors", + "type", + "trigger", + "animation" + ], + "stringLiterals": [], + "apiPatterns": [ + "view.children", + "new Graph" + ] + } + } + }, + { + "id": "case-24", + "query": "根据描述绘制图表,使用 G6 渲染一个包含节点和边的图形,设置了节点的位置和文本显示,边支持标签显示和特殊样式处理,包括对平行边的合并与视觉增强,最终将图形绘制到页面容器中。参考数据:[{\"id\":\"A\",\"style\":{\"x\":50,\"y\":350}},{\"id\":\"B\",\"style\":{\"x\":250,\"y\":150}},{\"id\":\"C\",\"style\":{\"x\":450,\"y\":350}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'A', style: { x: 50, y: 350 } },\n { id: 'B', style: { x: 250, y: 150 } },\n { id: 'C', style: { x: 450, y: 350 } },\n ],\n edges: [\n { source: 'A', target: 'B' },\n { source: 'B', target: 'A' },\n { id: 'B-C:1', source: 'B', target: 'C' },\n { id: 'B-C:2', source: 'B', target: 'C' },\n { source: 'A', target: 'C' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'center',\n data,\n node: {\n style: {\n labelText: (d) => d.id,\n },\n },\n edge: {\n style: {\n labelText: (d) => d?.data?.label || `${d.source}->${d.target}`,\n startArrow: false,\n },\n },\n transforms: [\n {\n type: 'process-parallel-edges',\n mode: 'merge',\n style: {\n halo: true,\n haloOpacity: 0.2,\n haloStroke: 'red',\n startArrow: true,\n },\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: container,\n data: {\n nodes: [\n { id: 'A', data: { label: '节点 A' }, style: { x: 50, y: 350 } },\n { id: 'B', data: { label: '节点 B' }, style: { x: 250, y: 150 } },\n { id: 'C', data: { label: '节点 C' }, style: { x: 450, y: 350 } },\n ],\n edges: [\n { id: 'e1', source: 'A', target: 'B', data: { label: '连接 1' } },\n { id: 'e2', source: 'A', target: 'B', data: { label: '连接 2' } },\n { id: 'e3', source: 'B', target: 'C', data: { label: 'B-C' } },\n { id: 'e4', source: 'C', target: 'A', data: { label: 'C-A' } },\n ],\n },\n transforms: [\n {\n type: 'process-parallel-edges',\n offset: 20,\n },\n ],\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'quadratic',\n style: {\n stroke: '#999',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelFill: '#666',\n labelFontSize: 11,\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.8,\n endArrow: {\n path: 'M 0,0 L 8,4 L 8,-4 Z',\n fill: '#999',\n },\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "duration": 10494, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-core-graph-init", + "g6-node-rect", + "g6-node-html", + "g6-core-transforms-animation" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1435, + "expectedLength": 926, + "similarity": 0.7, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: container,\n data: {\n nodes: [\n { id: 'A', data: { label: '节点 A' }, style: { x: 50, y: 350 } },\n { id: 'B', data: { label: '节点 B' }, style: { x: 250, y: 150 } },\n { id: 'C', data: { label: '节点 C' }, style: { x: 450, y: 350 } },\n ],\n edges: [\n { id: 'e1', source: 'A', target: 'B', data: { label: '连接 1' } },\n { id: 'e2', source: 'A', target: 'B', data: { label: '连接 2' } },\n { id: 'e3', source: 'B', target: 'C', data: { label: 'B-C' } },\n { id: 'e4', source: 'C', target: 'A', data: { label: 'C-A' } },\n ],\n },\n transforms: [\n {\n type: 'process-parallel-edges',\n offset: 20,\n },\n ],\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'quadratic',\n style: {\n stroke: '#999',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelFill: '#666',\n labelFontSize: 11,\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.8,\n endArrow: {\n path: 'M 0,0 L 8,4 L 8,-4 Z',\n fill: '#999',\n },\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "container", + "data", + "nodes", + "id", + "data", + "label", + "style", + "x", + "y", + "id", + "data", + "label", + "style", + "x", + "y", + "id", + "data", + "label", + "style", + "x", + "y", + "edges", + "id", + "source", + "target", + "data", + "label", + "id", + "source", + "target", + "data", + "label", + "id", + "source", + "target", + "data", + "label", + "id", + "source", + "target", + "data", + "label", + "transforms", + "type", + "offset", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "labelText", + "labelFill", + "labelFontSize", + "labelBackground", + "labelBackgroundFill", + "labelBackgroundOpacity", + "endArrow", + "path", + "fill", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-25", + "query": "根据描述绘制图表,使用 G6 图表库创建一个具有节点和边的图形可视化,根据 cluster 字段对节点和边进行分组并应用不同的颜色。图表包含图例插件用于展示节点分类,支持画布拖拽、缩放以及元素拖拽等交互行为。参考数据:[{\"id\":\"0\",\"label\":\"0\",\"style\":{\"x\":217.86420885505296,\"y\":114.28884847734246},\"data\":{\"cluster\":\"nodeType-0\"},\"cluster\":\"nodeType-0\"},{\"id\":\"1\",\"label\":\"1\",\"style\":{\"x\":113.58792632732174,\"y\":25.785315472468127},\"data\":{\"cluster\":\"nodeType-1\"},\"cluster\":\"nodeType-1\"},{\"id\":\"2\",\"label\":\"2\",\"style\":{\"x\":179.59682070334452,\"y\":38.87850516662148},\"data\":{\"cluster\":\"nodeType-2\"},\"cluster\":\"nodeType-2\"},{\"id\":\"3\",\"label\":\"3\",\"style\":{\"x\":204.20226244579672,\"y\":-5.33508012158744},\"data\":{\"cluster\":\"nodeType-0\"},\"cluster\":\"nodeType-0\"},{\"id\":\"4\",\"label\":\"4\",\"style\":{\"x\":308.74171746938134,\"y\":10.554714934145961},\"data\":{\"cluster\":\"nodeType-1\"},\"cluster\":\"nodeType-1\"},{\"id\":\"5\",\"label\":\"5\",\"style\":{\"x\":341.99836557519745,\"y\":48.30310308747067},\"data\":{\"cluster\":\"nodeType-2\"},\"cluster\":\"nodeType-2\"},{\"id\":\"6\",\"label\":\"6\",\"style\":{\"x\":376.62085426957793,\"y\":-10.286527884559707},\"data\":{\"cluster\":\"nodeType-0\"},\"cluster\":\"nodeType-0\"},{\"id\":\"7\",\"label\":\"7\",\"style\":{\"x\":254.42832676365109,\"y\":62.51510456243093},\"data\":{\"cluster\":\"nodeType-1\"},\"cluster\":\"nodeType-1\"},{\"id\":\"8\",\"label\":\"8\",\"style\":{\"x\":139.32504277036227,\"y\":135.40373347960067},\"data\":{\"cluster\":\"nodeType-2\"},\"cluster\":\"nodeType-2\"},{\"id\":\"9\",\"label\":\"9\",\"style\":{\"x\":245.24964464688256,\"y\":166.03052347036282},\"data\":{\"cluster\":\"nodeType-0\"},\"cluster\":\"nodeType-0\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst pattern = {\n nodes: [\n {\n id: 'pn0',\n cluster: 'nodeType-0',\n },\n {\n id: 'pn1',\n cluster: 'nodeType-1',\n },\n {\n id: 'pn2',\n cluster: 'nodeType-2',\n },\n ],\n edges: [\n { source: 'pn1', target: 'pn0', cluster: 'edgeType-1' },\n { source: 'pn1', target: 'pn2', cluster: 'edgeType-0' },\n { source: 'pn2', target: 'pn0', cluster: 'edgeType-2' },\n ],\n};\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"0\",\n \"label\": \"0\",\n \"style\": {\n \"x\": 217.86420885505296,\n \"y\": 114.28884847734246\n },\n \"data\": {\n \"cluster\": \"nodeType-0\"\n },\n \"cluster\": \"nodeType-0\"\n },\n {\n \"id\": \"1\",\n \"label\": \"1\",\n \"style\": {\n \"x\": 113.58792632732174,\n \"y\": 25.785315472468127\n },\n \"data\": {\n \"cluster\": \"nodeType-1\"\n },\n \"cluster\": \"nodeType-1\"\n },\n {\n \"id\": \"2\",\n \"label\": \"2\",\n \"style\": {\n \"x\": 179.59682070334452,\n \"y\": 38.87850516662148\n },\n \"data\": {\n \"cluster\": \"nodeType-2\"\n },\n \"cluster\": \"nodeType-2\"\n },\n {\n \"id\": \"3\",\n \"label\": \"3\",\n \"style\": {\n \"x\": 204.20226244579672,\n \"y\": -5.33508012158744\n },\n \"data\": {\n \"cluster\": \"nodeType-0\"\n },\n \"cluster\": \"nodeType-0\"\n },\n {\n \"id\": \"4\",\n \"label\": \"4\",\n \"style\": {\n \"x\": 308.74171746938134,\n \"y\": 10.554714934145961\n },\n \"data\": {\n \"cluster\": \"nodeType-1\"\n },\n \"cluster\": \"nodeType-1\"\n },\n {\n \"id\": \"5\",\n \"label\": \"5\",\n \"style\": {\n \"x\": 341.99836557519745,\n \"y\": 48.30310308747067\n },\n \"data\": {\n \"cluster\": \"nodeType-2\"\n },\n \"cluster\": \"nodeType-2\"\n },\n {\n \"id\": \"6\",\n \"label\": \"6\",\n \"style\": {\n \"x\": 376.62085426957793,\n \"y\": -10.286527884559707\n },\n \"data\": {\n \"cluster\": \"nodeType-0\"\n },\n \"cluster\": \"nodeType-0\"\n },\n {\n \"id\": \"7\",\n \"label\": \"7\",\n \"style\": {\n \"x\": 254.42832676365109,\n \"y\": 62.51510456243093\n },\n \"data\": {\n \"cluster\": \"nodeType-1\"\n },\n \"cluster\": \"nodeType-1\"\n },\n {\n \"id\": \"8\",\n \"label\": \"8\",\n \"style\": {\n \"x\": 139.32504277036227,\n \"y\": 135.40373347960067\n },\n \"data\": {\n \"cluster\": \"nodeType-2\"\n },\n \"cluster\": \"nodeType-2\"\n },\n {\n \"id\": \"9\",\n \"label\": \"9\",\n \"style\": {\n \"x\": 245.24964464688256,\n \"y\": 166.03052347036282\n },\n \"data\": {\n \"cluster\": \"nodeType-0\"\n },\n \"cluster\": \"nodeType-0\"\n },\n {\n \"id\": \"10\",\n \"label\": \"10\",\n \"style\": {\n \"x\": 250.33418485239127,\n \"y\": 227.6830390965898\n },\n \"data\": {\n \"cluster\": \"nodeType-1\"\n },\n \"cluster\": \"nodeType-1\"\n },\n {\n \"id\": \"11\",\n \"label\": \"11\",\n \"style\": {\n \"x\": 176.79897890681895,\n \"y\": 235.80422881594598\n },\n \"data\": {\n \"cluster\": \"nodeType-2\"\n },\n \"cluster\": \"nodeType-2\"\n },\n {\n \"id\": \"12\",\n \"label\": \"12\",\n \"style\": {\n \"x\": 331.32653587613936,\n \"y\": 158.8731219947074\n },\n \"data\": {\n \"cluster\": \"nodeType-0\"\n },\n \"cluster\": \"nodeType-0\"\n },\n {\n \"id\": \"13\",\n \"label\": \"13\",\n \"style\": {\n \"x\": 292.8309736938475,\n \"y\": 106.794007203338\n },\n \"data\": {\n \"cluster\": \"nodeType-1\"\n },\n \"cluster\": \"nodeType-1\"\n },\n {\n \"id\": \"14\",\n \"label\": \"14\",\n \"style\": {\n \"x\": 175.6768625027686,\n \"y\": 179.3951732038534\n },\n \"data\": {\n \"cluster\": \"nodeType-2\"\n },\n \"cluster\": \"nodeType-2\"\n },\n {\n \"id\": \"15\",\n \"label\": \"15\",\n \"style\": {\n \"x\": 83.26466725029928,\n \"y\": 96.50488885477502\n },\n \"data\": {\n \"cluster\": \"nodeType-0\"\n },\n \"cluster\": \"nodeType-0\"\n },\n {\n \"id\": \"16\",\n \"label\": \"16\",\n \"style\": {\n \"x\": 318.09206038019914,\n \"y\": 241.38853020289633\n },\n \"data\": {\n \"cluster\": \"nodeType-1\"\n },\n \"cluster\": \"nodeType-1\"\n },\n {\n \"id\": \"17\",\n \"label\": \"17\",\n \"style\": {\n \"x\": 397.2096443837184,\n \"y\": 251.11323425020436\n },\n \"data\": {\n \"cluster\": \"nodeType-2\"\n },\n \"cluster\": \"nodeType-2\"\n },\n {\n \"id\": \"18\",\n \"label\": \"18\",\n \"style\": {\n \"x\": 396.9307017482416,\n \"y\": 305.79619379078093\n },\n \"data\": {\n \"cluster\": \"nodeType-0\"\n },\n \"cluster\": \"nodeType-0\"\n },\n {\n \"id\": \"19\",\n \"label\": \"19\",\n \"style\": {\n \"x\": 323.19884694585255,\n \"y\": 354.7889914141042\n },\n \"data\": {\n \"cluster\": \"nodeType-1\"\n },\n \"cluster\": \"nodeType-1\"\n },\n {\n \"id\": \"20\",\n \"label\": \"20\",\n \"style\": {\n \"x\": 334.7320270398703,\n \"y\": 289.0437229111331\n },\n \"data\": {\n \"cluster\": \"nodeType-2\"\n },\n \"cluster\": \"nodeType-2\"\n },\n {\n \"id\": \"21\",\n \"label\": \"21\",\n \"style\": {\n \"x\": 276.9512819725375,\n \"y\": 284.9808595526045\n },\n \"data\": {\n \"cluster\": \"nodeType-0\"\n },\n \"cluster\": \"nodeType-0\"\n },\n {\n \"id\": \"22\",\n \"label\": \"22\",\n \"style\": {\n \"x\": 235.086300958203,\n \"y\": 348.23515388308186\n },\n \"data\": {\n \"cluster\": \"nodeType-1\"\n },\n \"cluster\": \"nodeType-1\"\n },\n {\n \"id\": \"23\",\n \"label\": \"23\",\n \"style\": {\n \"x\": 263.36101059763547,\n \"y\": 442.4976175844671\n },\n \"data\": {\n \"cluster\": \"nodeType-2\"\n },\n \"cluster\": \"nodeType-2\"\n },\n {\n \"id\": \"24\",\n \"label\": \"24\",\n \"style\": {\n \"x\": 195.01142425098806,\n \"y\": 287.081197770762\n },\n \"data\": {\n \"cluster\": \"nodeType-0\"\n },\n \"cluster\": \"nodeType-0\"\n },\n {\n \"id\": \"25\",\n \"label\": \"25\",\n \"style\": {\n \"x\": 120.39188452563401,\n \"y\": 337.8524937873151\n },\n \"data\": {\n \"cluster\": \"nodeType-1\"\n },\n \"cluster\": \"nodeType-1\"\n },\n {\n \"id\": \"26\",\n \"label\": \"26\",\n \"style\": {\n \"x\": 109.74700930888443,\n \"y\": 407.5171194512714\n },\n \"data\": {\n \"cluster\": \"nodeType-2\"\n },\n \"cluster\": \"nodeType-2\"\n },\n {\n \"id\": \"27\",\n \"label\": \"27\",\n \"style\": {\n \"x\": 328.18870325041166,\n \"y\": 527.9726877901181\n },\n \"data\": {\n \"cluster\": \"nodeType-0\"\n },\n \"cluster\": \"nodeType-0\"\n },\n {\n \"id\": \"28\",\n \"label\": \"28\",\n \"style\": {\n \"x\": 221.745767731853,\n \"y\": 400.38906283199213\n },\n \"data\": {\n \"cluster\": \"nodeType-1\"\n },\n \"cluster\": \"nodeType-1\"\n },\n {\n \"id\": \"29\",\n \"label\": \"29\",\n \"style\": {\n \"x\": 243.98258526664858,\n \"y\": 553.9974335527247\n },\n \"data\": {\n \"cluster\": \"nodeType-2\"\n },\n \"cluster\": \"nodeType-2\"\n },\n {\n \"id\": \"30\",\n \"label\": \"30\",\n \"style\": {\n \"x\": 179.30103487685315,\n \"y\": 433.1126685019916\n },\n \"data\": {\n \"cluster\": \"nodeType-0\"\n },\n \"cluster\": \"nodeType-0\"\n },\n {\n \"id\": \"31\",\n \"label\": \"31\",\n \"style\": {\n \"x\": 221.65781762707928,\n \"y\": 474.10779931544715\n },\n \"data\": {\n \"cluster\": \"nodeType-1\"\n },\n \"cluster\": \"nodeType-1\"\n },\n {\n \"id\": \"32\",\n \"label\": \"32\",\n \"style\": {\n \"x\": 349.13614579528684,\n \"y\": 422.65934738145364\n },\n \"data\": {\n \"cluster\": \"nodeType-2\"\n },\n \"cluster\": \"nodeType-2\"\n },\n {\n \"id\": \"33\",\n \"label\": \"33\",\n \"style\": {\n \"x\": 300.5432325124777,\n \"y\": 401.2786277319002\n },\n \"data\": {\n \"cluster\": \"nodeType-0\"\n },\n \"cluster\": \"nodeType-0\"\n }\n ],\n \"edges\": [\n {\n \"source\": \"0\",\n \"target\": \"1\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge0\"\n },\n {\n \"source\": \"0\",\n \"target\": \"2\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge1\"\n },\n {\n \"source\": \"0\",\n \"target\": \"3\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge2\"\n },\n {\n \"source\": \"0\",\n \"target\": \"4\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge3\"\n },\n {\n \"source\": \"0\",\n \"target\": \"5\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge4\"\n },\n {\n \"source\": \"0\",\n \"target\": \"7\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge5\"\n },\n {\n \"source\": \"0\",\n \"target\": \"8\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge6\"\n },\n {\n \"source\": \"0\",\n \"target\": \"9\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge7\"\n },\n {\n \"source\": \"0\",\n \"target\": \"10\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge8\"\n },\n {\n \"source\": \"0\",\n \"target\": \"11\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge9\"\n },\n {\n \"source\": \"0\",\n \"target\": \"13\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge10\"\n },\n {\n \"source\": \"0\",\n \"target\": \"14\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge11\"\n },\n {\n \"source\": \"0\",\n \"target\": \"15\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge12\"\n },\n {\n \"source\": \"0\",\n \"target\": \"16\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge13\"\n },\n {\n \"source\": \"2\",\n \"target\": \"3\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge14\"\n },\n {\n \"source\": \"4\",\n \"target\": \"5\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge15\"\n },\n {\n \"source\": \"4\",\n \"target\": \"6\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge16\"\n },\n {\n \"source\": \"5\",\n \"target\": \"6\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge17\"\n },\n {\n \"source\": \"7\",\n \"target\": \"13\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge18\"\n },\n {\n \"source\": \"8\",\n \"target\": \"14\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge19\"\n },\n {\n \"source\": \"9\",\n \"target\": \"10\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge20\"\n },\n {\n \"source\": \"10\",\n \"target\": \"22\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge21\"\n },\n {\n \"source\": \"10\",\n \"target\": \"14\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge22\"\n },\n {\n \"source\": \"10\",\n \"target\": \"12\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge23\"\n },\n {\n \"source\": \"10\",\n \"target\": \"24\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge24\"\n },\n {\n \"source\": \"10\",\n \"target\": \"21\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge25\"\n },\n {\n \"source\": \"10\",\n \"target\": \"20\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge26\"\n },\n {\n \"source\": \"11\",\n \"target\": \"24\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge27\"\n },\n {\n \"source\": \"11\",\n \"target\": \"22\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge28\"\n },\n {\n \"source\": \"11\",\n \"target\": \"14\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge29\"\n },\n {\n \"source\": \"12\",\n \"target\": \"13\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge30\"\n },\n {\n \"source\": \"16\",\n \"target\": \"17\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge31\"\n },\n {\n \"source\": \"16\",\n \"target\": \"18\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge32\"\n },\n {\n \"source\": \"16\",\n \"target\": \"21\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge33\"\n },\n {\n \"source\": \"16\",\n \"target\": \"22\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge34\"\n },\n {\n \"source\": \"17\",\n \"target\": \"18\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge35\"\n },\n {\n \"source\": \"17\",\n \"target\": \"20\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge36\"\n },\n {\n \"source\": \"18\",\n \"target\": \"19\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge37\"\n },\n {\n \"source\": \"19\",\n \"target\": \"20\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge38\"\n },\n {\n \"source\": \"19\",\n \"target\": \"33\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge39\"\n },\n {\n \"source\": \"19\",\n \"target\": \"22\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge40\"\n },\n {\n \"source\": \"19\",\n \"target\": \"23\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge41\"\n },\n {\n \"source\": \"20\",\n \"target\": \"21\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge42\"\n },\n {\n \"source\": \"21\",\n \"target\": \"22\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge43\"\n },\n {\n \"source\": \"22\",\n \"target\": \"24\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge44\"\n },\n {\n \"source\": \"22\",\n \"target\": \"25\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge45\"\n },\n {\n \"source\": \"22\",\n \"target\": \"26\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge46\"\n },\n {\n \"source\": \"22\",\n \"target\": \"23\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge47\"\n },\n {\n \"source\": \"22\",\n \"target\": \"28\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge48\"\n },\n {\n \"source\": \"22\",\n \"target\": \"30\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge49\"\n },\n {\n \"source\": \"22\",\n \"target\": \"31\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge50\"\n },\n {\n \"source\": \"22\",\n \"target\": \"32\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge51\"\n },\n {\n \"source\": \"22\",\n \"target\": \"33\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge52\"\n },\n {\n \"source\": \"23\",\n \"target\": \"28\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge53\"\n },\n {\n \"source\": \"23\",\n \"target\": \"27\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge54\"\n },\n {\n \"source\": \"23\",\n \"target\": \"29\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge55\"\n },\n {\n \"source\": \"23\",\n \"target\": \"30\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge56\"\n },\n {\n \"source\": \"23\",\n \"target\": \"31\",\n \"data\": {\n \"cluster\": \"edgeType-0\"\n },\n \"cluster\": \"edgeType-0\",\n \"id\": \"edge57\"\n },\n {\n \"source\": \"23\",\n \"target\": \"33\",\n \"data\": {\n \"cluster\": \"edgeType-1\"\n },\n \"cluster\": \"edgeType-1\",\n \"id\": \"edge58\"\n },\n {\n \"source\": \"32\",\n \"target\": \"33\",\n \"data\": {\n \"cluster\": \"edgeType-2\"\n },\n \"cluster\": \"edgeType-2\",\n \"id\": \"edge59\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data,\n autoFit: 'view',\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n node: {\n style: {\n labelPlacement: 'center',\n labelText: (d) => d.label,\n stroke: '#5F95FF',\n lineWidth: 1,\n },\n palette: {\n type: 'group',\n field: 'cluster',\n color: ['#5F95FF', '#61DDAA', '#65789B'],\n },\n },\n edge: {\n style: {\n endArrow: true,\n },\n palette: {\n type: 'group',\n field: 'cluster',\n color: ['#5F95FF', '#61DDAA', '#65789B'],\n },\n },\n plugins: [\n {\n type: 'legend',\n nodeField: 'cluster',\n position: 'bottom',\n },\n {\n key: 'hull-0',\n type: 'hull',\n members: [],\n },\n {\n key: 'hull-1',\n type: 'hull',\n members: [],\n },\n ],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst rawData = [\n {\"id\":\"0\",\"label\":\"0\",\"style\":{\"x\":217.86420885505296,\"y\":114.28884847734246},\"data\":{\"cluster\":\"nodeType-0\"},\"cluster\":\"nodeType-0\"},\n {\"id\":\"1\",\"label\":\"1\",\"style\":{\"x\":113.58792632732174,\"y\":25.785315472468127},\"data\":{\"cluster\":\"nodeType-1\"},\"cluster\":\"nodeType-1\"},\n {\"id\":\"2\",\"label\":\"2\",\"style\":{\"x\":179.59682070334452,\"y\":38.87850516662148},\"data\":{\"cluster\":\"nodeType-2\"},\"cluster\":\"nodeType-2\"},\n {\"id\":\"3\",\"label\":\"3\",\"style\":{\"x\":204.20226244579672,\"y\":-5.33508012158744},\"data\":{\"cluster\":\"nodeType-0\"},\"cluster\":\"nodeType-0\"},\n {\"id\":\"4\",\"label\":\"4\",\"style\":{\"x\":308.74171746938134,\"y\":10.554714934145961},\"data\":{\"cluster\":\"nodeType-1\"},\"cluster\":\"nodeType-1\"},\n {\"id\":\"5\",\"label\":\"5\",\"style\":{\"x\":341.99836557519745,\"y\":48.30310308747067},\"data\":{\"cluster\":\"nodeType-2\"},\"cluster\":\"nodeType-2\"},\n {\"id\":\"6\",\"label\":\"6\",\"style\":{\"x\":376.62085426957793,\"y\":-10.286527884559707},\"data\":{\"cluster\":\"nodeType-0\"},\"cluster\":\"nodeType-0\"},\n {\"id\":\"7\",\"label\":\"7\",\"style\":{\"x\":254.42832676365109,\"y\":62.51510456243093},\"data\":{\"cluster\":\"nodeType-1\"},\"cluster\":\"nodeType-1\"},\n {\"id\":\"8\",\"label\":\"8\",\"style\":{\"x\":139.32504277036227,\"y\":135.40373347960067},\"data\":{\"cluster\":\"nodeType-2\"},\"cluster\":\"nodeType-2\"},\n {\"id\":\"9\",\"label\":\"9\",\"style\":{\"x\":245.24964464688256,\"y\":166.03052347036282},\"data\":{\"cluster\":\"nodeType-0\"},\"cluster\":\"node", + "duration": 39691, + "retrievedSkillIds": [ + "g6-node-html", + "g6-behavior-drag-element", + "g6-node-rect", + "g6-node-circle", + "g6-layout-mindmap" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": true, + "issues": [ + "缺少 Chart/Graph 实例化", + "缺少 render() 调用" + ], + "warnings": [], + "codeLength": 1410, + "expectedLength": 19984, + "similarity": 0.2602083333333333, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst rawData = [\n {\"id\":\"0\",\"label\":\"0\",\"style\":{\"x\":217.86420885505296,\"y\":114.28884847734246},\"data\":{\"cluster\":\"nodeType-0\"},\"cluster\":\"nodeType-0\"},\n {\"id\":\"1\",\"label\":\"1\",\"style\":{\"x\":113.58792632732174,\"y\":25.785315472468127},\"data\":{\"cluster\":\"nodeType-1\"},\"cluster\":\"nodeType-1\"},\n {\"id\":\"2\",\"label\":\"2\",\"style\":{\"x\":179.59682070334452,\"y\":38.87850516662148},\"data\":{\"cluster\":\"nodeType-2\"},\"cluster\":\"nodeType-2\"},\n {\"id\":\"3\",\"label\":\"3\",\"style\":{\"x\":204.20226244579672,\"y\":-5.33508012158744},\"data\":{\"cluster\":\"nodeType-0\"},\"cluster\":\"nodeType-0\"},\n {\"id\":\"4\",\"label\":\"4\",\"style\":{\"x\":308.74171746938134,\"y\":10.554714934145961},\"data\":{\"cluster\":\"nodeType-1\"},\"cluster\":\"nodeType-1\"},\n {\"id\":\"5\",\"label\":\"5\",\"style\":{\"x\":341.99836557519745,\"y\":48.30310308747067},\"data\":{\"cluster\":\"nodeType-2\"},\"cluster\":\"nodeType-2\"},\n {\"id\":\"6\",\"label\":\"6\",\"style\":{\"x\":376.62085426957793,\"y\":-10.286527884559707},\"data\":{\"cluster\":\"nodeType-0\"},\"cluster\":\"nodeType-0\"},\n {\"id\":\"7\",\"label\":\"7\",\"style\":{\"x\":254.42832676365109,\"y\":62.51510456243093},\"data\":{\"cluster\":\"nodeType-1\"},\"cluster\":\"nodeType-1\"},\n {\"id\":\"8\",\"label\":\"8\",\"style\":{\"x\":139.32504277036227,\"y\":135.40373347960067},\"data\":{\"cluster\":\"nodeType-2\"},\"cluster\":\"nodeType-2\"},\n {\"id\":\"9\",\"label\":\"9\",\"style\":{\"x\":245.24964464688256,\"y\":166.03052347036282},\"data\":{\"cluster\":\"nodeType-0\"},\"cluster\":\"node", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [], + "objectKeys": [], + "stringLiterals": [ + "id", + "label", + "style", + "x", + "y", + "data", + "cluster", + "cluster", + "id", + "label", + "style", + "x", + "y", + "data", + "cluster", + "cluster", + "id", + "label", + "style", + "x", + "y", + "data", + "cluster", + "cluster", + "id", + "label", + "style", + "x", + "y", + "data", + "cluster", + "cluster", + "id", + "label", + "style", + "x", + "y", + "data", + "cluster", + "cluster", + "id", + "label", + "style", + "x", + "y", + "data", + "cluster", + "cluster", + "id", + "label", + "style", + "x", + "y", + "data", + "cluster", + "cluster", + "id", + "label", + "style", + "x", + "y", + "data", + "cluster", + "cluster", + "id", + "label", + "style", + "x", + "y", + "data", + "cluster", + "cluster", + "id", + "label", + "style", + "x", + "y", + "data", + "cluster", + "cluster" + ], + "apiPatterns": [] + } + } + }, + { + "id": "case-26", + "query": "根据描述绘制图表,使用 G6 图库将一个树形结构数据渲染为图形,节点显示文本为其 id 属性,采用右到左的缩进布局,支持画布拖拽、缩放以及节点的展开收起交互。参考数据:[{\"id\":\"Modeling Methods\",\"children\":[{\"id\":\"Classification\",\"children\":[{\"id\":\"Logistic regression\"},{\"id\":\"Linear discriminant analysis\"},{\"id\":\"Rules\"},{\"id\":\"Decision trees\"},{\"id\":\"Naive Bayes\"},{\"id\":\"K nearest neighbor\"},{\"id\":\"Probabilistic neural network\"},{\"id\":\"Support vector machine\"}]},{\"id\":\"Consensus\",\"children\":[{\"id\":\"Models diversity\",\"children\":[{\"id\":\"Different initializations\"},{\"id\":\"Different parameter choices\"},{\"id\":\"Different architectures\"},{\"id\":\"Different modeling methods\"},{\"id\":\"Different training sets\"},{\"id\":\"Different feature sets\"}]},{\"id\":\"Methods\",\"children\":[{\"id\":\"Classifier selection\"},{\"id\":\"Classifier fusion\"}]},{\"id\":\"Common\",\"children\":[{\"id\":\"Bagging\"},{\"id\":\"Boosting\"},{\"id\":\"AdaBoost\"}]}]},{\"id\":\"Regression\",\"children\":[{\"id\":\"Multiple linear regression\"},{\"id\":\"Partial least squares\"},{\"id\":\"Multi-layer feedforward neural network\"},{\"id\":\"General regression neural network\"},{\"id\":\"Support vector regression\"}]}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst data = {\n \"id\": \"Modeling Methods\",\n \"children\": [\n {\n \"id\": \"Classification\",\n \"children\": [\n {\n \"id\": \"Logistic regression\"\n },\n {\n \"id\": \"Linear discriminant analysis\"\n },\n {\n \"id\": \"Rules\"\n },\n {\n \"id\": \"Decision trees\"\n },\n {\n \"id\": \"Naive Bayes\"\n },\n {\n \"id\": \"K nearest neighbor\"\n },\n {\n \"id\": \"Probabilistic neural network\"\n },\n {\n \"id\": \"Support vector machine\"\n }\n ]\n },\n {\n \"id\": \"Consensus\",\n \"children\": [\n {\n \"id\": \"Models diversity\",\n \"children\": [\n {\n \"id\": \"Different initializations\"\n },\n {\n \"id\": \"Different parameter choices\"\n },\n {\n \"id\": \"Different architectures\"\n },\n {\n \"id\": \"Different modeling methods\"\n },\n {\n \"id\": \"Different training sets\"\n },\n {\n \"id\": \"Different feature sets\"\n }\n ]\n },\n {\n \"id\": \"Methods\",\n \"children\": [\n {\n \"id\": \"Classifier selection\"\n },\n {\n \"id\": \"Classifier fusion\"\n }\n ]\n },\n {\n \"id\": \"Common\",\n \"children\": [\n {\n \"id\": \"Bagging\"\n },\n {\n \"id\": \"Boosting\"\n },\n {\n \"id\": \"AdaBoost\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"Regression\",\n \"children\": [\n {\n \"id\": \"Multiple linear regression\"\n },\n {\n \"id\": \"Partial least squares\"\n },\n {\n \"id\": \"Multi-layer feedforward neural network\"\n },\n {\n \"id\": \"General regression neural network\"\n },\n {\n \"id\": \"Support vector regression\"\n }\n ]\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data: treeToGraphData(data),\n autoFit: 'view',\n node: {\n style: {\n labelText: (d) => d.id,\n labelPlacement: 'left',\n labelBackground: true,\n },\n animation: {\n enter: false,\n },\n },\n edge: {\n type: 'polyline',\n style: {\n radius: 4,\n router: {\n type: 'orth',\n },\n },\n animation: {\n enter: false,\n },\n },\n layout: {\n type: 'indented',\n direction: 'RL',\n indent: 80,\n getHeight: () => 16,\n getWidth: () => 32,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'collapse-expand'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: \"Modeling Methods\",\n children: [\n {\n id: \"Classification\",\n children: [\n { id: \"Logistic regression\" },\n { id: \"Linear discriminant analysis\" },\n { id: \"Rules\" },\n { id: \"Decision trees\" },\n { id: \"Naive Bayes\" },\n { id: \"K nearest neighbor\" },\n { id: \"Probabilistic neural network\" },\n { id: \"Support vector machine\" }\n ]\n },\n {\n id: \"Consensus\",\n children: [\n {\n id: \"Models diversity\",\n children: [\n { id: \"Different initializations\" },\n { id: \"Different parameter choices\" },\n { id: \"Different architectures\" },\n { id: \"Different modeling methods\" },\n { id: \"Different training sets\" },\n { id: \"Different feature sets\" }\n ]\n },\n {\n id: \"Methods\",\n children: [\n { id: \"Classifier selection\" },\n { id: \"Classifier fusion\" }\n ]\n },\n {\n id: \"Common\",\n children: [\n { id: \"Bagging\" },\n { id: \"Boosting\" },\n { id: \"AdaBoost\" }\n ]\n }\n ]\n },\n {\n id: \"Regression\",\n children: [\n { id: \"Multiple linear regression\" },\n { id: \"Partial least squares\" },\n { id: \"Multi-layer feedforward neural network\" },\n { id: \"General regression neural network\" },\n { id: \"Support vector regression\" }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n width: 900,\n height: 600,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'rect',\n style: {\n size: [200, 32],\n radius: 4,\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#333',\n labelFontSize: 12,\n cursor: 'pointer',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'indented',\n direction: 'RL',\n indent: 40,\n getWidth: () => 200,\n getHeight: () => 32,\n getVGap: () => 10,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true,\n },\n ],\n});\n\ngraph.render();", + "duration": 8755, + "retrievedSkillIds": [ + "g6-layout-mindmap", + "g6-pattern-tree-graph", + "g6-node-html", + "g6-node-circle", + "g6-behavior-canvas-nav" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2419, + "expectedLength": 2929, + "similarity": 0.7455734403387291, + "extractedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: \"Modeling Methods\",\n children: [\n {\n id: \"Classification\",\n children: [\n { id: \"Logistic regression\" },\n { id: \"Linear discriminant analysis\" },\n { id: \"Rules\" },\n { id: \"Decision trees\" },\n { id: \"Naive Bayes\" },\n { id: \"K nearest neighbor\" },\n { id: \"Probabilistic neural network\" },\n { id: \"Support vector machine\" }\n ]\n },\n {\n id: \"Consensus\",\n children: [\n {\n id: \"Models diversity\",\n children: [\n { id: \"Different initializations\" },\n { id: \"Different parameter choices\" },\n { id: \"Different architectures\" },\n { id: \"Different modeling methods\" },\n { id: \"Different training sets\" },\n { id: \"Different feature sets\" }\n ]\n },\n {\n id: \"Methods\",\n children: [\n { id: \"Classifier selection\" },\n { id: \"Classifier fusion\" }\n ]\n },\n {\n id: \"Common\",\n children: [\n { id: \"Bagging\" },\n { id: \"Boosting\" },\n { id: \"AdaBoost\" }\n ]\n }\n ]\n },\n {\n id: \"Regression\",\n children: [\n { id: \"Multiple linear regression\" },\n { id: \"Partial least squares\" },\n { id: \"Multi-layer feedforward neural network\" },\n { id: \"General regression neural network\" },\n { id: \"Support vector regression\" }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n width: 900,\n height: 600,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'rect',\n style: {\n size: [200, 32],\n radius: 4,\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#333',\n labelFontSize: 12,\n cursor: 'pointer',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'indented',\n direction: 'RL',\n indent: 40,\n getWidth: () => 200,\n getHeight: () => 32,\n getVGap: () => 10,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true,\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "treeToGraphData" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "treeToGraphData", + "render" + ], + "objectKeys": [ + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "container", + "width", + "height", + "autoFit", + "data", + "node", + "type", + "style", + "size", + "radius", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "cursor", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "direction", + "indent", + "getWidth", + "getHeight", + "getVGap", + "behaviors", + "type", + "trigger", + "animation" + ], + "stringLiterals": [], + "apiPatterns": [ + "view.children", + "type.line", + "new Graph" + ] + } + } + }, + { + "id": "case-27", + "query": "根据描述绘制图表,使用 G6 渲染一个包含多种状态和特性的六边形节点的图表,每个节点展示不同的视觉效果如光晕、徽标、端口等,并采用网格布局排列。参考数据:[{\"id\":\"default\"},{\"id\":\"halo\"},{\"id\":\"badges\"},{\"id\":\"ports\"},{\"id\":\"active\",\"states\":[\"active\"]},{\"id\":\"selected\",\"states\":[\"selected\"]},{\"id\":\"highlight\",\"states\":[\"highlight\"]},{\"id\":\"inactive\",\"states\":[\"inactive\"]},{\"id\":\"disabled\",\"states\":[\"disabled\"]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, iconfont } from '@antv/g6';\n\nconst style = document.createElement('style');\nstyle.innerHTML = `@import url('${iconfont.css}');`;\ndocument.head.appendChild(style);\n\nconst data = {\n nodes: [\n { id: 'default' },\n { id: 'halo' },\n { id: 'badges' },\n { id: 'ports' },\n {\n id: 'active',\n states: ['active'],\n },\n {\n id: 'selected',\n states: ['selected'],\n },\n {\n id: 'highlight',\n states: ['highlight'],\n },\n {\n id: 'inactive',\n states: ['inactive'],\n },\n {\n id: 'disabled',\n states: ['disabled'],\n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'hexagon',\n style: {\n size: 40,\n labelText: (d) => d.id,\n iconFontFamily: 'iconfont',\n iconText: '\\ue602',\n halo: (d) => (d.id === 'halo' ? true : false),\n badges: (d) =>\n d.id === 'badges'\n ? [\n {\n text: 'A',\n placement: 'right-top',\n },\n {\n text: 'Important',\n placement: 'right',\n },\n {\n text: 'Notice',\n placement: 'right-bottom',\n },\n ]\n : [],\n badgeFontSize: 8,\n badgePadding: [1, 4],\n outerR: 30, // 外半径\n portR: 3,\n ports: (d) =>\n d.id === 'ports'\n ? [{ placement: 'left' }, { placement: 'right' }, { placement: 'top' }, { placement: 'bottom' }]\n : [],\n },\n },\n layout: {\n type: 'grid',\n },\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst rawData = [\n { id: 'default' },\n { id: 'halo' },\n { id: 'badges' },\n { id: 'ports' },\n { id: 'active', states: ['active'] },\n { id: 'selected', states: ['selected'] },\n { id: 'highlight', states: ['highlight'] },\n { id: 'inactive', states: ['inactive'] },\n { id: 'disabled', states: ['disabled'] }\n];\n\nconst data = {\n nodes: rawData.map(item => ({\n id: item.id,\n data: { label: item.id },\n states: item.states || []\n })),\n edges: []\n};\n\nconst graph = new Graph({\n container,\n data,\n node: {\n type: 'hexagon',\n style: {\n size: 60,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n cursor: 'pointer',\n halo: (d) => d.id === 'halo',\n haloFill: '#1783FF',\n haloOpacity: 0.2,\n haloLineWidth: 12,\n badges: (d) => {\n if (d.id === 'badges') {\n return [\n { \n text: '3', \n placement: 'right-top', \n fill: '#ff4d4f', \n textFill: '#fff', \n fontSize: 10,\n padding: [2, 6]\n },\n { \n text: 'VIP', \n placement: 'right-bottom', \n fill: '#ffa940', \n textFill: '#fff', \n fontSize: 9,\n padding: [2, 4]\n }\n ];\n }\n return [];\n },\n ports: (d) => {\n if (d.id === 'ports') {\n return [\n { key: 'top', placement: 'top', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 2 },\n { key: 'bottom', placement: 'bottom', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 2 },\n { key: 'left', placement: 'left', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 2 },\n { key: 'right', placement: 'right', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 2 }\n ];\n }\n return [];\n }\n },\n state: {\n active: {\n fill: '#40a9ff',\n stroke: '#096dd9',\n lineWidth: 3,\n halo: true,\n haloFill: '#40a9ff',\n haloOpacity: 0.25,\n haloLineWidth: 10\n },\n selected: {\n fill: '#ff7875',\n stroke: '#ff4d4f',\n lineWidth: 3,\n halo: true,\n haloFill: '#ff7875',\n haloOpacity: 0.3,\n haloLineWidth: 15\n },\n highlight: {\n fill: '#73d13d',\n stroke: '#52c41a',\n lineWidth: 3,\n shadowColor: '#73d13d',\n shadowBlur: 20,\n shadowOffsetX: 0,\n shadowOffsetY: 0\n },\n inactive: {\n opacity: 0.3,\n fill: '#bfbfbf',\n stroke: '#8c8c8c',\n labelFill: '#999'\n },\n disabled: {\n opacity: 0.5,\n fill: '#f5f5f5',\n stroke: '#d9d9d9',\n lineDash: [4, 4],\n labelFill: '#999',\n cursor: 'not-allowed'\n }\n }\n },\n layout: {\n type: 'grid',\n rows: 3,\n cols: 3,\n rowGap: 100,\n colGap: 100,\n preventOverlap: true\n },\n behaviors: [\n 'drag-canvas', \n 'zoom-canvas',\n {\n type: 'hover-activate',\n state: 'active'\n },\n {\n type: 'click-select',\n state: 'selected',\n multiple: false\n }\n ]\n});\n\ngraph.render();", + "duration": 27238, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-node-rect", + "g6-pattern-flow-chart", + "g6-node-html", + "g6-layout-grid" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 3357, + "expectedLength": 1609, + "similarity": 0.4603119429590018, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst rawData = [\n { id: 'default' },\n { id: 'halo' },\n { id: 'badges' },\n { id: 'ports' },\n { id: 'active', states: ['active'] },\n { id: 'selected', states: ['selected'] },\n { id: 'highlight', states: ['highlight'] },\n { id: 'inactive', states: ['inactive'] },\n { id: 'disabled', states: ['disabled'] }\n];\n\nconst data = {\n nodes: rawData.map(item => ({\n id: item.id,\n data: { label: item.id },\n states: item.states || []\n })),\n edges: []\n};\n\nconst graph = new Graph({\n container,\n data,\n node: {\n type: 'hexagon',\n style: {\n size: 60,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n cursor: 'pointer',\n halo: (d) => d.id === 'halo',\n haloFill: '#1783FF',\n haloOpacity: 0.2,\n haloLineWidth: 12,\n badges: (d) => {\n if (d.id === 'badges') {\n return [\n { \n text: '3', \n placement: 'right-top', \n fill: '#ff4d4f', \n textFill: '#fff', \n fontSize: 10,\n padding: [2, 6]\n },\n { \n text: 'VIP', \n placement: 'right-bottom', \n fill: '#ffa940', \n textFill: '#fff', \n fontSize: 9,\n padding: [2, 4]\n }\n ];\n }\n return [];\n },\n ports: (d) => {\n if (d.id === 'ports') {\n return [\n { key: 'top', placement: 'top', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 2 },\n { key: 'bottom', placement: 'bottom', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 2 },\n { key: 'left', placement: 'left', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 2 },\n { key: 'right', placement: 'right', r: 4, fill: '#fff', stroke: '#1783FF', lineWidth: 2 }\n ];\n }\n return [];\n }\n },\n state: {\n active: {\n fill: '#40a9ff',\n stroke: '#096dd9',\n lineWidth: 3,\n halo: true,\n haloFill: '#40a9ff',\n haloOpacity: 0.25,\n haloLineWidth: 10\n },\n selected: {\n fill: '#ff7875',\n stroke: '#ff4d4f',\n lineWidth: 3,\n halo: true,\n haloFill: '#ff7875',\n haloOpacity: 0.3,\n haloLineWidth: 15\n },\n highlight: {\n fill: '#73d13d',\n stroke: '#52c41a',\n lineWidth: 3,\n shadowColor: '#73d13d',\n shadowBlur: 20,\n shadowOffsetX: 0,\n shadowOffsetY: 0\n },\n inactive: {\n opacity: 0.3,\n fill: '#bfbfbf',\n stroke: '#8c8c8c',\n labelFill: '#999'\n },\n disabled: {\n opacity: 0.5,\n fill: '#f5f5f5',\n stroke: '#d9d9d9',\n lineDash: [4, 4],\n labelFill: '#999',\n cursor: 'not-allowed'\n }\n }\n },\n layout: {\n type: 'grid',\n rows: 3,\n cols: 3,\n rowGap: 100,\n colGap: 100,\n preventOverlap: true\n },\n behaviors: [\n 'drag-canvas', \n 'zoom-canvas',\n {\n type: 'hover-activate',\n state: 'active'\n },\n {\n type: 'click-select',\n state: 'selected',\n multiple: false\n }\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "map", + "Graph", + "render" + ], + "objectKeys": [ + "id", + "id", + "id", + "id", + "id", + "states", + "id", + "states", + "id", + "states", + "id", + "states", + "id", + "states", + "nodes", + "id", + "data", + "label", + "states", + "edges", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "labelFontWeight", + "cursor", + "halo", + "haloFill", + "haloOpacity", + "haloLineWidth", + "badges", + "text", + "placement", + "fill", + "textFill", + "fontSize", + "padding", + "text", + "placement", + "fill", + "textFill", + "fontSize", + "padding", + "ports", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "state", + "active", + "fill", + "stroke", + "lineWidth", + "halo", + "haloFill", + "haloOpacity", + "haloLineWidth", + "selected", + "fill", + "stroke", + "lineWidth", + "halo", + "haloFill", + "haloOpacity", + "haloLineWidth", + "highlight", + "fill", + "stroke", + "lineWidth", + "shadowColor", + "shadowBlur", + "shadowOffsetX", + "shadowOffsetY", + "inactive", + "opacity", + "fill", + "stroke", + "labelFill", + "disabled", + "opacity", + "fill", + "stroke", + "lineDash", + "labelFill", + "cursor", + "layout", + "type", + "rows", + "cols", + "rowGap", + "colGap", + "preventOverlap", + "behaviors", + "type", + "state", + "type", + "state", + "multiple" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label" + ] + } + } + }, + { + "id": "case-28", + "query": "根据描述绘制图表,使用 AntV G6 渲染一个包含节点和边的图形,其中定义了两个节点和三条边,边连接到目标节点的不同端口,同时设置了箭头样式。参考数据:[{\"id\":\"node-1\",\"type\":\"circle\",\"style\":{\"x\":80,\"y\":200,\"size\":30}},{\"id\":\"node-2\",\"type\":\"rect\",\"style\":{\"x\":250,\"y\":200,\"size\":50,\"port\":true,\"ports\":[{\"key\":\"port-1\",\"placement\":[0,0.15]},{\"key\":\"port-2\",\"placement\":[0,0.5]},{\"key\":\"port-3\",\"placement\":[0,0.85]}]}},{\"id\":\"edge-1\",\"source\":\"node-1\",\"target\":\"node-2\",\"style\":{\"targetPort\":\"port-1\"}},{\"id\":\"edge-2\",\"source\":\"node-1\",\"target\":\"node-2\",\"style\":{\"targetPort\":\"port-2\"}},{\"id\":\"edge-3\",\"source\":\"node-1\",\"target\":\"node-2\",\"style\":{\"targetPort\":\"port-3\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', type: 'circle', style: { x: 80, y: 200, size: 30 } },\n {\n id: 'node-2',\n type: 'rect',\n style: {\n x: 250,\n y: 200,\n size: 50,\n port: true,\n ports: [\n { key: 'port-1', placement: [0, 0.15] },\n { key: 'port-2', placement: [0, 0.5] },\n { key: 'port-3', placement: [0, 0.85] },\n ],\n },\n },\n ],\n edges: [\n { id: 'edge-1', source: 'node-1', target: 'node-2', style: { targetPort: 'port-1' } },\n { id: 'edge-2', source: 'node-1', target: 'node-2', style: { targetPort: 'port-2' } },\n { id: 'edge-3', source: 'node-1', target: 'node-2', style: { targetPort: 'port-3' } },\n ],\n};\n\nconst graph = new Graph({\n data,\n edge: {\n style: {\n endArrow: true,\n },\n },\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n width: 400,\n height: 400,\n data: {\n nodes: [\n {\n id: 'node-1',\n type: 'circle',\n style: {\n x: 80,\n y: 200,\n size: 30,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n },\n },\n {\n id: 'node-2',\n type: 'rect',\n style: {\n x: 250,\n y: 200,\n size: [50, 50],\n fill: '#fff',\n stroke: '#1783FF',\n lineWidth: 2,\n ports: [\n { key: 'port-1', placement: [0, 0.15] },\n { key: 'port-2', placement: [0, 0.5] },\n { key: 'port-3', placement: [0, 0.85] },\n ],\n },\n },\n ],\n edges: [\n {\n id: 'edge-1',\n source: 'node-1',\n target: 'node-2',\n style: {\n targetPort: 'port-1',\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: {\n type: 'triangle',\n fill: '#999',\n size: 8,\n },\n },\n },\n {\n id: 'edge-2',\n source: 'node-1',\n target: 'node-2',\n style: {\n targetPort: 'port-2',\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: {\n type: 'triangle',\n fill: '#999',\n size: 8,\n },\n },\n },\n {\n id: 'edge-3',\n source: 'node-1',\n target: 'node-2',\n style: {\n targetPort: 'port-3',\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: {\n type: 'triangle',\n fill: '#999',\n size: 8,\n },\n },\n },\n ],\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "duration": 15990, + "retrievedSkillIds": [ + "g6-edge-line", + "g6-node-circle", + "g6-node-react", + "g6-core-custom-element", + "g6-core-graph-init" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1838, + "expectedLength": 872, + "similarity": 0.8458536585365853, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n width: 400,\n height: 400,\n data: {\n nodes: [\n {\n id: 'node-1',\n type: 'circle',\n style: {\n x: 80,\n y: 200,\n size: 30,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n },\n },\n {\n id: 'node-2',\n type: 'rect',\n style: {\n x: 250,\n y: 200,\n size: [50, 50],\n fill: '#fff',\n stroke: '#1783FF',\n lineWidth: 2,\n ports: [\n { key: 'port-1', placement: [0, 0.15] },\n { key: 'port-2', placement: [0, 0.5] },\n { key: 'port-3', placement: [0, 0.85] },\n ],\n },\n },\n ],\n edges: [\n {\n id: 'edge-1',\n source: 'node-1',\n target: 'node-2',\n style: {\n targetPort: 'port-1',\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: {\n type: 'triangle',\n fill: '#999',\n size: 8,\n },\n },\n },\n {\n id: 'edge-2',\n source: 'node-1',\n target: 'node-2',\n style: {\n targetPort: 'port-2',\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: {\n type: 'triangle',\n fill: '#999',\n size: 8,\n },\n },\n },\n {\n id: 'edge-3',\n source: 'node-1',\n target: 'node-2',\n style: {\n targetPort: 'port-3',\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: {\n type: 'triangle',\n fill: '#999',\n size: 8,\n },\n },\n },\n ],\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "container", + "width", + "height", + "data", + "nodes", + "id", + "type", + "style", + "x", + "y", + "size", + "fill", + "stroke", + "lineWidth", + "id", + "type", + "style", + "x", + "y", + "size", + "fill", + "stroke", + "lineWidth", + "ports", + "key", + "placement", + "key", + "placement", + "key", + "placement", + "edges", + "id", + "source", + "target", + "style", + "targetPort", + "stroke", + "lineWidth", + "endArrow", + "type", + "fill", + "size", + "id", + "source", + "target", + "style", + "targetPort", + "stroke", + "lineWidth", + "endArrow", + "type", + "fill", + "size", + "id", + "source", + "target", + "style", + "targetPort", + "stroke", + "lineWidth", + "endArrow", + "type", + "fill", + "size", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-29", + "query": "根据描述绘制图表,使用 G6 库创建一个径向布局的图形,展示节点与边的关系结构。节点数据包含 ID,边数据定义了节点之间的连接关系。支持画布拖拽和元素拖拽交互。参考数据:[{\"id\":\"0\"},{\"id\":\"1\"},{\"id\":\"2\"},{\"id\":\"3\"},{\"id\":\"4\"},{\"id\":\"5\"},{\"id\":\"6\"},{\"id\":\"7\"},{\"id\":\"8\"},{\"id\":\"9\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"0\"\n },\n {\n \"id\": \"1\"\n },\n {\n \"id\": \"2\"\n },\n {\n \"id\": \"3\"\n },\n {\n \"id\": \"4\"\n },\n {\n \"id\": \"5\"\n },\n {\n \"id\": \"6\"\n },\n {\n \"id\": \"7\"\n },\n {\n \"id\": \"8\"\n },\n {\n \"id\": \"9\"\n },\n {\n \"id\": \"10\"\n },\n {\n \"id\": \"11\"\n },\n {\n \"id\": \"12\"\n },\n {\n \"id\": \"13\"\n },\n {\n \"id\": \"14\"\n },\n {\n \"id\": \"15\"\n },\n {\n \"id\": \"16\"\n },\n {\n \"id\": \"17\"\n },\n {\n \"id\": \"18\"\n },\n {\n \"id\": \"19\"\n },\n {\n \"id\": \"20\"\n },\n {\n \"id\": \"21\"\n },\n {\n \"id\": \"22\"\n },\n {\n \"id\": \"23\"\n },\n {\n \"id\": \"24\"\n },\n {\n \"id\": \"25\"\n },\n {\n \"id\": \"26\"\n },\n {\n \"id\": \"27\"\n },\n {\n \"id\": \"28\"\n },\n {\n \"id\": \"29\"\n },\n {\n \"id\": \"30\"\n },\n {\n \"id\": \"31\"\n },\n {\n \"id\": \"32\"\n },\n {\n \"id\": \"33\"\n }\n ],\n \"edges\": [\n {\n \"source\": \"0\",\n \"target\": \"1\"\n },\n {\n \"source\": \"0\",\n \"target\": \"2\"\n },\n {\n \"source\": \"0\",\n \"target\": \"3\"\n },\n {\n \"source\": \"0\",\n \"target\": \"4\"\n },\n {\n \"source\": \"0\",\n \"target\": \"5\"\n },\n {\n \"source\": \"0\",\n \"target\": \"7\"\n },\n {\n \"source\": \"0\",\n \"target\": \"8\"\n },\n {\n \"source\": \"0\",\n \"target\": \"9\"\n },\n {\n \"source\": \"0\",\n \"target\": \"10\"\n },\n {\n \"source\": \"0\",\n \"target\": \"11\"\n },\n {\n \"source\": \"0\",\n \"target\": \"13\"\n },\n {\n \"source\": \"0\",\n \"target\": \"14\"\n },\n {\n \"source\": \"0\",\n \"target\": \"15\"\n },\n {\n \"source\": \"0\",\n \"target\": \"16\"\n },\n {\n \"source\": \"2\",\n \"target\": \"3\"\n },\n {\n \"source\": \"4\",\n \"target\": \"5\"\n },\n {\n \"source\": \"4\",\n \"target\": \"6\"\n },\n {\n \"source\": \"5\",\n \"target\": \"6\"\n },\n {\n \"source\": \"7\",\n \"target\": \"13\"\n },\n {\n \"source\": \"8\",\n \"target\": \"14\"\n },\n {\n \"source\": \"10\",\n \"target\": \"22\"\n },\n {\n \"source\": \"10\",\n \"target\": \"14\"\n },\n {\n \"source\": \"10\",\n \"target\": \"12\"\n },\n {\n \"source\": \"10\",\n \"target\": \"24\"\n },\n {\n \"source\": \"10\",\n \"target\": \"21\"\n },\n {\n \"source\": \"10\",\n \"target\": \"20\"\n },\n {\n \"source\": \"11\",\n \"target\": \"24\"\n },\n {\n \"source\": \"11\",\n \"target\": \"22\"\n },\n {\n \"source\": \"11\",\n \"target\": \"14\"\n },\n {\n \"source\": \"12\",\n \"target\": \"13\"\n },\n {\n \"source\": \"16\",\n \"target\": \"17\"\n },\n {\n \"source\": \"16\",\n \"target\": \"18\"\n },\n {\n \"source\": \"16\",\n \"target\": \"21\"\n },\n {\n \"source\": \"16\",\n \"target\": \"22\"\n },\n {\n \"source\": \"17\",\n \"target\": \"18\"\n },\n {\n \"source\": \"17\",\n \"target\": \"20\"\n },\n {\n \"source\": \"18\",\n \"target\": \"19\"\n },\n {\n \"source\": \"19\",\n \"target\": \"20\"\n },\n {\n \"source\": \"19\",\n \"target\": \"33\"\n },\n {\n \"source\": \"19\",\n \"target\": \"22\"\n },\n {\n \"source\": \"19\",\n \"target\": \"23\"\n },\n {\n \"source\": \"20\",\n \"target\": \"21\"\n },\n {\n \"source\": \"21\",\n \"target\": \"22\"\n },\n {\n \"source\": \"22\",\n \"target\": \"24\"\n },\n {\n \"source\": \"22\",\n \"target\": \"26\"\n },\n {\n \"source\": \"22\",\n \"target\": \"23\"\n },\n {\n \"source\": \"22\",\n \"target\": \"28\"\n },\n {\n \"source\": \"22\",\n \"target\": \"30\"\n },\n {\n \"source\": \"22\",\n \"target\": \"31\"\n },\n {\n \"source\": \"22\",\n \"target\": \"32\"\n },\n {\n \"source\": \"22\",\n \"target\": \"33\"\n },\n {\n \"source\": \"23\",\n \"target\": \"28\"\n },\n {\n \"source\": \"23\",\n \"target\": \"27\"\n },\n {\n \"source\": \"23\",\n \"target\": \"29\"\n },\n {\n \"source\": \"23\",\n \"target\": \"30\"\n },\n {\n \"source\": \"23\",\n \"target\": \"31\"\n },\n {\n \"source\": \"23\",\n \"target\": \"33\"\n },\n {\n \"source\": \"32\",\n \"target\": \"33\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data,\n autoFit: 'center',\n layout: {\n type: 'radial',\n nodeSize: 32,\n unitRadius: 100,\n linkDistance: 200,\n },\n node: {\n style: {\n labelFill: '#fff',\n labelPlacement: 'center',\n labelText: (d) => d.id,\n },\n },\n behaviors: ['drag-canvas', 'drag-element'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0' },\n { id: '1' },\n { id: '2' },\n { id: '3' },\n { id: '4' },\n { id: '5' },\n { id: '6' },\n { id: '7' },\n { id: '8' },\n { id: '9' },\n ],\n edges: [\n { source: '0', target: '1' },\n { source: '0', target: '2' },\n { source: '0', target: '3' },\n { source: '0', target: '4' },\n { source: '1', target: '5' },\n { source: '2', target: '6' },\n { source: '3', target: '7' },\n { source: '4', target: '8' },\n { source: '0', target: '9' },\n { source: '5', target: '9' },\n { source: '6', target: '7' },\n { source: '8', target: '2' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data,\n node: {\n type: 'circle',\n style: {\n size: 32,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 14,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n endArrow: {\n path: 'M 0,0 L 8,4 L 8,-4 Z',\n fill: '#adc6ff',\n },\n },\n },\n layout: {\n type: 'radial',\n unitRadius: 100,\n preventOverlap: true,\n nodeSize: 32,\n strictRadial: false,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n ],\n});\n\ngraph.render();", + "duration": 8790, + "retrievedSkillIds": [ + "g6-behavior-drag-element", + "g6-layout-mindmap", + "g6-layout-grid", + "g6-layout-force", + "g6-core-data-structure" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1406, + "expectedLength": 5021, + "similarity": 0.6192629179331307, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0' },\n { id: '1' },\n { id: '2' },\n { id: '3' },\n { id: '4' },\n { id: '5' },\n { id: '6' },\n { id: '7' },\n { id: '8' },\n { id: '9' },\n ],\n edges: [\n { source: '0', target: '1' },\n { source: '0', target: '2' },\n { source: '0', target: '3' },\n { source: '0', target: '4' },\n { source: '1', target: '5' },\n { source: '2', target: '6' },\n { source: '3', target: '7' },\n { source: '4', target: '8' },\n { source: '0', target: '9' },\n { source: '5', target: '9' },\n { source: '6', target: '7' },\n { source: '8', target: '2' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data,\n node: {\n type: 'circle',\n style: {\n size: 32,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 14,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n endArrow: {\n path: 'M 0,0 L 8,4 L 8,-4 Z',\n fill: '#adc6ff',\n },\n },\n },\n layout: {\n type: 'radial',\n unitRadius: 100,\n preventOverlap: true,\n nodeSize: 32,\n strictRadial: false,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "container", + "autoFit", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "path", + "fill", + "layout", + "type", + "unitRadius", + "preventOverlap", + "nodeSize", + "strictRadial", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-30", + "query": "根据描述绘制图表,使用 G6 库创建一个图实例,设置容器、数据、网格布局和交互行为,并添加了一个工具栏插件用于执行画布操作。参考数据:[{\"id\":\"node-0\"},{\"id\":\"node-1\"},{\"id\":\"node-2\"},{\"id\":\"node-3\"},{\"id\":\"node-4\"},{\"id\":\"node-5\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [{ id: 'node-0' }, { id: 'node-1' }, { id: 'node-2' }, { id: 'node-3' }, { id: 'node-4' }, { id: 'node-5' }],\n edges: [\n { source: 'node-0', target: 'node-1' },\n { source: 'node-0', target: 'node-2' },\n { source: 'node-0', target: 'node-3' },\n { source: 'node-0', target: 'node-4' },\n { source: 'node-1', target: 'node-0' },\n { source: 'node-2', target: 'node-0' },\n { source: 'node-3', target: 'node-0' },\n { source: 'node-4', target: 'node-0' },\n { source: 'node-5', target: 'node-0' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'grid',\n },\n behaviors: ['zoom-canvas', 'drag-canvas', 'drag-element'],\n plugins: [\n {\n type: 'toolbar',\n position: 'top-left',\n onClick: (item) => {\n alert('item clicked:' + item);\n },\n getItems: () => {\n // G6 内置了 9 个 icon,分别是 zoom-in、zoom-out、redo、undo、edit、delete、auto-fit、export、reset\n return [\n { id: 'zoom-in', value: 'zoom-in' },\n { id: 'zoom-out', value: 'zoom-out' },\n { id: 'redo', value: 'redo' },\n { id: 'undo', value: 'undo' },\n { id: 'edit', value: 'edit' },\n { id: 'delete', value: 'delete' },\n { id: 'auto-fit', value: 'auto-fit' },\n { id: 'export', value: 'export' },\n { id: 'reset', value: 'reset' },\n ];\n },\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-0', data: { label: 'Node 0' } },\n { id: 'node-1', data: { label: 'Node 1' } },\n { id: 'node-2', data: { label: 'Node 2' } },\n { id: 'node-3', data: { label: 'Node 3' } },\n { id: 'node-4', data: { label: 'Node 4' } },\n { id: 'node-5', data: { label: 'Node 5' } },\n ],\n edges: [\n { id: 'e0-1', source: 'node-0', target: 'node-1' },\n { id: 'e0-2', source: 'node-0', target: 'node-2' },\n { id: 'e1-3', source: 'node-1', target: 'node-3' },\n { id: 'e2-4', source: 'node-2', target: 'node-4' },\n { id: 'e3-5', source: 'node-3', target: 'node-5' },\n { id: 'e4-5', source: 'node-4', target: 'node-5' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n rowGap: 80,\n colGap: 80,\n },\n node: {\n type: 'circle',\n style: {\n size: 50,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#aaa',\n lineWidth: 1.5,\n endArrow: true,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'click-select'],\n plugins: [\n {\n type: 'toolbar',\n position: 'right-top',\n items: [\n { id: 'zoom-in', value: 'zoom-in' },\n { id: 'zoom-out', value: 'zoom-out' },\n { id: 'fit-view', value: 'fit-view' },\n { id: 'reset', value: 'reset' },\n ],\n },\n ],\n});\n\ngraph.render();", + "duration": 15737, + "retrievedSkillIds": [ + "g6-core-graph-init", + "g6-behavior-canvas-nav", + "g6-node-react", + "g6-plugin-minimap", + "g6-layout-grid" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1628, + "expectedLength": 1473, + "similarity": 0.6929178191652837, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-0', data: { label: 'Node 0' } },\n { id: 'node-1', data: { label: 'Node 1' } },\n { id: 'node-2', data: { label: 'Node 2' } },\n { id: 'node-3', data: { label: 'Node 3' } },\n { id: 'node-4', data: { label: 'Node 4' } },\n { id: 'node-5', data: { label: 'Node 5' } },\n ],\n edges: [\n { id: 'e0-1', source: 'node-0', target: 'node-1' },\n { id: 'e0-2', source: 'node-0', target: 'node-2' },\n { id: 'e1-3', source: 'node-1', target: 'node-3' },\n { id: 'e2-4', source: 'node-2', target: 'node-4' },\n { id: 'e3-5', source: 'node-3', target: 'node-5' },\n { id: 'e4-5', source: 'node-4', target: 'node-5' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n rowGap: 80,\n colGap: 80,\n },\n node: {\n type: 'circle',\n style: {\n size: 50,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#aaa',\n lineWidth: 1.5,\n endArrow: true,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'click-select'],\n plugins: [\n {\n type: 'toolbar',\n position: 'right-top',\n items: [\n { id: 'zoom-in', value: 'zoom-in' },\n { id: 'zoom-out', value: 'zoom-out' },\n { id: 'fit-view', value: 'fit-view' },\n { id: 'reset', value: 'reset' },\n ],\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "edges", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "container", + "layout", + "type", + "rows", + "cols", + "rowGap", + "colGap", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "behaviors", + "plugins", + "type", + "position", + "items", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "value" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-31", + "query": "根据描述绘制图表,使用 G6 库创建一个力导向图,包含三个节点和三条边,并为节点和边配置了样式及标签属性,同时启用画布拖拽和元素拖拽交互。参考数据:[{\"id\":\"node1\",\"style\":{\"x\":150,\"y\":100}},{\"id\":\"node2\",\"style\":{\"x\":250,\"y\":200}},{\"id\":\"node3\",\"style\":{\"x\":450,\"y\":200}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', style: { x: 150, y: 100 } },\n { id: 'node2', style: { x: 250, y: 200 } },\n { id: 'node3', style: { x: 450, y: 200 } },\n ],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node1', target: 'node3' },\n { source: 'node2', target: 'node3' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n labelText: (d) => d.id,\n labelPosition: 'bottom',\n labelFill: '#e66465',\n labelFontSize: 12,\n labelFontStyle: 'italic',\n labelBackground: true,\n labelBackgroundFill: 'linear-gradient(#e66465, #9198e5)',\n labelBackgroundStroke: '#9ec9ff',\n labelBackgroundRadius: 2,\n },\n },\n edge: {\n style: {\n labelText: (d) => d.id,\n labelPosition: 'center',\n labelTextBaseline: 'top',\n labelDy: 5,\n labelFontSize: 12,\n labelFontWeight: 'bold',\n labelFill: '#1890ff',\n labelBackground: true,\n labelBackgroundFill: 'linear-gradient(336deg, rgba(0,0,255,.8), rgba(0,0,255,0) 70.71%)',\n labelBackgroundStroke: '#9ec9ff',\n labelBackgroundRadius: 2,\n },\n },\n layout: {\n type: 'force',\n },\n behaviors: ['drag-canvas', 'drag-element'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', data: { label: 'Node 1' }, style: { x: 150, y: 100 } },\n { id: 'node2', data: { label: 'Node 2' }, style: { x: 250, y: 200 } },\n { id: 'node3', data: { label: 'Node 3' }, style: { x: 450, y: 200 } },\n ],\n edges: [\n { source: 'node1', target: 'node2', data: { label: 'Edge 1-2' } },\n { source: 'node2', target: 'node3', data: { label: 'Edge 2-3' } },\n { source: 'node3', target: 'node1', data: { label: 'Edge 3-1' } },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#aaa',\n lineWidth: 2,\n endArrow: true,\n labelText: (d) => d.data.label,\n labelFill: '#666',\n labelFontSize: 10,\n },\n },\n layout: {\n type: 'force',\n linkDistance: 150,\n gravity: 10,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element-force'],\n});\n\ngraph.render();", + "duration": 15937, + "retrievedSkillIds": [ + "g6-behavior-drag-element", + "g6-behavior-canvas-nav", + "g6-layout-force", + "g6-node-circle", + "g6-core-graph-init" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1208, + "expectedLength": 1292, + "similarity": 0.7049509297520661, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', data: { label: 'Node 1' }, style: { x: 150, y: 100 } },\n { id: 'node2', data: { label: 'Node 2' }, style: { x: 250, y: 200 } },\n { id: 'node3', data: { label: 'Node 3' }, style: { x: 450, y: 200 } },\n ],\n edges: [\n { source: 'node1', target: 'node2', data: { label: 'Edge 1-2' } },\n { source: 'node2', target: 'node3', data: { label: 'Edge 2-3' } },\n { source: 'node3', target: 'node1', data: { label: 'Edge 3-1' } },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#aaa',\n lineWidth: 2,\n endArrow: true,\n labelText: (d) => d.data.label,\n labelFill: '#666',\n labelFontSize: 10,\n },\n },\n layout: {\n type: 'force',\n linkDistance: 150,\n gravity: 10,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element-force'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "style", + "x", + "y", + "id", + "data", + "label", + "style", + "x", + "y", + "id", + "data", + "label", + "style", + "x", + "y", + "edges", + "source", + "target", + "data", + "label", + "source", + "target", + "data", + "label", + "source", + "target", + "data", + "label", + "container", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "labelText", + "labelFill", + "labelFontSize", + "layout", + "type", + "linkDistance", + "gravity", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-32", + "query": "根据描述绘制图表,使用 G6 构建了一个力导向图,包含四种不同形状的节点和四条边,节点与边根据 cluster 字段进行颜色映射,并启用了图例插件用于交互式过滤和展示分类信息。参考数据:[{\"id\":\"1\",\"type\":\"circle\",\"data\":{\"cluster\":\"node-type1\"}},{\"id\":\"2\",\"type\":\"rect\",\"data\":{\"cluster\":\"node-type2\"}},{\"id\":\"3\",\"type\":\"triangle\",\"data\":{\"cluster\":\"node-type3\"}},{\"id\":\"4\",\"type\":\"diamond\",\"data\":{\"cluster\":\"node-type4\"}},{\"id\":\"1-2\",\"source\":\"1\",\"target\":\"2\",\"type\":\"quadratic\",\"data\":{\"cluster\":\"edge-type1\"}},{\"id\":\"1-4\",\"source\":\"1\",\"target\":\"4\",\"data\":{\"cluster\":\"edge-type2\"}},{\"id\":\"3-4\",\"source\":\"3\",\"target\":\"4\"},{\"id\":\"2-4\",\"source\":\"2\",\"target\":\"4\",\"data\":{\"cluster\":\"edge-type3\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n {\n id: '1',\n type: 'circle',\n data: { cluster: 'node-type1' },\n },\n {\n id: '2',\n type: 'rect',\n data: { cluster: 'node-type2' },\n },\n {\n id: '3',\n type: 'triangle',\n data: { cluster: 'node-type3' },\n },\n {\n id: '4',\n type: 'diamond',\n data: { cluster: 'node-type4' },\n },\n ],\n edges: [\n {\n id: '1-2',\n source: '1',\n target: '2',\n type: 'quadratic',\n data: { cluster: 'edge-type1' },\n },\n {\n id: '1-4',\n source: '1',\n target: '4',\n data: { cluster: 'edge-type2' },\n },\n {\n id: '3-4',\n source: '3',\n target: '4',\n },\n {\n id: '2-4',\n source: '2',\n target: '4',\n data: { cluster: 'edge-type3' },\n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: { size: 32 },\n palette: { field: 'cluster' },\n },\n edge: {\n palette: { field: 'cluster' },\n },\n layout: {\n type: 'force',\n },\n plugins: [\n {\n type: 'legend',\n nodeField: 'cluster',\n edgeField: 'cluster',\n titleText: 'Legend Title',\n trigger: 'click',\n position: 'top',\n gridCol: 3,\n itemLabelFontSize: 12,\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '1', type: 'circle', data: { cluster: 'node-type1' } },\n { id: '2', type: 'rect', data: { cluster: 'node-type2' } },\n { id: '3', type: 'triangle', data: { cluster: 'node-type3' } },\n { id: '4', type: 'diamond', data: { cluster: 'node-type4' } }\n ],\n edges: [\n { id: '1-2', source: '1', target: '2', type: 'quadratic', data: { cluster: 'edge-type1' } },\n { id: '1-4', source: '1', target: '4', data: { cluster: 'edge-type2' } },\n { id: '3-4', source: '3', target: '4', data: {} },\n { id: '2-4', source: '2', target: '4', data: { cluster: 'edge-type3' } }\n ]\n};\n\nconst nodeColorMap = {\n 'node-type1': '#1783FF',\n 'node-type2': '#00C9C9',\n 'node-type3': '#F08F56',\n 'node-type4': '#D580FF'\n};\n\nconst edgeColorMap = {\n 'edge-type1': '#1783FF',\n 'edge-type2': '#00C9C9',\n 'edge-type3': '#F08F56'\n};\n\nconst graph = new Graph({\n container,\n width: 800,\n height: 600,\n data,\n node: {\n type: (d) => d.type,\n style: {\n size: (d) => {\n if (d.type === 'rect') return [40, 30];\n if (d.type === 'diamond') return [40, 30];\n return 30;\n },\n fill: (d) => nodeColorMap[d.data.cluster] || '#999',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12\n }\n },\n edge: {\n type: (d) => d.type || 'line',\n style: {\n stroke: (d) => edgeColorMap[d.data.cluster] || '#999',\n lineWidth: 2,\n endArrow: true,\n labelText: (d) => d.data.cluster || '',\n labelFontSize: 10,\n labelFill: '#666',\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.8\n }\n },\n layout: {\n type: 'force',\n linkDistance: 120,\n nodeStrength: 200,\n edgeStrength: 1,\n preventOverlap: true\n },\n plugins: [\n {\n type: 'legend',\n nodeField: 'cluster',\n edgeField: 'cluster',\n showEdge: true,\n position: 'top-right'\n }\n ],\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'click-select']\n});\n\ngraph.render();", + "duration": 21838, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-pattern-tree-graph", + "g6-layout-mindmap", + "g6-node-html", + "g6-node-rect" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2140, + "expectedLength": 1335, + "similarity": 0.8789277905556976, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '1', type: 'circle', data: { cluster: 'node-type1' } },\n { id: '2', type: 'rect', data: { cluster: 'node-type2' } },\n { id: '3', type: 'triangle', data: { cluster: 'node-type3' } },\n { id: '4', type: 'diamond', data: { cluster: 'node-type4' } }\n ],\n edges: [\n { id: '1-2', source: '1', target: '2', type: 'quadratic', data: { cluster: 'edge-type1' } },\n { id: '1-4', source: '1', target: '4', data: { cluster: 'edge-type2' } },\n { id: '3-4', source: '3', target: '4', data: {} },\n { id: '2-4', source: '2', target: '4', data: { cluster: 'edge-type3' } }\n ]\n};\n\nconst nodeColorMap = {\n 'node-type1': '#1783FF',\n 'node-type2': '#00C9C9',\n 'node-type3': '#F08F56',\n 'node-type4': '#D580FF'\n};\n\nconst edgeColorMap = {\n 'edge-type1': '#1783FF',\n 'edge-type2': '#00C9C9',\n 'edge-type3': '#F08F56'\n};\n\nconst graph = new Graph({\n container,\n width: 800,\n height: 600,\n data,\n node: {\n type: (d) => d.type,\n style: {\n size: (d) => {\n if (d.type === 'rect') return [40, 30];\n if (d.type === 'diamond') return [40, 30];\n return 30;\n },\n fill: (d) => nodeColorMap[d.data.cluster] || '#999',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12\n }\n },\n edge: {\n type: (d) => d.type || 'line',\n style: {\n stroke: (d) => edgeColorMap[d.data.cluster] || '#999',\n lineWidth: 2,\n endArrow: true,\n labelText: (d) => d.data.cluster || '',\n labelFontSize: 10,\n labelFill: '#666',\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.8\n }\n },\n layout: {\n type: 'force',\n linkDistance: 120,\n nodeStrength: 200,\n edgeStrength: 1,\n preventOverlap: true\n },\n plugins: [\n {\n type: 'legend',\n nodeField: 'cluster',\n edgeField: 'cluster',\n showEdge: true,\n position: 'top-right'\n }\n ],\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'click-select']\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "type", + "data", + "cluster", + "id", + "type", + "data", + "cluster", + "id", + "type", + "data", + "cluster", + "id", + "type", + "data", + "cluster", + "edges", + "id", + "source", + "target", + "type", + "data", + "cluster", + "id", + "source", + "target", + "data", + "cluster", + "id", + "source", + "target", + "data", + "id", + "source", + "target", + "data", + "cluster", + "width", + "height", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "labelText", + "labelFontSize", + "labelFill", + "labelBackground", + "labelBackgroundFill", + "labelBackgroundOpacity", + "layout", + "type", + "linkDistance", + "nodeStrength", + "edgeStrength", + "preventOverlap", + "plugins", + "type", + "nodeField", + "edgeField", + "showEdge", + "position", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-33", + "query": "根据描述绘制图表,使用 G6 库创建一个径向布局的图谱,将数据中的节点与边进行可视化渲染,支持画布拖拽和元素拖拽交互。参考数据:[{\"id\":\"0\"},{\"id\":\"1\"},{\"id\":\"2\"},{\"id\":\"3\"},{\"id\":\"4\"},{\"id\":\"5\"},{\"id\":\"6\"},{\"id\":\"7\"},{\"id\":\"8\"},{\"id\":\"9\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"0\"\n },\n {\n \"id\": \"1\"\n },\n {\n \"id\": \"2\"\n },\n {\n \"id\": \"3\"\n },\n {\n \"id\": \"4\"\n },\n {\n \"id\": \"5\"\n },\n {\n \"id\": \"6\"\n },\n {\n \"id\": \"7\"\n },\n {\n \"id\": \"8\"\n },\n {\n \"id\": \"9\"\n },\n {\n \"id\": \"10\"\n },\n {\n \"id\": \"11\"\n },\n {\n \"id\": \"12\"\n },\n {\n \"id\": \"13\"\n },\n {\n \"id\": \"14\"\n },\n {\n \"id\": \"15\"\n },\n {\n \"id\": \"16\"\n },\n {\n \"id\": \"17\"\n },\n {\n \"id\": \"18\"\n },\n {\n \"id\": \"19\"\n },\n {\n \"id\": \"20\"\n },\n {\n \"id\": \"21\"\n },\n {\n \"id\": \"22\"\n },\n {\n \"id\": \"23\"\n },\n {\n \"id\": \"24\"\n },\n {\n \"id\": \"25\"\n },\n {\n \"id\": \"26\"\n },\n {\n \"id\": \"27\"\n },\n {\n \"id\": \"28\"\n },\n {\n \"id\": \"29\"\n },\n {\n \"id\": \"30\"\n },\n {\n \"id\": \"31\"\n },\n {\n \"id\": \"32\"\n },\n {\n \"id\": \"33\"\n }\n ],\n \"edges\": [\n {\n \"source\": \"0\",\n \"target\": \"1\"\n },\n {\n \"source\": \"0\",\n \"target\": \"2\"\n },\n {\n \"source\": \"0\",\n \"target\": \"3\"\n },\n {\n \"source\": \"0\",\n \"target\": \"4\"\n },\n {\n \"source\": \"0\",\n \"target\": \"5\"\n },\n {\n \"source\": \"0\",\n \"target\": \"7\"\n },\n {\n \"source\": \"0\",\n \"target\": \"8\"\n },\n {\n \"source\": \"0\",\n \"target\": \"9\"\n },\n {\n \"source\": \"0\",\n \"target\": \"10\"\n },\n {\n \"source\": \"0\",\n \"target\": \"11\"\n },\n {\n \"source\": \"0\",\n \"target\": \"13\"\n },\n {\n \"source\": \"0\",\n \"target\": \"14\"\n },\n {\n \"source\": \"0\",\n \"target\": \"15\"\n },\n {\n \"source\": \"0\",\n \"target\": \"16\"\n },\n {\n \"source\": \"2\",\n \"target\": \"3\"\n },\n {\n \"source\": \"4\",\n \"target\": \"5\"\n },\n {\n \"source\": \"4\",\n \"target\": \"6\"\n },\n {\n \"source\": \"5\",\n \"target\": \"6\"\n },\n {\n \"source\": \"7\",\n \"target\": \"13\"\n },\n {\n \"source\": \"8\",\n \"target\": \"14\"\n },\n {\n \"source\": \"10\",\n \"target\": \"22\"\n },\n {\n \"source\": \"10\",\n \"target\": \"14\"\n },\n {\n \"source\": \"10\",\n \"target\": \"12\"\n },\n {\n \"source\": \"10\",\n \"target\": \"24\"\n },\n {\n \"source\": \"10\",\n \"target\": \"21\"\n },\n {\n \"source\": \"10\",\n \"target\": \"20\"\n },\n {\n \"source\": \"11\",\n \"target\": \"24\"\n },\n {\n \"source\": \"11\",\n \"target\": \"22\"\n },\n {\n \"source\": \"11\",\n \"target\": \"14\"\n },\n {\n \"source\": \"12\",\n \"target\": \"13\"\n },\n {\n \"source\": \"16\",\n \"target\": \"17\"\n },\n {\n \"source\": \"16\",\n \"target\": \"18\"\n },\n {\n \"source\": \"16\",\n \"target\": \"21\"\n },\n {\n \"source\": \"16\",\n \"target\": \"22\"\n },\n {\n \"source\": \"17\",\n \"target\": \"18\"\n },\n {\n \"source\": \"17\",\n \"target\": \"20\"\n },\n {\n \"source\": \"18\",\n \"target\": \"19\"\n },\n {\n \"source\": \"19\",\n \"target\": \"20\"\n },\n {\n \"source\": \"19\",\n \"target\": \"33\"\n },\n {\n \"source\": \"19\",\n \"target\": \"22\"\n },\n {\n \"source\": \"19\",\n \"target\": \"23\"\n },\n {\n \"source\": \"20\",\n \"target\": \"21\"\n },\n {\n \"source\": \"21\",\n \"target\": \"22\"\n },\n {\n \"source\": \"22\",\n \"target\": \"24\"\n },\n {\n \"source\": \"22\",\n \"target\": \"26\"\n },\n {\n \"source\": \"22\",\n \"target\": \"23\"\n },\n {\n \"source\": \"22\",\n \"target\": \"28\"\n },\n {\n \"source\": \"22\",\n \"target\": \"30\"\n },\n {\n \"source\": \"22\",\n \"target\": \"31\"\n },\n {\n \"source\": \"22\",\n \"target\": \"32\"\n },\n {\n \"source\": \"22\",\n \"target\": \"33\"\n },\n {\n \"source\": \"23\",\n \"target\": \"28\"\n },\n {\n \"source\": \"23\",\n \"target\": \"27\"\n },\n {\n \"source\": \"23\",\n \"target\": \"29\"\n },\n {\n \"source\": \"23\",\n \"target\": \"30\"\n },\n {\n \"source\": \"23\",\n \"target\": \"31\"\n },\n {\n \"source\": \"23\",\n \"target\": \"33\"\n },\n {\n \"source\": \"32\",\n \"target\": \"33\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data,\n autoFit: 'center',\n layout: {\n type: 'radial',\n nodeSize: 32,\n unitRadius: 90,\n linkDistance: 200,\n preventOverlap: true,\n maxPreventOverlapIteration: 100,\n },\n node: {\n style: {\n labelFill: '#fff',\n labelPlacement: 'center',\n labelText: (d) => d.id,\n },\n },\n behaviors: ['drag-canvas', 'drag-element'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0' },\n { id: '1' },\n { id: '2' },\n { id: '3' },\n { id: '4' },\n { id: '5' },\n { id: '6' },\n { id: '7' },\n { id: '8' },\n { id: '9' }\n ],\n edges: [\n { id: 'e0-1', source: '0', target: '1' },\n { id: 'e0-2', source: '0', target: '2' },\n { id: 'e0-3', source: '0', target: '3' },\n { id: 'e0-4', source: '0', target: '4' },\n { id: 'e0-5', source: '0', target: '5' },\n { id: 'e0-6', source: '0', target: '6' },\n { id: 'e0-7', source: '0', target: '7' },\n { id: 'e0-8', source: '0', target: '8' },\n { id: 'e0-9', source: '0', target: '9' }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'radial',\n unitRadius: 80,\n preventOverlap: true,\n maxIteration: 500\n },\n node: {\n style: {\n size: 32,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 14\n }\n },\n edge: {\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "duration": 8535, + "retrievedSkillIds": [ + "g6-behavior-canvas-nav", + "g6-behavior-drag-element", + "g6-layout-mindmap", + "g6-layout-force", + "g6-core-graph-init" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1218, + "expectedLength": 5083, + "similarity": 0.6268686868686868, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0' },\n { id: '1' },\n { id: '2' },\n { id: '3' },\n { id: '4' },\n { id: '5' },\n { id: '6' },\n { id: '7' },\n { id: '8' },\n { id: '9' }\n ],\n edges: [\n { id: 'e0-1', source: '0', target: '1' },\n { id: 'e0-2', source: '0', target: '2' },\n { id: 'e0-3', source: '0', target: '3' },\n { id: 'e0-4', source: '0', target: '4' },\n { id: 'e0-5', source: '0', target: '5' },\n { id: 'e0-6', source: '0', target: '6' },\n { id: 'e0-7', source: '0', target: '7' },\n { id: 'e0-8', source: '0', target: '8' },\n { id: 'e0-9', source: '0', target: '9' }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'radial',\n unitRadius: 80,\n preventOverlap: true,\n maxIteration: 500\n },\n node: {\n style: {\n size: 32,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 14\n }\n },\n edge: {\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "edges", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "container", + "layout", + "type", + "unitRadius", + "preventOverlap", + "maxIteration", + "node", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "style", + "stroke", + "lineWidth", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-34", + "query": "根据描述绘制图表,使用 G6 构建了一个树形结构图,展示机器学习建模方法的层级关系。通过 compact-box 布局进行横向排列,节点根据是否为叶子节点决定标签位置,支持画布拖拽、缩放以及节点展开收起等交互行为。参考数据:[{\"id\":\"Modeling Methods\",\"children\":[{\"id\":\"Classification\",\"children\":[{\"id\":\"Logistic regression\"},{\"id\":\"Linear discriminant analysis\"},{\"id\":\"Rules\"},{\"id\":\"Decision trees\"},{\"id\":\"Naive Bayes\"},{\"id\":\"K nearest neighbor\"},{\"id\":\"Probabilistic neural network\"},{\"id\":\"Support vector machine\"}]},{\"id\":\"Consensus\",\"children\":[{\"id\":\"Models diversity\",\"children\":[{\"id\":\"Different initializations\"},{\"id\":\"Different parameter choices\"},{\"id\":\"Different architectures\"},{\"id\":\"Different modeling methods\"},{\"id\":\"Different training sets\"},{\"id\":\"Different feature sets\"}]},{\"id\":\"Methods\",\"children\":[{\"id\":\"Classifier selection\"},{\"id\":\"Classifier fusion\"}]},{\"id\":\"Common\",\"children\":[{\"id\":\"Bagging\"},{\"id\":\"Boosting\"},{\"id\":\"AdaBoost\"}]}]},{\"id\":\"Regression\",\"children\":[{\"id\":\"Multiple linear regression\"},{\"id\":\"Partial least squares\"},{\"id\":\"Multi-layer feedforward neural network\"},{\"id\":\"General regression neural network\"},{\"id\":\"Support vector regression\"}]}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\n/**\n * If the node is a leaf node\n * @param {*} d - node data\n * @returns {boolean} - whether the node is a leaf node\n */\nfunction isLeafNode(d) {\n return !d.children || d.children.length === 0;\n}\n\nconst data = {\n \"id\": \"Modeling Methods\",\n \"children\": [\n {\n \"id\": \"Classification\",\n \"children\": [\n {\n \"id\": \"Logistic regression\"\n },\n {\n \"id\": \"Linear discriminant analysis\"\n },\n {\n \"id\": \"Rules\"\n },\n {\n \"id\": \"Decision trees\"\n },\n {\n \"id\": \"Naive Bayes\"\n },\n {\n \"id\": \"K nearest neighbor\"\n },\n {\n \"id\": \"Probabilistic neural network\"\n },\n {\n \"id\": \"Support vector machine\"\n }\n ]\n },\n {\n \"id\": \"Consensus\",\n \"children\": [\n {\n \"id\": \"Models diversity\",\n \"children\": [\n {\n \"id\": \"Different initializations\"\n },\n {\n \"id\": \"Different parameter choices\"\n },\n {\n \"id\": \"Different architectures\"\n },\n {\n \"id\": \"Different modeling methods\"\n },\n {\n \"id\": \"Different training sets\"\n },\n {\n \"id\": \"Different feature sets\"\n }\n ]\n },\n {\n \"id\": \"Methods\",\n \"children\": [\n {\n \"id\": \"Classifier selection\"\n },\n {\n \"id\": \"Classifier fusion\"\n }\n ]\n },\n {\n \"id\": \"Common\",\n \"children\": [\n {\n \"id\": \"Bagging\"\n },\n {\n \"id\": \"Boosting\"\n },\n {\n \"id\": \"AdaBoost\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"Regression\",\n \"children\": [\n {\n \"id\": \"Multiple linear regression\"\n },\n {\n \"id\": \"Partial least squares\"\n },\n {\n \"id\": \"Multi-layer feedforward neural network\"\n },\n {\n \"id\": \"General regression neural network\"\n },\n {\n \"id\": \"Support vector regression\"\n }\n ]\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: treeToGraphData(data),\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'collapse-expand'],\n node: {\n style: {\n labelText: (d) => d.id,\n labelPlacement: (d) => (isLeafNode(d) ? 'right' : 'left'),\n labelBackground: true,\n ports: [{ placement: 'right' }, { placement: 'left' }],\n },\n animation: {\n enter: false,\n },\n },\n edge: {\n type: 'cubic-horizontal',\n animation: {\n enter: false,\n },\n },\n layout: {\n type: 'compact-box',\n direction: 'LR',\n getHeight: function getHeight() {\n return 32;\n },\n getWidth: function getWidth() {\n return 32;\n },\n getVGap: function getVGap() {\n return 10;\n },\n getHGap: function getHGap() {\n return 100;\n },\n },\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst rawData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nfunction markLeafNodes(node) {\n if (!node.children || node.children.length === 0) {\n node.data = { ...(node.data || {}), isLeaf: true };\n } else {\n node.data = { ...(node.data || {}), isLeaf: false };\n node.children.forEach(markLeafNodes);\n }\n}\n\nmarkLeafNodes(rawData);\n\nconst graph = new Graph({\n container: 'container',\n width: 1200,\n height: 800,\n autoFit: 'view',\n data: treeToGraphData(rawData),\n node: {\n type: 'rect',\n style: {\n size: [160, 36],\n radius: 4,\n fill: (d) => d.data.isLeaf ? '#e6f4ff' : '#f0f5ff',\n stroke: (d) => d.data.isLeaf ? '#91caff' : '#adc6ff',\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: (d) => d.data.isLeaf ? 'center' : 'center',\n labelFill: '#333',\n labelFontSize: 12,\n labelFontWeight: (d) => d.data.isLeaf ? 'normal' : 'bold',\n cursor: 'pointer'\n }\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5\n }\n },\n layout: {\n type: 'compact-box',\n direction: 'LR',\n getWidth: () => 160,\n getHeight: () => 36,\n getHGap: () => 60,\n getVGap: () => 16\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true\n }\n ]\n});\n\ngraph.render();", + "duration": 39674, + "retrievedSkillIds": [ + "g6-layout-mindmap", + "g6-pattern-tree-graph", + "g6-layout-force", + "g6-node-rect", + "g6-layout-grid" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2886, + "expectedLength": 3326, + "similarity": 0.591842105263158, + "extractedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst rawData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nfunction markLeafNodes(node) {\n if (!node.children || node.children.length === 0) {\n node.data = { ...(node.data || {}), isLeaf: true };\n } else {\n node.data = { ...(node.data || {}), isLeaf: false };\n node.children.forEach(markLeafNodes);\n }\n}\n\nmarkLeafNodes(rawData);\n\nconst graph = new Graph({\n container: 'container',\n width: 1200,\n height: 800,\n autoFit: 'view',\n data: treeToGraphData(rawData),\n node: {\n type: 'rect',\n style: {\n size: [160, 36],\n radius: 4,\n fill: (d) => d.data.isLeaf ? '#e6f4ff' : '#f0f5ff',\n stroke: (d) => d.data.isLeaf ? '#91caff' : '#adc6ff',\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: (d) => d.data.isLeaf ? 'center' : 'center',\n labelFill: '#333',\n labelFontSize: 12,\n labelFontWeight: (d) => d.data.isLeaf ? 'normal' : 'bold',\n cursor: 'pointer'\n }\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5\n }\n },\n layout: {\n type: 'compact-box',\n direction: 'LR',\n getWidth: () => 160,\n getHeight: () => 36,\n getHGap: () => 60,\n getVGap: () => 16\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true\n }\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "treeToGraphData" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "markLeafNodes", + "forEach", + "markLeafNodes", + "Graph", + "treeToGraphData", + "render" + ], + "objectKeys": [ + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "isLeaf", + "isLeaf", + "container", + "width", + "height", + "autoFit", + "data", + "node", + "type", + "style", + "size", + "radius", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "labelFontWeight", + "cursor", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "direction", + "getWidth", + "getHeight", + "getHGap", + "getVGap", + "behaviors", + "type", + "trigger", + "animation" + ], + "stringLiterals": [], + "apiPatterns": [ + "view.children", + "new Graph" + ] + } + } + }, + { + "id": "case-35", + "query": "根据描述绘制图表,使用 G6 图表库创建一个力导向图,展示节点与边的关系结构。节点具有不同的大小和集群属性,部分节点标记为叶子节点。通过力导向布局算法自动计算节点位置,渲染出图形关系网络。参考数据:[{\"id\":\"node0\",\"style\":{\"size\":50},\"data\":{\"cluster\":\"node0\"}},{\"id\":\"node1\",\"style\":{\"size\":30},\"data\":{\"cluster\":\"node1\"}},{\"id\":\"node2\",\"style\":{\"size\":30},\"data\":{\"cluster\":\"node2\"}},{\"id\":\"node3\",\"style\":{\"size\":30},\"data\":{\"cluster\":\"node3\"}},{\"id\":\"node4\",\"style\":{\"size\":30},\"data\":{\"cluster\":\"node4\"}},{\"id\":\"node5\",\"style\":{\"size\":30},\"data\":{\"isLeaf\":true,\"cluster\":\"node5\"}},{\"id\":\"node6\",\"style\":{\"size\":15},\"data\":{\"isLeaf\":true,\"cluster\":\"node6\"}},{\"id\":\"node7\",\"style\":{\"size\":15},\"data\":{\"isLeaf\":true,\"cluster\":\"node7\"}},{\"id\":\"node8\",\"style\":{\"size\":15},\"data\":{\"isLeaf\":true,\"cluster\":\"node8\"}},{\"id\":\"node9\",\"style\":{\"size\":15},\"data\":{\"isLeaf\":true,\"cluster\":\"node9\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"node0\",\n \"style\": {\n \"size\": 50\n },\n \"data\": {\n \"cluster\": \"node0\"\n }\n },\n {\n \"id\": \"node1\",\n \"style\": {\n \"size\": 30\n },\n \"data\": {\n \"cluster\": \"node1\"\n }\n },\n {\n \"id\": \"node2\",\n \"style\": {\n \"size\": 30\n },\n \"data\": {\n \"cluster\": \"node2\"\n }\n },\n {\n \"id\": \"node3\",\n \"style\": {\n \"size\": 30\n },\n \"data\": {\n \"cluster\": \"node3\"\n }\n },\n {\n \"id\": \"node4\",\n \"style\": {\n \"size\": 30\n },\n \"data\": {\n \"cluster\": \"node4\"\n }\n },\n {\n \"id\": \"node5\",\n \"style\": {\n \"size\": 30\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node5\"\n }\n },\n {\n \"id\": \"node6\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node6\"\n }\n },\n {\n \"id\": \"node7\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node7\"\n }\n },\n {\n \"id\": \"node8\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node8\"\n }\n },\n {\n \"id\": \"node9\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node9\"\n }\n },\n {\n \"id\": \"node10\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node10\"\n }\n },\n {\n \"id\": \"node11\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node11\"\n }\n },\n {\n \"id\": \"node12\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node12\"\n }\n },\n {\n \"id\": \"node13\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node13\"\n }\n },\n {\n \"id\": \"node14\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node14\"\n }\n },\n {\n \"id\": \"node15\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node15\"\n }\n },\n {\n \"id\": \"node16\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node16\"\n }\n }\n ],\n \"edges\": [\n {\n \"source\": \"node0\",\n \"target\": \"node1\"\n },\n {\n \"source\": \"node0\",\n \"target\": \"node2\"\n },\n {\n \"source\": \"node0\",\n \"target\": \"node3\"\n },\n {\n \"source\": \"node0\",\n \"target\": \"node4\"\n },\n {\n \"source\": \"node0\",\n \"target\": \"node5\"\n },\n {\n \"source\": \"node1\",\n \"target\": \"node6\"\n },\n {\n \"source\": \"node1\",\n \"target\": \"node7\"\n },\n {\n \"source\": \"node2\",\n \"target\": \"node8\"\n },\n {\n \"source\": \"node2\",\n \"target\": \"node9\"\n },\n {\n \"source\": \"node2\",\n \"target\": \"node10\"\n },\n {\n \"source\": \"node2\",\n \"target\": \"node11\"\n },\n {\n \"source\": \"node2\",\n \"target\": \"node12\"\n },\n {\n \"source\": \"node2\",\n \"target\": \"node13\"\n },\n {\n \"source\": \"node3\",\n \"target\": \"node14\"\n },\n {\n \"source\": \"node3\",\n \"target\": \"node15\"\n },\n {\n \"source\": \"node3\",\n \"target\": \"node16\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'force',\n },\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node0', style: { size: 50 }, data: { cluster: 'node0' } },\n { id: 'node1', style: { size: 30 }, data: { cluster: 'node1' } },\n { id: 'node2', style: { size: 30 }, data: { cluster: 'node2' } },\n { id: 'node3', style: { size: 30 }, data: { cluster: 'node3' } },\n { id: 'node4', style: { size: 30 }, data: { cluster: 'node4' } },\n { id: 'node5', style: { size: 30 }, data: { isLeaf: true, cluster: 'node5' } },\n { id: 'node6', style: { size: 15 }, data: { isLeaf: true, cluster: 'node6' } },\n { id: 'node7', style: { size: 15 }, data: { isLeaf: true, cluster: 'node7' } },\n { id: 'node8', style: { size: 15 }, data: { isLeaf: true, cluster: 'node8' } },\n { id: 'node9', style: { size: 15 }, data: { isLeaf: true, cluster: 'node9' } }\n ],\n edges: [\n { source: 'node0', target: 'node1' },\n { source: 'node0', target: 'node2' },\n { source: 'node0', target: 'node3' },\n { source: 'node0', target: 'node4' },\n { source: 'node0', target: 'node5' },\n { source: 'node1', target: 'node6' },\n { source: 'node2', target: 'node7' },\n { source: 'node3', target: 'node8' },\n { source: 'node4', target: 'node9' }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n data: data,\n node: {\n type: 'circle',\n style: {\n size: (d) => d.style?.size || 30,\n fill: (d) => {\n const colors = {\n node0: '#1783FF',\n node1: '#52C41A', \n node2: '#FAAD14',\n node3: '#F5222D',\n node4: '#722ED1',\n node5: '#13C2C2',\n node6: '#EB2F96',\n node7: '#FA541C',\n node8: '#2F4554',\n node9: '#61DDAA'\n };\n return colors[d.data?.cluster] || '#999';\n },\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n halo: (d) => d.data?.isLeaf ? false : true,\n haloLineWidth: 8,\n haloOpacity: 0.15\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#e0e0e0',\n lineWidth: 1.5,\n endArrow: true\n }\n },\n layout: {\n type: 'force',\n linkDistance: 100,\n gravity: 10,\n coulombDisScale: 0.005,\n damping: 0.9,\n maxIteration: 1000\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force'\n ]\n});\n\ngraph.render();", + "duration": 18686, + "retrievedSkillIds": [ + "g6-layout-force", + "g6-layout-mindmap", + "g6-node-rect", + "g6-pattern-network-graph", + "g6-node-circle" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2404, + "expectedLength": 3949, + "similarity": 0.5594339198614973, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node0', style: { size: 50 }, data: { cluster: 'node0' } },\n { id: 'node1', style: { size: 30 }, data: { cluster: 'node1' } },\n { id: 'node2', style: { size: 30 }, data: { cluster: 'node2' } },\n { id: 'node3', style: { size: 30 }, data: { cluster: 'node3' } },\n { id: 'node4', style: { size: 30 }, data: { cluster: 'node4' } },\n { id: 'node5', style: { size: 30 }, data: { isLeaf: true, cluster: 'node5' } },\n { id: 'node6', style: { size: 15 }, data: { isLeaf: true, cluster: 'node6' } },\n { id: 'node7', style: { size: 15 }, data: { isLeaf: true, cluster: 'node7' } },\n { id: 'node8', style: { size: 15 }, data: { isLeaf: true, cluster: 'node8' } },\n { id: 'node9', style: { size: 15 }, data: { isLeaf: true, cluster: 'node9' } }\n ],\n edges: [\n { source: 'node0', target: 'node1' },\n { source: 'node0', target: 'node2' },\n { source: 'node0', target: 'node3' },\n { source: 'node0', target: 'node4' },\n { source: 'node0', target: 'node5' },\n { source: 'node1', target: 'node6' },\n { source: 'node2', target: 'node7' },\n { source: 'node3', target: 'node8' },\n { source: 'node4', target: 'node9' }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n data: data,\n node: {\n type: 'circle',\n style: {\n size: (d) => d.style?.size || 30,\n fill: (d) => {\n const colors = {\n node0: '#1783FF',\n node1: '#52C41A', \n node2: '#FAAD14',\n node3: '#F5222D',\n node4: '#722ED1',\n node5: '#13C2C2',\n node6: '#EB2F96',\n node7: '#FA541C',\n node8: '#2F4554',\n node9: '#61DDAA'\n };\n return colors[d.data?.cluster] || '#999';\n },\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n halo: (d) => d.data?.isLeaf ? false : true,\n haloLineWidth: 8,\n haloOpacity: 0.15\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#e0e0e0',\n lineWidth: 1.5,\n endArrow: true\n }\n },\n layout: {\n type: 'force',\n linkDistance: 100,\n gravity: 10,\n coulombDisScale: 0.005,\n damping: 0.9,\n maxIteration: 1000\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force'\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "style", + "size", + "data", + "cluster", + "id", + "style", + "size", + "data", + "cluster", + "id", + "style", + "size", + "data", + "cluster", + "id", + "style", + "size", + "data", + "cluster", + "id", + "style", + "size", + "data", + "cluster", + "id", + "style", + "size", + "data", + "isLeaf", + "cluster", + "id", + "style", + "size", + "data", + "isLeaf", + "cluster", + "id", + "style", + "size", + "data", + "isLeaf", + "cluster", + "id", + "style", + "size", + "data", + "isLeaf", + "cluster", + "id", + "style", + "size", + "data", + "isLeaf", + "cluster", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "container", + "data", + "node", + "type", + "style", + "size", + "fill", + "node0", + "node1", + "node2", + "node3", + "node4", + "node5", + "node6", + "node7", + "node8", + "node9", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "halo", + "false", + "haloLineWidth", + "haloOpacity", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "layout", + "type", + "linkDistance", + "gravity", + "coulombDisScale", + "damping", + "maxIteration", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-36", + "query": "根据描述绘制图表,使用 AntV G6 渲染一个包含 4 个节点和 4 条边的图形,节点具有固定坐标,边构成一个闭合环结构,支持通过刷选行为进行交互选择。参考数据:[{\"id\":\"node-1\",\"style\":{\"x\":200,\"y\":250}},{\"id\":\"node-2\",\"style\":{\"x\":250,\"y\":200}},{\"id\":\"node-3\",\"style\":{\"x\":300,\"y\":250}},{\"id\":\"node-4\",\"style\":{\"x\":250,\"y\":300}},{\"source\":\"node-1\",\"target\":\"node-2\"},{\"source\":\"node-2\",\"target\":\"node-3\"},{\"source\":\"node-3\",\"target\":\"node-4\"},{\"source\":\"node-4\",\"target\":\"node-1\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node-1', style: { x: 200, y: 250 } },\n { id: 'node-2', style: { x: 250, y: 200 } },\n { id: 'node-3', style: { x: 300, y: 250 } },\n { id: 'node-4', style: { x: 250, y: 300 } },\n ],\n edges: [\n { source: 'node-1', target: 'node-2' },\n { source: 'node-2', target: 'node-3' },\n { source: 'node-3', target: 'node-4' },\n { source: 'node-4', target: 'node-1' },\n ],\n },\n behaviors: [\n {\n key: 'brush-select',\n type: 'brush-select',\n enable: true,\n animation: false,\n mode: 'default', // union intersect diff default\n state: 'selected', // 'active', 'selected', 'inactive', ...\n trigger: [], // ['Shift', 'Alt', 'Control', 'Drag', 'Meta', ...]\n style: {\n width: 0,\n height: 0,\n lineWidth: 4,\n lineDash: [2, 2],\n fill: 'linear-gradient(217deg, rgba(255,0,0,.8), rgba(255,0,0,0) 70.71%),linear-gradient(127deg, rgba(0,255,0,.8), rgba(0,255,0,0) 70.71%),linear-gradient(336deg, rgba(0,0,255,.8), rgba(0,0,255,0) 70.71%)',\n stroke: 'pink',\n fillOpacity: 0.2,\n zIndex: 2,\n pointerEvents: 'none',\n },\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', style: { x: 200, y: 250 } },\n { id: 'node-2', style: { x: 250, y: 200 } },\n { id: 'node-3', style: { x: 300, y: 250 } },\n { id: 'node-4', style: { x: 250, y: 300 } },\n ],\n edges: [\n { source: 'node-1', target: 'node-2' },\n { source: 'node-2', target: 'node-3' },\n { source: 'node-3', target: 'node-4' },\n { source: 'node-4', target: 'node-1' },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n width: 500,\n height: 500,\n data,\n node: {\n type: 'circle',\n style: {\n size: 30,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 2,\n endArrow: true,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'brush-select'],\n});\n\ngraph.render();", + "duration": 7639, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-layout-circular", + "g6-edge-polyline", + "g6-core-custom-element", + "g6-pattern-flow-chart" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 966, + "expectedLength": 1299, + "similarity": 0.6922679664302013, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', style: { x: 200, y: 250 } },\n { id: 'node-2', style: { x: 250, y: 200 } },\n { id: 'node-3', style: { x: 300, y: 250 } },\n { id: 'node-4', style: { x: 250, y: 300 } },\n ],\n edges: [\n { source: 'node-1', target: 'node-2' },\n { source: 'node-2', target: 'node-3' },\n { source: 'node-3', target: 'node-4' },\n { source: 'node-4', target: 'node-1' },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n width: 500,\n height: 500,\n data,\n node: {\n type: 'circle',\n style: {\n size: 30,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 2,\n endArrow: true,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'brush-select'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "container", + "width", + "height", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-37", + "query": "根据描述绘制图表,使用 AntV G6 渲染一个包含两个节点和一条边的简单图形,其中一个节点具有特殊样式,并为边定义了控制点以实现折线效果,同时启用了元素拖拽交互。参考数据:[{\"id\":\"node-1\",\"style\":{\"x\":200,\"y\":200}},{\"id\":\"node-2\",\"style\":{\"x\":350,\"y\":120}},{\"id\":\"node-cp\",\"style\":{\"x\":300,\"y\":190,\"size\":5,\"fill\":\"rgb(244, 109, 67)\"}},{\"id\":\"edge-1\",\"source\":\"node-1\",\"target\":\"node-2\",\"style\":{\"controlPoints\":[[300,190]]}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', style: { x: 200, y: 200 } },\n { id: 'node-2', style: { x: 350, y: 120 } },\n { id: 'node-cp', style: { x: 300, y: 190, size: 5, fill: 'rgb(244, 109, 67)' } },\n ],\n edges: [\n {\n id: 'edge-1',\n source: 'node-1',\n target: 'node-2',\n style: { controlPoints: [[300, 190]] },\n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n edge: {\n type: 'polyline',\n style: {\n router: {\n type: 'orth',\n },\n controlPoints: (d) => d.style.controlPoints,\n },\n },\n behaviors: [{ type: 'drag-element' }],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', style: { x: 200, y: 200 } },\n { id: 'node-2', style: { x: 350, y: 120 } },\n { id: 'node-cp', style: { x: 300, y: 190, size: 5, fill: 'rgb(244, 109, 67)' } }\n ],\n edges: [\n { id: 'edge-1', source: 'node-1', target: 'node-2', style: { controlPoints: [[300, 190]] } }\n ]\n};\n\nconst graph = new Graph({\n container,\n width: 800,\n height: 400,\n data,\n node: {\n style: {\n size: 20,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2\n }\n },\n edge: {\n type: 'polyline',\n style: {\n stroke: '#999',\n lineWidth: 2,\n endArrow: true\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "duration": 66229, + "retrievedSkillIds": [ + "g6-behavior-drag-element", + "g6-edge-polyline", + "g6-edge-line", + "g6-core-custom-element", + "g6-pattern-flow-chart" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 754, + "expectedLength": 674, + "similarity": 0.9577272727272728, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', style: { x: 200, y: 200 } },\n { id: 'node-2', style: { x: 350, y: 120 } },\n { id: 'node-cp', style: { x: 300, y: 190, size: 5, fill: 'rgb(244, 109, 67)' } }\n ],\n edges: [\n { id: 'edge-1', source: 'node-1', target: 'node-2', style: { controlPoints: [[300, 190]] } }\n ]\n};\n\nconst graph = new Graph({\n container,\n width: 800,\n height: 400,\n data,\n node: {\n style: {\n size: 20,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2\n }\n },\n edge: {\n type: 'polyline',\n style: {\n stroke: '#999',\n lineWidth: 2,\n endArrow: true\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "rgb", + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "size", + "fill", + "edges", + "id", + "source", + "target", + "style", + "controlPoints", + "width", + "height", + "node", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-38", + "query": "根据描述绘制图表,使用 G6 图表库渲染一个力导向图,展示公司与个人之间的关系网络。数据经过格式化处理,节点包括公司和个人,边表示雇佣、法人或投资关系。启用 hover 激活交互效果,并防止节点重叠。参考数据:[{\"id\":\"27800994\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"7e023446a248dd2e873ede3a08eeadc5\",\"registCapi\":\"5000.0\",\"name\":\"成都倍达资产管理有限公司\",\"econKind\":\"有限责任公司(非自然人投资或控股的法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"成都倍达资产管理有限公司\",\"degree\":4},{\"id\":\"13956312\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"3fc8e6b450a351dffaf97ebba7bd5675\",\"registCapi\":\"21000.0\",\"name\":\"小米科技(武汉)有限公司\",\"econKind\":\"有限责任公司(外商投资企业法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"小米科技(武汉)有限公司\",\"degree\":4},{\"id\":\"71848026\",\"labels\":[\"Person\"],\"properties\":{\"keyNo\":\"p26b3775f4ea1307e28aef63a6cf2cb8\",\"role\":\"自然人股东\",\"name\":\"刘敏\"},\"type\":\"Person\",\"name\":\"刘敏\",\"degree\":5},{\"id\":\"44830398\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"cac4c7d67320964eddebc475fa66d3f9\",\"registCapi\":\"1000.0\",\"name\":\"北京金山数字娱乐科技有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"北京金山数字娱乐科技有限公司\",\"degree\":4},{\"id\":\"47387343\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"d64da78333777354bf3634e371d736a6\",\"registCapi\":\"0.0\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"econKind\":\"有限合伙企业\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"degree\":3},{\"id\":\"26295729\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"77472fbe731c1b8f4bfc2723f3b65415\",\"registCapi\":\"21550.0\",\"name\":\"珠海金山软件有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"珠海金山软件有限公司\",\"degree\":5},{\"id\":\"24305985\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"6e62fda57887baa0909cb79bef96b07c\",\"registCapi\":\"5000.0\",\"name\":\"小米影业有限责任公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"小米影业有限责任公司\",\"degree\":10},{\"id\":\"9036981\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"29328112375d07205ab125dcb575d59b\",\"registCapi\":\"1000.0\",\"name\":\"图扑尚贸易(上海)有限公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"图扑尚贸易(上海)有限公司\",\"degree\":3},{\"id\":\"53463922\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"f1ba2f7dfcecba582edbf89b03009980\",\"registCapi\":\"43757.56\",\"name\":\"广州华凌空调设备有限公司\",\"econKind\":\"其他有限责任公司\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广州华凌空调设备有限公司\",\"degree\":4},{\"id\":\"2791598\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"0cc68eb8e8f9d0445d1916a9872d207c\",\"registCapi\":\"6926.0\",\"name\":\"广东美的生活电器制造有限公司\",\"econKind\":\"有限责任公司(台港澳与境内合资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广东美的生活电器制造有限公司\",\"degree\":4}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst format = (data) => {\n const { nodes, edges } = data;\n return {\n nodes: nodes.map(({ id, ...node }) => ({ id, data: node })),\n edges: edges.map(({ id, source, target, ...edge }) => ({ id, source, target, data: edge })),\n };\n};\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"27800994\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"7e023446a248dd2e873ede3a08eeadc5\",\n \"registCapi\": \"5000.0\",\n \"name\": \"成都倍达资产管理有限公司\",\n \"econKind\": \"有限责任公司(非自然人投资或控股的法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"成都倍达资产管理有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"13956312\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"3fc8e6b450a351dffaf97ebba7bd5675\",\n \"registCapi\": \"21000.0\",\n \"name\": \"小米科技(武汉)有限公司\",\n \"econKind\": \"有限责任公司(外商投资企业法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"小米科技(武汉)有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"71848026\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p26b3775f4ea1307e28aef63a6cf2cb8\",\n \"role\": \"自然人股东\",\n \"name\": \"刘敏\"\n },\n \"type\": \"Person\",\n \"name\": \"刘敏\",\n \"degree\": 5\n },\n {\n \"id\": \"44830398\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"cac4c7d67320964eddebc475fa66d3f9\",\n \"registCapi\": \"1000.0\",\n \"name\": \"北京金山数字娱乐科技有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京金山数字娱乐科技有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"47387343\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"d64da78333777354bf3634e371d736a6\",\n \"registCapi\": \"0.0\",\n \"name\": \"上海晨熹创业投资中心(有限合伙)\",\n \"econKind\": \"有限合伙企业\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"上海晨熹创业投资中心(有限合伙)\",\n \"degree\": 3\n },\n {\n \"id\": \"26295729\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"77472fbe731c1b8f4bfc2723f3b65415\",\n \"registCapi\": \"21550.0\",\n \"name\": \"珠海金山软件有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"珠海金山软件有限公司\",\n \"degree\": 5\n },\n {\n \"id\": \"24305985\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"6e62fda57887baa0909cb79bef96b07c\",\n \"registCapi\": \"5000.0\",\n \"name\": \"小米影业有限责任公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"小米影业有限责任公司\",\n \"degree\": 10\n },\n {\n \"id\": \"9036981\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"29328112375d07205ab125dcb575d59b\",\n \"registCapi\": \"1000.0\",\n \"name\": \"图扑尚贸易(上海)有限公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"图扑尚贸易(上海)有限公司\",\n \"degree\": 3\n },\n {\n \"id\": \"53463922\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"f1ba2f7dfcecba582edbf89b03009980\",\n \"registCapi\": \"43757.56\",\n \"name\": \"广州华凌空调设备有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"广州华凌空调设备有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"2791598\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"0cc68eb8e8f9d0445d1916a9872d207c\",\n \"registCapi\": \"6926.0\",\n \"name\": \"广东美的生活电器制造有限公司\",\n \"econKind\": \"有限责任公司(台港澳与境内合资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"广东美的生活电器制造有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"52763524\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"ee92647afee609db9b431e4234557374\",\n \"registCapi\": \"200.0\",\n \"name\": \"北京创派力量科技有限公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京创派力量科技有限公司\",\n \"degree\": 5\n },\n {\n \"id\": \"50182662\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"e2f02283910a7f2c6759440681edf7eb\",\n \"registCapi\": \"534.4822\",\n \"name\": \"西安蜂语信息科技有限公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"西安蜂语信息科技有限公司\",\n \"degree\": 2\n },\n {\n \"id\": \"40184690\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"b5cede7322c0f76d5adfe81632de5d21\",\n \"registCapi\": \"44000.0\",\n \"name\": \"上海新飞凡电子商务有限公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股的法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"上海新飞凡电子商务有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"9323996\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"2a821429194d8afebf174c226dee21bb\",\n \"registCapi\": \"560.0\",\n \"name\": \"珠海金山快快科技有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"注销\"\n },\n \"type\": \"Company\",\n \"name\": \"珠海金山快快科技有限公司\",\n \"degree\": 3\n },\n {\n \"id\": \"1471865\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"06c739fdd7af2d3a52139a939196165f\",\n \"registCapi\": \"50.0\",\n \"name\": \"深圳英鹏玩聚互娱科技有限公司\",\n \"econKind\": \"有限责任公司\",\n \"status\": \"注销\"\n },\n \"type\": \"Company\",\n \"name\": \"深圳英鹏玩聚互娱科技有限公司\",\n \"degree\": 9\n },\n {\n \"id\": \"16406890\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"4acdaf5e031fc214abdb6287e9a9276f\",\n \"registCapi\": \"45000.0\",\n \"name\": \"重庆市小米小额贷款有限公司\",\n \"econKind\": \"有限责任公司(台港澳法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"重庆市小米小额贷款有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"46583563\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"d2adf1c22178335067fa214da6cffab5\",\n \"registCapi\": \"5000.0\",\n \"name\": \"小米信用管理有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"小米信用管理有限公司\",\n \"degree\": 7\n },\n {\n \"id\": \"61422172\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p077472cd738bf6c70d757a42c6acaf4\",\n \"role\": \"\",\n \"name\": \"林斌\"\n },\n \"type\": \"Person\",\n \"name\": \"林斌\",\n \"degree\": 10\n },\n {\n \"id\": \"40800362\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"b894dee03e3d201af50ab60638820740\",\n \"registCapi\": \"2592.0\",\n \"name\": \"合肥荣事达洗衣机有限公司\",\n \"econKind\": \"有限责任公司(中外合资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"合肥荣事达洗衣机有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"50714910\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"e558d7a7bf37fc3b8ccfcd7e7a85b7cc\",\n \"registCapi\": \"42000.0\",\n \"name\": \"广东美的微波炉制造有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"广东美的微波炉制造有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"53320045\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"f1141d6decb76ff22e70e5f8b656b68c\",\n \"registCapi\": \"2700.0\",\n \"name\": \"北京小米电子产品有限公司\",\n \"econKind\": \"有限责任公司(台港澳法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京小米电子产品有限公司\",\n \"degree\": 6\n },\n {\n \"id\": \"93817\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"006f4aa686287cb359b449ce6ce347d1\",\n \"registCapi\": \"200000.0\",\n \"name\": \"四川银米科技有限责任公司\",\n \"econKind\": \"有限责任公司(非自然人投资或控股的法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"四川银米科技有限责任公司\",\n \"degree\": 5\n },\n {\n \"id\": \"26623797\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"78bd7f41ad3bd438e8b63e2a2b5ae644\",\n \"registCapi\": \"1135.9266\",\n \"name\": \"舒可士(深圳)科技有限公司\",\n \"econKind\": \"有限责任公司(台港澳与境内合资)外资比例低于25%\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"舒可士(深圳)科技有限公司\",\n \"degree\": 3\n },\n {\n \"id\": \"5154548\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"17773b52b0164d5d0c39a14cbc1d12c8\",\n \"registCapi\": \"28800.0\",\n \"name\": \"北京小米移动软件有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京小米移动软件有限公司\",\n \"degree\": 6\n },\n {\n \"id\": \"42426456\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"bfeb8fa5f2ef0a07606c0a7aa4253621\",\n \"registCapi\": \"8000.0\",\n \"name\": \"邯郸美的制冷设备有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"邯郸美的制冷设备有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"67299081\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p1910534b4ae98fea35ddbeb1d61cd44\",\n \"role\": \"执行董事\",\n \"name\": \"雷军\"\n },\n \"type\": \"Person\",\n \"name\": \"雷军\",\n \"degree\": 57\n },\n {\n \"id\": \"74635102\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p2f10e89de841bdc628df613420b0040\",\n \"role\": \"\",\n \"name\": \"朱凤涛\"\n },\n \"type\": \"Person\",\n \"name\": \"朱凤涛\",\n \"degree\": 2\n },\n {\n \"id\": \"653142\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"02ff6e6bed57a655db1bc67dfa829984\",\n \"registCapi\": \"100000.0\",\n \"name\": \"广东小米科技有限责任公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"广东小米科技有限责任公司\",\n \"degree\": 5\n },\n {\n \"id\": \"9296707\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"2a620cfbe8a8678ce9bb3312da633871\",\n \"registCapi\": \"931250.6158\",\n \"name\": \"上海万达网络金融服务有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"上海万达网络金融服务有限公司\",\n \"degree\": 5\n },\n {\n \"id\": \"95397448\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p6d7e0b8f1d5f085cef08c25afc20309\",\n \"role\": \"副董事长\",\n \"name\": \"刘德\"\n },\n \"type\": \"Person\",\n \"name\": \"刘德\",\n \"degree\": 26\n },\n {\n \"id\": \"101641703\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p804a400c7a446c6eb28cfa455ffc91f\",\n \"role\": \"自然人股东\",\n \"name\": \"张震阳\"\n },\n \"type\": \"Person\",\n \"name\": \"张震阳\",\n \"degree\": 3\n },\n {\n \"id\": \"21768893\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"630537e4747092679451cea00432584b\",\n \"registCapi\": \"67650.0\",\n \"name\": \"安得智联科技股份有限公司\",\n \"econKind\": \"股份有限公司(台港澳与境内合资、未上市)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"安得智联科技股份有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"26627684\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"78c200dd24178853e4a985d918c6bc2e\",\n \"registCapi\": \"500000.0\",\n \"name\": \"中央汇金资产管理有限责任公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"中央汇金资产管理有限责任公司\",\n \"degree\": 3\n },\n {\n \"id\": \"38315442\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"ad622acd512e8f07fb287627b6901a7d\",\n \"registCapi\": \"100.0\",\n \"name\": \"西藏小米科技有限责任公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股的法人独资)\",\n \"status\": \"注销\"\n },\n \"type\": \"Company\",\n \"name\": \"西藏小米科技有限责任公司\",\n \"degree\": 4\n },\n {\n \"id\": \"30954022\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"8c3516cd93679b88af8eb26e8ec8e86b\",\n \"registCapi\": \"1000.0\",\n \"name\": \"北京金山软件有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京金山软件有限公司\",\n \"degree\": 4\n }\n ],\n \"edges\": [\n {\n \"id\": \"202765330\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"30954022\"\n },\n {\n \"id\": \"211823788\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事长\"\n },\n \"source\": \"67299081\",\n \"target\": \"93817\"\n },\n {\n \"id\": \"211823791\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"93817\"\n },\n {\n \"id\": \"131295128\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"67299081\",\n \"target\": \"38315442\"\n },\n {\n \"id\": \"256349818\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"9036981\"\n },\n {\n \"id\": \"180159485\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"46583563\"\n },\n {\n \"id\": \"180159486\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事长\"\n },\n \"source\": \"67299081\",\n \"target\": \"46583563\"\n },\n {\n \"id\": \"4981020\",\n \"type\": \"INVEST\",\n \"properties\": {\n \"role\": \"企业法人\",\n \"stockPercent\": 100,\n \"shouldCapi\": 44000\n },\n \"source\": \"9296707\",\n \"target\": \"40184690\"\n },\n {\n \"id\": \"121849387\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"67299081\",\n \"target\": \"93817\"\n },\n {\n \"id\": \"151712616\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"27800994\"\n },\n {\n \"id\": \"160158693\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"16406890\"\n },\n {\n \"id\": \"160158692\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"61422172\",\n \"target\": \"16406890\"\n },\n {\n \"id\": \"110517278\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"95397448\",\n \"target\": \"53320045\"\n },\n {\n \"id\": \"130289005\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"67299081\",\n \"target\": \"13956312\"\n },\n {\n \"id\": \"241050886\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"44830398\"\n },\n {\n \"id\": \"233524846\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"26295729\"\n },\n {\n \"id\": \"97660530\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"67299081\",\n \"target\": \"653142\"\n },\n {\n \"id\": \"170221103\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事,经理\"\n },\n \"source\": \"74635102\",\n \"target\": \"50714910\"\n },\n {\n \"id\": \"188473211\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"61422172\",\n \"target\": \"53320045\"\n },\n {\n \"id\": \"188473209\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事长\"\n },\n \"source\": \"67299081\",\n \"target\": \"53320045\"\n },\n {\n \"id\": \"188473212\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"总经理\"\n },\n \"source\": \"95397448\",\n \"target\": \"53320045\"\n },\n {\n \"id\": \"3474831\",\n \"type\": \"INVEST\",\n \"properties\": {\n \"role\": \"企业法人\",\n \"stockPercent\": 80,\n \"shouldCapi\": 800\n },\n \"source\": \"26295729\",\n \"target\": \"30954022\"\n },\n {\n \"id\": \"2840015\",\n \"type\": \"INVEST\",\n \"properties\": {\n \"role\": \"企业法人\",\n \"stockPercent\": 62.5,\n \"shouldCapi\": 350\n },\n \"source\": \"44830398\",\n \"target\": \"9323996\"\n },\n {\n \"id\": \"85633798\",\n \"type\": \"INVEST\",\n \"properties\": {\n \"role\": \"自然人股东\",\n \"stockPercent\": 2.01,\n \"shouldCapi\": 100.5\n },\n \"source\": \"95397448\",\n \"target\": \"24305985\"\n },\n {\n \"id\": \"180159488\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"61422172\",\n \"target\": \"46583563\"\n },\n {\n \"id\": \"229272386\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事兼总经理\"\n },\n \"source\": \"67299081\",\n \"target\": \"13956312\"\n },\n {\n \"id\": \"229272385\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"13956312\"\n },\n {\n \"id\": \"252833811\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事长\"\n },\n \"source\": \"67299081\",\n \"target\": \"24305985\"\n },\n {\n \"id\": \"252833810\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"24305985\"\n },\n {\n \"id\": \"161979950\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"经理\"\n },\n \"source\": \"95397448\",\n \"target\": \"653142\"\n },\n {\n \"id\": \"161979949\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"653142\"\n },\n {\n \"id\": \"231346748\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事兼总经理\"\n },\n \"source\": \"67299081\",\n \"target\": \"38315442\"\n },\n {\n \"id\": \"192021637\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"9323996\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: format(data),\n behaviors: [\n {\n type: 'hover-activate',\n degree: 1, // 👈🏻 Activate relations.\n },\n ],\n layout: {\n type: 'force',\n preventOverlap: true,\n nodeSize: 24,\n },\n animation: false,\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, GraphEvent } from '@antv/g6';\n\nconst rawNodes = [\n {\"id\":\"27800994\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"7e023446a248dd2e873ede3a08eeadc5\",\"registCapi\":\"5000.0\",\"name\":\"成都倍达资产管理有限公司\",\"econKind\":\"有限责任公司(非自然人投资或控股的法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"成都倍达资产管理有限公司\",\"degree\":4},\n {\"id\":\"13956312\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"3fc8e6b450a351dffaf97ebba7bd5675\",\"registCapi\":\"21000.0\",\"name\":\"小米科技(武汉)有限公司\",\"econKind\":\"有限责任公司(外商投资企业法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"小米科技(武汉)有限公司\",\"degree\":4},\n {\"id\":\"71848026\",\"labels\":[\"Person\"],\"properties\":{\"keyNo\":\"p26b3775f4ea1307e28aef63a6cf2cb8\",\"role\":\"自然人股东\",\"name\":\"刘敏\"},\"type\":\"Person\",\"name\":\"刘敏\",\"degree\":5},\n {\"id\":\"44830398\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"cac4c7d67320964eddebc475fa66d3f9\",\"registCapi\":\"1000.0\",\"name\":\"北京金山数字娱乐科技有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"北京金山数字娱乐科技有限公司\",\"degree\":4},\n {\"id\":\"47387343\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"d64da78333777354bf3634e371d736a6\",\"registCapi\":\"0.0\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"econKind\":\"有限合伙企业\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"degree\":3},\n {\"id\":\"26295729\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"77472fbe731c1b8f4bfc2723f3b65415\",\"registCapi\":\"21550.0\",\"name\":\"珠海金山软件有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"珠海金山软件有限公司\",\"degree\":5},\n {\"id\":\"24305985\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"6e62fda57887baa0909cb79bef96b07c\",\"registCapi\":\"5000.0\",\"name\":\"小米影业有限责任公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"小米影业有限责任公司\",\"degree\":10},\n {\"id\":\"9036981\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"29328112375d07205ab125dcb575d59b\",\"registCapi\":\"1000.0\",\"name\":\"图扑尚贸易(上海)有限公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"图扑尚贸易(上海)有限公司\",\"degree\":3},\n {\"id\":\"53463922\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"f1ba2f7dfcecba582edbf89b03009980\",\"registCapi\":\"43757.56\",\"name\":\"广州华凌空调设备有限公司\",\"econKind\":\"其他有限责任公司\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广州华凌空调设备有限公司\",\"degree\":4},\n {\"id\":\"2791598\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"0cc68eb8e8f9d0445d1916a9872d207c\",\"registCapi\":\"6926.0\",\"name\":\"广东美的生活电器制造有限公司\",\"econKind\":\"有限责任公司(台港澳与境内合资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广东美的生活电器制造有限公司\",\"degree\":4}\n];\n\nconst nodes = rawNodes.map(node => ({\n id: node.id,\n data: {\n name: node.name,\n type: node.type,\n degree: node.degree,\n registCapi: node.properties?.registCapi || '0',\n status: node.properties?.status || '',\n econKind: node.properties?.econKind || '',\n role: node.properties?.role || ''\n }\n}));\n\nconst edges = [\n { source: '71848026', target: '24305985', data: { type: '投资' } },\n { source: '71848026', target: '13956312', data: { type: '股东' } },\n { source: '71848026', target: '26295729', data: { type: '法人' } },\n { source: '71848026', target: '44830398', data: { type: '投资' } },\n { source: '71848026', target: '27800994', data: { type: '任职' } },\n { source: '13956312', target: '24305985', data: { type: '关联' } },\n { source: '26295729', target: '44830398', data: { type: '投资' } },\n { source: '24305985', target: '47387343', data: { type: '投资' } },\n { source: '24305985', target: '9036981', data: { type: '控股' } },\n { source: '53463922', target: '2791598', data: { type: '关联' } },\n { source: '2791598', target: '53463922', data: { type: '投资' } },\n { source: '27800994', target: '47387343', data: { type: '投资' } },\n { source: '44830398', target: '26295729', data: { type: '关联' } },\n];\n\nconst graph = new Graph({\n container: 'container',\n width: 960,\n height: 640,\n data: { nodes, edges },\n \n node: {\n type: 'circle',\n style: {\n size: (d) => 20 + d.data.degree * 8,\n labelText: (d) => d.data.name,\n labelPlacement: 'bottom',\n labelFontSize: 12,\n labelFill: '#333',\n labelMaxWidth: 120,\n labelWordWrap: true,\n cursor: 'pointer',\n },\n palette: {\n type: 'group',\n field: 'type',\n color: ['#1783FF', '#52c41a'],\n },\n state: {\n active: {\n lineWidth: 3,\n halo: true,\n haloOpacity: 0.25,\n haloLineWidth: 12,\n stroke: '#fff',\n },\n inactive: {\n opacity: 0.2,\n },\n selected: {\n lineWidth: 3,\n halo: true,\n haloOpacity: 0.3,\n haloLineWidth: 16,\n stroke: '#fff',\n },\n },\n },\n\n edge: {\n type: 'line',\n style: {\n stroke: '#e0e0e0',\n lineWidth: 1.5,\n endArrow: true,\n labelText: (d) => d.data.type,\n labelFontSize: 10,\n labelFill: '#999',\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.8,\n },\n state: {\n active: {\n stroke: '#1783FF',\n lineWidth: 2,\n },\n inactive: {\n opacity: 0.1,\n },\n },\n },\n\n layout: {\n type: 'force',\n linkDistance: 150,\n gravity: 10,\n nodeStrength: 30,\n edgeStrength: 0.2,\n },\n\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force',\n {\n type: 'hover-activate',\n degree: 1,\n state: 'active',\n },\n {\n type: 'click-select',\n state: 'selected',\n multiple: false,\n },\n ],\n\n plugins: [\n {\n type: 'tooltip',\n getContent: (event, items) => {\n const [item] = items;\n if (!item) return '';\n const d = item.data;\n let content = `\n
\n
${d.name}
\n `;\n \n if (d.type === 'Company') {\n content += `\n
类型:公司
\n
注册资本:${d.registCapi}万元
\n
状态:${d.status}
\n
企业类型:${d.econKind}
\n `;\n } else {\n content += `\n
类型:个人
\n
角色:${d.role || '自然人", + "duration": 36288, + "retrievedSkillIds": [ + "g6-pattern-network-graph", + "g6-behavior-hover-activate", + "g6-node-circle", + "g6-node-react", + "g6-layout-grid" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": true, + "issues": [ + "缺少 render() 调用" + ], + "warnings": [], + "codeLength": 6286, + "expectedLength": 19532, + "similarity": 0.40138807998446907, + "extractedCode": "import { Graph, GraphEvent } from '@antv/g6';\n\nconst rawNodes = [\n {\"id\":\"27800994\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"7e023446a248dd2e873ede3a08eeadc5\",\"registCapi\":\"5000.0\",\"name\":\"成都倍达资产管理有限公司\",\"econKind\":\"有限责任公司(非自然人投资或控股的法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"成都倍达资产管理有限公司\",\"degree\":4},\n {\"id\":\"13956312\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"3fc8e6b450a351dffaf97ebba7bd5675\",\"registCapi\":\"21000.0\",\"name\":\"小米科技(武汉)有限公司\",\"econKind\":\"有限责任公司(外商投资企业法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"小米科技(武汉)有限公司\",\"degree\":4},\n {\"id\":\"71848026\",\"labels\":[\"Person\"],\"properties\":{\"keyNo\":\"p26b3775f4ea1307e28aef63a6cf2cb8\",\"role\":\"自然人股东\",\"name\":\"刘敏\"},\"type\":\"Person\",\"name\":\"刘敏\",\"degree\":5},\n {\"id\":\"44830398\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"cac4c7d67320964eddebc475fa66d3f9\",\"registCapi\":\"1000.0\",\"name\":\"北京金山数字娱乐科技有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"北京金山数字娱乐科技有限公司\",\"degree\":4},\n {\"id\":\"47387343\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"d64da78333777354bf3634e371d736a6\",\"registCapi\":\"0.0\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"econKind\":\"有限合伙企业\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"degree\":3},\n {\"id\":\"26295729\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"77472fbe731c1b8f4bfc2723f3b65415\",\"registCapi\":\"21550.0\",\"name\":\"珠海金山软件有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"珠海金山软件有限公司\",\"degree\":5},\n {\"id\":\"24305985\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"6e62fda57887baa0909cb79bef96b07c\",\"registCapi\":\"5000.0\",\"name\":\"小米影业有限责任公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"小米影业有限责任公司\",\"degree\":10},\n {\"id\":\"9036981\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"29328112375d07205ab125dcb575d59b\",\"registCapi\":\"1000.0\",\"name\":\"图扑尚贸易(上海)有限公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"图扑尚贸易(上海)有限公司\",\"degree\":3},\n {\"id\":\"53463922\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"f1ba2f7dfcecba582edbf89b03009980\",\"registCapi\":\"43757.56\",\"name\":\"广州华凌空调设备有限公司\",\"econKind\":\"其他有限责任公司\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广州华凌空调设备有限公司\",\"degree\":4},\n {\"id\":\"2791598\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"0cc68eb8e8f9d0445d1916a9872d207c\",\"registCapi\":\"6926.0\",\"name\":\"广东美的生活电器制造有限公司\",\"econKind\":\"有限责任公司(台港澳与境内合资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广东美的生活电器制造有限公司\",\"degree\":4}\n];\n\nconst nodes = rawNodes.map(node => ({\n id: node.id,\n data: {\n name: node.name,\n type: node.type,\n degree: node.degree,\n registCapi: node.properties?.registCapi || '0',\n status: node.properties?.status || '',\n econKind: node.properties?.econKind || '',\n role: node.properties?.role || ''\n }\n}));\n\nconst edges = [\n { source: '71848026', target: '24305985', data: { type: '投资' } },\n { source: '71848026', target: '13956312', data: { type: '股东' } },\n { source: '71848026', target: '26295729', data: { type: '法人' } },\n { source: '71848026', target: '44830398', data: { type: '投资' } },\n { source: '71848026', target: '27800994', data: { type: '任职' } },\n { source: '13956312', target: '24305985', data: { type: '关联' } },\n { source: '26295729', target: '44830398', data: { type: '投资' } },\n { source: '24305985', target: '47387343', data: { type: '投资' } },\n { source: '24305985', target: '9036981', data: { type: '控股' } },\n { source: '53463922', target: '2791598', data: { type: '关联' } },\n { source: '2791598', target: '53463922', data: { type: '投资' } },\n { source: '27800994', target: '47387343', data: { type: '投资' } },\n { source: '44830398', target: '26295729', data: { type: '关联' } },\n];\n\nconst graph = new Graph({\n container: 'container',\n width: 960,\n height: 640,\n data: { nodes, edges },\n \n node: {\n type: 'circle',\n style: {\n size: (d) => 20 + d.data.degree * 8,\n labelText: (d) => d.data.name,\n labelPlacement: 'bottom',\n labelFontSize: 12,\n labelFill: '#333',\n labelMaxWidth: 120,\n labelWordWrap: true,\n cursor: 'pointer',\n },\n palette: {\n type: 'group',\n field: 'type',\n color: ['#1783FF', '#52c41a'],\n },\n state: {\n active: {\n lineWidth: 3,\n halo: true,\n haloOpacity: 0.25,\n haloLineWidth: 12,\n stroke: '#fff',\n },\n inactive: {\n opacity: 0.2,\n },\n selected: {\n lineWidth: 3,\n halo: true,\n haloOpacity: 0.3,\n haloLineWidth: 16,\n stroke: '#fff',\n },\n },\n },\n\n edge: {\n type: 'line',\n style: {\n stroke: '#e0e0e0',\n lineWidth: 1.5,\n endArrow: true,\n labelText: (d) => d.data.type,\n labelFontSize: 10,\n labelFill: '#999',\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.8,\n },\n state: {\n active: {\n stroke: '#1783FF',\n lineWidth: 2,\n },\n inactive: {\n opacity: 0.1,\n },\n },\n },\n\n layout: {\n type: 'force',\n linkDistance: 150,\n gravity: 10,\n nodeStrength: 30,\n edgeStrength: 0.2,\n },\n\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force',\n {\n type: 'hover-activate',\n degree: 1,\n state: 'active',\n },\n {\n type: 'click-select',\n state: 'selected',\n multiple: false,\n },\n ],\n\n plugins: [\n {\n type: 'tooltip',\n getContent: (event, items) => {\n const [item] = items;\n if (!item) return '';\n const d = item.data;\n let content = `\n
\n
${d.name}
\n `;\n \n if (d.type === 'Company') {\n content += `\n
类型:公司
\n
注册资本:${d.registCapi}万元
\n
状态:${d.status}
\n
企业类型:${d.econKind}
\n `;\n } else {\n content += `\n
类型:个人
\n
角色:${d.role || '自然人", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "GraphEvent" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "map", + "Graph" + ], + "objectKeys": [ + "id", + "data", + "name", + "type", + "degree", + "registCapi", + "status", + "econKind", + "role", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "container", + "width", + "height", + "data", + "node", + "type", + "style", + "size", + "labelText", + "labelPlacement", + "labelFontSize", + "labelFill", + "labelMaxWidth", + "labelWordWrap", + "cursor", + "palette", + "type", + "field", + "color", + "state", + "active", + "lineWidth", + "halo", + "haloOpacity", + "haloLineWidth", + "stroke", + "inactive", + "opacity", + "selected", + "lineWidth", + "halo", + "haloOpacity", + "haloLineWidth", + "stroke", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "labelText", + "labelFontSize", + "labelFill", + "labelBackground", + "labelBackgroundFill", + "labelBackgroundOpacity", + "state", + "active", + "stroke", + "lineWidth", + "inactive", + "opacity", + "layout", + "type", + "linkDistance", + "gravity", + "nodeStrength", + "edgeStrength", + "behaviors", + "type", + "degree", + "state", + "type", + "state", + "multiple", + "plugins", + "type", + "getContent", + "padding", + "width", + "weight", + "size", + "bottom", + "color", + "color", + "size", + "bottom", + "color", + "size", + "bottom", + "color", + "size", + "bottom", + "color", + "size", + "color", + "size", + "bottom", + "color", + "size", + "bottom" + ], + "stringLiterals": [ + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "role", + "name", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree" + ], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-39", + "query": "根据描述绘制图表,使用 G6 渲染一个包含三个节点和三条边的简单关系图,节点带有固定位置和标签文本,启用画布缩放、拖拽以及自动适配标签显示的行为,并添加了网格线插件和动画效果。参考数据:[{\"id\":\"node1\",\"style\":{\"x\":200,\"y\":100,\"labelText\":\"短标签\"}},{\"id\":\"node2\",\"style\":{\"x\":360,\"y\":100,\"labelText\":\"中等长度的标签\"}},{\"id\":\"node3\",\"style\":{\"x\":280,\"y\":220,\"labelText\":\"这是一个非常非常长的标签,需要自适应显示\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', style: { x: 200, y: 100, labelText: '短标签' } },\n { id: 'node2', style: { x: 360, y: 100, labelText: '中等长度的标签' } },\n { id: 'node3', style: { x: 280, y: 220, labelText: '这是一个非常非常长的标签,需要自适应显示' } },\n ],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node1', target: 'node3' },\n { source: 'node2', target: 'node3' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n behaviors: [\n 'zoom-canvas',\n 'drag-canvas',\n {\n key: 'auto-adapt-label',\n type: 'auto-adapt-label',\n padding: 0,\n throttle: 200,\n },\n ],\n plugins: [{ type: 'grid-line', size: 30 }],\n animation: true,\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', data: { label: '短标签' }, style: { x: 200, y: 100 } },\n { id: 'node2', data: { label: '中等长度的标签' }, style: { x: 360, y: 100 } },\n { id: 'node3', data: { label: '这是一个非常非常长的标签,需要自适应显示' }, style: { x: 280, y: 220 } }\n ],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node2', target: 'node3' },\n { source: 'node3', target: 'node1' }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelFill: '#333',\n labelFontSize: 12,\n labelPlacement: 'bottom',\n labelMaxWidth: 120,\n labelWordWrap: true,\n labelOffsetY: 8\n },\n animation: {\n enter: { type: 'fade-in', duration: 500, easing: 'ease-out' },\n update: { type: 'position', duration: 300, easing: 'ease-in-out' }\n }\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 2,\n endArrow: { path: 'arrow', size: 8 }\n },\n animation: {\n enter: { type: 'fade-in', duration: 500, easing: 'ease-out' }\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: ['grid-line'],\n autoFit: 'view'\n});\n\ngraph.render();", + "duration": 27903, + "retrievedSkillIds": [ + "g6-behavior-canvas-nav", + "g6-plugin-minimap", + "g6-node-circle", + "g6-node-html", + "g6-core-transforms-animation" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1338, + "expectedLength": 750, + "similarity": 0.7779014844804318, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', data: { label: '短标签' }, style: { x: 200, y: 100 } },\n { id: 'node2', data: { label: '中等长度的标签' }, style: { x: 360, y: 100 } },\n { id: 'node3', data: { label: '这是一个非常非常长的标签,需要自适应显示' }, style: { x: 280, y: 220 } }\n ],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node2', target: 'node3' },\n { source: 'node3', target: 'node1' }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelFill: '#333',\n labelFontSize: 12,\n labelPlacement: 'bottom',\n labelMaxWidth: 120,\n labelWordWrap: true,\n labelOffsetY: 8\n },\n animation: {\n enter: { type: 'fade-in', duration: 500, easing: 'ease-out' },\n update: { type: 'position', duration: 300, easing: 'ease-in-out' }\n }\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 2,\n endArrow: { path: 'arrow', size: 8 }\n },\n animation: {\n enter: { type: 'fade-in', duration: 500, easing: 'ease-out' }\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: ['grid-line'],\n autoFit: 'view'\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "style", + "x", + "y", + "id", + "data", + "label", + "style", + "x", + "y", + "id", + "data", + "label", + "style", + "x", + "y", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "container", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelFill", + "labelFontSize", + "labelPlacement", + "labelMaxWidth", + "labelWordWrap", + "labelOffsetY", + "animation", + "enter", + "type", + "duration", + "easing", + "update", + "type", + "duration", + "easing", + "edge", + "style", + "stroke", + "lineWidth", + "endArrow", + "path", + "size", + "animation", + "enter", + "type", + "duration", + "easing", + "behaviors", + "plugins", + "autoFit" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-40", + "query": "根据描述绘制图表,使用 G6 构建了一个径向布局的关系图,展示了节点之间的连接关系,并根据节点的 type 属性进行分组配色。节点数据包含 ID 和类型信息,边数据定义了节点间的连接关系。支持画布拖拽和元素拖拽交互。参考数据:[{\"id\":\"0\",\"data\":{\"type\":\"a\"}},{\"id\":\"1\",\"data\":{\"type\":\"a\"}},{\"id\":\"2\",\"data\":{\"type\":\"a\"}},{\"id\":\"3\",\"data\":{\"type\":\"a\"}},{\"id\":\"4\",\"data\":{\"type\":\"c\"}},{\"id\":\"5\",\"data\":{\"type\":\"a\"}},{\"id\":\"6\",\"data\":{\"type\":\"b\"}},{\"id\":\"7\",\"data\":{\"type\":\"b\"}},{\"id\":\"8\",\"data\":{\"type\":\"c\"}},{\"id\":\"9\",\"data\":{\"type\":\"d\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0', data: { type: 'a' } },\n { id: '1', data: { type: 'a' } },\n { id: '2', data: { type: 'a' } },\n { id: '3', data: { type: 'a' } },\n { id: '4', data: { type: 'c' } },\n { id: '5', data: { type: 'a' } },\n { id: '6', data: { type: 'b' } },\n { id: '7', data: { type: 'b' } },\n { id: '8', data: { type: 'c' } },\n { id: '9', data: { type: 'd' } },\n { id: '10', data: { type: 'd' } },\n { id: '11', data: { type: 'b' } },\n { id: '12', data: { type: 'c' } },\n { id: '13', data: { type: 'b' } },\n { id: '14', data: { type: 'd' } },\n { id: '15', data: { type: 'd' } },\n { id: '16', data: { type: 'b' } },\n { id: '17', data: { type: 'c' } },\n { id: '18', data: { type: 'c' } },\n { id: '19', data: { type: 'b' } },\n { id: '20', data: { type: 'b' } },\n { id: '21', data: { type: 'd' } },\n { id: '22', data: { type: 'd' } },\n { id: '23', data: { type: 'd' } },\n { id: '24', data: { type: 'a' } },\n { id: '25', data: { type: 'a' } },\n { id: '26', data: { type: 'b' } },\n { id: '27', data: { type: 'b' } },\n { id: '28', data: { type: 'd' } },\n { id: '29', data: { type: 'c' } },\n { id: '30', data: { type: 'c' } },\n { id: '31', data: { type: 'b' } },\n { id: '32', data: { type: 'b' } },\n { id: '33', data: { type: 'a' } },\n ],\n edges: [\n { source: '0', target: '1' },\n { source: '0', target: '2' },\n { source: '0', target: '3' },\n { source: '0', target: '4' },\n { source: '0', target: '5' },\n { source: '0', target: '7' },\n { source: '0', target: '8' },\n { source: '0', target: '9' },\n { source: '0', target: '10' },\n { source: '0', target: '11' },\n { source: '0', target: '13' },\n { source: '0', target: '14' },\n { source: '0', target: '15' },\n { source: '0', target: '16' },\n { source: '2', target: '3' },\n { source: '4', target: '5' },\n { source: '4', target: '6' },\n { source: '5', target: '6' },\n { source: '7', target: '13' },\n { source: '8', target: '14' },\n { source: '9', target: '10' },\n { source: '10', target: '22' },\n { source: '10', target: '14' },\n { source: '10', target: '12' },\n { source: '10', target: '24' },\n { source: '10', target: '21' },\n { source: '10', target: '20' },\n { source: '11', target: '24' },\n { source: '11', target: '22' },\n { source: '11', target: '14' },\n { source: '12', target: '13' },\n { source: '16', target: '17' },\n { source: '16', target: '18' },\n { source: '16', target: '21' },\n { source: '16', target: '22' },\n { source: '17', target: '18' },\n { source: '17', target: '20' },\n { source: '18', target: '19' },\n { source: '19', target: '20' },\n { source: '19', target: '33' },\n { source: '19', target: '22' },\n { source: '19', target: '23' },\n { source: '20', target: '21' },\n { source: '21', target: '22' },\n { source: '22', target: '24' },\n { source: '22', target: '25' },\n { source: '22', target: '26' },\n { source: '22', target: '23' },\n { source: '22', target: '28' },\n { source: '22', target: '30' },\n { source: '22', target: '31' },\n { source: '22', target: '32' },\n { source: '22', target: '33' },\n { source: '23', target: '28' },\n { source: '23', target: '27' },\n { source: '23', target: '29' },\n { source: '23', target: '30' },\n { source: '23', target: '31' },\n { source: '23', target: '33' },\n { source: '32', target: '33' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'center',\n data,\n layout: {\n type: 'radial',\n nodeSize: 32,\n unitRadius: 90,\n linkDistance: 200,\n preventOverlap: true,\n sortBy: 'type',\n sortStrength: 50,\n },\n node: {\n style: {\n labelFill: '#fff',\n labelPlacement: 'center',\n labelText: (d) => d.id,\n },\n palette: {\n type: 'group',\n field: 'type',\n },\n },\n edge: {\n style: {\n endArrow: true,\n },\n },\n behaviors: ['drag-canvas', 'drag-element'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [\n {\"id\":\"0\",\"data\":{\"type\":\"a\"}},\n {\"id\":\"1\",\"data\":{\"type\":\"a\"}},\n {\"id\":\"2\",\"data\":{\"type\":\"a\"}},\n {\"id\":\"3\",\"data\":{\"type\":\"a\"}},\n {\"id\":\"4\",\"data\":{\"type\":\"c\"}},\n {\"id\":\"5\",\"data\":{\"type\":\"a\"}},\n {\"id\":\"6\",\"data\":{\"type\":\"b\"}},\n {\"id\":\"7\",\"data\":{\"type\":\"b\"}},\n {\"id\":\"8\",\"data\":{\"type\":\"c\"}},\n {\"id\":\"9\",\"data\":{\"type\":\"d\"}}\n];\n\nconst edges = [];\nconst edgeSet = new Set();\nconst connections = [\n ['0', '1'], ['0', '2'], ['1', '3'], ['2', '4'], \n ['3', '5'], ['4', '6'], ['5', '7'], ['6', '8'], \n ['7', '9'], ['8', '9'], ['1', '6'], ['2', '7'], ['3', '8']\n];\n\nconnections.forEach(([source, target]) => {\n const key = `${source}-${target}`;\n const reverseKey = `${target}-${source}`;\n if (!edgeSet.has(key) && !edgeSet.has(reverseKey)) {\n edgeSet.add(key);\n edges.push({ source, target });\n }\n});\n\nconst graph = new Graph({\n container: 'container',\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: 40,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n palette: {\n type: 'group',\n field: 'type',\n color: ['#1783FF', '#00C9C9', '#F08F56', '#D580FF'],\n },\n },\n edge: {\n style: {\n stroke: '#bfbfbf',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'radial',\n unitRadius: 100,\n preventOverlap: true,\n nodeSize: 40,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "duration": 17824, + "retrievedSkillIds": [ + "g6-layout-grid", + "g6-layout-mindmap", + "g6-node-circle", + "g6-layout-dagre", + "g6-behavior-drag-element" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1524, + "expectedLength": 4086, + "similarity": 0.49724088601212457, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [\n {\"id\":\"0\",\"data\":{\"type\":\"a\"}},\n {\"id\":\"1\",\"data\":{\"type\":\"a\"}},\n {\"id\":\"2\",\"data\":{\"type\":\"a\"}},\n {\"id\":\"3\",\"data\":{\"type\":\"a\"}},\n {\"id\":\"4\",\"data\":{\"type\":\"c\"}},\n {\"id\":\"5\",\"data\":{\"type\":\"a\"}},\n {\"id\":\"6\",\"data\":{\"type\":\"b\"}},\n {\"id\":\"7\",\"data\":{\"type\":\"b\"}},\n {\"id\":\"8\",\"data\":{\"type\":\"c\"}},\n {\"id\":\"9\",\"data\":{\"type\":\"d\"}}\n];\n\nconst edges = [];\nconst edgeSet = new Set();\nconst connections = [\n ['0', '1'], ['0', '2'], ['1', '3'], ['2', '4'], \n ['3', '5'], ['4', '6'], ['5', '7'], ['6', '8'], \n ['7', '9'], ['8', '9'], ['1', '6'], ['2', '7'], ['3', '8']\n];\n\nconnections.forEach(([source, target]) => {\n const key = `${source}-${target}`;\n const reverseKey = `${target}-${source}`;\n if (!edgeSet.has(key) && !edgeSet.has(reverseKey)) {\n edgeSet.add(key);\n edges.push({ source, target });\n }\n});\n\nconst graph = new Graph({\n container: 'container',\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: 40,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n palette: {\n type: 'group',\n field: 'type',\n color: ['#1783FF', '#00C9C9', '#F08F56', '#D580FF'],\n },\n },\n edge: {\n style: {\n stroke: '#bfbfbf',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'radial',\n unitRadius: 100,\n preventOverlap: true,\n nodeSize: 40,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Set", + "forEach", + "has", + "has", + "add", + "push", + "Graph", + "render" + ], + "objectKeys": [ + "container", + "data", + "node", + "type", + "style", + "size", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "palette", + "type", + "field", + "color", + "edge", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "unitRadius", + "preventOverlap", + "nodeSize", + "behaviors" + ], + "stringLiterals": [ + "id", + "data", + "type", + "id", + "data", + "type", + "id", + "data", + "type", + "id", + "data", + "type", + "id", + "data", + "type", + "id", + "data", + "type", + "id", + "data", + "type", + "id", + "data", + "type", + "id", + "data", + "type", + "id", + "data", + "type" + ], + "apiPatterns": [ + "new Graph" + ] + } + } + }, + { + "id": "case-41", + "query": "根据描述绘制图表,使用 G6 图表库创建一个力导向图,展示节点和边的关系,节点根据 cluster 字段进行颜色区分,并配有图例用于说明节点和边的类型。参考数据:[{\"id\":\"node-1\",\"type\":\"circle\",\"data\":{\"cluster\":\"node-type1\"}},{\"id\":\"node-2\",\"type\":\"rect\",\"data\":{\"cluster\":\"node-type2\"}},{\"id\":\"node-3\",\"type\":\"triangle\",\"data\":{\"cluster\":\"node-type3\"}},{\"id\":\"node-4\",\"type\":\"diamond\",\"data\":{\"cluster\":\"node-type4\"}},{\"source\":\"node-1\",\"target\":\"node-2\",\"data\":{\"cluster\":\"edge-type1\"}},{\"source\":\"node-1\",\"target\":\"node-4\",\"data\":{\"cluster\":\"edge-type2\"}},{\"source\":\"node-3\",\"target\":\"node-4\"},{\"source\":\"node-2\",\"target\":\"node-4\",\"data\":{\"cluster\":\"edge-type3\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', type: 'circle', data: { cluster: 'node-type1' } },\n { id: 'node-2', type: 'rect', data: { cluster: 'node-type2' } },\n { id: 'node-3', type: 'triangle', data: { cluster: 'node-type3' } },\n { id: 'node-4', type: 'diamond', data: { cluster: 'node-type4' } },\n ],\n edges: [\n { source: 'node-1', target: 'node-2', data: { cluster: 'edge-type1' } },\n { source: 'node-1', target: 'node-4', data: { cluster: 'edge-type2' } },\n { source: 'node-3', target: 'node-4' },\n { source: 'node-2', target: 'node-4', data: { cluster: 'edge-type3' } },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: { size: 32 },\n palette: {\n field: 'cluster',\n },\n },\n layout: {\n type: 'force',\n },\n plugins: [\n {\n type: 'legend',\n nodeField: 'cluster',\n edgeField: 'cluster',\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', data: { type: 'circle', cluster: 'node-type1' } },\n { id: 'node-2', data: { type: 'rect', cluster: 'node-type2' } },\n { id: 'node-3', data: { type: 'triangle', cluster: 'node-type3' } },\n { id: 'node-4', data: { type: 'diamond', cluster: 'node-type4' } }\n ],\n edges: [\n { id: 'edge-1', source: 'node-1', target: 'node-2', data: { cluster: 'edge-type1' } },\n { id: 'edge-2', source: 'node-1', target: 'node-4', data: { cluster: 'edge-type2' } },\n { id: 'edge-3', source: 'node-3', target: 'node-4', data: {} },\n { id: 'edge-4', source: 'node-2', target: 'node-4', data: { cluster: 'edge-type3' } }\n ]\n};\n\nconst nodeColors = {\n 'node-type1': '#5B8FF9',\n 'node-type2': '#5AD8A6',\n 'node-type3': '#5D7092',\n 'node-type4': '#F6BD16'\n};\n\nconst edgeColors = {\n 'edge-type1': '#5B8FF9',\n 'edge-type2': '#5AD8A6',\n 'edge-type3': '#F6BD16'\n};\n\nconst graph = new Graph({\n container: container,\n data: data,\n node: {\n type: (d) => d.data.type || 'circle',\n style: {\n size: 40,\n fill: (d) => nodeColors[d.data.cluster] || '#999',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.cluster,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12\n }\n },\n edge: {\n style: {\n stroke: (d) => edgeColors[d.data.cluster] || '#999',\n lineWidth: 2,\n endArrow: true,\n labelText: (d) => d.data.cluster || 'default',\n labelFontSize: 10,\n labelFill: '#666'\n }\n },\n layout: {\n type: 'force',\n linkDistance: 150,\n nodeStrength: 30,\n edgeStrength: 0.1\n },\n plugins: [\n {\n type: 'legend',\n nodeField: 'cluster',\n edgeField: 'cluster',\n position: 'top-left',\n itemConfig: {\n node: {\n style: {\n size: 10\n }\n },\n edge: {\n style: {\n lineWidth: 2\n }\n }\n }\n }\n ],\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element-force']\n});\n\ngraph.render();", + "duration": 21219, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-layout-circular", + "g6-layout-mindmap", + "g6-behavior-drag-element", + "g6-core-graph-init" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2073, + "expectedLength": 958, + "similarity": 0.9267385963038137, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', data: { type: 'circle', cluster: 'node-type1' } },\n { id: 'node-2', data: { type: 'rect', cluster: 'node-type2' } },\n { id: 'node-3', data: { type: 'triangle', cluster: 'node-type3' } },\n { id: 'node-4', data: { type: 'diamond', cluster: 'node-type4' } }\n ],\n edges: [\n { id: 'edge-1', source: 'node-1', target: 'node-2', data: { cluster: 'edge-type1' } },\n { id: 'edge-2', source: 'node-1', target: 'node-4', data: { cluster: 'edge-type2' } },\n { id: 'edge-3', source: 'node-3', target: 'node-4', data: {} },\n { id: 'edge-4', source: 'node-2', target: 'node-4', data: { cluster: 'edge-type3' } }\n ]\n};\n\nconst nodeColors = {\n 'node-type1': '#5B8FF9',\n 'node-type2': '#5AD8A6',\n 'node-type3': '#5D7092',\n 'node-type4': '#F6BD16'\n};\n\nconst edgeColors = {\n 'edge-type1': '#5B8FF9',\n 'edge-type2': '#5AD8A6',\n 'edge-type3': '#F6BD16'\n};\n\nconst graph = new Graph({\n container: container,\n data: data,\n node: {\n type: (d) => d.data.type || 'circle',\n style: {\n size: 40,\n fill: (d) => nodeColors[d.data.cluster] || '#999',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.cluster,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12\n }\n },\n edge: {\n style: {\n stroke: (d) => edgeColors[d.data.cluster] || '#999',\n lineWidth: 2,\n endArrow: true,\n labelText: (d) => d.data.cluster || 'default',\n labelFontSize: 10,\n labelFill: '#666'\n }\n },\n layout: {\n type: 'force',\n linkDistance: 150,\n nodeStrength: 30,\n edgeStrength: 0.1\n },\n plugins: [\n {\n type: 'legend',\n nodeField: 'cluster',\n edgeField: 'cluster',\n position: 'top-left',\n itemConfig: {\n node: {\n style: {\n size: 10\n }\n },\n edge: {\n style: {\n lineWidth: 2\n }\n }\n }\n }\n ],\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element-force']\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "type", + "cluster", + "id", + "data", + "type", + "cluster", + "id", + "data", + "type", + "cluster", + "id", + "data", + "type", + "cluster", + "edges", + "id", + "source", + "target", + "data", + "cluster", + "id", + "source", + "target", + "data", + "cluster", + "id", + "source", + "target", + "data", + "id", + "source", + "target", + "data", + "cluster", + "container", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "style", + "stroke", + "lineWidth", + "endArrow", + "labelText", + "labelFontSize", + "labelFill", + "layout", + "type", + "linkDistance", + "nodeStrength", + "edgeStrength", + "plugins", + "type", + "nodeField", + "edgeField", + "position", + "itemConfig", + "node", + "style", + "size", + "edge", + "style", + "lineWidth", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-42", + "query": "根据描述绘制图表,使用 G6 库将一个具有三层嵌套结构的树形数据转换为图形数据并渲染成一棵右到左方向的水平脑图。节点显示文本为其 id 属性,并支持左侧和右侧连接线端点。通过 cubic-horizontal 类型的边连接父子节点,整体布局采用 mindmap 类型,具备折叠展开、画布拖拽与缩放等交互行为。参考数据:[{\"id\":\"Modeling Methods\",\"children\":[{\"id\":\"Classification\",\"children\":[{\"id\":\"Logistic regression\"},{\"id\":\"Linear discriminant analysis\"},{\"id\":\"Rules\"},{\"id\":\"Decision trees\"},{\"id\":\"Naive Bayes\"},{\"id\":\"K nearest neighbor\"},{\"id\":\"Probabilistic neural network\"},{\"id\":\"Support vector machine\"}]},{\"id\":\"Consensus\",\"children\":[{\"id\":\"Models diversity\",\"children\":[{\"id\":\"Different initializations\"},{\"id\":\"Different parameter choices\"},{\"id\":\"Different architectures\"},{\"id\":\"Different modeling methods\"},{\"id\":\"Different training sets\"},{\"id\":\"Different feature sets\"}]},{\"id\":\"Methods\",\"children\":[{\"id\":\"Classifier selection\"},{\"id\":\"Classifier fusion\"}]},{\"id\":\"Common\",\"children\":[{\"id\":\"Bagging\"},{\"id\":\"Boosting\"},{\"id\":\"AdaBoost\"}]}]},{\"id\":\"Regression\",\"children\":[{\"id\":\"Multiple linear regression\"},{\"id\":\"Partial least squares\"},{\"id\":\"Multi-layer feedforward neural network\"},{\"id\":\"General regression neural network\"},{\"id\":\"Support vector regression\"}]}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst data = {\n \"id\": \"Modeling Methods\",\n \"children\": [\n {\n \"id\": \"Classification\",\n \"children\": [\n {\n \"id\": \"Logistic regression\"\n },\n {\n \"id\": \"Linear discriminant analysis\"\n },\n {\n \"id\": \"Rules\"\n },\n {\n \"id\": \"Decision trees\"\n },\n {\n \"id\": \"Naive Bayes\"\n },\n {\n \"id\": \"K nearest neighbor\"\n },\n {\n \"id\": \"Probabilistic neural network\"\n },\n {\n \"id\": \"Support vector machine\"\n }\n ]\n },\n {\n \"id\": \"Consensus\",\n \"children\": [\n {\n \"id\": \"Models diversity\",\n \"children\": [\n {\n \"id\": \"Different initializations\"\n },\n {\n \"id\": \"Different parameter choices\"\n },\n {\n \"id\": \"Different architectures\"\n },\n {\n \"id\": \"Different modeling methods\"\n },\n {\n \"id\": \"Different training sets\"\n },\n {\n \"id\": \"Different feature sets\"\n }\n ]\n },\n {\n \"id\": \"Methods\",\n \"children\": [\n {\n \"id\": \"Classifier selection\"\n },\n {\n \"id\": \"Classifier fusion\"\n }\n ]\n },\n {\n \"id\": \"Common\",\n \"children\": [\n {\n \"id\": \"Bagging\"\n },\n {\n \"id\": \"Boosting\"\n },\n {\n \"id\": \"AdaBoost\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"Regression\",\n \"children\": [\n {\n \"id\": \"Multiple linear regression\"\n },\n {\n \"id\": \"Partial least squares\"\n },\n {\n \"id\": \"Multi-layer feedforward neural network\"\n },\n {\n \"id\": \"General regression neural network\"\n },\n {\n \"id\": \"Support vector regression\"\n }\n ]\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: treeToGraphData(data),\n node: {\n style: {\n labelText: (d) => d.id,\n labelPlacement: 'left',\n labelBackground: true,\n ports: [{ placement: 'right' }, { placement: 'left' }],\n },\n animation: {\n enter: false,\n },\n },\n edge: {\n type: 'cubic-horizontal',\n animation: {\n enter: false,\n },\n },\n layout: {\n type: 'mindmap',\n direction: 'RL',\n getHeight: () => 32,\n getWidth: () => 32,\n getVGap: () => 4,\n getHGap: () => 100,\n },\n behaviors: ['collapse-expand', 'drag-canvas', 'zoom-canvas'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n width: 1000,\n height: 800,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'rect',\n style: {\n size: [180, 36],\n radius: 18,\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#333',\n labelFontSize: 12,\n ports: [\n { key: 'left', placement: 'left' },\n { key: 'right', placement: 'right' }\n ]\n }\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5\n }\n },\n layout: {\n type: 'mindmap',\n direction: 'RL',\n getWidth: () => 180,\n getHeight: () => 36,\n getHGap: () => 50,\n getVGap: () => 10\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true\n }\n ]\n});\n\ngraph.render();", + "duration": 16580, + "retrievedSkillIds": [ + "g6-layout-mindmap", + "g6-pattern-tree-graph", + "g6-behavior-drag-element", + "g6-core-graph-init", + "g6-node-circle" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2521, + "expectedLength": 2928, + "similarity": 0.7775433337452828, + "extractedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n width: 1000,\n height: 800,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'rect',\n style: {\n size: [180, 36],\n radius: 18,\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#333',\n labelFontSize: 12,\n ports: [\n { key: 'left', placement: 'left' },\n { key: 'right', placement: 'right' }\n ]\n }\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5\n }\n },\n layout: {\n type: 'mindmap',\n direction: 'RL',\n getWidth: () => 180,\n getHeight: () => 36,\n getHGap: () => 50,\n getVGap: () => 10\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true\n }\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "treeToGraphData" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "treeToGraphData", + "render" + ], + "objectKeys": [ + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "container", + "width", + "height", + "autoFit", + "data", + "node", + "type", + "style", + "size", + "radius", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "ports", + "key", + "placement", + "key", + "placement", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "direction", + "getWidth", + "getHeight", + "getHGap", + "getVGap", + "behaviors", + "type", + "trigger", + "animation" + ], + "stringLiterals": [], + "apiPatterns": [ + "view.children", + "new Graph" + ] + } + } + }, + { + "id": "case-43", + "query": "根据描述绘制图表,创建了一个基于 G6 的图实例,设置了容器和静态的节点与边数据,启用了套索选择交互行为,最后渲染了图形。参考数据:[{\"id\":\"node-1\",\"style\":{\"x\":200,\"y\":250}},{\"id\":\"node-2\",\"style\":{\"x\":250,\"y\":200}},{\"id\":\"node-3\",\"style\":{\"x\":300,\"y\":250}},{\"id\":\"node-4\",\"style\":{\"x\":250,\"y\":300}},{\"source\":\"node-1\",\"target\":\"node-2\"},{\"source\":\"node-2\",\"target\":\"node-3\"},{\"source\":\"node-3\",\"target\":\"node-4\"},{\"source\":\"node-4\",\"target\":\"node-1\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node-1', style: { x: 200, y: 250 } },\n { id: 'node-2', style: { x: 250, y: 200 } },\n { id: 'node-3', style: { x: 300, y: 250 } },\n { id: 'node-4', style: { x: 250, y: 300 } },\n ],\n edges: [\n { source: 'node-1', target: 'node-2' },\n { source: 'node-2', target: 'node-3' },\n { source: 'node-3', target: 'node-4' },\n { source: 'node-4', target: 'node-1' },\n ],\n },\n behaviors: [\n {\n key: 'lasso-select',\n type: 'lasso-select',\n enable: true,\n animation: false,\n mode: 'default', // union intersect diff default\n state: 'selected', // 'active', 'selected', 'inactive', ...\n trigger: [], // ['Shift', 'Alt', 'Control', 'Drag', 'Meta', ...]\n style: {\n width: 0,\n height: 0,\n lineWidth: 4,\n lineDash: [2, 2],\n fill: 'linear-gradient(217deg, rgba(255,0,0,.8), rgba(255,0,0,0) 70.71%),linear-gradient(127deg, rgba(0,255,0,.8), rgba(0,255,0,0) 70.71%),linear-gradient(336deg, rgba(0,0,255,.8), rgba(0,0,255,0) 70.71%)',\n stroke: 'pink',\n fillOpacity: 0.2,\n zIndex: 2,\n pointerEvents: 'none',\n },\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: container,\n data: {\n nodes: [\n { id: 'node-1', style: { x: 200, y: 250 } },\n { id: 'node-2', style: { x: 250, y: 200 } },\n { id: 'node-3', style: { x: 300, y: 250 } },\n { id: 'node-4', style: { x: 250, y: 300 } },\n ],\n edges: [\n { source: 'node-1', target: 'node-2' },\n { source: 'node-2', target: 'node-3' },\n { source: 'node-3', target: 'node-4' },\n { source: 'node-4', target: 'node-1' },\n ],\n },\n behaviors: ['lasso-select'],\n});\n\ngraph.render();", + "duration": 10552, + "retrievedSkillIds": [ + "g6-core-graph-init", + "g6-node-circle", + "g6-node-react", + "g6-core-transforms-animation", + "g6-behavior-drag-element" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 579, + "expectedLength": 1299, + "similarity": 0.7927092677092678, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: container,\n data: {\n nodes: [\n { id: 'node-1', style: { x: 200, y: 250 } },\n { id: 'node-2', style: { x: 250, y: 200 } },\n { id: 'node-3', style: { x: 300, y: 250 } },\n { id: 'node-4', style: { x: 250, y: 300 } },\n ],\n edges: [\n { source: 'node-1', target: 'node-2' },\n { source: 'node-2', target: 'node-3' },\n { source: 'node-3', target: 'node-4' },\n { source: 'node-4', target: 'node-1' },\n ],\n },\n behaviors: ['lasso-select'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "container", + "data", + "nodes", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-44", + "query": "根据描述绘制图表,使用 G6 构建了一个图结构可视化,包含 6 个节点和 9 条边,并采用网格布局展示。支持画布拖拽交互,并添加了网格线作为辅助插件。整个图结构通过 render 方法进行渲染。参考数据:[{\"id\":\"node-0\"},{\"id\":\"node-1\"},{\"id\":\"node-2\"},{\"id\":\"node-3\"},{\"id\":\"node-4\"},{\"id\":\"node-5\"},{\"source\":\"node-0\",\"target\":\"node-1\"},{\"source\":\"node-0\",\"target\":\"node-2\"},{\"source\":\"node-0\",\"target\":\"node-3\"},{\"source\":\"node-0\",\"target\":\"node-4\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [{ id: 'node-0' }, { id: 'node-1' }, { id: 'node-2' }, { id: 'node-3' }, { id: 'node-4' }, { id: 'node-5' }],\n edges: [\n { source: 'node-0', target: 'node-1' },\n { source: 'node-0', target: 'node-2' },\n { source: 'node-0', target: 'node-3' },\n { source: 'node-0', target: 'node-4' },\n { source: 'node-1', target: 'node-0' },\n { source: 'node-2', target: 'node-0' },\n { source: 'node-3', target: 'node-0' },\n { source: 'node-4', target: 'node-0' },\n { source: 'node-5', target: 'node-0' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: { type: 'grid' },\n behaviors: ['drag-canvas'],\n plugins: [{ key: 'grid-line', type: 'grid-line', follow: false }],\n});\n\ngraph.render();", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node-0' },\n { id: 'node-1' },\n { id: 'node-2' },\n { id: 'node-3' },\n { id: 'node-4' },\n { id: 'node-5' },\n ],\n edges: [\n { source: 'node-0', target: 'node-1' },\n { source: 'node-0', target: 'node-2' },\n { source: 'node-0', target: 'node-3' },\n { source: 'node-0', target: 'node-4' },\n { source: 'node-1', target: 'node-5' },\n { source: 'node-2', target: 'node-5' },\n { source: 'node-3', target: 'node-5' },\n { source: 'node-1', target: 'node-2' },\n { source: 'node-3', target: 'node-4' },\n ],\n },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n rowGap: 80,\n colGap: 80,\n },\n behaviors: ['drag-canvas', 'zoom-canvas'],\n plugins: ['grid-line'],\n});\n\ngraph.render();", + "duration": 7103, + "retrievedSkillIds": [ + "g6-behavior-canvas-nav", + "g6-layout-grid", + "g6-node-rect", + "g6-node-circle", + "g6-behavior-drag-element" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 884, + "expectedLength": 792, + "similarity": 0.9254607106000294, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node-0' },\n { id: 'node-1' },\n { id: 'node-2' },\n { id: 'node-3' },\n { id: 'node-4' },\n { id: 'node-5' },\n ],\n edges: [\n { source: 'node-0', target: 'node-1' },\n { source: 'node-0', target: 'node-2' },\n { source: 'node-0', target: 'node-3' },\n { source: 'node-0', target: 'node-4' },\n { source: 'node-1', target: 'node-5' },\n { source: 'node-2', target: 'node-5' },\n { source: 'node-3', target: 'node-5' },\n { source: 'node-1', target: 'node-2' },\n { source: 'node-3', target: 'node-4' },\n ],\n },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n rowGap: 80,\n colGap: 80,\n },\n behaviors: ['drag-canvas', 'zoom-canvas'],\n plugins: ['grid-line'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "container", + "data", + "nodes", + "id", + "id", + "id", + "id", + "id", + "id", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "layout", + "type", + "rows", + "cols", + "rowGap", + "colGap", + "behaviors", + "plugins" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-45", + "query": "根据描述绘制图表,使用 G6 创建一个图实例,设置容器和基础配置。定义了六个节点和五条边的数据,采用网格布局展示节点。添加了点击和悬停两种 Tooltip 插件用于显示元素信息,并启用画布和元素拖拽交互行为。最后调用 render 方法渲染图形。参考数据:[{\"id\":\"0\",\"data\":{\"label\":\"node-0\",\"description\":\"This is node-0.\"}},{\"id\":\"1\",\"data\":{\"label\":\"node-1\",\"description\":\"This is node-1.\"}},{\"id\":\"2\",\"data\":{\"label\":\"node-2\",\"description\":\"This is node-2.\"}},{\"id\":\"3\",\"data\":{\"label\":\"node-3\",\"description\":\"This is node-3.\"}},{\"id\":\"4\",\"data\":{\"label\":\"node-4\",\"description\":\"This is node-4.\"}},{\"id\":\"5\",\"data\":{\"label\":\"node-5\",\"description\":\"This is node-5.\"}},{\"source\":\"0\",\"target\":\"1\",\"data\":{\"description\":\"This is edge from node 0 to node 1.\"}},{\"source\":\"0\",\"target\":\"2\",\"data\":{\"description\":\"This is edge from node 0 to node 2.\"}},{\"source\":\"0\",\"target\":\"3\",\"data\":{\"description\":\"This is edge from node 0 to node 3.\"}},{\"source\":\"0\",\"target\":\"4\",\"data\":{\"description\":\"This is edge from node 0 to node 4.\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: '0', data: { label: 'node-0', description: 'This is node-0.' } },\n { id: '1', data: { label: 'node-1', description: 'This is node-1.' } },\n { id: '2', data: { label: 'node-2', description: 'This is node-2.' } },\n { id: '3', data: { label: 'node-3', description: 'This is node-3.' } },\n { id: '4', data: { label: 'node-4', description: 'This is node-4.' } },\n { id: '5', data: { label: 'node-5', description: 'This is node-5.' } },\n ],\n edges: [\n { source: '0', target: '1', data: { description: 'This is edge from node 0 to node 1.' } },\n { source: '0', target: '2', data: { description: 'This is edge from node 0 to node 2.' } },\n { source: '0', target: '3', data: { description: 'This is edge from node 0 to node 3.' } },\n { source: '0', target: '4', data: { description: 'This is edge from node 0 to node 4.' } },\n { source: '0', target: '5', data: { description: 'This is edge from node 0 to node 5.' } },\n ],\n },\n layout: {\n type: 'grid',\n },\n plugins: [\n function () {\n return {\n key: 'tooltip-click',\n type: 'tooltip',\n trigger: 'click',\n getContent: (evt, items) => {\n return `
click ${items[0].id}
`;\n },\n onOpenChange: (open) => {\n const tooltip = this.getPluginInstance('tooltip-hover');\n if (tooltip && open) tooltip.hide();\n },\n };\n },\n function () {\n return {\n key: 'tooltip-hover',\n type: 'tooltip',\n trigger: 'hover',\n enable: (e) => {\n const tooltip = this.getPluginInstance('tooltip-click');\n return e.target.id !== tooltip.currentTarget;\n },\n getContent: (evt, items) => {\n return `
hover ${items[0].id}
`;\n },\n onOpenChange: (open) => {\n const tooltip = this.getPluginInstance('tooltip-click');\n if (tooltip && open) {\n tooltip.hide();\n }\n },\n };\n },\n ],\n behaviors: ['drag-canvas', 'drag-element'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0', data: { label: 'node-0', description: 'This is node-0.' } },\n { id: '1', data: { label: 'node-1', description: 'This is node-1.' } },\n { id: '2', data: { label: 'node-2', description: 'This is node-2.' } },\n { id: '3', data: { label: 'node-3', description: 'This is node-3.' } },\n { id: '4', data: { label: 'node-4', description: 'This is node-4.' } },\n { id: '5', data: { label: 'node-5', description: 'This is node-5.' } },\n ],\n edges: [\n { id: 'e0-1', source: '0', target: '1', data: { description: 'This is edge from node 0 to node 1.' } },\n { id: 'e0-2', source: '0', target: '2', data: { description: 'This is edge from node 0 to node 2.' } },\n { id: 'e0-3', source: '0', target: '3', data: { description: 'This is edge from node 0 to node 3.' } },\n { id: 'e0-4', source: '0', target: '4', data: { description: 'This is edge from node 0 to node 4.' } },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n data,\n layout: {\n type: 'grid',\n cols: 3,\n },\n node: {\n style: {\n size: 60,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true,\n },\n },\n plugins: [\n {\n type: 'tooltip',\n trigger: 'click',\n getContent: (e, items) => {\n const item = items[0];\n return `
${item.data?.description || ''}
`;\n },\n },\n {\n type: 'tooltip',\n trigger: 'pointerenter',\n getContent: (e, items) => {\n const item = items[0];\n return `
${item.data?.description || ''}
`;\n },\n },\n ],\n behaviors: ['drag-canvas', 'drag-element'],\n});\n\ngraph.render();", + "duration": 70312, + "retrievedSkillIds": [ + "g6-core-graph-init", + "g6-node-html", + "g6-node-react", + "g6-core-transforms-animation", + "g6-node-rect" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1953, + "expectedLength": 2185, + "similarity": 0.8497707680250784, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0', data: { label: 'node-0', description: 'This is node-0.' } },\n { id: '1', data: { label: 'node-1', description: 'This is node-1.' } },\n { id: '2', data: { label: 'node-2', description: 'This is node-2.' } },\n { id: '3', data: { label: 'node-3', description: 'This is node-3.' } },\n { id: '4', data: { label: 'node-4', description: 'This is node-4.' } },\n { id: '5', data: { label: 'node-5', description: 'This is node-5.' } },\n ],\n edges: [\n { id: 'e0-1', source: '0', target: '1', data: { description: 'This is edge from node 0 to node 1.' } },\n { id: 'e0-2', source: '0', target: '2', data: { description: 'This is edge from node 0 to node 2.' } },\n { id: 'e0-3', source: '0', target: '3', data: { description: 'This is edge from node 0 to node 3.' } },\n { id: 'e0-4', source: '0', target: '4', data: { description: 'This is edge from node 0 to node 4.' } },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n data,\n layout: {\n type: 'grid',\n cols: 3,\n },\n node: {\n style: {\n size: 60,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true,\n },\n },\n plugins: [\n {\n type: 'tooltip',\n trigger: 'click',\n getContent: (e, items) => {\n const item = items[0];\n return `
${item.data?.description || ''}
`;\n },\n },\n {\n type: 'tooltip',\n trigger: 'pointerenter',\n getContent: (e, items) => {\n const item = items[0];\n return `
${item.data?.description || ''}
`;\n },\n },\n ],\n behaviors: ['drag-canvas', 'drag-element'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "description", + "id", + "data", + "label", + "description", + "id", + "data", + "label", + "description", + "id", + "data", + "label", + "description", + "id", + "data", + "label", + "description", + "id", + "data", + "label", + "description", + "edges", + "id", + "source", + "target", + "data", + "description", + "id", + "source", + "target", + "data", + "description", + "id", + "source", + "target", + "data", + "description", + "id", + "source", + "target", + "data", + "description", + "container", + "layout", + "type", + "cols", + "node", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "edge", + "style", + "stroke", + "lineWidth", + "endArrow", + "plugins", + "type", + "trigger", + "getContent", + "padding", + "width", + "type", + "trigger", + "getContent", + "padding", + "width", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-46", + "query": "根据描述绘制图表,使用 G6 渲染一个静态的节点和边构成的图结构,节点包含位置和大小信息,边表示节点之间的连接关系,并为节点和边配置了标签显示样式,同时启用画布的缩放与拖拽交互。参考数据:[{\"id\":\"node0\",\"size\":50,\"label\":\"0\",\"style\":{\"x\":326,\"y\":268}},{\"id\":\"node1\",\"size\":30,\"label\":\"1\",\"style\":{\"x\":280,\"y\":384}},{\"id\":\"node2\",\"size\":30,\"label\":\"2\",\"style\":{\"x\":234,\"y\":167}},{\"id\":\"node3\",\"size\":30,\"label\":\"3\",\"style\":{\"x\":391,\"y\":368}},{\"id\":\"node4\",\"size\":30,\"label\":\"4\",\"style\":{\"x\":444,\"y\":209}},{\"id\":\"node5\",\"size\":30,\"label\":\"5\",\"style\":{\"x\":378,\"y\":157}},{\"id\":\"node6\",\"size\":15,\"label\":\"6\",\"style\":{\"x\":229,\"y\":400}},{\"id\":\"node7\",\"size\":15,\"label\":\"7\",\"style\":{\"x\":281,\"y\":440}},{\"id\":\"node8\",\"size\":15,\"label\":\"8\",\"style\":{\"x\":188,\"y\":119}},{\"id\":\"node9\",\"size\":15,\"label\":\"9\",\"style\":{\"x\":287,\"y\":157}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node0', size: 50, label: '0', style: { x: 326, y: 268 } },\n { id: 'node1', size: 30, label: '1', style: { x: 280, y: 384 } },\n { id: 'node2', size: 30, label: '2', style: { x: 234, y: 167 } },\n { id: 'node3', size: 30, label: '3', style: { x: 391, y: 368 } },\n { id: 'node4', size: 30, label: '4', style: { x: 444, y: 209 } },\n { id: 'node5', size: 30, label: '5', style: { x: 378, y: 157 } },\n { id: 'node6', size: 15, label: '6', style: { x: 229, y: 400 } },\n { id: 'node7', size: 15, label: '7', style: { x: 281, y: 440 } },\n { id: 'node8', size: 15, label: '8', style: { x: 188, y: 119 } },\n { id: 'node9', size: 15, label: '9', style: { x: 287, y: 157 } },\n { id: 'node10', size: 15, label: '10', style: { x: 185, y: 200 } },\n { id: 'node11', size: 15, label: '11', style: { x: 238, y: 110 } },\n { id: 'node12', size: 15, label: '12', style: { x: 239, y: 221 } },\n { id: 'node13', size: 15, label: '13', style: { x: 176, y: 160 } },\n { id: 'node14', size: 15, label: '14', style: { x: 389, y: 423 } },\n { id: 'node15', size: 15, label: '15', style: { x: 441, y: 341 } },\n { id: 'node16', size: 15, label: '16', style: { x: 442, y: 398 } },\n ],\n edges: [\n { source: 'node0', target: 'node1', label: '0-1' },\n { source: 'node0', target: 'node2', label: '0-2' },\n { source: 'node0', target: 'node3', label: '0-3' },\n { source: 'node0', target: 'node4', label: '0-4' },\n { source: 'node0', target: 'node5', label: '0-5' },\n { source: 'node1', target: 'node6', label: '1-6' },\n { source: 'node1', target: 'node7', label: '1-7' },\n { source: 'node2', target: 'node8', label: '2-8' },\n { source: 'node2', target: 'node9', label: '2-9' },\n { source: 'node2', target: 'node10', label: '2-10' },\n { source: 'node2', target: 'node11', label: '2-11' },\n { source: 'node2', target: 'node12', label: '2-12' },\n { source: 'node2', target: 'node13', label: '2-13' },\n { source: 'node3', target: 'node14', label: '3-14' },\n { source: 'node3', target: 'node15', label: '3-15' },\n { source: 'node3', target: 'node16', label: '3-16' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n labelText: (d) => d.id,\n labelMaxWidth: '200%',\n labelWordWrap: true,\n size: (d) => d.size,\n },\n },\n edge: {\n style: {\n labelText: (d) => `${d.source}-${d.target}`,\n labelWordWrap: true,\n labelMaxLines: 2,\n labelMaxWidth: '60%',\n },\n },\n behaviors: [\n {\n type: 'fix-element-size',\n key: 'fix-element-size',\n enable: true,\n node: [\n {\n shape: (shapes) =>\n shapes.find((shape) => shape.parentElement?.className === 'label' && shape.className === 'text'),\n fields: ['fontSize', 'lineHeight'],\n },\n ],\n edge: [\n {\n shape: (shapes) =>\n shapes.find((shape) => shape.parentElement?.className === 'label' && shape.className === 'text'),\n fields: ['fontSize', 'lineHeight'],\n },\n ],\n },\n 'zoom-canvas',\n 'drag-canvas',\n ],\n autoFit: 'center',\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node0', data: { label: '0' }, style: { x: 326, y: 268, size: 50 } },\n { id: 'node1', data: { label: '1' }, style: { x: 280, y: 384, size: 30 } },\n { id: 'node2', data: { label: '2' }, style: { x: 234, y: 167, size: 30 } },\n { id: 'node3', data: { label: '3' }, style: { x: 391, y: 368, size: 30 } },\n { id: 'node4', data: { label: '4' }, style: { x: 444, y: 209, size: 30 } },\n { id: 'node5', data: { label: '5' }, style: { x: 378, y: 157, size: 30 } },\n { id: 'node6', data: { label: '6' }, style: { x: 229, y: 400, size: 15 } },\n { id: 'node7', data: { label: '7' }, style: { x: 281, y: 440, size: 15 } },\n { id: 'node8', data: { label: '8' }, style: { x: 188, y: 119, size: 15 } },\n { id: 'node9', data: { label: '9' }, style: { x: 287, y: 157, size: 15 } },\n ],\n edges: [\n { source: 'node0', target: 'node1' },\n { source: 'node0', target: 'node2' },\n { source: 'node0', target: 'node3' },\n { source: 'node0', target: 'node4' },\n { source: 'node0', target: 'node5' },\n { source: 'node1', target: 'node6' },\n { source: 'node1', target: 'node7' },\n { source: 'node2', target: 'node8' },\n { source: 'node2', target: 'node9' },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n data,\n node: {\n type: 'circle',\n style: {\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 1,\n endArrow: true,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "duration": 22750, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-behavior-canvas-nav", + "g6-node-image", + "g6-node-rect", + "g6-node-html" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1742, + "expectedLength": 3227, + "similarity": 1, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node0', data: { label: '0' }, style: { x: 326, y: 268, size: 50 } },\n { id: 'node1', data: { label: '1' }, style: { x: 280, y: 384, size: 30 } },\n { id: 'node2', data: { label: '2' }, style: { x: 234, y: 167, size: 30 } },\n { id: 'node3', data: { label: '3' }, style: { x: 391, y: 368, size: 30 } },\n { id: 'node4', data: { label: '4' }, style: { x: 444, y: 209, size: 30 } },\n { id: 'node5', data: { label: '5' }, style: { x: 378, y: 157, size: 30 } },\n { id: 'node6', data: { label: '6' }, style: { x: 229, y: 400, size: 15 } },\n { id: 'node7', data: { label: '7' }, style: { x: 281, y: 440, size: 15 } },\n { id: 'node8', data: { label: '8' }, style: { x: 188, y: 119, size: 15 } },\n { id: 'node9', data: { label: '9' }, style: { x: 287, y: 157, size: 15 } },\n ],\n edges: [\n { source: 'node0', target: 'node1' },\n { source: 'node0', target: 'node2' },\n { source: 'node0', target: 'node3' },\n { source: 'node0', target: 'node4' },\n { source: 'node0', target: 'node5' },\n { source: 'node1', target: 'node6' },\n { source: 'node1', target: 'node7' },\n { source: 'node2', target: 'node8' },\n { source: 'node2', target: 'node9' },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n data,\n node: {\n type: 'circle',\n style: {\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 1,\n endArrow: true,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "container", + "node", + "type", + "style", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "style", + "stroke", + "lineWidth", + "endArrow", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-47", + "query": "根据描述绘制图表,使用 G6 库创建一个图形实例并渲染,设置了一个网格布局,包含节点和边的数据结构,支持画布的缩放、拖拽等交互行为,并添加了背景插件。参考数据:[{\"nodes\":[{\"id\":\"node-0\"},{\"id\":\"node-1\"},{\"id\":\"node-2\"},{\"id\":\"node-3\"},{\"id\":\"node-4\"},{\"id\":\"node-5\"}],\"edges\":[{\"source\":\"node-0\",\"target\":\"node-1\"},{\"source\":\"node-0\",\"target\":\"node-2\"},{\"source\":\"node-0\",\"target\":\"node-3\"},{\"source\":\"node-0\",\"target\":\"node-4\"},{\"source\":\"node-1\",\"target\":\"node-0\"},{\"source\":\"node-2\",\"target\":\"node-0\"},{\"source\":\"node-3\",\"target\":\"node-0\"},{\"source\":\"node-4\",\"target\":\"node-0\"},{\"source\":\"node-5\",\"target\":\"node-0\"}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [{ id: 'node-0' }, { id: 'node-1' }, { id: 'node-2' }, { id: 'node-3' }, { id: 'node-4' }, { id: 'node-5' }],\n edges: [\n { source: 'node-0', target: 'node-1' },\n { source: 'node-0', target: 'node-2' },\n { source: 'node-0', target: 'node-3' },\n { source: 'node-0', target: 'node-4' },\n { source: 'node-1', target: 'node-0' },\n { source: 'node-2', target: 'node-0' },\n { source: 'node-3', target: 'node-0' },\n { source: 'node-4', target: 'node-0' },\n { source: 'node-5', target: 'node-0' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n width: 800,\n height: 600,\n data,\n layout: { type: 'grid' },\n behaviors: ['zoom-canvas', 'drag-canvas', 'drag-element'],\n plugins: [\n {\n type: 'background',\n width: '800px',\n height: '600px',\n backgroundColor: 'red',\n backgroundSize: 'cover',\n opacity: 0.2,\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-0' },\n { id: 'node-1' },\n { id: 'node-2' },\n { id: 'node-3' },\n { id: 'node-4' },\n { id: 'node-5' }\n ],\n edges: [\n { id: 'e0-1', source: 'node-0', target: 'node-1' },\n { id: 'e0-2', source: 'node-0', target: 'node-2' },\n { id: 'e0-3', source: 'node-0', target: 'node-3' },\n { id: 'e0-4', source: 'node-0', target: 'node-4' },\n { id: 'e1-0', source: 'node-1', target: 'node-0' },\n { id: 'e2-0', source: 'node-2', target: 'node-0' },\n { id: 'e3-0', source: 'node-3', target: 'node-0' },\n { id: 'e4-0', source: 'node-4', target: 'node-0' },\n { id: 'e5-0', source: 'node-5', target: 'node-0' }\n ]\n};\n\nconst graph = new Graph({\n container,\n data,\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n rowGap: 80,\n colGap: 80\n },\n node: {\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFill: '#333'\n }\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: ['grid-line']\n});\n\ngraph.render();", + "duration": 26814, + "retrievedSkillIds": [ + "g6-behavior-canvas-nav", + "g6-layout-grid", + "g6-node-react", + "g6-behavior-drag-element", + "g6-core-graph-init" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1264, + "expectedLength": 967, + "similarity": 0.8524109224109224, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-0' },\n { id: 'node-1' },\n { id: 'node-2' },\n { id: 'node-3' },\n { id: 'node-4' },\n { id: 'node-5' }\n ],\n edges: [\n { id: 'e0-1', source: 'node-0', target: 'node-1' },\n { id: 'e0-2', source: 'node-0', target: 'node-2' },\n { id: 'e0-3', source: 'node-0', target: 'node-3' },\n { id: 'e0-4', source: 'node-0', target: 'node-4' },\n { id: 'e1-0', source: 'node-1', target: 'node-0' },\n { id: 'e2-0', source: 'node-2', target: 'node-0' },\n { id: 'e3-0', source: 'node-3', target: 'node-0' },\n { id: 'e4-0', source: 'node-4', target: 'node-0' },\n { id: 'e5-0', source: 'node-5', target: 'node-0' }\n ]\n};\n\nconst graph = new Graph({\n container,\n data,\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n rowGap: 80,\n colGap: 80\n },\n node: {\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFill: '#333'\n }\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: ['grid-line']\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "id", + "id", + "id", + "id", + "id", + "edges", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "layout", + "type", + "rows", + "cols", + "rowGap", + "colGap", + "node", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "edge", + "style", + "stroke", + "lineWidth", + "endArrow", + "behaviors", + "plugins" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-48", + "query": "根据描述绘制图表,使用 AntV G6 渲染一个树形结构图,数据以嵌套对象形式表示建模方法的分类体系。节点显示为文本标签,位于右侧,具有背景;边采用正交路由的折线样式。整体布局为左到右的缩进树状结构,支持画布拖拽、缩放以及节点展开收起等交互行为。参考数据:[{\"id\":\"Modeling Methods\",\"children\":[{\"id\":\"Classification\",\"children\":[{\"id\":\"Logistic regression\"},{\"id\":\"Linear discriminant analysis\"},{\"id\":\"Rules\"},{\"id\":\"Decision trees\"},{\"id\":\"Naive Bayes\"},{\"id\":\"K nearest neighbor\"},{\"id\":\"Probabilistic neural network\"},{\"id\":\"Support vector machine\"}]},{\"id\":\"Consensus\",\"children\":[{\"id\":\"Models diversity\",\"children\":[{\"id\":\"Different initializations\"},{\"id\":\"Different parameter choices\"},{\"id\":\"Different architectures\"},{\"id\":\"Different modeling methods\"},{\"id\":\"Different training sets\"},{\"id\":\"Different feature sets\"}]},{\"id\":\"Methods\",\"children\":[{\"id\":\"Classifier selection\"},{\"id\":\"Classifier fusion\"}]},{\"id\":\"Common\",\"children\":[{\"id\":\"Bagging\"},{\"id\":\"Boosting\"},{\"id\":\"AdaBoost\"}]}]},{\"id\":\"Regression\",\"children\":[{\"id\":\"Multiple linear regression\"},{\"id\":\"Partial least squares\"},{\"id\":\"Multi-layer feedforward neural network\"},{\"id\":\"General regression neural network\"},{\"id\":\"Support vector regression\"}]}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst data = {\n \"id\": \"Modeling Methods\",\n \"children\": [\n {\n \"id\": \"Classification\",\n \"children\": [\n {\n \"id\": \"Logistic regression\"\n },\n {\n \"id\": \"Linear discriminant analysis\"\n },\n {\n \"id\": \"Rules\"\n },\n {\n \"id\": \"Decision trees\"\n },\n {\n \"id\": \"Naive Bayes\"\n },\n {\n \"id\": \"K nearest neighbor\"\n },\n {\n \"id\": \"Probabilistic neural network\"\n },\n {\n \"id\": \"Support vector machine\"\n }\n ]\n },\n {\n \"id\": \"Consensus\",\n \"children\": [\n {\n \"id\": \"Models diversity\",\n \"children\": [\n {\n \"id\": \"Different initializations\"\n },\n {\n \"id\": \"Different parameter choices\"\n },\n {\n \"id\": \"Different architectures\"\n },\n {\n \"id\": \"Different modeling methods\"\n },\n {\n \"id\": \"Different training sets\"\n },\n {\n \"id\": \"Different feature sets\"\n }\n ]\n },\n {\n \"id\": \"Methods\",\n \"children\": [\n {\n \"id\": \"Classifier selection\"\n },\n {\n \"id\": \"Classifier fusion\"\n }\n ]\n },\n {\n \"id\": \"Common\",\n \"children\": [\n {\n \"id\": \"Bagging\"\n },\n {\n \"id\": \"Boosting\"\n },\n {\n \"id\": \"AdaBoost\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"Regression\",\n \"children\": [\n {\n \"id\": \"Multiple linear regression\"\n },\n {\n \"id\": \"Partial least squares\"\n },\n {\n \"id\": \"Multi-layer feedforward neural network\"\n },\n {\n \"id\": \"General regression neural network\"\n },\n {\n \"id\": \"Support vector regression\"\n }\n ]\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data: treeToGraphData(data),\n autoFit: 'view',\n node: {\n style: {\n labelText: (d) => d.id,\n labelPlacement: 'right',\n labelBackground: true,\n },\n animation: {\n enter: false,\n },\n },\n edge: {\n type: 'polyline',\n style: {\n radius: 4,\n router: {\n type: 'orth',\n },\n },\n animation: {\n enter: false,\n },\n },\n layout: {\n type: 'indented',\n direction: 'LR',\n indent: 80,\n getHeight: () => 16,\n getWidth: () => 32,\n dropCap: false,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'collapse-expand'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst rawData = [\n {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n }\n];\n\nconst graph = new Graph({\n container,\n width: 1000,\n height: 800,\n autoFit: 'view',\n data: treeToGraphData(rawData[0]),\n node: {\n type: 'rect',\n style: {\n size: [180, 32],\n radius: 4,\n fill: '#e6f4ff',\n stroke: '#91caff',\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: 'right',\n labelFill: '#333',\n labelFontSize: 12,\n labelOffsetX: 8,\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.9,\n labelBackgroundPadding: [2, 4],\n cursor: 'pointer',\n },\n state: {\n collapsed: {\n fill: '#fff2e8',\n stroke: '#ffbb96',\n },\n },\n },\n edge: {\n type: 'polyline',\n style: {\n stroke: '#91caff',\n lineWidth: 1.5,\n radius: 4,\n },\n },\n layout: {\n type: 'indented',\n direction: 'LR',\n indent: 40,\n getHeight: () => 32,\n getWidth: () => 180,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n },\n ],\n});\n\ngraph.render();", + "duration": 21964, + "retrievedSkillIds": [ + "g6-layout-mindmap", + "g6-pattern-tree-graph", + "g6-node-circle", + "g6-node-rect", + "g6-pattern-flow-chart" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2766, + "expectedLength": 2950, + "similarity": 0.7337713874910137, + "extractedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst rawData = [\n {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n }\n];\n\nconst graph = new Graph({\n container,\n width: 1000,\n height: 800,\n autoFit: 'view',\n data: treeToGraphData(rawData[0]),\n node: {\n type: 'rect',\n style: {\n size: [180, 32],\n radius: 4,\n fill: '#e6f4ff',\n stroke: '#91caff',\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: 'right',\n labelFill: '#333',\n labelFontSize: 12,\n labelOffsetX: 8,\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.9,\n labelBackgroundPadding: [2, 4],\n cursor: 'pointer',\n },\n state: {\n collapsed: {\n fill: '#fff2e8',\n stroke: '#ffbb96',\n },\n },\n },\n edge: {\n type: 'polyline',\n style: {\n stroke: '#91caff',\n lineWidth: 1.5,\n radius: 4,\n },\n },\n layout: {\n type: 'indented',\n direction: 'LR',\n indent: 40,\n getHeight: () => 32,\n getWidth: () => 180,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "treeToGraphData" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "treeToGraphData", + "render" + ], + "objectKeys": [ + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "width", + "height", + "autoFit", + "data", + "node", + "type", + "style", + "size", + "radius", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "labelOffsetX", + "labelBackground", + "labelBackgroundFill", + "labelBackgroundOpacity", + "labelBackgroundPadding", + "cursor", + "state", + "collapsed", + "fill", + "stroke", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "radius", + "layout", + "type", + "direction", + "indent", + "getHeight", + "getWidth", + "behaviors", + "type", + "trigger" + ], + "stringLiterals": [], + "apiPatterns": [ + "view.children", + "new Graph" + ] + } + } + }, + { + "id": "case-49", + "query": "根据描述绘制图表,使用 G6 构建了一个基于网格布局的图结构可视化,包含节点和边的数据定义,并启用了画布缩放、拖拽以及节点上的右键菜单交互功能。参考数据:[{\"id\":\"node-0\"},{\"id\":\"node-1\"},{\"id\":\"node-2\"},{\"id\":\"node-3\"},{\"id\":\"node-4\"},{\"id\":\"node-5\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [{ id: 'node-0' }, { id: 'node-1' }, { id: 'node-2' }, { id: 'node-3' }, { id: 'node-4' }, { id: 'node-5' }],\n edges: [\n { source: 'node-0', target: 'node-1' },\n { source: 'node-0', target: 'node-2' },\n { source: 'node-0', target: 'node-3' },\n { source: 'node-0', target: 'node-4' },\n { source: 'node-1', target: 'node-0' },\n { source: 'node-2', target: 'node-0' },\n { source: 'node-3', target: 'node-0' },\n { source: 'node-4', target: 'node-0' },\n { source: 'node-5', target: 'node-0' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'grid',\n },\n behaviors: ['zoom-canvas', 'drag-canvas', 'drag-element'],\n plugins: [\n {\n type: 'contextmenu',\n trigger: 'contextmenu', // 'click' or 'contextmenu'\n onClick: (v) => {\n alert('You have clicked the「' + v + '」item');\n },\n getItems: () => {\n return [\n { name: '展开一度关系', value: 'spread' },\n { name: '查看详情', value: 'detail' },\n ];\n },\n enable: (e) => e.targetType === 'node',\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [\n { id: 'node-0', data: { label: '节点 0' } },\n { id: 'node-1', data: { label: '节点 1' } },\n { id: 'node-2', data: { label: '节点 2' } },\n { id: 'node-3', data: { label: '节点 3' } },\n { id: 'node-4', data: { label: '节点 4' } },\n { id: 'node-5', data: { label: '节点 5' } },\n];\n\nconst edges = [\n { id: 'edge-0', source: 'node-0', target: 'node-1' },\n { id: 'edge-1', source: 'node-1', target: 'node-2' },\n { id: 'edge-2', source: 'node-2', target: 'node-3' },\n { id: 'edge-3', source: 'node-3', target: 'node-4' },\n { id: 'edge-4', source: 'node-4', target: 'node-5' },\n { id: 'edge-5', source: 'node-0', target: 'node-3' },\n];\n\nconst graph = new Graph({\n container: container,\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n rowGap: 80,\n colGap: 80,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\nconst menu = document.createElement('div');\nmenu.style.position = 'absolute';\nmenu.style.background = '#fff';\nmenu.style.border = '1px solid #e8e8e8';\nmenu.style.borderRadius = '4px';\nmenu.style.boxShadow = '0 2px 8px rgba(0,0,0,0.15)';\nmenu.style.padding = '4px 0';\nmenu.style.display = 'none';\nmenu.style.zIndex = '1000';\nmenu.innerHTML = `\n
查看详情
\n
删除节点
\n`;\ndocument.body.appendChild(menu);\n\ngraph.on('node:contextmenu', (evt) => {\n evt.preventDefault();\n const { clientX, clientY } = evt;\n menu.style.left = `${clientX}px`;\n menu.style.top = `${clientY}px`;\n menu.style.display = 'block';\n menu.dataset.nodeId = evt.target.id;\n});\n\ndocument.addEventListener('click', () => {\n menu.style.display = 'none';\n});\n\nmenu.addEventListener('click', (e) => {\n if (e.target.classList.contains('menu-item')) {\n const nodeId = menu.dataset.nodeId;\n const action = e.target.textContent;\n console.log(`对节点 ${nodeId} 执行操作: ${action}`);\n menu.style.display = 'none';\n }\n});\n\ngraph.render();", + "duration": 15768, + "retrievedSkillIds": [ + "g6-layout-grid", + "g6-behavior-canvas-nav", + "g6-layout-mindmap", + "g6-node-react", + "g6-node-circle" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2391, + "expectedLength": 1164, + "similarity": 0.49269643581283135, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [\n { id: 'node-0', data: { label: '节点 0' } },\n { id: 'node-1', data: { label: '节点 1' } },\n { id: 'node-2', data: { label: '节点 2' } },\n { id: 'node-3', data: { label: '节点 3' } },\n { id: 'node-4', data: { label: '节点 4' } },\n { id: 'node-5', data: { label: '节点 5' } },\n];\n\nconst edges = [\n { id: 'edge-0', source: 'node-0', target: 'node-1' },\n { id: 'edge-1', source: 'node-1', target: 'node-2' },\n { id: 'edge-2', source: 'node-2', target: 'node-3' },\n { id: 'edge-3', source: 'node-3', target: 'node-4' },\n { id: 'edge-4', source: 'node-4', target: 'node-5' },\n { id: 'edge-5', source: 'node-0', target: 'node-3' },\n];\n\nconst graph = new Graph({\n container: container,\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n rowGap: 80,\n colGap: 80,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\nconst menu = document.createElement('div');\nmenu.style.position = 'absolute';\nmenu.style.background = '#fff';\nmenu.style.border = '1px solid #e8e8e8';\nmenu.style.borderRadius = '4px';\nmenu.style.boxShadow = '0 2px 8px rgba(0,0,0,0.15)';\nmenu.style.padding = '4px 0';\nmenu.style.display = 'none';\nmenu.style.zIndex = '1000';\nmenu.innerHTML = `\n
查看详情
\n
删除节点
\n`;\ndocument.body.appendChild(menu);\n\ngraph.on('node:contextmenu', (evt) => {\n evt.preventDefault();\n const { clientX, clientY } = evt;\n menu.style.left = `${clientX}px`;\n menu.style.top = `${clientY}px`;\n menu.style.display = 'block';\n menu.dataset.nodeId = evt.target.id;\n});\n\ndocument.addEventListener('click', () => {\n menu.style.display = 'none';\n});\n\nmenu.addEventListener('click', (e) => {\n if (e.target.classList.contains('menu-item')) {\n const nodeId = menu.dataset.nodeId;\n const action = e.target.textContent;\n console.log(`对节点 ${nodeId} 执行操作: ${action}`);\n menu.style.display = 'none';\n }\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "createElement", + "rgba", + "appendChild", + "on", + "preventDefault", + "addEventListener", + "addEventListener", + "contains", + "log", + "render" + ], + "objectKeys": [ + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "container", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "rows", + "cols", + "rowGap", + "colGap", + "behaviors", + "padding", + "cursor", + "padding", + "cursor", + "node" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "graph.on", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-50", + "query": "根据描述绘制图表,使用 G6 渲染一个横向缩进布局的树图,展示机器学习建模方法的层级结构。节点根据其相对于父节点的位置显示在左侧、右侧或中间,并配置了相应的标签和连接线样式。支持画布拖拽、缩放以及节点展开收起等交互行为。参考数据:[{\"id\":\"Modeling Methods\",\"children\":[{\"id\":\"Classification\",\"children\":[{\"id\":\"Logistic regression\"},{\"id\":\"Linear discriminant analysis\"},{\"id\":\"Rules\"},{\"id\":\"Decision trees\"},{\"id\":\"Naive Bayes\"},{\"id\":\"K nearest neighbor\"},{\"id\":\"Probabilistic neural network\"},{\"id\":\"Support vector machine\"}]},{\"id\":\"Consensus\",\"children\":[{\"id\":\"Models diversity\",\"children\":[{\"id\":\"Different initializations\"},{\"id\":\"Different parameter choices\"},{\"id\":\"Different architectures\"},{\"id\":\"Different modeling methods\"},{\"id\":\"Different training sets\"},{\"id\":\"Different feature sets\"}]},{\"id\":\"Methods\",\"children\":[{\"id\":\"Classifier selection\"},{\"id\":\"Classifier fusion\"}]},{\"id\":\"Common\",\"children\":[{\"id\":\"Bagging\"},{\"id\":\"Boosting\"},{\"id\":\"AdaBoost\"}]}]},{\"id\":\"Regression\",\"children\":[{\"id\":\"Multiple linear regression\"},{\"id\":\"Partial least squares\"},{\"id\":\"Multi-layer feedforward neural network\"},{\"id\":\"General regression neural network\"},{\"id\":\"Support vector regression\"}]}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst getNodeSide = (graph, datum) => {\n const parentData = graph.getParentData(datum.id, 'tree');\n if (!parentData) return 'center';\n return datum.style.x > parentData.style.x ? 'right' : 'left';\n};\n\nconst data = {\n \"id\": \"Modeling Methods\",\n \"children\": [\n {\n \"id\": \"Classification\",\n \"children\": [\n {\n \"id\": \"Logistic regression\"\n },\n {\n \"id\": \"Linear discriminant analysis\"\n },\n {\n \"id\": \"Rules\"\n },\n {\n \"id\": \"Decision trees\"\n },\n {\n \"id\": \"Naive Bayes\"\n },\n {\n \"id\": \"K nearest neighbor\"\n },\n {\n \"id\": \"Probabilistic neural network\"\n },\n {\n \"id\": \"Support vector machine\"\n }\n ]\n },\n {\n \"id\": \"Consensus\",\n \"children\": [\n {\n \"id\": \"Models diversity\",\n \"children\": [\n {\n \"id\": \"Different initializations\"\n },\n {\n \"id\": \"Different parameter choices\"\n },\n {\n \"id\": \"Different architectures\"\n },\n {\n \"id\": \"Different modeling methods\"\n },\n {\n \"id\": \"Different training sets\"\n },\n {\n \"id\": \"Different feature sets\"\n }\n ]\n },\n {\n \"id\": \"Methods\",\n \"children\": [\n {\n \"id\": \"Classifier selection\"\n },\n {\n \"id\": \"Classifier fusion\"\n }\n ]\n },\n {\n \"id\": \"Common\",\n \"children\": [\n {\n \"id\": \"Bagging\"\n },\n {\n \"id\": \"Boosting\"\n },\n {\n \"id\": \"AdaBoost\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"Regression\",\n \"children\": [\n {\n \"id\": \"Multiple linear regression\"\n },\n {\n \"id\": \"Partial least squares\"\n },\n {\n \"id\": \"Multi-layer feedforward neural network\"\n },\n {\n \"id\": \"General regression neural network\"\n },\n {\n \"id\": \"Support vector regression\"\n }\n ]\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data: treeToGraphData(data),\n autoFit: 'view',\n node: {\n style: function (d) {\n const side = getNodeSide(this, d);\n return {\n labelText: d.id,\n labelPlacement: side === 'center' ? 'bottom' : side,\n labelBackground: true,\n ports:\n side === 'center'\n ? [{ placement: 'bottom' }]\n : side === 'right'\n ? [{ placement: 'bottom' }, { placement: 'left' }]\n : [{ placement: 'bottom' }, { placement: 'right' }],\n };\n },\n animation: {\n enter: false,\n },\n },\n edge: {\n type: 'polyline',\n style: {\n radius: 4,\n router: {\n type: 'orth',\n },\n },\n animation: {\n enter: false,\n },\n },\n layout: {\n type: 'indented',\n direction: 'H',\n indent: 80,\n preLayout: false,\n getHeight: () => 16,\n getWidth: () => 32,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'collapse-expand'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'rect',\n style: {\n size: [180, 36],\n radius: 4,\n fill: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return '#1783FF';\n if (depth === 1) return '#00C9A7';\n if (depth === 2) return '#F6F8FA';\n return '#FFFFFF';\n },\n stroke: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return '#1783FF';\n if (depth === 1) return '#00C9A7';\n return '#E0E0E0';\n },\n lineWidth: 1,\n labelText: (d) => d.id,\n labelFill: (d) => {\n const depth = d.depth || 0;\n return depth < 2 ? '#FFFFFF' : '#333333';\n },\n labelPlacement: 'center',\n labelFontSize: 12,\n labelFontWeight: (d) => d.depth === 0 ? 'bold' : 'normal',\n cursor: 'pointer',\n },\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#CCCCCC',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'indented',\n direction: 'LR',\n indent: 40,\n getWidth: () => 180,\n getHeight: () => 40,\n getHGap: () => 60,\n getVGap: () => 10,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true,\n },\n ],\n});\n\ngraph.render();", + "duration": 19244, + "retrievedSkillIds": [ + "g6-layout-mindmap", + "g6-pattern-tree-graph", + "g6-node-circle", + "g6-behavior-drag-element", + "g6-node-rect" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2939, + "expectedLength": 3506, + "similarity": 0.5660854147394389, + "extractedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'rect',\n style: {\n size: [180, 36],\n radius: 4,\n fill: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return '#1783FF';\n if (depth === 1) return '#00C9A7';\n if (depth === 2) return '#F6F8FA';\n return '#FFFFFF';\n },\n stroke: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return '#1783FF';\n if (depth === 1) return '#00C9A7';\n return '#E0E0E0';\n },\n lineWidth: 1,\n labelText: (d) => d.id,\n labelFill: (d) => {\n const depth = d.depth || 0;\n return depth < 2 ? '#FFFFFF' : '#333333';\n },\n labelPlacement: 'center',\n labelFontSize: 12,\n labelFontWeight: (d) => d.depth === 0 ? 'bold' : 'normal',\n cursor: 'pointer',\n },\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#CCCCCC',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'indented',\n direction: 'LR',\n indent: 40,\n getWidth: () => 180,\n getHeight: () => 40,\n getHGap: () => 60,\n getVGap: () => 10,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true,\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "treeToGraphData" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "treeToGraphData", + "render" + ], + "objectKeys": [ + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "container", + "autoFit", + "data", + "node", + "type", + "style", + "size", + "radius", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelFill", + "labelPlacement", + "labelFontSize", + "labelFontWeight", + "cursor", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "direction", + "indent", + "getWidth", + "getHeight", + "getHGap", + "getVGap", + "behaviors", + "type", + "trigger", + "animation" + ], + "stringLiterals": [], + "apiPatterns": [ + "view.children", + "new Graph" + ] + } + } + }, + { + "id": "case-51", + "query": "根据描述绘制图表,使用 G6 构建了一个图谱可视化,通过 MDS 布局展示节点和边的关系,支持画布的缩放、拖拽以及元素拖动等交互行为,节点根据所属聚类显示不同样式。参考数据:[{\"id\":\"0\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"1\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"2\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"3\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"4\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"5\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"6\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"7\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"8\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"9\",\"data\":{\"cluster\":\"a\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"0\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"1\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"2\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"3\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"4\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"5\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"6\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"7\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"8\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"9\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"10\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"11\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"12\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"13\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"14\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"15\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"16\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"17\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"18\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"19\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"20\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"21\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"22\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"23\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"24\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"25\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"26\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"27\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"28\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"29\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"30\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"31\",\n \"data\": {\n \"cluster\": \"d\"\n }\n },\n {\n \"id\": \"32\",\n \"data\": {\n \"cluster\": \"d\"\n }\n },\n {\n \"id\": \"33\",\n \"data\": {\n \"cluster\": \"d\"\n }\n }\n ],\n \"edges\": [\n {\n \"source\": \"0\",\n \"target\": \"1\"\n },\n {\n \"source\": \"0\",\n \"target\": \"2\"\n },\n {\n \"source\": \"0\",\n \"target\": \"3\"\n },\n {\n \"source\": \"0\",\n \"target\": \"4\"\n },\n {\n \"source\": \"0\",\n \"target\": \"5\"\n },\n {\n \"source\": \"0\",\n \"target\": \"7\"\n },\n {\n \"source\": \"0\",\n \"target\": \"8\"\n },\n {\n \"source\": \"0\",\n \"target\": \"9\"\n },\n {\n \"source\": \"0\",\n \"target\": \"10\"\n },\n {\n \"source\": \"0\",\n \"target\": \"11\"\n },\n {\n \"source\": \"0\",\n \"target\": \"13\"\n },\n {\n \"source\": \"0\",\n \"target\": \"14\"\n },\n {\n \"source\": \"0\",\n \"target\": \"15\"\n },\n {\n \"source\": \"0\",\n \"target\": \"16\"\n },\n {\n \"source\": \"2\",\n \"target\": \"3\"\n },\n {\n \"source\": \"4\",\n \"target\": \"5\"\n },\n {\n \"source\": \"4\",\n \"target\": \"6\"\n },\n {\n \"source\": \"5\",\n \"target\": \"6\"\n },\n {\n \"source\": \"7\",\n \"target\": \"13\"\n },\n {\n \"source\": \"8\",\n \"target\": \"14\"\n },\n {\n \"source\": \"9\",\n \"target\": \"10\"\n },\n {\n \"source\": \"10\",\n \"target\": \"22\"\n },\n {\n \"source\": \"10\",\n \"target\": \"14\"\n },\n {\n \"source\": \"10\",\n \"target\": \"12\"\n },\n {\n \"source\": \"10\",\n \"target\": \"24\"\n },\n {\n \"source\": \"10\",\n \"target\": \"21\"\n },\n {\n \"source\": \"10\",\n \"target\": \"20\"\n },\n {\n \"source\": \"11\",\n \"target\": \"24\"\n },\n {\n \"source\": \"11\",\n \"target\": \"22\"\n },\n {\n \"source\": \"11\",\n \"target\": \"14\"\n },\n {\n \"source\": \"12\",\n \"target\": \"13\"\n },\n {\n \"source\": \"16\",\n \"target\": \"17\"\n },\n {\n \"source\": \"16\",\n \"target\": \"18\"\n },\n {\n \"source\": \"16\",\n \"target\": \"21\"\n },\n {\n \"source\": \"16\",\n \"target\": \"22\"\n },\n {\n \"source\": \"17\",\n \"target\": \"18\"\n },\n {\n \"source\": \"17\",\n \"target\": \"20\"\n },\n {\n \"source\": \"18\",\n \"target\": \"19\"\n },\n {\n \"source\": \"19\",\n \"target\": \"20\"\n },\n {\n \"source\": \"19\",\n \"target\": \"33\"\n },\n {\n \"source\": \"19\",\n \"target\": \"22\"\n },\n {\n \"source\": \"19\",\n \"target\": \"23\"\n },\n {\n \"source\": \"20\",\n \"target\": \"21\"\n },\n {\n \"source\": \"21\",\n \"target\": \"22\"\n },\n {\n \"source\": \"22\",\n \"target\": \"24\"\n },\n {\n \"source\": \"22\",\n \"target\": \"25\"\n },\n {\n \"source\": \"22\",\n \"target\": \"26\"\n },\n {\n \"source\": \"22\",\n \"target\": \"23\"\n },\n {\n \"source\": \"22\",\n \"target\": \"28\"\n },\n {\n \"source\": \"22\",\n \"target\": \"30\"\n },\n {\n \"source\": \"22\",\n \"target\": \"31\"\n },\n {\n \"source\": \"22\",\n \"target\": \"32\"\n },\n {\n \"source\": \"22\",\n \"target\": \"33\"\n },\n {\n \"source\": \"23\",\n \"target\": \"28\"\n },\n {\n \"source\": \"23\",\n \"target\": \"27\"\n },\n {\n \"source\": \"23\",\n \"target\": \"29\"\n },\n {\n \"source\": \"23\",\n \"target\": \"30\"\n },\n {\n \"source\": \"23\",\n \"target\": \"31\"\n },\n {\n \"source\": \"23\",\n \"target\": \"33\"\n },\n {\n \"source\": \"32\",\n \"target\": \"33\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n padding: 20,\n autoFit: 'view',\n data,\n node: {\n style: {\n labelFill: '#fff',\n labelText: (d) => d.id,\n labelPlacement: 'center',\n },\n },\n layout: {\n type: 'mds',\n nodeSize: 32,\n linkDistance: 100,\n },\n behaviors: ['drag-element', 'drag-canvas', 'zoom-canvas'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [\n {\"id\":\"0\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"1\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"2\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"3\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"4\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"5\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"6\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"7\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"8\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"9\",\"data\":{\"cluster\":\"a\"}}\n];\n\nconst edges = [];\nconst edgeSet = new Set();\nfor (let i = 0; i < nodes.length; i++) {\n for (let j = i + 1; j < nodes.length; j++) {\n if (Math.random() < 0.4) {\n const source = nodes[i].id;\n const target = nodes[j].id;\n const key = `${source}-${target}`;\n if (!edgeSet.has(key)) {\n edgeSet.add(key);\n edges.push({ source, target });\n }\n }\n }\n}\n\nconst clusterColors = {\n 'a': '#1783FF',\n 'b': '#00C9C9',\n 'c': '#F08F56',\n 'd': '#8B5CF6',\n 'e': '#EF4444'\n};\n\nconst graph = new Graph({\n container: container,\n data: { nodes, edges },\n layout: {\n type: 'mds'\n },\n node: {\n type: 'circle',\n style: {\n size: 32,\n fill: (d) => clusterColors[d.data?.cluster] || '#999',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12\n }\n },\n edge: {\n style: {\n stroke: '#e2e2e2',\n lineWidth: 1.5,\n opacity: 0.6\n }\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element'\n ]\n});\n\ngraph.render();", + "duration": 16218, + "retrievedSkillIds": [ + "g6-behavior-canvas-nav", + "g6-layout-grid", + "g6-layout-mindmap", + "g6-node-circle", + "g6-behavior-drag-element" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1521, + "expectedLength": 6878, + "similarity": 0.5477418449420659, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [\n {\"id\":\"0\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"1\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"2\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"3\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"4\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"5\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"6\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"7\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"8\",\"data\":{\"cluster\":\"a\"}},\n {\"id\":\"9\",\"data\":{\"cluster\":\"a\"}}\n];\n\nconst edges = [];\nconst edgeSet = new Set();\nfor (let i = 0; i < nodes.length; i++) {\n for (let j = i + 1; j < nodes.length; j++) {\n if (Math.random() < 0.4) {\n const source = nodes[i].id;\n const target = nodes[j].id;\n const key = `${source}-${target}`;\n if (!edgeSet.has(key)) {\n edgeSet.add(key);\n edges.push({ source, target });\n }\n }\n }\n}\n\nconst clusterColors = {\n 'a': '#1783FF',\n 'b': '#00C9C9',\n 'c': '#F08F56',\n 'd': '#8B5CF6',\n 'e': '#EF4444'\n};\n\nconst graph = new Graph({\n container: container,\n data: { nodes, edges },\n layout: {\n type: 'mds'\n },\n node: {\n type: 'circle',\n style: {\n size: 32,\n fill: (d) => clusterColors[d.data?.cluster] || '#999',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12\n }\n },\n edge: {\n style: {\n stroke: '#e2e2e2',\n lineWidth: 1.5,\n opacity: 0.6\n }\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element'\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Set", + "random", + "has", + "add", + "push", + "Graph", + "render" + ], + "objectKeys": [ + "container", + "data", + "layout", + "type", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "style", + "stroke", + "lineWidth", + "opacity", + "behaviors" + ], + "stringLiterals": [ + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "a", + "b", + "c", + "d", + "e" + ], + "apiPatterns": [ + "new Graph" + ] + } + } + }, + { + "id": "case-52", + "query": "根据描述绘制图表,使用 G6 图表库渲染一个企业关系图谱,展示公司与人员之间的投资、任职等关系。通过力导向布局自动排列节点,并支持鼠标悬停高亮关联元素。参考数据:[{\"id\":\"27800994\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"7e023446a248dd2e873ede3a08eeadc5\",\"registCapi\":\"5000.0\",\"name\":\"成都倍达资产管理有限公司\",\"econKind\":\"有限责任公司(非自然人投资或控股的法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"成都倍达资产管理有限公司\",\"degree\":4},{\"id\":\"13956312\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"3fc8e6b450a351dffaf97ebba7bd5675\",\"registCapi\":\"21000.0\",\"name\":\"小米科技(武汉)有限公司\",\"econKind\":\"有限责任公司(外商投资企业法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"小米科技(武汉)有限公司\",\"degree\":4},{\"id\":\"71848026\",\"labels\":[\"Person\"],\"properties\":{\"keyNo\":\"p26b3775f4ea1307e28aef63a6cf2cb8\",\"role\":\"自然人股东\",\"name\":\"刘敏\"},\"type\":\"Person\",\"name\":\"刘敏\",\"degree\":5},{\"id\":\"44830398\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"cac4c7d67320964eddebc475fa66d3f9\",\"registCapi\":\"1000.0\",\"name\":\"北京金山数字娱乐科技有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"北京金山数字娱乐科技有限公司\",\"degree\":4},{\"id\":\"47387343\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"d64da78333777354bf3634e371d736a6\",\"registCapi\":\"0.0\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"econKind\":\"有限合伙企业\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"degree\":3},{\"id\":\"26295729\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"77472fbe731c1b8f4bfc2723f3b65415\",\"registCapi\":\"21550.0\",\"name\":\"珠海金山软件有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"珠海金山软件有限公司\",\"degree\":5},{\"id\":\"24305985\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"6e62fda57887baa0909cb79bef96b07c\",\"registCapi\":\"5000.0\",\"name\":\"小米影业有限责任公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"小米影业有限责任公司\",\"degree\":10},{\"id\":\"9036981\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"29328112375d07205ab125dcb575d59b\",\"registCapi\":\"1000.0\",\"name\":\"图扑尚贸易(上海)有限公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"图扑尚贸易(上海)有限公司\",\"degree\":3},{\"id\":\"53463922\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"f1ba2f7dfcecba582edbf89b03009980\",\"registCapi\":\"43757.56\",\"name\":\"广州华凌空调设备有限公司\",\"econKind\":\"其他有限责任公司\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广州华凌空调设备有限公司\",\"degree\":4},{\"id\":\"2791598\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"0cc68eb8e8f9d0445d1916a9872d207c\",\"registCapi\":\"6926.0\",\"name\":\"广东美的生活电器制造有限公司\",\"econKind\":\"有限责任公司(台港澳与境内合资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广东美的生活电器制造有限公司\",\"degree\":4}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst format = (data) => {\n const { nodes, edges } = data;\n return {\n nodes: nodes.map(({ id, ...node }) => ({ id, data: node })),\n edges: edges.map(({ id, source, target, ...edge }) => ({ id, source, target, data: edge })),\n };\n};\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"27800994\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"7e023446a248dd2e873ede3a08eeadc5\",\n \"registCapi\": \"5000.0\",\n \"name\": \"成都倍达资产管理有限公司\",\n \"econKind\": \"有限责任公司(非自然人投资或控股的法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"成都倍达资产管理有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"13956312\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"3fc8e6b450a351dffaf97ebba7bd5675\",\n \"registCapi\": \"21000.0\",\n \"name\": \"小米科技(武汉)有限公司\",\n \"econKind\": \"有限责任公司(外商投资企业法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"小米科技(武汉)有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"71848026\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p26b3775f4ea1307e28aef63a6cf2cb8\",\n \"role\": \"自然人股东\",\n \"name\": \"刘敏\"\n },\n \"type\": \"Person\",\n \"name\": \"刘敏\",\n \"degree\": 5\n },\n {\n \"id\": \"44830398\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"cac4c7d67320964eddebc475fa66d3f9\",\n \"registCapi\": \"1000.0\",\n \"name\": \"北京金山数字娱乐科技有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京金山数字娱乐科技有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"47387343\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"d64da78333777354bf3634e371d736a6\",\n \"registCapi\": \"0.0\",\n \"name\": \"上海晨熹创业投资中心(有限合伙)\",\n \"econKind\": \"有限合伙企业\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"上海晨熹创业投资中心(有限合伙)\",\n \"degree\": 3\n },\n {\n \"id\": \"26295729\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"77472fbe731c1b8f4bfc2723f3b65415\",\n \"registCapi\": \"21550.0\",\n \"name\": \"珠海金山软件有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"珠海金山软件有限公司\",\n \"degree\": 5\n },\n {\n \"id\": \"24305985\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"6e62fda57887baa0909cb79bef96b07c\",\n \"registCapi\": \"5000.0\",\n \"name\": \"小米影业有限责任公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"小米影业有限责任公司\",\n \"degree\": 10\n },\n {\n \"id\": \"9036981\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"29328112375d07205ab125dcb575d59b\",\n \"registCapi\": \"1000.0\",\n \"name\": \"图扑尚贸易(上海)有限公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"图扑尚贸易(上海)有限公司\",\n \"degree\": 3\n },\n {\n \"id\": \"53463922\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"f1ba2f7dfcecba582edbf89b03009980\",\n \"registCapi\": \"43757.56\",\n \"name\": \"广州华凌空调设备有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"广州华凌空调设备有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"2791598\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"0cc68eb8e8f9d0445d1916a9872d207c\",\n \"registCapi\": \"6926.0\",\n \"name\": \"广东美的生活电器制造有限公司\",\n \"econKind\": \"有限责任公司(台港澳与境内合资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"广东美的生活电器制造有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"52763524\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"ee92647afee609db9b431e4234557374\",\n \"registCapi\": \"200.0\",\n \"name\": \"北京创派力量科技有限公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京创派力量科技有限公司\",\n \"degree\": 5\n },\n {\n \"id\": \"50182662\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"e2f02283910a7f2c6759440681edf7eb\",\n \"registCapi\": \"534.4822\",\n \"name\": \"西安蜂语信息科技有限公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"西安蜂语信息科技有限公司\",\n \"degree\": 2\n },\n {\n \"id\": \"40184690\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"b5cede7322c0f76d5adfe81632de5d21\",\n \"registCapi\": \"44000.0\",\n \"name\": \"上海新飞凡电子商务有限公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股的法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"上海新飞凡电子商务有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"9323996\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"2a821429194d8afebf174c226dee21bb\",\n \"registCapi\": \"560.0\",\n \"name\": \"珠海金山快快科技有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"注销\"\n },\n \"type\": \"Company\",\n \"name\": \"珠海金山快快科技有限公司\",\n \"degree\": 3\n },\n {\n \"id\": \"1471865\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"06c739fdd7af2d3a52139a939196165f\",\n \"registCapi\": \"50.0\",\n \"name\": \"深圳英鹏玩聚互娱科技有限公司\",\n \"econKind\": \"有限责任公司\",\n \"status\": \"注销\"\n },\n \"type\": \"Company\",\n \"name\": \"深圳英鹏玩聚互娱科技有限公司\",\n \"degree\": 9\n },\n {\n \"id\": \"16406890\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"4acdaf5e031fc214abdb6287e9a9276f\",\n \"registCapi\": \"45000.0\",\n \"name\": \"重庆市小米小额贷款有限公司\",\n \"econKind\": \"有限责任公司(台港澳法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"重庆市小米小额贷款有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"46583563\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"d2adf1c22178335067fa214da6cffab5\",\n \"registCapi\": \"5000.0\",\n \"name\": \"小米信用管理有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"小米信用管理有限公司\",\n \"degree\": 7\n },\n {\n \"id\": \"61422172\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p077472cd738bf6c70d757a42c6acaf4\",\n \"role\": \"\",\n \"name\": \"林斌\"\n },\n \"type\": \"Person\",\n \"name\": \"林斌\",\n \"degree\": 10\n },\n {\n \"id\": \"40800362\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"b894dee03e3d201af50ab60638820740\",\n \"registCapi\": \"2592.0\",\n \"name\": \"合肥荣事达洗衣机有限公司\",\n \"econKind\": \"有限责任公司(中外合资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"合肥荣事达洗衣机有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"50714910\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"e558d7a7bf37fc3b8ccfcd7e7a85b7cc\",\n \"registCapi\": \"42000.0\",\n \"name\": \"广东美的微波炉制造有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"广东美的微波炉制造有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"53320045\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"f1141d6decb76ff22e70e5f8b656b68c\",\n \"registCapi\": \"2700.0\",\n \"name\": \"北京小米电子产品有限公司\",\n \"econKind\": \"有限责任公司(台港澳法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京小米电子产品有限公司\",\n \"degree\": 6\n },\n {\n \"id\": \"93817\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"006f4aa686287cb359b449ce6ce347d1\",\n \"registCapi\": \"200000.0\",\n \"name\": \"四川银米科技有限责任公司\",\n \"econKind\": \"有限责任公司(非自然人投资或控股的法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"四川银米科技有限责任公司\",\n \"degree\": 5\n },\n {\n \"id\": \"26623797\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"78bd7f41ad3bd438e8b63e2a2b5ae644\",\n \"registCapi\": \"1135.9266\",\n \"name\": \"舒可士(深圳)科技有限公司\",\n \"econKind\": \"有限责任公司(台港澳与境内合资)外资比例低于25%\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"舒可士(深圳)科技有限公司\",\n \"degree\": 3\n },\n {\n \"id\": \"5154548\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"17773b52b0164d5d0c39a14cbc1d12c8\",\n \"registCapi\": \"28800.0\",\n \"name\": \"北京小米移动软件有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京小米移动软件有限公司\",\n \"degree\": 6\n },\n {\n \"id\": \"42426456\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"bfeb8fa5f2ef0a07606c0a7aa4253621\",\n \"registCapi\": \"8000.0\",\n \"name\": \"邯郸美的制冷设备有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"邯郸美的制冷设备有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"67299081\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p1910534b4ae98fea35ddbeb1d61cd44\",\n \"role\": \"执行董事\",\n \"name\": \"雷军\"\n },\n \"type\": \"Person\",\n \"name\": \"雷军\",\n \"degree\": 57\n },\n {\n \"id\": \"74635102\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p2f10e89de841bdc628df613420b0040\",\n \"role\": \"\",\n \"name\": \"朱凤涛\"\n },\n \"type\": \"Person\",\n \"name\": \"朱凤涛\",\n \"degree\": 2\n },\n {\n \"id\": \"653142\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"02ff6e6bed57a655db1bc67dfa829984\",\n \"registCapi\": \"100000.0\",\n \"name\": \"广东小米科技有限责任公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"广东小米科技有限责任公司\",\n \"degree\": 5\n },\n {\n \"id\": \"9296707\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"2a620cfbe8a8678ce9bb3312da633871\",\n \"registCapi\": \"931250.6158\",\n \"name\": \"上海万达网络金融服务有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"上海万达网络金融服务有限公司\",\n \"degree\": 5\n },\n {\n \"id\": \"95397448\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p6d7e0b8f1d5f085cef08c25afc20309\",\n \"role\": \"副董事长\",\n \"name\": \"刘德\"\n },\n \"type\": \"Person\",\n \"name\": \"刘德\",\n \"degree\": 26\n },\n {\n \"id\": \"101641703\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p804a400c7a446c6eb28cfa455ffc91f\",\n \"role\": \"自然人股东\",\n \"name\": \"张震阳\"\n },\n \"type\": \"Person\",\n \"name\": \"张震阳\",\n \"degree\": 3\n },\n {\n \"id\": \"21768893\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"630537e4747092679451cea00432584b\",\n \"registCapi\": \"67650.0\",\n \"name\": \"安得智联科技股份有限公司\",\n \"econKind\": \"股份有限公司(台港澳与境内合资、未上市)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"安得智联科技股份有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"26627684\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"78c200dd24178853e4a985d918c6bc2e\",\n \"registCapi\": \"500000.0\",\n \"name\": \"中央汇金资产管理有限责任公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"中央汇金资产管理有限责任公司\",\n \"degree\": 3\n },\n {\n \"id\": \"38315442\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"ad622acd512e8f07fb287627b6901a7d\",\n \"registCapi\": \"100.0\",\n \"name\": \"西藏小米科技有限责任公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股的法人独资)\",\n \"status\": \"注销\"\n },\n \"type\": \"Company\",\n \"name\": \"西藏小米科技有限责任公司\",\n \"degree\": 4\n },\n {\n \"id\": \"30954022\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"8c3516cd93679b88af8eb26e8ec8e86b\",\n \"registCapi\": \"1000.0\",\n \"name\": \"北京金山软件有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京金山软件有限公司\",\n \"degree\": 4\n }\n ],\n \"edges\": [\n {\n \"id\": \"202765330\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"30954022\"\n },\n {\n \"id\": \"211823788\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事长\"\n },\n \"source\": \"67299081\",\n \"target\": \"93817\"\n },\n {\n \"id\": \"211823791\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"93817\"\n },\n {\n \"id\": \"131295128\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"67299081\",\n \"target\": \"38315442\"\n },\n {\n \"id\": \"256349818\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"9036981\"\n },\n {\n \"id\": \"180159485\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"46583563\"\n },\n {\n \"id\": \"180159486\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事长\"\n },\n \"source\": \"67299081\",\n \"target\": \"46583563\"\n },\n {\n \"id\": \"4981020\",\n \"type\": \"INVEST\",\n \"properties\": {\n \"role\": \"企业法人\",\n \"stockPercent\": 100,\n \"shouldCapi\": 44000\n },\n \"source\": \"9296707\",\n \"target\": \"40184690\"\n },\n {\n \"id\": \"121849387\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"67299081\",\n \"target\": \"93817\"\n },\n {\n \"id\": \"151712616\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"27800994\"\n },\n {\n \"id\": \"160158693\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"16406890\"\n },\n {\n \"id\": \"160158692\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"61422172\",\n \"target\": \"16406890\"\n },\n {\n \"id\": \"110517278\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"95397448\",\n \"target\": \"53320045\"\n },\n {\n \"id\": \"130289005\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"67299081\",\n \"target\": \"13956312\"\n },\n {\n \"id\": \"241050886\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"44830398\"\n },\n {\n \"id\": \"233524846\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"26295729\"\n },\n {\n \"id\": \"97660530\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"67299081\",\n \"target\": \"653142\"\n },\n {\n \"id\": \"170221103\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事,经理\"\n },\n \"source\": \"74635102\",\n \"target\": \"50714910\"\n },\n {\n \"id\": \"188473211\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"61422172\",\n \"target\": \"53320045\"\n },\n {\n \"id\": \"188473209\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事长\"\n },\n \"source\": \"67299081\",\n \"target\": \"53320045\"\n },\n {\n \"id\": \"188473212\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"总经理\"\n },\n \"source\": \"95397448\",\n \"target\": \"53320045\"\n },\n {\n \"id\": \"3474831\",\n \"type\": \"INVEST\",\n \"properties\": {\n \"role\": \"企业法人\",\n \"stockPercent\": 80,\n \"shouldCapi\": 800\n },\n \"source\": \"26295729\",\n \"target\": \"30954022\"\n },\n {\n \"id\": \"2840015\",\n \"type\": \"INVEST\",\n \"properties\": {\n \"role\": \"企业法人\",\n \"stockPercent\": 62.5,\n \"shouldCapi\": 350\n },\n \"source\": \"44830398\",\n \"target\": \"9323996\"\n },\n {\n \"id\": \"85633798\",\n \"type\": \"INVEST\",\n \"properties\": {\n \"role\": \"自然人股东\",\n \"stockPercent\": 2.01,\n \"shouldCapi\": 100.5\n },\n \"source\": \"95397448\",\n \"target\": \"24305985\"\n },\n {\n \"id\": \"180159488\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"61422172\",\n \"target\": \"46583563\"\n },\n {\n \"id\": \"229272386\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事兼总经理\"\n },\n \"source\": \"67299081\",\n \"target\": \"13956312\"\n },\n {\n \"id\": \"229272385\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"13956312\"\n },\n {\n \"id\": \"252833811\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事长\"\n },\n \"source\": \"67299081\",\n \"target\": \"24305985\"\n },\n {\n \"id\": \"252833810\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"24305985\"\n },\n {\n \"id\": \"161979950\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"经理\"\n },\n \"source\": \"95397448\",\n \"target\": \"653142\"\n },\n {\n \"id\": \"161979949\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"653142\"\n },\n {\n \"id\": \"231346748\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事兼总经理\"\n },\n \"source\": \"67299081\",\n \"target\": \"38315442\"\n },\n {\n \"id\": \"192021637\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"9323996\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: format(data),\n node: {\n style: { size: 30 },\n state: {\n highlight: {\n fill: '#D580FF',\n halo: true,\n lineWidth: 0,\n },\n dim: {\n fill: '#99ADD1',\n },\n },\n },\n edge: {\n state: {\n highlight: {\n stroke: '#D580FF',\n },\n },\n },\n behaviors: [\n {\n type: 'hover-activate',\n enable: (event) => event.targetType === 'node',\n degree: 1, // 👈🏻 Activate relations.\n state: 'highlight',\n inactiveState: 'dim',\n onHover: (event) => {\n event.view.setCursor('pointer');\n },\n onHoverEnd: (event) => {\n event.view.setCursor('default');\n },\n },\n ],\n layout: {\n type: 'force',\n preventOverlap: true,\n nodeSize: 24,\n },\n animation: false,\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\n// 节点数据\nconst rawNodes = [\n {\"id\":\"27800994\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"7e023446a248dd2e873ede3a08eeadc5\",\"registCapi\":\"5000.0\",\"name\":\"成都倍达资产管理有限公司\",\"econKind\":\"有限责任公司(非自然人投资或控股的法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"成都倍达资产管理有限公司\",\"degree\":4},\n {\"id\":\"13956312\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"3fc8e6b450a351dffaf97ebba7bd5675\",\"registCapi\":\"21000.0\",\"name\":\"小米科技(武汉)有限公司\",\"econKind\":\"有限责任公司(外商投资企业法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"小米科技(武汉)有限公司\",\"degree\":4},\n {\"id\":\"71848026\",\"labels\":[\"Person\"],\"properties\":{\"keyNo\":\"p26b3775f4ea1307e28aef63a6cf2cb8\",\"role\":\"自然人股东\",\"name\":\"刘敏\"},\"type\":\"Person\",\"name\":\"刘敏\",\"degree\":5},\n {\"id\":\"44830398\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"cac4c7d67320964eddebc475fa66d3f9\",\"registCapi\":\"1000.0\",\"name\":\"北京金山数字娱乐科技有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"北京金山数字娱乐科技有限公司\",\"degree\":4},\n {\"id\":\"47387343\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"d64da78333777354bf3634e371d736a6\",\"registCapi\":\"0.0\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"econKind\":\"有限合伙企业\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"degree\":3},\n {\"id\":\"26295729\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"77472fbe731c1b8f4bfc2723f3b65415\",\"registCapi\":\"21550.0\",\"name\":\"珠海金山软件有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"珠海金山软件有限公司\",\"degree\":5},\n {\"id\":\"24305985\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"6e62fda57887baa0909cb79bef96b07c\",\"registCapi\":\"5000.0\",\"name\":\"小米影业有限责任公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"小米影业有限责任公司\",\"degree\":10},\n {\"id\":\"9036981\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"29328112375d07205ab125dcb575d59b\",\"registCapi\":\"1000.0\",\"name\":\"图扑尚贸易(上海)有限公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"图扑尚贸易(上海)有限公司\",\"degree\":3},\n {\"id\":\"53463922\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"f1ba2f7dfcecba582edbf89b03009980\",\"registCapi\":\"43757.56\",\"name\":\"广州华凌空调设备有限公司\",\"econKind\":\"其他有限责任公司\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广州华凌空调设备有限公司\",\"degree\":4},\n {\"id\":\"2791598\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"0cc68eb8e8f9d0445d1916a9872d207c\",\"registCapi\":\"6926.0\",\"name\":\"广东美的生活电器制造有限公司\",\"econKind\":\"有限责任公司(台港澳与境内合资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广东美的生活电器制造有限公司\",\"degree\":4}\n];\n\n// 构建边数据(投资、任职关系)\nconst edges = [\n { source: \"71848026\", target: \"24305985\", data: { relation: \"投资\", amount: \"自然人股东\" } },\n { source: \"13956312\", target: \"53463922\", data: { relation: \"投资\", amount: \"控股\" } },\n { source: \"27800994\", target: \"47387343\", data: { relation: \"投资\", amount: \"有限合伙\" } },\n { source: \"26295729\", target: \"44830398\", data: { relation: \"控股\", amount: \"100%\" } },\n { source: \"24305985\", target: \"9036981\", data: { relation: \"投资\", amount: \"贸易合作\" } },\n { source: \"53463922\", target: \"2791598\", data: { relation: \"供应链\", amount: \"设备供应\" } },\n { source: \"71848026\", target: \"47387343\", data: { relation: \"任职\", amount: \"执行事务合伙人\" } },\n { source: \"13956312\", target: \"24305985\", data: { relation: \"投资\", amount: \"影视投资\" } },\n { source: \"26295729\", target: \"27800994\", data: { relation: \"投资\", amount: \"资产管理\" } },\n { source: \"44830398\", target: \"9036981\", data: { relation: \"合作\", amount: \"数字娱乐\" } },\n { source: \"2791598\", target: \"53463922\", data: { relation: \"采购\", amount: \"空调设备\" } },\n { source: \"47387343\", target: \"24305985\", data: { relation: \"投资\", amount: \"影视基金\" } }\n];\n\n// 转换节点数据格式\nconst nodes = rawNodes.map(node => ({\n id: node.id,\n data: {\n name: node.name,\n type: node.type,\n degree: node.degree,\n registCapi: node.properties.registCapi,\n econKind: node.properties.econKind,\n status: node.properties.status,\n role: node.properties.role\n }\n}));\n\nconst data = { nodes, edges };\n\nconst graph = new Graph({\n container: 'container',\n width: 960,\n height: 640,\n data,\n\n node: {\n type: 'circle',\n style: {\n size: (d) => 24 + (d.data.degree || 1) * 6,\n labelText: (d) => d.data.name,\n labelPlacement: 'bottom',\n labelFontSize: 11,\n labelFill: '#333',\n labelMaxWidth: 140,\n labelWordWrap: true,\n cursor: 'pointer',\n },\n palette: {\n type: 'group',\n field: 'type',\n color: ['#1783FF', '#52c41a'], // Company: 蓝色, Person: 绿色\n },\n state: {\n active: {\n lineWidth: 3,\n halo: true,\n haloOpacity: 0.25,\n haloLineWidth: 12,\n labelFontSize: 12,\n labelFontWeight: 'bold',\n },\n inactive: {\n opacity: 0.2,\n },\n selected: {\n lineWidth: 3,\n halo: true,\n haloOpacity: 0.3,\n haloLineWidth: 16,\n },\n },\n },\n\n edge: {\n type: 'line',\n style: {\n stroke: '#c2c8d5',\n lineWidth: 1.5,\n endArrow: true,\n endArrowSize: 8,\n labelText: (d) => d.data.relation,\n labelFontSize: 10,\n labelFill: '#666',\n labelBackground: true,\n labelBackgroundFill: '#f5f5f5',\n labelBackgroundOpacity: 0.8,\n labelBackgroundRadius: 4,\n labelPadding: [2, 4],\n },\n state: {\n active: {\n stroke: '#1783FF',\n lineWidth: 3,\n labelFontWeight: 'bold',\n labelFill: '#1783FF',\n },\n inactive: {\n opacity: 0.1,\n },\n },\n },\n\n layout: {\n type: 'force',\n linkDistance: 150,\n gravity: 20,\n nodeStrength: 30,\n edgeStrength: 0.2,\n },\n\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force',\n {\n type: 'hover-activate',\n degree: 1,\n state: 'active',\n inactiveState: 'inactive',\n },\n {\n type: 'click-select',\n state: 'selected',\n multiple: false,\n },\n ],\n\n plugins: [\n {\n type: 'tooltip',\n getContent: (event, items) => {\n const [item] = items;\n if (!item) return '';\n const d = item.data;\n const isPerson = d.type === 'Person';\n \n let content = `
`;\n content += `
${d.name}
`;\n \n if (isPerson) {\n content += `
● 自然人
`;\n if (d.role) content += `
角色:${d.role}
`;\n } else {\n content += `
● 企业
`;\n if (d.econKind) content += `
类型:${d.econKind}
`;\n if (d.registCapi && d.registCapi !== '0.0') content += `
注册资本:${d.registCapi}万元
`;\n if (d.status) content += `
状态:${d.status}
`;\n }\n \n content += `
关联度:${d.degree}
`;\n content += `
`;\n return content;\n },\n offset: [10, 10],\n },\n {\n type: 'minimap',\n size: [200, 140],\n position: 'right-bottom',\n },\n ],\n});\n\ngraph.render();", + "duration": 65660, + "retrievedSkillIds": [ + "g6-pattern-network-graph", + "g6-behavior-hover-activate", + "g6-core-graph-api", + "g6-node-html", + "g6-node-circle" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 7162, + "expectedLength": 20091, + "similarity": 0.42275213321006944, + "extractedCode": "import { Graph } from '@antv/g6';\n\n// 节点数据\nconst rawNodes = [\n {\"id\":\"27800994\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"7e023446a248dd2e873ede3a08eeadc5\",\"registCapi\":\"5000.0\",\"name\":\"成都倍达资产管理有限公司\",\"econKind\":\"有限责任公司(非自然人投资或控股的法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"成都倍达资产管理有限公司\",\"degree\":4},\n {\"id\":\"13956312\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"3fc8e6b450a351dffaf97ebba7bd5675\",\"registCapi\":\"21000.0\",\"name\":\"小米科技(武汉)有限公司\",\"econKind\":\"有限责任公司(外商投资企业法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"小米科技(武汉)有限公司\",\"degree\":4},\n {\"id\":\"71848026\",\"labels\":[\"Person\"],\"properties\":{\"keyNo\":\"p26b3775f4ea1307e28aef63a6cf2cb8\",\"role\":\"自然人股东\",\"name\":\"刘敏\"},\"type\":\"Person\",\"name\":\"刘敏\",\"degree\":5},\n {\"id\":\"44830398\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"cac4c7d67320964eddebc475fa66d3f9\",\"registCapi\":\"1000.0\",\"name\":\"北京金山数字娱乐科技有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"北京金山数字娱乐科技有限公司\",\"degree\":4},\n {\"id\":\"47387343\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"d64da78333777354bf3634e371d736a6\",\"registCapi\":\"0.0\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"econKind\":\"有限合伙企业\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"degree\":3},\n {\"id\":\"26295729\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"77472fbe731c1b8f4bfc2723f3b65415\",\"registCapi\":\"21550.0\",\"name\":\"珠海金山软件有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"珠海金山软件有限公司\",\"degree\":5},\n {\"id\":\"24305985\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"6e62fda57887baa0909cb79bef96b07c\",\"registCapi\":\"5000.0\",\"name\":\"小米影业有限责任公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"小米影业有限责任公司\",\"degree\":10},\n {\"id\":\"9036981\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"29328112375d07205ab125dcb575d59b\",\"registCapi\":\"1000.0\",\"name\":\"图扑尚贸易(上海)有限公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"图扑尚贸易(上海)有限公司\",\"degree\":3},\n {\"id\":\"53463922\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"f1ba2f7dfcecba582edbf89b03009980\",\"registCapi\":\"43757.56\",\"name\":\"广州华凌空调设备有限公司\",\"econKind\":\"其他有限责任公司\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广州华凌空调设备有限公司\",\"degree\":4},\n {\"id\":\"2791598\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"0cc68eb8e8f9d0445d1916a9872d207c\",\"registCapi\":\"6926.0\",\"name\":\"广东美的生活电器制造有限公司\",\"econKind\":\"有限责任公司(台港澳与境内合资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广东美的生活电器制造有限公司\",\"degree\":4}\n];\n\n// 构建边数据(投资、任职关系)\nconst edges = [\n { source: \"71848026\", target: \"24305985\", data: { relation: \"投资\", amount: \"自然人股东\" } },\n { source: \"13956312\", target: \"53463922\", data: { relation: \"投资\", amount: \"控股\" } },\n { source: \"27800994\", target: \"47387343\", data: { relation: \"投资\", amount: \"有限合伙\" } },\n { source: \"26295729\", target: \"44830398\", data: { relation: \"控股\", amount: \"100%\" } },\n { source: \"24305985\", target: \"9036981\", data: { relation: \"投资\", amount: \"贸易合作\" } },\n { source: \"53463922\", target: \"2791598\", data: { relation: \"供应链\", amount: \"设备供应\" } },\n { source: \"71848026\", target: \"47387343\", data: { relation: \"任职\", amount: \"执行事务合伙人\" } },\n { source: \"13956312\", target: \"24305985\", data: { relation: \"投资\", amount: \"影视投资\" } },\n { source: \"26295729\", target: \"27800994\", data: { relation: \"投资\", amount: \"资产管理\" } },\n { source: \"44830398\", target: \"9036981\", data: { relation: \"合作\", amount: \"数字娱乐\" } },\n { source: \"2791598\", target: \"53463922\", data: { relation: \"采购\", amount: \"空调设备\" } },\n { source: \"47387343\", target: \"24305985\", data: { relation: \"投资\", amount: \"影视基金\" } }\n];\n\n// 转换节点数据格式\nconst nodes = rawNodes.map(node => ({\n id: node.id,\n data: {\n name: node.name,\n type: node.type,\n degree: node.degree,\n registCapi: node.properties.registCapi,\n econKind: node.properties.econKind,\n status: node.properties.status,\n role: node.properties.role\n }\n}));\n\nconst data = { nodes, edges };\n\nconst graph = new Graph({\n container: 'container',\n width: 960,\n height: 640,\n data,\n\n node: {\n type: 'circle',\n style: {\n size: (d) => 24 + (d.data.degree || 1) * 6,\n labelText: (d) => d.data.name,\n labelPlacement: 'bottom',\n labelFontSize: 11,\n labelFill: '#333',\n labelMaxWidth: 140,\n labelWordWrap: true,\n cursor: 'pointer',\n },\n palette: {\n type: 'group',\n field: 'type',\n color: ['#1783FF', '#52c41a'], // Company: 蓝色, Person: 绿色\n },\n state: {\n active: {\n lineWidth: 3,\n halo: true,\n haloOpacity: 0.25,\n haloLineWidth: 12,\n labelFontSize: 12,\n labelFontWeight: 'bold',\n },\n inactive: {\n opacity: 0.2,\n },\n selected: {\n lineWidth: 3,\n halo: true,\n haloOpacity: 0.3,\n haloLineWidth: 16,\n },\n },\n },\n\n edge: {\n type: 'line',\n style: {\n stroke: '#c2c8d5',\n lineWidth: 1.5,\n endArrow: true,\n endArrowSize: 8,\n labelText: (d) => d.data.relation,\n labelFontSize: 10,\n labelFill: '#666',\n labelBackground: true,\n labelBackgroundFill: '#f5f5f5',\n labelBackgroundOpacity: 0.8,\n labelBackgroundRadius: 4,\n labelPadding: [2, 4],\n },\n state: {\n active: {\n stroke: '#1783FF',\n lineWidth: 3,\n labelFontWeight: 'bold',\n labelFill: '#1783FF',\n },\n inactive: {\n opacity: 0.1,\n },\n },\n },\n\n layout: {\n type: 'force',\n linkDistance: 150,\n gravity: 20,\n nodeStrength: 30,\n edgeStrength: 0.2,\n },\n\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force',\n {\n type: 'hover-activate',\n degree: 1,\n state: 'active',\n inactiveState: 'inactive',\n },\n {\n type: 'click-select',\n state: 'selected',\n multiple: false,\n },\n ],\n\n plugins: [\n {\n type: 'tooltip',\n getContent: (event, items) => {\n const [item] = items;\n if (!item) return '';\n const d = item.data;\n const isPerson = d.type === 'Person';\n \n let content = `
`;\n content += `
${d.name}
`;\n \n if (isPerson) {\n content += `
● 自然人
`;\n if (d.role) content += `
角色:${d.role}
`;\n } else {\n content += `
● 企业
`;\n if (d.econKind) content += `
类型:${d.econKind}
`;\n if (d.registCapi && d.registCapi !== '0.0') content += `
注册资本:${d.registCapi}万元
`;\n if (d.status) content += `
状态:${d.status}
`;\n }\n \n content += `
关联度:${d.degree}
`;\n content += `
`;\n return content;\n },\n offset: [10, 10],\n },\n {\n type: 'minimap',\n size: [200, 140],\n position: 'right-bottom',\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "map", + "Graph", + "render" + ], + "objectKeys": [ + "source", + "target", + "data", + "relation", + "amount", + "source", + "target", + "data", + "relation", + "amount", + "source", + "target", + "data", + "relation", + "amount", + "source", + "target", + "data", + "relation", + "amount", + "source", + "target", + "data", + "relation", + "amount", + "source", + "target", + "data", + "relation", + "amount", + "source", + "target", + "data", + "relation", + "amount", + "source", + "target", + "data", + "relation", + "amount", + "source", + "target", + "data", + "relation", + "amount", + "source", + "target", + "data", + "relation", + "amount", + "source", + "target", + "data", + "relation", + "amount", + "source", + "target", + "data", + "relation", + "amount", + "id", + "data", + "name", + "type", + "degree", + "registCapi", + "econKind", + "status", + "role", + "container", + "width", + "height", + "node", + "type", + "style", + "size", + "labelText", + "labelPlacement", + "labelFontSize", + "labelFill", + "labelMaxWidth", + "labelWordWrap", + "cursor", + "palette", + "type", + "field", + "color", + "Company", + "Person", + "state", + "active", + "lineWidth", + "halo", + "haloOpacity", + "haloLineWidth", + "labelFontSize", + "labelFontWeight", + "inactive", + "opacity", + "selected", + "lineWidth", + "halo", + "haloOpacity", + "haloLineWidth", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "endArrowSize", + "labelText", + "labelFontSize", + "labelFill", + "labelBackground", + "labelBackgroundFill", + "labelBackgroundOpacity", + "labelBackgroundRadius", + "labelPadding", + "state", + "active", + "stroke", + "lineWidth", + "labelFontWeight", + "labelFill", + "inactive", + "opacity", + "layout", + "type", + "linkDistance", + "gravity", + "nodeStrength", + "edgeStrength", + "behaviors", + "type", + "degree", + "state", + "inactiveState", + "type", + "state", + "multiple", + "plugins", + "type", + "getContent", + "padding", + "width", + "size", + "weight", + "size", + "bottom", + "color", + "color", + "bottom", + "color", + "top", + "color", + "bottom", + "color", + "top", + "color", + "color", + "color", + "color", + "top", + "size", + "offset", + "type", + "size", + "position" + ], + "stringLiterals": [ + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "role", + "name", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree" + ], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-53", + "query": "根据描述绘制图表,使用 AntV G6 渲染一个树状图,展示机器学习建模方法的层级结构。节点根据是否为叶节点采用不同的标签样式,支持画布拖拽、缩放以及节点折叠展开等交互行为。参考数据:[{\"id\":\"Modeling Methods\",\"children\":[{\"id\":\"Classification\",\"children\":[{\"id\":\"Logistic regression\"},{\"id\":\"Linear discriminant analysis\"},{\"id\":\"Rules\"},{\"id\":\"Decision trees\"},{\"id\":\"Naive Bayes\"},{\"id\":\"K nearest neighbor\"},{\"id\":\"Probabilistic neural network\"},{\"id\":\"Support vector machine\"}]},{\"id\":\"Consensus\",\"children\":[{\"id\":\"Models diversity\",\"children\":[{\"id\":\"Different initializations\"},{\"id\":\"Different parameter choices\"},{\"id\":\"Different architectures\"},{\"id\":\"Different modeling methods\"},{\"id\":\"Different training sets\"},{\"id\":\"Different feature sets\"}]},{\"id\":\"Methods\",\"children\":[{\"id\":\"Classifier selection\"},{\"id\":\"Classifier fusion\"}]},{\"id\":\"Common\",\"children\":[{\"id\":\"Bagging\"},{\"id\":\"Boosting\"},{\"id\":\"AdaBoost\"}]}]},{\"id\":\"Regression\",\"children\":[{\"id\":\"Multiple linear regression\"},{\"id\":\"Partial least squares\"},{\"id\":\"Multi-layer feedforward neural network\"},{\"id\":\"General regression neural network\"},{\"id\":\"Support vector regression\"}]}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\n/**\n * If the node is a leaf node\n * @param {*} d - node data\n * @returns {boolean} - whether the node is a leaf node\n */\nfunction isLeafNode(d) {\n return !d.children || d.children.length === 0;\n}\n\nconst data = {\n \"id\": \"Modeling Methods\",\n \"children\": [\n {\n \"id\": \"Classification\",\n \"children\": [\n {\n \"id\": \"Logistic regression\"\n },\n {\n \"id\": \"Linear discriminant analysis\"\n },\n {\n \"id\": \"Rules\"\n },\n {\n \"id\": \"Decision trees\"\n },\n {\n \"id\": \"Naive Bayes\"\n },\n {\n \"id\": \"K nearest neighbor\"\n },\n {\n \"id\": \"Probabilistic neural network\"\n },\n {\n \"id\": \"Support vector machine\"\n }\n ]\n },\n {\n \"id\": \"Consensus\",\n \"children\": [\n {\n \"id\": \"Models diversity\",\n \"children\": [\n {\n \"id\": \"Different initializations\"\n },\n {\n \"id\": \"Different parameter choices\"\n },\n {\n \"id\": \"Different architectures\"\n },\n {\n \"id\": \"Different modeling methods\"\n },\n {\n \"id\": \"Different training sets\"\n },\n {\n \"id\": \"Different feature sets\"\n }\n ]\n },\n {\n \"id\": \"Methods\",\n \"children\": [\n {\n \"id\": \"Classifier selection\"\n },\n {\n \"id\": \"Classifier fusion\"\n }\n ]\n },\n {\n \"id\": \"Common\",\n \"children\": [\n {\n \"id\": \"Bagging\"\n },\n {\n \"id\": \"Boosting\"\n },\n {\n \"id\": \"AdaBoost\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"Regression\",\n \"children\": [\n {\n \"id\": \"Multiple linear regression\"\n },\n {\n \"id\": \"Partial least squares\"\n },\n {\n \"id\": \"Multi-layer feedforward neural network\"\n },\n {\n \"id\": \"General regression neural network\"\n },\n {\n \"id\": \"Support vector regression\"\n }\n ]\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: treeToGraphData(data),\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'collapse-expand'],\n node: {\n style: (d) => {\n const style = {\n labelText: d.id,\n labelPlacement: 'right',\n labelOffsetX: 2,\n labelBackground: true,\n ports: [{ placement: 'top' }, { placement: 'bottom' }],\n };\n if (isLeafNode(d)) {\n Object.assign(style, {\n labelTransform: [\n ['rotate', 90],\n ['translate', 18],\n ],\n labelBaseline: 'center',\n labelTextAlign: 'left',\n });\n }\n return style;\n },\n animation: {\n enter: false,\n },\n },\n edge: {\n type: 'cubic-vertical',\n animation: {\n enter: false,\n },\n },\n layout: {\n type: 'compact-box',\n direction: 'TB',\n getHeight: function getHeight() {\n return 16;\n },\n getWidth: function getWidth() {\n return 16;\n },\n getVGap: function getVGap() {\n return 80;\n },\n getHGap: function getHGap() {\n return 20;\n },\n },\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst rawData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nfunction markLeafNodes(node) {\n if (!node.children || node.children.length === 0) {\n node.data = { isLeaf: true, label: node.id };\n } else {\n node.data = { isLeaf: false, label: node.id };\n node.children.forEach(markLeafNodes);\n }\n return node;\n}\n\nconst treeData = markLeafNodes(rawData);\n\nconst graph = new Graph({\n container: 'container',\n width: 1000,\n height: 800,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'rect',\n style: {\n size: (d) => d.data?.isLeaf ? [150, 32] : [180, 40],\n radius: (d) => d.data?.isLeaf ? 4 : 8,\n fill: (d) => d.data?.isLeaf ? '#e6f4ff' : '#1677ff',\n stroke: (d) => d.data?.isLeaf ? '#91caff' : '#1677ff',\n lineWidth: 1,\n labelText: (d) => d.data?.label,\n labelFill: (d) => d.data?.isLeaf ? '#1677ff' : '#ffffff',\n labelFontSize: (d) => d.data?.isLeaf ? 12 : 14,\n labelFontWeight: (d) => d.data?.isLeaf ? 'normal' : 'bold',\n labelPlacement: 'center',\n cursor: 'pointer',\n },\n },\n edge: {\n type: 'cubic-vertical',\n style: {\n stroke: '#c0d8f0',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'compact-box',\n direction: 'TB',\n getHeight: () => 40,\n getWidth: (d) => d.data?.isLeaf ? 150 : 180,\n getVGap: () => 50,\n getHGap: () => 40,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true,\n },\n ],\n});\n\ngraph.render();", + "duration": 26192, + "retrievedSkillIds": [ + "g6-pattern-tree-graph", + "g6-node-rect", + "g6-layout-mindmap", + "g6-node-circle", + "g6-node-html" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 3047, + "expectedLength": 3620, + "similarity": 0.5509109311740891, + "extractedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst rawData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nfunction markLeafNodes(node) {\n if (!node.children || node.children.length === 0) {\n node.data = { isLeaf: true, label: node.id };\n } else {\n node.data = { isLeaf: false, label: node.id };\n node.children.forEach(markLeafNodes);\n }\n return node;\n}\n\nconst treeData = markLeafNodes(rawData);\n\nconst graph = new Graph({\n container: 'container',\n width: 1000,\n height: 800,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'rect',\n style: {\n size: (d) => d.data?.isLeaf ? [150, 32] : [180, 40],\n radius: (d) => d.data?.isLeaf ? 4 : 8,\n fill: (d) => d.data?.isLeaf ? '#e6f4ff' : '#1677ff',\n stroke: (d) => d.data?.isLeaf ? '#91caff' : '#1677ff',\n lineWidth: 1,\n labelText: (d) => d.data?.label,\n labelFill: (d) => d.data?.isLeaf ? '#1677ff' : '#ffffff',\n labelFontSize: (d) => d.data?.isLeaf ? 12 : 14,\n labelFontWeight: (d) => d.data?.isLeaf ? 'normal' : 'bold',\n labelPlacement: 'center',\n cursor: 'pointer',\n },\n },\n edge: {\n type: 'cubic-vertical',\n style: {\n stroke: '#c0d8f0',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'compact-box',\n direction: 'TB',\n getHeight: () => 40,\n getWidth: (d) => d.data?.isLeaf ? 150 : 180,\n getVGap: () => 50,\n getHGap: () => 40,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true,\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "treeToGraphData" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "markLeafNodes", + "forEach", + "markLeafNodes", + "Graph", + "treeToGraphData", + "render" + ], + "objectKeys": [ + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "isLeaf", + "label", + "isLeaf", + "label", + "container", + "width", + "height", + "autoFit", + "data", + "node", + "type", + "style", + "size", + "radius", + "4", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelFill", + "labelFontSize", + "12", + "labelFontWeight", + "labelPlacement", + "cursor", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "direction", + "getHeight", + "getWidth", + "150", + "getVGap", + "getHGap", + "behaviors", + "type", + "trigger", + "animation" + ], + "stringLiterals": [], + "apiPatterns": [ + "view.children", + "new Graph", + "x6.label" + ] + } + } + }, + { + "id": "case-54", + "query": "根据描述绘制图表,使用 G6 库创建一个径向布局的图谱可视化,通过导入 Graph 模块并传入包含节点和边的数据来实例化图表。设置图表容器为 'container',采用径向布局并配置相关参数如节点大小、半径距离等,同时开启防止重叠功能。节点样式设置了居中白色文字标签显示节点 ID,支持画布拖拽与元素拖拽交互,最后调用 render 方法渲染图表。参考数据:[{\"id\":\"0\"},{\"id\":\"1\"},{\"id\":\"2\"},{\"id\":\"3\"},{\"id\":\"4\"},{\"id\":\"5\"},{\"id\":\"6\"},{\"id\":\"7\"},{\"id\":\"8\"},{\"id\":\"9\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"0\"\n },\n {\n \"id\": \"1\"\n },\n {\n \"id\": \"2\"\n },\n {\n \"id\": \"3\"\n },\n {\n \"id\": \"4\"\n },\n {\n \"id\": \"5\"\n },\n {\n \"id\": \"6\"\n },\n {\n \"id\": \"7\"\n },\n {\n \"id\": \"8\"\n },\n {\n \"id\": \"9\"\n },\n {\n \"id\": \"10\"\n },\n {\n \"id\": \"11\"\n },\n {\n \"id\": \"12\"\n },\n {\n \"id\": \"13\"\n },\n {\n \"id\": \"14\"\n },\n {\n \"id\": \"15\"\n },\n {\n \"id\": \"16\"\n },\n {\n \"id\": \"17\"\n },\n {\n \"id\": \"18\"\n },\n {\n \"id\": \"19\"\n },\n {\n \"id\": \"20\"\n },\n {\n \"id\": \"21\"\n },\n {\n \"id\": \"22\"\n },\n {\n \"id\": \"23\"\n },\n {\n \"id\": \"24\"\n },\n {\n \"id\": \"25\"\n },\n {\n \"id\": \"26\"\n },\n {\n \"id\": \"27\"\n },\n {\n \"id\": \"28\"\n },\n {\n \"id\": \"29\"\n },\n {\n \"id\": \"30\"\n },\n {\n \"id\": \"31\"\n },\n {\n \"id\": \"32\"\n },\n {\n \"id\": \"33\"\n }\n ],\n \"edges\": [\n {\n \"source\": \"0\",\n \"target\": \"1\"\n },\n {\n \"source\": \"0\",\n \"target\": \"2\"\n },\n {\n \"source\": \"0\",\n \"target\": \"3\"\n },\n {\n \"source\": \"0\",\n \"target\": \"4\"\n },\n {\n \"source\": \"0\",\n \"target\": \"5\"\n },\n {\n \"source\": \"0\",\n \"target\": \"7\"\n },\n {\n \"source\": \"0\",\n \"target\": \"8\"\n },\n {\n \"source\": \"0\",\n \"target\": \"9\"\n },\n {\n \"source\": \"0\",\n \"target\": \"10\"\n },\n {\n \"source\": \"0\",\n \"target\": \"11\"\n },\n {\n \"source\": \"0\",\n \"target\": \"13\"\n },\n {\n \"source\": \"0\",\n \"target\": \"14\"\n },\n {\n \"source\": \"0\",\n \"target\": \"15\"\n },\n {\n \"source\": \"0\",\n \"target\": \"16\"\n },\n {\n \"source\": \"2\",\n \"target\": \"3\"\n },\n {\n \"source\": \"4\",\n \"target\": \"5\"\n },\n {\n \"source\": \"4\",\n \"target\": \"6\"\n },\n {\n \"source\": \"5\",\n \"target\": \"6\"\n },\n {\n \"source\": \"7\",\n \"target\": \"13\"\n },\n {\n \"source\": \"8\",\n \"target\": \"14\"\n },\n {\n \"source\": \"10\",\n \"target\": \"22\"\n },\n {\n \"source\": \"10\",\n \"target\": \"14\"\n },\n {\n \"source\": \"10\",\n \"target\": \"12\"\n },\n {\n \"source\": \"10\",\n \"target\": \"24\"\n },\n {\n \"source\": \"10\",\n \"target\": \"21\"\n },\n {\n \"source\": \"10\",\n \"target\": \"20\"\n },\n {\n \"source\": \"11\",\n \"target\": \"24\"\n },\n {\n \"source\": \"11\",\n \"target\": \"22\"\n },\n {\n \"source\": \"11\",\n \"target\": \"14\"\n },\n {\n \"source\": \"12\",\n \"target\": \"13\"\n },\n {\n \"source\": \"16\",\n \"target\": \"17\"\n },\n {\n \"source\": \"16\",\n \"target\": \"18\"\n },\n {\n \"source\": \"16\",\n \"target\": \"21\"\n },\n {\n \"source\": \"16\",\n \"target\": \"22\"\n },\n {\n \"source\": \"17\",\n \"target\": \"18\"\n },\n {\n \"source\": \"17\",\n \"target\": \"20\"\n },\n {\n \"source\": \"18\",\n \"target\": \"19\"\n },\n {\n \"source\": \"19\",\n \"target\": \"20\"\n },\n {\n \"source\": \"19\",\n \"target\": \"33\"\n },\n {\n \"source\": \"19\",\n \"target\": \"22\"\n },\n {\n \"source\": \"19\",\n \"target\": \"23\"\n },\n {\n \"source\": \"20\",\n \"target\": \"21\"\n },\n {\n \"source\": \"21\",\n \"target\": \"22\"\n },\n {\n \"source\": \"22\",\n \"target\": \"24\"\n },\n {\n \"source\": \"22\",\n \"target\": \"26\"\n },\n {\n \"source\": \"22\",\n \"target\": \"23\"\n },\n {\n \"source\": \"22\",\n \"target\": \"28\"\n },\n {\n \"source\": \"22\",\n \"target\": \"30\"\n },\n {\n \"source\": \"22\",\n \"target\": \"31\"\n },\n {\n \"source\": \"22\",\n \"target\": \"32\"\n },\n {\n \"source\": \"22\",\n \"target\": \"33\"\n },\n {\n \"source\": \"23\",\n \"target\": \"28\"\n },\n {\n \"source\": \"23\",\n \"target\": \"27\"\n },\n {\n \"source\": \"23\",\n \"target\": \"29\"\n },\n {\n \"source\": \"23\",\n \"target\": \"30\"\n },\n {\n \"source\": \"23\",\n \"target\": \"31\"\n },\n {\n \"source\": \"23\",\n \"target\": \"33\"\n },\n {\n \"source\": \"32\",\n \"target\": \"33\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data,\n autoFit: 'center',\n layout: {\n type: 'radial',\n nodeSize: 32,\n unitRadius: 90,\n linkDistance: 200,\n preventOverlap: true,\n maxPreventOverlapIteration: 100,\n strictRadial: false,\n },\n node: {\n style: {\n labelFill: '#fff',\n labelPlacement: 'center',\n labelText: (d) => d.id,\n },\n },\n behaviors: ['drag-canvas', 'drag-element'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0', data: { label: '0' } },\n { id: '1', data: { label: '1' } },\n { id: '2', data: { label: '2' } },\n { id: '3', data: { label: '3' } },\n { id: '4', data: { label: '4' } },\n { id: '5', data: { label: '5' } },\n { id: '6', data: { label: '6' } },\n { id: '7', data: { label: '7' } },\n { id: '8', data: { label: '8' } },\n { id: '9', data: { label: '9' } },\n ],\n edges: [\n { id: 'e0-1', source: '0', target: '1' },\n { id: 'e0-2', source: '0', target: '2' },\n { id: 'e0-3', source: '0', target: '3' },\n { id: 'e0-4', source: '0', target: '4' },\n { id: 'e0-5', source: '0', target: '5' },\n { id: 'e1-6', source: '1', target: '6' },\n { id: 'e2-7', source: '2', target: '7' },\n { id: 'e3-8', source: '3', target: '8' },\n { id: 'e4-9', source: '4', target: '9' },\n { id: 'e6-7', source: '6', target: '7' },\n { id: 'e7-8', source: '7', target: '8' },\n { id: 'e8-9', source: '8', target: '9' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data,\n layout: {\n type: 'radial',\n preventOverlap: true,\n nodeSize: 40,\n unitRadius: 100,\n linkDistance: 150,\n },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 14,\n labelFontWeight: 'bold',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#ccc',\n lineWidth: 1.5,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "duration": 10706, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-core-graph-init", + "g6-behavior-drag-element", + "g6-node-rect", + "g6-node-html" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1689, + "expectedLength": 5108, + "similarity": 0.6154233046450589, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0', data: { label: '0' } },\n { id: '1', data: { label: '1' } },\n { id: '2', data: { label: '2' } },\n { id: '3', data: { label: '3' } },\n { id: '4', data: { label: '4' } },\n { id: '5', data: { label: '5' } },\n { id: '6', data: { label: '6' } },\n { id: '7', data: { label: '7' } },\n { id: '8', data: { label: '8' } },\n { id: '9', data: { label: '9' } },\n ],\n edges: [\n { id: 'e0-1', source: '0', target: '1' },\n { id: 'e0-2', source: '0', target: '2' },\n { id: 'e0-3', source: '0', target: '3' },\n { id: 'e0-4', source: '0', target: '4' },\n { id: 'e0-5', source: '0', target: '5' },\n { id: 'e1-6', source: '1', target: '6' },\n { id: 'e2-7', source: '2', target: '7' },\n { id: 'e3-8', source: '3', target: '8' },\n { id: 'e4-9', source: '4', target: '9' },\n { id: 'e6-7', source: '6', target: '7' },\n { id: 'e7-8', source: '7', target: '8' },\n { id: 'e8-9', source: '8', target: '9' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data,\n layout: {\n type: 'radial',\n preventOverlap: true,\n nodeSize: 40,\n unitRadius: 100,\n linkDistance: 150,\n },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 14,\n labelFontWeight: 'bold',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#ccc',\n lineWidth: 1.5,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "edges", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "container", + "autoFit", + "layout", + "type", + "preventOverlap", + "nodeSize", + "unitRadius", + "linkDistance", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "labelFontWeight", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-55", + "query": "根据描述绘制图表,使用 G6 渲染一个包含节点和组合的图形,节点根据所属组合进行分组,组合以圆形方式展示,支持拖拽和展开收起交互。参考数据:[{\"id\":\"node1\",\"combo\":\"combo1\",\"style\":{\"x\":250,\"y\":150}},{\"id\":\"node2\",\"combo\":\"combo1\",\"style\":{\"x\":350,\"y\":150}},{\"id\":\"node3\",\"combo\":\"combo2\",\"style\":{\"x\":250,\"y\":300}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 250, y: 150 } },\n { id: 'node2', combo: 'combo1', style: { x: 350, y: 150 } },\n { id: 'node3', combo: 'combo2', style: { x: 250, y: 300 } },\n ],\n edges: [],\n combos: [{ id: 'combo1', combo: 'combo2' }, { id: 'combo2' }],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n labelText: (d) => d.id,\n },\n },\n combo: {\n type: 'circle',\n },\n behaviors: ['drag-element', 'collapse-expand'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 250, y: 150 }, data: { label: 'Node 1' } },\n { id: 'node2', combo: 'combo1', style: { x: 350, y: 150 }, data: { label: 'Node 2' } },\n { id: 'node3', combo: 'combo2', style: { x: 250, y: 300 }, data: { label: 'Node 3' } },\n ],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node1', target: 'node3' },\n ],\n combos: [\n { id: 'combo1', data: { label: 'Combo 1' } },\n { id: 'combo2', data: { label: 'Combo 2' } },\n ],\n};\n\nconst graph = new Graph({\n container,\n width: 800,\n height: 600,\n data,\n node: {\n type: 'circle',\n style: {\n size: 30,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data?.label || d.id,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n combo: {\n type: 'circle',\n style: {\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 2,\n padding: 20,\n labelText: (d) => d.data?.label || d.id,\n labelPlacement: 'top',\n labelFill: '#1d39c4',\n labelFontWeight: 600,\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n type: 'collapse-expand',\n trigger: 'dblclick',\n },\n ],\n});\n\ngraph.render();", + "duration": 13333, + "retrievedSkillIds": [ + "g6-pattern-tree-graph", + "g6-node-circle", + "g6-node-rect", + "g6-combo-overview", + "g6-behavior-canvas-nav" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1323, + "expectedLength": 575, + "similarity": 0.7662226272966512, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 250, y: 150 }, data: { label: 'Node 1' } },\n { id: 'node2', combo: 'combo1', style: { x: 350, y: 150 }, data: { label: 'Node 2' } },\n { id: 'node3', combo: 'combo2', style: { x: 250, y: 300 }, data: { label: 'Node 3' } },\n ],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node1', target: 'node3' },\n ],\n combos: [\n { id: 'combo1', data: { label: 'Combo 1' } },\n { id: 'combo2', data: { label: 'Combo 2' } },\n ],\n};\n\nconst graph = new Graph({\n container,\n width: 800,\n height: 600,\n data,\n node: {\n type: 'circle',\n style: {\n size: 30,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data?.label || d.id,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n combo: {\n type: 'circle',\n style: {\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 2,\n padding: 20,\n labelText: (d) => d.data?.label || d.id,\n labelPlacement: 'top',\n labelFill: '#1d39c4',\n labelFontWeight: 600,\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n type: 'collapse-expand',\n trigger: 'dblclick',\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "combo", + "style", + "x", + "y", + "data", + "label", + "id", + "combo", + "style", + "x", + "y", + "data", + "label", + "id", + "combo", + "style", + "x", + "y", + "data", + "label", + "edges", + "source", + "target", + "source", + "target", + "combos", + "id", + "data", + "label", + "id", + "data", + "label", + "width", + "height", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "combo", + "type", + "style", + "fill", + "stroke", + "lineWidth", + "padding", + "labelText", + "labelPlacement", + "labelFill", + "labelFontWeight", + "behaviors", + "type", + "trigger" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-56", + "query": "根据描述绘制图表,使用 G6 图表库创建一个力导向图,展示节点和边的关系网络。节点代表人物,边代表人物之间的关联及其强度。启用了画布拖拽、缩放和元素拖拽的交互功能,采用力导向布局进行自动排布。参考数据:[{\"id\":\"Myriel\"},{\"id\":\"Napoleon\"},{\"id\":\"Mlle.Baptistine\"},{\"id\":\"Mme.Magloire\"},{\"id\":\"CountessdeLo\"},{\"id\":\"Geborand\"},{\"id\":\"Champtercier\"},{\"id\":\"Cravatte\"},{\"id\":\"Count\"},{\"id\":\"OldMan\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst colors = [\n '#5F95FF',\n '#61DDAA',\n '#65789B',\n '#F6BD16',\n '#7262FD',\n '#78D3F8',\n '#9661BC',\n '#F6903D',\n '#008685',\n '#F08BB4',\n];\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"Myriel\"\n },\n {\n \"id\": \"Napoleon\"\n },\n {\n \"id\": \"Mlle.Baptistine\"\n },\n {\n \"id\": \"Mme.Magloire\"\n },\n {\n \"id\": \"CountessdeLo\"\n },\n {\n \"id\": \"Geborand\"\n },\n {\n \"id\": \"Champtercier\"\n },\n {\n \"id\": \"Cravatte\"\n },\n {\n \"id\": \"Count\"\n },\n {\n \"id\": \"OldMan\"\n },\n {\n \"id\": \"Labarre\"\n },\n {\n \"id\": \"Valjean\"\n },\n {\n \"id\": \"Marguerite\"\n },\n {\n \"id\": \"Mme.deR\"\n },\n {\n \"id\": \"Isabeau\"\n },\n {\n \"id\": \"Gervais\"\n },\n {\n \"id\": \"Tholomyes\"\n },\n {\n \"id\": \"Listolier\"\n },\n {\n \"id\": \"Fameuil\"\n },\n {\n \"id\": \"Blacheville\"\n },\n {\n \"id\": \"Favourite\"\n },\n {\n \"id\": \"Dahlia\"\n },\n {\n \"id\": \"Zephine\"\n },\n {\n \"id\": \"Fantine\"\n },\n {\n \"id\": \"Mme.Thenardier\"\n },\n {\n \"id\": \"Thenardier\"\n },\n {\n \"id\": \"Cosette\"\n },\n {\n \"id\": \"Javert\"\n },\n {\n \"id\": \"Fauchelevent\"\n },\n {\n \"id\": \"Bamatabois\"\n },\n {\n \"id\": \"Perpetue\"\n },\n {\n \"id\": \"Simplice\"\n },\n {\n \"id\": \"Scaufflaire\"\n },\n {\n \"id\": \"Woman1\"\n },\n {\n \"id\": \"Judge\"\n },\n {\n \"id\": \"Champmathieu\"\n },\n {\n \"id\": \"Brevet\"\n },\n {\n \"id\": \"Chenildieu\"\n },\n {\n \"id\": \"Cochepaille\"\n },\n {\n \"id\": \"Pontmercy\"\n },\n {\n \"id\": \"Boulatruelle\"\n },\n {\n \"id\": \"Eponine\"\n },\n {\n \"id\": \"Anzelma\"\n },\n {\n \"id\": \"Woman2\"\n },\n {\n \"id\": \"MotherInnocent\"\n },\n {\n \"id\": \"Gribier\"\n },\n {\n \"id\": \"Jondrette\"\n },\n {\n \"id\": \"Mme.Burgon\"\n },\n {\n \"id\": \"Gavroche\"\n },\n {\n \"id\": \"Gillenormand\"\n },\n {\n \"id\": \"Magnon\"\n },\n {\n \"id\": \"Mlle.Gillenormand\"\n },\n {\n \"id\": \"Mme.Pontmercy\"\n },\n {\n \"id\": \"Mlle.Vaubois\"\n },\n {\n \"id\": \"Lt.Gillenormand\"\n },\n {\n \"id\": \"Marius\"\n },\n {\n \"id\": \"BaronessT\"\n },\n {\n \"id\": \"Mabeuf\"\n },\n {\n \"id\": \"Enjolras\"\n },\n {\n \"id\": \"Combeferre\"\n },\n {\n \"id\": \"Prouvaire\"\n },\n {\n \"id\": \"Feuilly\"\n },\n {\n \"id\": \"Courfeyrac\"\n },\n {\n \"id\": \"Bahorel\"\n },\n {\n \"id\": \"Bossuet\"\n },\n {\n \"id\": \"Joly\"\n },\n {\n \"id\": \"Grantaire\"\n },\n {\n \"id\": \"MotherPlutarch\"\n },\n {\n \"id\": \"Gueulemer\"\n },\n {\n \"id\": \"Babet\"\n },\n {\n \"id\": \"Claquesous\"\n },\n {\n \"id\": \"Montparnasse\"\n },\n {\n \"id\": \"Toussaint\"\n },\n {\n \"id\": \"Child1\"\n },\n {\n \"id\": \"Child2\"\n },\n {\n \"id\": \"Brujon\"\n },\n {\n \"id\": \"Mme.Hucheloup\"\n }\n ],\n \"edges\": [\n {\n \"source\": \"Napoleon\",\n \"target\": \"Myriel\",\n \"value\": 1\n },\n {\n \"source\": \"Mlle.Baptistine\",\n \"target\": \"Myriel\",\n \"value\": 8\n },\n {\n \"source\": \"Mme.Magloire\",\n \"target\": \"Myriel\",\n \"value\": 10\n },\n {\n \"source\": \"Mme.Magloire\",\n \"target\": \"Mlle.Baptistine\",\n \"value\": 6\n },\n {\n \"source\": \"CountessdeLo\",\n \"target\": \"Myriel\",\n \"value\": 1\n },\n {\n \"source\": \"Geborand\",\n \"target\": \"Myriel\",\n \"value\": 1\n },\n {\n \"source\": \"Champtercier\",\n \"target\": \"Myriel\",\n \"value\": 1\n },\n {\n \"source\": \"Cravatte\",\n \"target\": \"Myriel\",\n \"value\": 1\n },\n {\n \"source\": \"Count\",\n \"target\": \"Myriel\",\n \"value\": 2\n },\n {\n \"source\": \"OldMan\",\n \"target\": \"Myriel\",\n \"value\": 1\n },\n {\n \"source\": \"Valjean\",\n \"target\": \"Labarre\",\n \"value\": 1\n },\n {\n \"source\": \"Valjean\",\n \"target\": \"Mme.Magloire\",\n \"value\": 3\n },\n {\n \"source\": \"Valjean\",\n \"target\": \"Mlle.Baptistine\",\n \"value\": 3\n },\n {\n \"source\": \"Valjean\",\n \"target\": \"Myriel\",\n \"value\": 5\n },\n {\n \"source\": \"Marguerite\",\n \"target\": \"Valjean\",\n \"value\": 1\n },\n {\n \"source\": \"Mme.deR\",\n \"target\": \"Valjean\",\n \"value\": 1\n },\n {\n \"source\": \"Isabeau\",\n \"target\": \"Valjean\",\n \"value\": 1\n },\n {\n \"source\": \"Gervais\",\n \"target\": \"Valjean\",\n \"value\": 1\n },\n {\n \"source\": \"Listolier\",\n \"target\": \"Tholomyes\",\n \"value\": 4\n },\n {\n \"source\": \"Fameuil\",\n \"target\": \"Tholomyes\",\n \"value\": 4\n },\n {\n \"source\": \"Fameuil\",\n \"target\": \"Listolier\",\n \"value\": 4\n },\n {\n \"source\": \"Blacheville\",\n \"target\": \"Tholomyes\",\n \"value\": 4\n },\n {\n \"source\": \"Blacheville\",\n \"target\": \"Listolier\",\n \"value\": 4\n },\n {\n \"source\": \"Blacheville\",\n \"target\": \"Fameuil\",\n \"value\": 4\n },\n {\n \"source\": \"Favourite\",\n \"target\": \"Tholomyes\",\n \"value\": 3\n },\n {\n \"source\": \"Favourite\",\n \"target\": \"Listolier\",\n \"value\": 3\n },\n {\n \"source\": \"Favourite\",\n \"target\": \"Fameuil\",\n \"value\": 3\n },\n {\n \"source\": \"Favourite\",\n \"target\": \"Blacheville\",\n \"value\": 4\n },\n {\n \"source\": \"Dahlia\",\n \"target\": \"Tholomyes\",\n \"value\": 3\n },\n {\n \"source\": \"Dahlia\",\n \"target\": \"Listolier\",\n \"value\": 3\n },\n {\n \"source\": \"Dahlia\",\n \"target\": \"Fameuil\",\n \"value\": 3\n },\n {\n \"source\": \"Dahlia\",\n \"target\": \"Blacheville\",\n \"value\": 3\n },\n {\n \"source\": \"Dahlia\",\n \"target\": \"Favourite\",\n \"value\": 5\n },\n {\n \"source\": \"Zephine\",\n \"target\": \"Tholomyes\",\n \"value\": 3\n },\n {\n \"source\": \"Zephine\",\n \"target\": \"Listolier\",\n \"value\": 3\n },\n {\n \"source\": \"Zephine\",\n \"target\": \"Fameuil\",\n \"value\": 3\n },\n {\n \"source\": \"Zephine\",\n \"target\": \"Blacheville\",\n \"value\": 3\n },\n {\n \"source\": \"Zephine\",\n \"target\": \"Favourite\",\n \"value\": 4\n },\n {\n \"source\": \"Zephine\",\n \"target\": \"Dahlia\",\n \"value\": 4\n },\n {\n \"source\": \"Fantine\",\n \"target\": \"Tholomyes\",\n \"value\": 3\n },\n {\n \"source\": \"Fantine\",\n \"target\": \"Listolier\",\n \"value\": 3\n },\n {\n \"source\": \"Fantine\",\n \"target\": \"Fameuil\",\n \"value\": 3\n },\n {\n \"source\": \"Fantine\",\n \"target\": \"Blacheville\",\n \"value\": 3\n },\n {\n \"source\": \"Fantine\",\n \"target\": \"Favourite\",\n \"value\": 4\n },\n {\n \"source\": \"Fantine\",\n \"target\": \"Dahlia\",\n \"value\": 4\n },\n {\n \"source\": \"Fantine\",\n \"target\": \"Zephine\",\n \"value\": 4\n },\n {\n \"source\": \"Fantine\",\n \"target\": \"Marguerite\",\n \"value\": 2\n },\n {\n \"source\": \"Fantine\",\n \"target\": \"Valjean\",\n \"value\": 9\n },\n {\n \"source\": \"Mme.Thenardier\",\n \"target\": \"Fantine\",\n \"value\": 2\n },\n {\n \"source\": \"Mme.Thenardier\",\n \"target\": \"Valjean\",\n \"value\": 7\n },\n {\n \"source\": \"Thenardier\",\n \"target\": \"Mme.Thenardier\",\n \"value\": 13\n },\n {\n \"source\": \"Thenardier\",\n \"target\": \"Fantine\",\n \"value\": 1\n },\n {\n \"source\": \"Thenardier\",\n \"target\": \"Valjean\",\n \"value\": 12\n },\n {\n \"source\": \"Cosette\",\n \"target\": \"Mme.Thenardier\",\n \"value\": 4\n },\n {\n \"source\": \"Cosette\",\n \"target\": \"Valjean\",\n \"value\": 31\n },\n {\n \"source\": \"Cosette\",\n \"target\": \"Tholomyes\",\n \"value\": 1\n },\n {\n \"source\": \"Cosette\",\n \"target\": \"Thenardier\",\n \"value\": 1\n },\n {\n \"source\": \"Javert\",\n \"target\": \"Valjean\",\n \"value\": 17\n },\n {\n \"source\": \"Javert\",\n \"target\": \"Fantine\",\n \"value\": 5\n },\n {\n \"source\": \"Javert\",\n \"target\": \"Thenardier\",\n \"value\": 5\n },\n {\n \"source\": \"Javert\",\n \"target\": \"Mme.Thenardier\",\n \"value\": 1\n },\n {\n \"source\": \"Javert\",\n \"target\": \"Cosette\",\n \"value\": 1\n },\n {\n \"source\": \"Fauchelevent\",\n \"target\": \"Valjean\",\n \"value\": 8\n },\n {\n \"source\": \"Fauchelevent\",\n \"target\": \"Javert\",\n \"value\": 1\n },\n {\n \"source\": \"Bamatabois\",\n \"target\": \"Fantine\",\n \"value\": 1\n },\n {\n \"source\": \"Bamatabois\",\n \"target\": \"Javert\",\n \"value\": 1\n },\n {\n \"source\": \"Bamatabois\",\n \"target\": \"Valjean\",\n \"value\": 2\n },\n {\n \"source\": \"Perpetue\",\n \"target\": \"Fantine\",\n \"value\": 1\n },\n {\n \"source\": \"Simplice\",\n \"target\": \"Perpetue\",\n \"value\": 2\n },\n {\n \"source\": \"Simplice\",\n \"target\": \"Valjean\",\n \"value\": 3\n },\n {\n \"source\": \"Simplice\",\n \"target\": \"Fantine\",\n \"value\": 2\n },\n {\n \"source\": \"Simplice\",\n \"target\": \"Javert\",\n \"value\": 1\n },\n {\n \"source\": \"Scaufflaire\",\n \"target\": \"Valjean\",\n \"value\": 1\n },\n {\n \"source\": \"Woman1\",\n \"target\": \"Valjean\",\n \"value\": 2\n },\n {\n \"source\": \"Woman1\",\n \"target\": \"Javert\",\n \"value\": 1\n },\n {\n \"source\": \"Judge\",\n \"target\": \"Valjean\",\n \"value\": 3\n },\n {\n \"source\": \"Judge\",\n \"target\": \"Bamatabois\",\n \"value\": 2\n },\n {\n \"source\": \"Champmathieu\",\n \"target\": \"Valjean\",\n \"value\": 3\n },\n {\n \"source\": \"Champmathieu\",\n \"target\": \"Judge\",\n \"value\": 3\n },\n {\n \"source\": \"Champmathieu\",\n \"target\": \"Bamatabois\",\n \"value\": 2\n },\n {\n \"source\": \"Brevet\",\n \"target\": \"Judge\",\n \"value\": 2\n },\n {\n \"source\": \"Brevet\",\n \"target\": \"Champmathieu\",\n \"value\": 2\n },\n {\n \"source\": \"Brevet\",\n \"target\": \"Valjean\",\n \"value\": 2\n },\n {\n \"source\": \"Brevet\",\n \"target\": \"Bamatabois\",\n \"value\": 1\n },\n {\n \"source\": \"Chenildieu\",\n \"target\": \"Judge\",\n \"value\": 2\n },\n {\n \"source\": \"Chenildieu\",\n \"target\": \"Champmathieu\",\n \"value\": 2\n },\n {\n \"source\": \"Chenildieu\",\n \"target\": \"Brevet\",\n \"value\": 2\n },\n {\n \"source\": \"Chenildieu\",\n \"target\": \"Valjean\",\n \"value\": 2\n },\n {\n \"source\": \"Chenildieu\",\n \"target\": \"Bamatabois\",\n \"value\": 1\n },\n {\n \"source\": \"Cochepaille\",\n \"target\": \"Judge\",\n \"value\": 2\n },\n {\n \"source\": \"Cochepaille\",\n \"target\": \"Champmathieu\",\n \"value\": 2\n },\n {\n \"source\": \"Cochepaille\",\n \"target\": \"Brevet\",\n \"value\": 2\n },\n {\n \"source\": \"Cochepaille\",\n \"target\": \"Chenildieu\",\n \"value\": 2\n },\n {\n \"source\": \"Cochepaille\",\n \"target\": \"Valjean\",\n \"value\": 2\n },\n {\n \"source\": \"Cochepaille\",\n \"target\": \"Bamatabois\",\n \"value\": 1\n },\n {\n \"source\": \"Pontmercy\",\n \"target\": \"Thenardier\",\n \"value\": 1\n },\n {\n \"source\": \"Boulatruelle\",\n \"target\": \"Thenardier\",\n \"value\": 1\n },\n {\n \"source\": \"Eponine\",\n \"target\": \"Mme.Thenardier\",\n \"value\": 2\n },\n {\n \"source\": \"Eponine\",\n \"target\": \"Thenardier\",\n \"value\": 3\n },\n {\n \"source\": \"Anzelma\",\n \"target\": \"Eponine\",\n \"value\": 2\n },\n {\n \"source\": \"Anzelma\",\n \"target\": \"Thenardier\",\n \"value\": 2\n },\n {\n \"source\": \"Anzelma\",\n \"target\": \"Mme.Thenardier\",\n \"value\": 1\n },\n {\n \"source\": \"Woman2\",\n \"target\": \"Valjean\",\n \"value\": 3\n },\n {\n \"source\": \"Woman2\",\n \"target\": \"Cosette\",\n \"value\": 1\n },\n {\n \"source\": \"Woman2\",\n \"target\": \"Javert\",\n \"value\": 1\n },\n {\n \"source\": \"MotherInnocent\",\n \"target\": \"Fauchelevent\",\n \"value\": 3\n },\n {\n \"source\": \"MotherInnocent\",\n \"target\": \"Valjean\",\n \"value\": 1\n },\n {\n \"source\": \"Gribier\",\n \"target\": \"Fauchelevent\",\n \"value\": 2\n },\n {\n \"source\": \"Mme.Burgon\",\n \"target\": \"Jondrette\",\n \"value\": 1\n },\n {\n \"source\": \"Gavroche\",\n \"target\": \"Mme.Burgon\",\n \"value\": 2\n },\n {\n \"source\": \"Gavroche\",\n \"target\": \"Thenardier\",\n \"value\": 1\n },\n {\n \"source\": \"Gavroche\",\n \"target\": \"Javert\",\n \"value\": 1\n },\n {\n \"source\": \"Gavroche\",\n \"target\": \"Valjean\",\n \"value\": 1\n },\n {\n \"source\": \"Gillenormand\",\n \"target\": \"Cosette\",\n \"value\": 3\n },\n {\n \"source\": \"Gillenormand\",\n \"target\": \"Valjean\",\n \"value\": 2\n },\n {\n \"source\": \"Magnon\",\n \"target\": \"Gillenormand\",\n \"value\": 1\n },\n {\n \"source\": \"Magnon\",\n \"target\": \"Mme.Thenardier\",\n \"value\": 1\n },\n {\n \"source\": \"Mlle.Gillenormand\",\n \"target\": \"Gillenormand\",\n \"value\": 9\n },\n {\n \"source\": \"Mlle.Gillenormand\",\n \"target\": \"Cosette\",\n \"value\": 2\n },\n {\n \"source\": \"Mlle.Gillenormand\",\n \"target\": \"Valjean\",\n \"value\": 2\n },\n {\n \"source\": \"Mme.Pontmercy\",\n \"target\": \"Mlle.Gillenormand\",\n \"value\": 1\n },\n {\n \"source\": \"Mme.Pontmercy\",\n \"target\": \"Pontmercy\",\n \"value\": 1\n },\n {\n \"source\": \"Mlle.Vaubois\",\n \"target\": \"Mlle.Gillenormand\",\n \"value\": 1\n },\n {\n \"source\": \"Lt.Gillenormand\",\n \"target\": \"Mlle.Gillenormand\",\n \"value\": 2\n },\n {\n \"source\": \"Lt.Gillenormand\",\n \"target\": \"Gillenormand\",\n \"value\": 1\n },\n {\n \"source\": \"Lt.Gillenormand\",\n \"target\": \"Cosette\",\n \"value\": 1\n },\n {\n \"source\": \"Marius\",\n \"target\": \"Mlle.Gillenormand\",\n \"value\": 6\n },\n {\n \"source\": \"Marius\",\n \"target\": \"Gillenormand\",\n \"value\": 12\n },\n {\n \"source\": \"Marius\",\n \"target\": \"Pontmercy\",\n \"value\": 1\n },\n {\n \"source\": \"Marius\",\n \"target\": \"Lt.Gillenormand\",\n \"value\": 1\n },\n {\n \"source\": \"Marius\",\n \"target\": \"Cosette\",\n \"value\": 21\n },\n {\n \"source\": \"Marius\",\n \"target\": \"Valjean\",\n \"value\": 19\n },\n {\n \"source\": \"Marius\",\n \"target\": \"Tholomyes\",\n \"value\": 1\n },\n {\n \"source\": \"Marius\",\n \"target\": \"Thenardier\",\n \"value\": 2\n },\n {\n \"source\": \"Marius\",\n \"target\": \"Eponine\",\n \"value\": 5\n },\n {\n \"source\": \"Marius\",\n \"target\": \"Gavroche\",\n \"value\": 4\n },\n {\n \"source\": \"BaronessT\",\n \"target\": \"Gillenormand\",\n \"value\": 1\n },\n {\n \"source\": \"BaronessT\",\n \"target\": \"Marius\",\n \"value\": 1\n },\n {\n \"source\": \"Mabeuf\",\n \"target\": \"Marius\",\n \"value\": 1\n },\n {\n \"source\": \"Mabeuf\",\n \"target\": \"Eponine\",\n \"value\": 1\n },\n {\n \"source\": \"Mabeuf\",\n \"target\": \"Gavroche\",\n \"value\": 1\n },\n {\n \"source\": \"Enjolras\",\n \"target\": \"Marius\",\n \"value\": 7\n },\n {\n \"source\": \"Enjolras\",\n \"target\": \"Gavroche\",\n \"value\": 7\n },\n {\n \"source\": \"Enjolras\",\n \"target\": \"Javert\",\n \"value\": 6\n },\n {\n \"source\": \"Enjolras\",\n \"target\": \"Mabeuf\",\n \"value\": 1\n },\n {\n \"source\": \"Enjolras\",\n \"target\": \"Valjean\",\n \"value\": 4\n },\n {\n \"source\": \"Combeferre\",\n \"target\": \"Enjolras\",\n \"value\": 15\n },\n {\n \"source\": \"Combeferre\",\n \"target\": \"Marius\",\n \"value\": 5\n },\n {\n \"source\": \"Combeferre\",\n \"target\": \"Gavroche\",\n \"value\": 6\n },\n {\n \"source\": \"Combeferre\",\n \"target\": \"Mabeuf\",\n \"value\": 2\n },\n {\n \"source\": \"Prouvaire\",\n \"target\": \"Gavroche\",\n \"value\": 1\n },\n {\n \"source\": \"Prouvaire\",\n \"target\": \"Enjolras\",\n \"value\": 4\n },\n {\n \"source\": \"Prouvaire\",\n \"target\": \"Combeferre\",\n \"value\": 2\n },\n {\n \"source\": \"Feuilly\",\n \"target\": \"Gavroche\",\n \"value\": 2\n },\n {\n \"source\": \"Feuilly\",\n \"target\": \"Enjolras\",\n \"value\": 6\n },\n {\n \"source\": \"Feuilly\",\n \"target\": \"Prouvaire\",\n \"value\": 2\n },\n {\n \"source\": \"Feuilly\",\n \"target\": \"Combeferre\",\n \"value\": 5\n },\n {\n \"source\": \"Feuilly\",\n \"target\": \"Mabeuf\",\n \"value\": 1\n },\n {\n \"source\": \"Feuilly\",\n \"target\": \"Marius\",\n \"value\": 1\n },\n {\n \"source\": \"Courfeyrac\",\n \"target\": \"Marius\",\n \"value\": 9\n },\n {\n \"source\": \"Courfeyrac\",\n \"target\": \"Enjolras\",\n \"value\": 17\n },\n {\n \"source\": \"Courfeyrac\",\n \"target\": \"Combeferre\",\n \"value\": 13\n },\n {\n \"source\": \"Courfeyrac\",\n \"target\": \"Gavroche\",\n \"value\": 7\n },\n {\n \"source\": \"Courfeyrac\",\n \"target\": \"Mabeuf\",\n \"value\": 2\n },\n {\n \"source\": \"Courfeyrac\",\n \"target\": \"Eponine\",\n \"value\": 1\n },\n {\n \"source\": \"Courfeyrac\",\n \"target\": \"Feuilly\",\n \"value\": 6\n },\n {\n \"source\": \"Courfeyrac\",\n \"target\": \"Prouvaire\",\n \"value\": 3\n },\n {\n \"source\": \"Bahorel\",\n \"target\": \"Combeferre\",\n \"value\": 5\n },\n {\n \"source\": \"Bahorel\",\n \"target\": \"Gavroche\",\n \"value\": 5\n },\n {\n \"source\": \"Bahorel\",\n \"target\": \"Courfeyrac\",\n \"value\": 6\n },\n {\n \"source\": \"Bahorel\",\n \"target\": \"Mabeuf\",\n \"value\": 2\n },\n {\n \"source\": \"Bahorel\",\n \"target\": \"Enjolras\",\n \"value\": 4\n },\n {\n \"source\": \"Bahorel\",\n \"target\": \"Feuilly\",\n \"value\": 3\n },\n {\n \"source\": \"Bahorel\",\n \"target\": \"Prouvaire\",\n \"value\": 2\n },\n {\n \"source\": \"Bahorel\",\n \"target\": \"Marius\",\n \"value\": 1\n },\n {\n \"source\": \"Bossuet\",\n \"target\": \"Marius\",\n \"value\": 5\n },\n {\n \"source\": \"Bossuet\",\n \"target\": \"Courfeyrac\",\n \"value\": 12\n },\n {\n \"source\": \"Bossuet\",\n \"target\": \"Gavroche\",\n \"value\": 5\n },\n {\n \"source\": \"Bossuet\",\n \"target\": \"Bahorel\",\n \"value\": 4\n },\n {\n \"source\": \"Bossuet\",\n \"target\": \"Enjolras\",\n \"value\": 10\n },\n {\n \"source\": \"Bossuet\",\n \"target\": \"Feuilly\",\n \"value\": 6\n },\n {\n \"source\": \"Bossuet\",\n \"target\": \"Prouvaire\",\n \"value\": 2\n },\n {\n \"source\": \"Bossuet\",\n \"target\": \"Combeferre\",\n \"value\": 9\n },\n {\n \"source\": \"Bossuet\",\n \"target\": \"Mabeuf\",\n \"value\": 1\n },\n {\n \"source\": \"Bossuet\",\n \"target\": \"Valjean\",\n \"value\": 1\n },\n {\n \"source\": \"Joly\",\n \"target\": \"Bahorel\",\n \"value\": 5\n },\n {\n \"source\": \"Joly\",\n \"target\": \"Bossuet\",\n \"value\": 7\n },\n {\n \"source\": \"Joly\",\n \"target\": \"Gavroche\",\n \"value\": 3\n },\n {\n \"source\": \"Joly\",\n \"target\": \"Courfeyrac\",\n \"value\": 5\n },\n {\n \"source\": \"Joly\",\n \"target\": \"Enjolras\",\n \"value\": 5\n },\n {\n \"source\": \"Joly\",\n \"target\": \"Feuilly\",\n \"value\": 5\n },\n {\n \"source\": \"Joly\",\n \"target\": \"Prouvaire\",\n \"value\": 2\n },\n {\n \"source\": \"Joly\",\n \"target\": \"Combeferre\",\n \"value\": 5\n },\n {\n \"source\": \"Joly\",\n \"target\": \"Mabeuf\",\n \"value\": 1\n },\n {\n \"source\": \"Joly\",\n \"target\": \"Marius\",\n \"value\": 2\n },\n {\n \"source\": \"Grantaire\",\n \"target\": \"Bossuet\",\n \"value\": 3\n },\n {\n \"source\": \"Grantaire\",\n \"target\": \"Enjolras\",\n \"value\": 3\n },\n {\n \"source\": \"Grantaire\",\n \"target\": \"Combeferre\",\n \"value\": 1\n },\n {\n \"source\": \"Grantaire\",\n \"target\": \"Courfeyrac\",\n \"value\": 2\n },\n {\n \"source\": \"Grantaire\",\n \"target\": \"Joly\",\n \"value\": 2\n },\n {\n \"source\": \"Grantaire\",\n \"target\": \"Gavroche\",\n \"value\": 1\n },\n {\n \"source\": \"Grantaire\",\n \"target\": \"Bahorel\",\n \"value\": 1\n },\n {\n \"source\": \"Grantaire\",\n \"target\": \"Feuilly\",\n \"value\": 1\n },\n {\n \"source\": \"Grantaire\",\n \"target\": \"Prouvaire\",\n \"value\": 1\n },\n {\n \"source\": \"MotherPlutarch\",\n \"target\": \"Mabeuf\",\n \"value\": 3\n },\n {\n \"source\": \"Gueulemer\",\n \"target\": \"Thenardier\",\n \"value\": 5\n },\n {\n \"source\": \"Gueulemer\",\n \"target\": \"Valjean\",\n \"value\": 1\n },\n {\n \"source\": \"Gueulemer\",\n \"target\": \"Mme.Thenardier\",\n \"value\": 1\n },\n {\n \"source\": \"Gueulemer\",\n \"target\": \"Javert\",\n \"value\": 1\n },\n {\n \"source\": \"Gueulemer\",\n \"target\": \"Gavroche\",\n \"value\": 1\n },\n {\n \"source\": \"Gueulemer\",\n \"target\": \"Eponine\",\n \"value\": 1\n },\n {\n \"source\": \"Babet\",\n \"target\": \"Thenardier\",\n \"value\": 6\n },\n {\n \"source\": \"Babet\",\n \"target\": \"Gueulemer\",\n \"value\": 6\n },\n {\n \"source\": \"Babet\",\n \"target\": \"Valjean\",\n \"value\": 1\n },\n {\n \"source\": \"Babet\",\n \"target\": \"Mme.Thenardier\",\n \"value\": 1\n },\n {\n \"source\": \"Babet\",\n \"target\": \"Javert\",\n \"value\": 2\n },\n {\n \"source\": \"Babet\",\n \"target\": \"Gavroche\",\n \"value\": 1\n },\n {\n \"source\": \"Babet\",\n \"target\": \"Eponine\",\n \"value\": 1\n },\n {\n \"source\": \"Claquesous\",\n \"target\": \"Thenardier\",\n \"value\": 4\n },\n {\n \"source\": \"Claquesous\",\n \"target\": \"Babet\",\n \"value\": 4\n },\n {\n \"source\": \"Claquesous\",\n \"target\": \"Gueulemer\",\n \"value\": 4\n },\n {\n \"source\": \"Claquesous\",\n \"target\": \"Valjean\",\n \"value\": 1\n },\n {\n \"source\": \"Claquesous\",\n \"target\": \"Mme.Thenardier\",\n \"value\": 1\n },\n {\n \"source\": \"Claquesous\",\n \"target\": \"Javert\",\n \"value\": 1\n },\n {\n \"source\": \"Claquesous\",\n \"target\": \"Eponine\",\n \"value\": 1\n },\n {\n \"source\": \"Claquesous\",\n \"target\": \"Enjolras\",\n \"value\": 1\n },\n {\n \"source\": \"Montparnasse\",\n \"target\": \"Javert\",\n \"value\": 1\n },\n {\n \"source\": \"Montparnasse\",\n \"target\": \"Babet\",\n \"value\": 2\n },\n {\n \"source\": \"Montparnasse\",\n \"target\": \"Gueulemer\",\n \"value\": 2\n },\n {\n \"source\": \"Montparnasse\",\n \"target\": \"Claquesous\",\n \"value\": 2\n },\n {\n \"source\": \"Montparnasse\",\n \"target\": \"Valjean\",\n \"value\": 1\n },\n {\n \"source\": \"Montparnasse\",\n \"target\": \"Gavroche\",\n \"value\": 1\n },\n {\n \"source\": \"Montparnasse\",\n \"target\": \"Eponine\",\n \"value\": 1\n },\n {\n \"source\": \"Montparnasse\",\n \"target\": \"Thenardier\",\n \"value\": 1\n },\n {\n \"source\": \"Toussaint\",\n \"target\": \"Cosette\",\n \"value\": 2\n },\n {\n \"source\": \"Toussaint\",\n \"target\": \"Javert\",\n \"value\": 1\n },\n {\n \"source\": \"Toussaint\",\n \"target\": \"Valjean\",\n \"value\": 1\n },\n {\n \"source\": \"Child1\",\n \"target\": \"Gavroche\",\n \"value\": 2\n },\n {\n \"source\": \"Child2\",\n \"target\": \"Gavroche\",\n \"value\": 2\n },\n {\n \"source\": \"Child2\",\n \"target\": \"Child1\",\n \"value\": 3\n },\n {\n \"source\": \"Brujon\",\n \"target\": \"Babet\",\n \"value\": 3\n },\n {\n \"source\": \"Brujon\",\n \"target\": \"Gueulemer\",\n \"value\": 3\n },\n {\n \"source\": \"Brujon\",\n \"target\": \"Thenardier\",\n \"value\": 3\n },\n {\n \"source\": \"Brujon\",\n \"target\": \"Gavroche\",\n \"value\": 1\n },\n {\n \"source\": \"Brujon\",\n \"target\": \"Eponine\",\n \"value\": 1\n },\n {\n \"source\": \"Brujon\",\n \"target\": \"Claquesous\",\n \"value\": 1\n },\n {\n \"source\": \"Brujon\",\n \"target\": \"Montparnasse\",\n \"value\": 1\n },\n {\n \"source\": \"Mme.Hucheloup\",\n \"target\": \"Bossuet\",\n \"value\": 1\n },\n {\n \"source\": \"Mme.Hucheloup\",\n \"target\": \"Joly\",\n \"value\": 1\n },\n {\n \"source\": \"Mme.Hucheloup\",\n \"target\": \"Grantaire\",\n \"value\": 1\n },\n {\n \"source\": \"Mme.Hucheloup\",\n \"target\": \"Bahorel\",\n \"value\": 1\n },\n {\n \"source\": \"Mme.Hucheloup\",\n \"target\": \"Courfeyrac\",\n \"value\": 1\n },\n {\n \"source\": \"Mme.Hucheloup\",\n \"target\": \"Gavroche\",\n \"value\": 1\n },\n {\n \"source\": \"Mme.Hucheloup\",\n \"target\": \"Enjolras\",\n \"value\": 1\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data,\n autoFit: 'view',\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n layout: {\n type: 'force',\n linkDistance: 50,\n animation: false,\n },\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'Myriel', data: { label: 'Myriel', role: 'bishop' } },\n { id: 'Napoleon', data: { label: 'Napoleon', role: 'historical' } },\n { id: 'Mlle.Baptistine', data: { label: 'Mlle.Baptistine', role: 'family' } },\n { id: 'Mme.Magloire', data: { label: 'Mme.Magloire', role: 'servant' } },\n { id: 'CountessdeLo', data: { label: 'CountessdeLo', role: 'noble' } },\n { id: 'Geborand', data: { label: 'Geborand', role: 'noble' } },\n { id: 'Champtercier', data: { label: 'Champtercier', role: 'official' } },\n { id: 'Cravatte', data: { label: 'Cravatte', role: 'criminal' } },\n { id: 'Count', data: { label: 'Count', role: 'noble' } },\n { id: 'OldMan', data: { label: 'OldMan', role: 'civilian' } },\n ],\n edges: [\n { source: 'Myriel', target: 'Mlle.Baptistine', data: { strength: 8, relation: 'family' } },\n { source: 'Myriel', target: 'Mme.Magloire', data: { strength: 6, relation: 'service' } },\n { source: 'Myriel', target: 'Napoleon', data: { strength: 3, relation: 'admiration' } },\n { source: 'Myriel', target: 'Champtercier', data: { strength: 4, relation: 'diocese' } },\n { source: 'Myriel', target: 'Cravatte', data: { strength: 5, relation: 'mercy' } },\n { source: 'Myriel', target: 'OldMan', data: { strength: 4, relation: 'parish' } },\n { source: 'CountessdeLo', target: 'Geborand', data: { strength: 7, relation: 'social' } },\n { source: 'CountessdeLo', target: 'Count', data: { strength: 6, relation: 'social' } },\n { source: 'Geborand', target: 'Count', data: { strength: 5, relation: 'social' } },\n { source: 'CountessdeLo', target: 'Myriel', data: { strength: 2, relation: 'acquaintance' } },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'circle',\n style: {\n size: (d) => (d.data.role === 'bishop' ? 40 : 30),\n fill: (d) => {\n const colors = {\n bishop: '#1783FF',\n historical: '#FA8C16',\n family: '#52C41A',\n servant: '#722ED1',\n noble: '#EB2F96',\n official: '#13C2C2',\n criminal: '#F5222D',\n civilian: '#8C8C8C',\n };\n return colors[d.data.role] || '#8C8C8C';\n },\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFontSize: 12,\n labelFill: '#333',\n lineWidth: 2,\n stroke: '#fff',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: (d) => d.data.strength / 2,\n labelText: (d) => d.data.relation,\n labelFontSize: 10,\n labelFill: '#666',\n endArrow: true,\n },\n },\n layout: {\n type: 'force',\n linkDistance: 120,\n gravity: 10,\n coulombDisScale: 0.005,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force',\n ],\n});\n\ngraph.render();", + "duration": 15661, + "retrievedSkillIds": [ + "g6-layout-force", + "g6-behavior-drag-element", + "g6-layout-grid", + "g6-behavior-canvas-nav", + "g6-pattern-network-graph" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2866, + "expectedLength": 26886, + "similarity": 0.4760894495412844, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'Myriel', data: { label: 'Myriel', role: 'bishop' } },\n { id: 'Napoleon', data: { label: 'Napoleon', role: 'historical' } },\n { id: 'Mlle.Baptistine', data: { label: 'Mlle.Baptistine', role: 'family' } },\n { id: 'Mme.Magloire', data: { label: 'Mme.Magloire', role: 'servant' } },\n { id: 'CountessdeLo', data: { label: 'CountessdeLo', role: 'noble' } },\n { id: 'Geborand', data: { label: 'Geborand', role: 'noble' } },\n { id: 'Champtercier', data: { label: 'Champtercier', role: 'official' } },\n { id: 'Cravatte', data: { label: 'Cravatte', role: 'criminal' } },\n { id: 'Count', data: { label: 'Count', role: 'noble' } },\n { id: 'OldMan', data: { label: 'OldMan', role: 'civilian' } },\n ],\n edges: [\n { source: 'Myriel', target: 'Mlle.Baptistine', data: { strength: 8, relation: 'family' } },\n { source: 'Myriel', target: 'Mme.Magloire', data: { strength: 6, relation: 'service' } },\n { source: 'Myriel', target: 'Napoleon', data: { strength: 3, relation: 'admiration' } },\n { source: 'Myriel', target: 'Champtercier', data: { strength: 4, relation: 'diocese' } },\n { source: 'Myriel', target: 'Cravatte', data: { strength: 5, relation: 'mercy' } },\n { source: 'Myriel', target: 'OldMan', data: { strength: 4, relation: 'parish' } },\n { source: 'CountessdeLo', target: 'Geborand', data: { strength: 7, relation: 'social' } },\n { source: 'CountessdeLo', target: 'Count', data: { strength: 6, relation: 'social' } },\n { source: 'Geborand', target: 'Count', data: { strength: 5, relation: 'social' } },\n { source: 'CountessdeLo', target: 'Myriel', data: { strength: 2, relation: 'acquaintance' } },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'circle',\n style: {\n size: (d) => (d.data.role === 'bishop' ? 40 : 30),\n fill: (d) => {\n const colors = {\n bishop: '#1783FF',\n historical: '#FA8C16',\n family: '#52C41A',\n servant: '#722ED1',\n noble: '#EB2F96',\n official: '#13C2C2',\n criminal: '#F5222D',\n civilian: '#8C8C8C',\n };\n return colors[d.data.role] || '#8C8C8C';\n },\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFontSize: 12,\n labelFill: '#333',\n lineWidth: 2,\n stroke: '#fff',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: (d) => d.data.strength / 2,\n labelText: (d) => d.data.relation,\n labelFontSize: 10,\n labelFill: '#666',\n endArrow: true,\n },\n },\n layout: {\n type: 'force',\n linkDistance: 120,\n gravity: 10,\n coulombDisScale: 0.005,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force',\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "role", + "id", + "data", + "label", + "role", + "id", + "data", + "label", + "role", + "id", + "data", + "label", + "role", + "id", + "data", + "label", + "role", + "id", + "data", + "label", + "role", + "id", + "data", + "label", + "role", + "id", + "data", + "label", + "role", + "id", + "data", + "label", + "role", + "id", + "data", + "label", + "role", + "edges", + "source", + "target", + "data", + "strength", + "relation", + "source", + "target", + "data", + "strength", + "relation", + "source", + "target", + "data", + "strength", + "relation", + "source", + "target", + "data", + "strength", + "relation", + "source", + "target", + "data", + "strength", + "relation", + "source", + "target", + "data", + "strength", + "relation", + "source", + "target", + "data", + "strength", + "relation", + "source", + "target", + "data", + "strength", + "relation", + "source", + "target", + "data", + "strength", + "relation", + "source", + "target", + "data", + "strength", + "relation", + "container", + "node", + "type", + "style", + "size", + "40", + "fill", + "bishop", + "historical", + "family", + "servant", + "noble", + "official", + "criminal", + "civilian", + "labelText", + "labelPlacement", + "labelFontSize", + "labelFill", + "lineWidth", + "stroke", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "labelText", + "labelFontSize", + "labelFill", + "endArrow", + "layout", + "type", + "linkDistance", + "gravity", + "coulombDisScale", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-57", + "query": "根据描述绘制图表,使用 AntV G6 渲染一个径向树状图,展示层级数据结构。数据以树形结构组织,通过 dendrogram 布局算法进行径向排列,并应用了节点和边的样式配置。支持画布拖拽、缩放以及节点悬停高亮等交互行为。参考数据:[{\"id\":\"flare\",\"children\":[{\"id\":\"analytics\",\"children\":[{\"id\":\"cluster\",\"children\":[{\"id\":\"AgglomerativeCluster\",\"value\":3938},{\"id\":\"CommunityStructure\",\"value\":3812},{\"id\":\"HierarchicalCluster\",\"value\":6714},{\"id\":\"MergeEdge\",\"value\":743}]},{\"id\":\"graph\",\"children\":[{\"id\":\"BetweennessCentrality\",\"value\":3534},{\"id\":\"LinkDistance\",\"value\":5731},{\"id\":\"MaxFlowMinCut\",\"value\":7840},{\"id\":\"ShortestPaths\",\"value\":5914},{\"id\":\"SpanningTree\",\"value\":3416}]},{\"id\":\"optimization\",\"children\":[{\"id\":\"AspectRatioBanker\",\"value\":7074}]}]},{\"id\":\"animate\",\"children\":[{\"id\":\"Easing\",\"value\":17010},{\"id\":\"FunctionSequence\",\"value\":5842},{\"id\":\"interpolate\",\"children\":[{\"id\":\"ArrayInterpolator\",\"value\":1983},{\"id\":\"ColorInterpolator\",\"value\":2047},{\"id\":\"DateInterpolator\",\"value\":1375},{\"id\":\"Interpolator\",\"value\":8746},{\"id\":\"MatrixInterpolator\",\"value\":2202},{\"id\":\"NumberInterpolator\",\"value\":1382},{\"id\":\"ObjectInterpolator\",\"value\":1629},{\"id\":\"PointInterpolator\",\"value\":1675},{\"id\":\"RectangleInterpolator\",\"value\":2042}]},{\"id\":\"ISchedulable\",\"value\":1041},{\"id\":\"Parallel\",\"value\":5176},{\"id\":\"Pause\",\"value\":449}]}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst data = {\n \"id\": \"flare\",\n \"children\": [\n {\n \"id\": \"analytics\",\n \"children\": [\n {\n \"id\": \"cluster\",\n \"children\": [\n {\n \"id\": \"AgglomerativeCluster\",\n \"value\": 3938\n },\n {\n \"id\": \"CommunityStructure\",\n \"value\": 3812\n },\n {\n \"id\": \"HierarchicalCluster\",\n \"value\": 6714\n },\n {\n \"id\": \"MergeEdge\",\n \"value\": 743\n }\n ]\n },\n {\n \"id\": \"graph\",\n \"children\": [\n {\n \"id\": \"BetweennessCentrality\",\n \"value\": 3534\n },\n {\n \"id\": \"LinkDistance\",\n \"value\": 5731\n },\n {\n \"id\": \"MaxFlowMinCut\",\n \"value\": 7840\n },\n {\n \"id\": \"ShortestPaths\",\n \"value\": 5914\n },\n {\n \"id\": \"SpanningTree\",\n \"value\": 3416\n }\n ]\n },\n {\n \"id\": \"optimization\",\n \"children\": [\n {\n \"id\": \"AspectRatioBanker\",\n \"value\": 7074\n }\n ]\n }\n ]\n },\n {\n \"id\": \"animate\",\n \"children\": [\n {\n \"id\": \"Easing\",\n \"value\": 17010\n },\n {\n \"id\": \"FunctionSequence\",\n \"value\": 5842\n },\n {\n \"id\": \"interpolate\",\n \"children\": [\n {\n \"id\": \"ArrayInterpolator\",\n \"value\": 1983\n },\n {\n \"id\": \"ColorInterpolator\",\n \"value\": 2047\n },\n {\n \"id\": \"DateInterpolator\",\n \"value\": 1375\n },\n {\n \"id\": \"Interpolator\",\n \"value\": 8746\n },\n {\n \"id\": \"MatrixInterpolator\",\n \"value\": 2202\n },\n {\n \"id\": \"NumberInterpolator\",\n \"value\": 1382\n },\n {\n \"id\": \"ObjectInterpolator\",\n \"value\": 1629\n },\n {\n \"id\": \"PointInterpolator\",\n \"value\": 1675\n },\n {\n \"id\": \"RectangleInterpolator\",\n \"value\": 2042\n }\n ]\n },\n {\n \"id\": \"ISchedulable\",\n \"value\": 1041\n },\n {\n \"id\": \"Parallel\",\n \"value\": 5176\n },\n {\n \"id\": \"Pause\",\n \"value\": 449\n },\n {\n \"id\": \"Scheduler\",\n \"value\": 5593\n },\n {\n \"id\": \"Sequence\",\n \"value\": 5534\n },\n {\n \"id\": \"Transition\",\n \"value\": 9201\n },\n {\n \"id\": \"Transitioner\",\n \"value\": 19975\n },\n {\n \"id\": \"TransitionEvent\",\n \"value\": 1116\n },\n {\n \"id\": \"Tween\",\n \"value\": 6006\n }\n ]\n },\n {\n \"id\": \"display\",\n \"children\": [\n {\n \"id\": \"DirtySprite\",\n \"value\": 8833\n },\n {\n \"id\": \"LineSprite\",\n \"value\": 1732\n },\n {\n \"id\": \"RectSprite\",\n \"value\": 3623\n },\n {\n \"id\": \"TextSprite\",\n \"value\": 10066\n }\n ]\n },\n {\n \"id\": \"flex\",\n \"children\": [\n {\n \"id\": \"FlareVis\",\n \"value\": 4116\n }\n ]\n },\n {\n \"id\": \"physics\",\n \"children\": [\n {\n \"id\": \"DragForce\",\n \"value\": 1082\n },\n {\n \"id\": \"GravityForce\",\n \"value\": 1336\n },\n {\n \"id\": \"IForce\",\n \"value\": 319\n },\n {\n \"id\": \"NBodyForce\",\n \"value\": 10498\n },\n {\n \"id\": \"Particle\",\n \"value\": 2822\n },\n {\n \"id\": \"Simulation\",\n \"value\": 9983\n },\n {\n \"id\": \"Spring\",\n \"value\": 2213\n },\n {\n \"id\": \"SpringForce\",\n \"value\": 1681\n }\n ]\n },\n {\n \"id\": \"query\",\n \"children\": [\n {\n \"id\": \"AggregateExpression\",\n \"value\": 1616\n },\n {\n \"id\": \"And\",\n \"value\": 1027\n },\n {\n \"id\": \"Arithmetic\",\n \"value\": 3891\n },\n {\n \"id\": \"Average\",\n \"value\": 891\n },\n {\n \"id\": \"BinaryExpression\",\n \"value\": 2893\n },\n {\n \"id\": \"Comparison\",\n \"value\": 5103\n },\n {\n \"id\": \"CompositeExpression\",\n \"value\": 3677\n },\n {\n \"id\": \"Count\",\n \"value\": 781\n },\n {\n \"id\": \"DateUtil\",\n \"value\": 4141\n },\n {\n \"id\": \"Distinct\",\n \"value\": 933\n },\n {\n \"id\": \"Expression\",\n \"value\": 5130\n },\n {\n \"id\": \"ExpressionIterator\",\n \"value\": 3617\n },\n {\n \"id\": \"Fn\",\n \"value\": 3240\n },\n {\n \"id\": \"If\",\n \"value\": 2732\n },\n {\n \"id\": \"IsA\",\n \"value\": 2039\n },\n {\n \"id\": \"Literal\",\n \"value\": 1214\n },\n {\n \"id\": \"Match\",\n \"value\": 3748\n },\n {\n \"id\": \"Maximum\",\n \"value\": 843\n },\n {\n \"id\": \"methods\",\n \"children\": [\n {\n \"id\": \"add\",\n \"value\": 593\n },\n {\n \"id\": \"and\",\n \"value\": 330\n },\n {\n \"id\": \"average\",\n \"value\": 287\n },\n {\n \"id\": \"count\",\n \"value\": 277\n },\n {\n \"id\": \"distinct\",\n \"value\": 292\n },\n {\n \"id\": \"div\",\n \"value\": 595\n },\n {\n \"id\": \"eq\",\n \"value\": 594\n },\n {\n \"id\": \"fn\",\n \"value\": 460\n },\n {\n \"id\": \"gt\",\n \"value\": 603\n },\n {\n \"id\": \"gte\",\n \"value\": 625\n },\n {\n \"id\": \"iff\",\n \"value\": 748\n },\n {\n \"id\": \"isa\",\n \"value\": 461\n },\n {\n \"id\": \"lt\",\n \"value\": 597\n },\n {\n \"id\": \"lte\",\n \"value\": 619\n },\n {\n \"id\": \"max\",\n \"value\": 283\n },\n {\n \"id\": \"min\",\n \"value\": 283\n },\n {\n \"id\": \"mod\",\n \"value\": 591\n },\n {\n \"id\": \"mul\",\n \"value\": 603\n },\n {\n \"id\": \"neq\",\n \"value\": 599\n },\n {\n \"id\": \"not\",\n \"value\": 386\n },\n {\n \"id\": \"or\",\n \"value\": 323\n },\n {\n \"id\": \"orderby\",\n \"value\": 307\n },\n {\n \"id\": \"range\",\n \"value\": 772\n },\n {\n \"id\": \"select\",\n \"value\": 296\n },\n {\n \"id\": \"stddev\",\n \"value\": 363\n },\n {\n \"id\": \"sub\",\n \"value\": 600\n },\n {\n \"id\": \"sum\",\n \"value\": 280\n },\n {\n \"id\": \"update\",\n \"value\": 307\n },\n {\n \"id\": \"variance\",\n \"value\": 335\n },\n {\n \"id\": \"where\",\n \"value\": 299\n },\n {\n \"id\": \"xor\",\n \"value\": 354\n },\n {\n \"id\": \"-\",\n \"value\": 264\n }\n ]\n },\n {\n \"id\": \"Minimum\",\n \"value\": 843\n },\n {\n \"id\": \"Not\",\n \"value\": 1554\n },\n {\n \"id\": \"Or\",\n \"value\": 970\n },\n {\n \"id\": \"Query\",\n \"value\": 13896\n },\n {\n \"id\": \"Range\",\n \"value\": 1594\n },\n {\n \"id\": \"StringUtil\",\n \"value\": 4130\n },\n {\n \"id\": \"Sum\",\n \"value\": 791\n },\n {\n \"id\": \"Variable\",\n \"value\": 1124\n },\n {\n \"id\": \"Variance\",\n \"value\": 1876\n },\n {\n \"id\": \"Xor\",\n \"value\": 1101\n }\n ]\n },\n {\n \"id\": \"scale\",\n \"children\": [\n {\n \"id\": \"IScaleMap\",\n \"value\": 2105\n },\n {\n \"id\": \"LinearScale\",\n \"value\": 1316\n },\n {\n \"id\": \"LogScale\",\n \"value\": 3151\n },\n {\n \"id\": \"OrdinalScale\",\n \"value\": 3770\n },\n {\n \"id\": \"QuantileScale\",\n \"value\": 2435\n },\n {\n \"id\": \"QuantitativeScale\",\n \"value\": 4839\n },\n {\n \"id\": \"RootScale\",\n \"value\": 1756\n },\n {\n \"id\": \"Scale\",\n \"value\": 4268\n },\n {\n \"id\": \"ScaleType\",\n \"value\": 1821\n },\n {\n \"id\": \"TimeScale\",\n \"value\": 5833\n }\n ]\n },\n {\n \"id\": \"util\",\n \"children\": [\n {\n \"id\": \"Arrays\",\n \"value\": 8258\n },\n {\n \"id\": \"Colors\",\n \"value\": 10001\n },\n {\n \"id\": \"Dates\",\n \"value\": 8217\n },\n {\n \"id\": \"Displays\",\n \"value\": 12555\n },\n {\n \"id\": \"Filter\",\n \"value\": 2324\n },\n {\n \"id\": \"Geometry\",\n \"value\": 10993\n },\n {\n \"id\": \"heap\",\n \"children\": [\n {\n \"id\": \"FibonacciHeap\",\n \"value\": 9354\n },\n {\n \"id\": \"HeapNode\",\n \"value\": 1233\n }\n ]\n },\n {\n \"id\": \"IEvaluable\",\n \"value\": 335\n },\n {\n \"id\": \"IPredicate\",\n \"value\": 383\n },\n {\n \"id\": \"IValueProxy\",\n \"value\": 874\n },\n {\n \"id\": \"math\",\n \"children\": [\n {\n \"id\": \"DenseMatrix\",\n \"value\": 3165\n },\n {\n \"id\": \"IMatrix\",\n \"value\": 2815\n },\n {\n \"id\": \"SparseMatrix\",\n \"value\": 3366\n }\n ]\n },\n {\n \"id\": \"Maths\",\n \"value\": 17705\n },\n {\n \"id\": \"Orientation\",\n \"value\": 1486\n },\n {\n \"id\": \"palette\",\n \"children\": [\n {\n \"id\": \"ColorPalette\",\n \"value\": 6367\n },\n {\n \"id\": \"Palette\",\n \"value\": 1229\n },\n {\n \"id\": \"ShapePalette\",\n \"value\": 2059\n },\n {\n \"id\": \"SizePalette\",\n \"value\": 2291\n }\n ]\n },\n {\n \"id\": \"Property\",\n \"value\": 5559\n },\n {\n \"id\": \"Shapes\",\n \"value\": 19118\n },\n {\n \"id\": \"Sort\",\n \"value\": 6887\n },\n {\n \"id\": \"Stats\",\n \"value\": 6557\n },\n {\n \"id\": \"Strings\",\n \"value\": 22026\n }\n ]\n },\n {\n \"id\": \"vis\",\n \"children\": [\n {\n \"id\": \"axis\",\n \"children\": [\n {\n \"id\": \"Axes\",\n \"value\": 1302\n },\n {\n \"id\": \"Axis\",\n \"value\": 24593\n },\n {\n \"id\": \"AxisGridLine\",\n \"value\": 652\n },\n {\n \"id\": \"AxisLabel\",\n \"value\": 636\n },\n {\n \"id\": \"CartesianAxes\",\n \"value\": 6703\n }\n ]\n },\n {\n \"id\": \"controls\",\n \"children\": [\n {\n \"id\": \"AnchorControl\",\n \"value\": 2138\n },\n {\n \"id\": \"ClickControl\",\n \"value\": 3824\n },\n {\n \"id\": \"Control\",\n \"value\": 1353\n },\n {\n \"id\": \"ControlList\",\n \"value\": 4665\n },\n {\n \"id\": \"DragControl\",\n \"value\": 2649\n },\n {\n \"id\": \"ExpandControl\",\n \"value\": 2832\n },\n {\n \"id\": \"HoverControl\",\n \"value\": 4896\n },\n {\n \"id\": \"IControl\",\n \"value\": 763\n },\n {\n \"id\": \"PanZoomControl\",\n \"value\": 5222\n },\n {\n \"id\": \"SelectionControl\",\n \"value\": 7862\n },\n {\n \"id\": \"TooltipControl\",\n \"value\": 8435\n }\n ]\n },\n {\n \"id\": \"data\",\n \"children\": [\n {\n \"id\": \"Data\",\n \"value\": 20544\n },\n {\n \"id\": \"DataList\",\n \"value\": 19788\n },\n {\n \"id\": \"DataSprite\",\n \"value\": 10349\n },\n {\n \"id\": \"EdgeSprite\",\n \"value\": 3301\n },\n {\n \"id\": \"NodeSprite\",\n \"value\": 19382\n },\n {\n \"id\": \"render\",\n \"children\": [\n {\n \"id\": \"ArrowType\",\n \"value\": 698\n },\n {\n \"id\": \"EdgeRenderer\",\n \"value\": 5569\n },\n {\n \"id\": \"IRenderer\",\n \"value\": 353\n },\n {\n \"id\": \"ShapeRenderer\",\n \"value\": 2247\n }\n ]\n },\n {\n \"id\": \"ScaleBinding\",\n \"value\": 11275\n },\n {\n \"id\": \"Tree\",\n \"value\": 7147\n },\n {\n \"id\": \"TreeBuilder\",\n \"value\": 9930\n }\n ]\n },\n {\n \"id\": \"events\",\n \"children\": [\n {\n \"id\": \"DataEvent\",\n \"value\": 2313\n },\n {\n \"id\": \"SelectionEvent\",\n \"value\": 1880\n },\n {\n \"id\": \"TooltipEvent\",\n \"value\": 1701\n },\n {\n \"id\": \"VisualizationEvent\",\n \"value\": 1117\n }\n ]\n },\n {\n \"id\": \"legend\",\n \"children\": [\n {\n \"id\": \"Legend\",\n \"value\": 20859\n },\n {\n \"id\": \"LegendItem\",\n \"value\": 4614\n },\n {\n \"id\": \"LegendRange\",\n \"value\": 10530\n }\n ]\n },\n {\n \"id\": \"operator\",\n \"children\": [\n {\n \"id\": \"distortion\",\n \"children\": [\n {\n \"id\": \"BifocalDistortion\",\n \"value\": 4461\n },\n {\n \"id\": \"Distortion\",\n \"value\": 6314\n },\n {\n \"id\": \"FisheyeDistortion\",\n \"value\": 3444\n }\n ]\n },\n {\n \"id\": \"encoder\",\n \"children\": [\n {\n \"id\": \"ColorEncoder\",\n \"value\": 3179\n },\n {\n \"id\": \"Encoder\",\n \"value\": 4060\n },\n {\n \"id\": \"PropertyEncoder\",\n \"value\": 4138\n },\n {\n \"id\": \"ShapeEncoder\",\n \"value\": 1690\n },\n {\n \"id\": \"SizeEncoder\",\n \"value\": 1830\n }\n ]\n },\n {\n \"id\": \"filter\",\n \"children\": [\n {\n \"id\": \"FisheyeTreeFilter\",\n \"value\": 5219\n },\n {\n \"id\": \"GraphDistanceFilter\",\n \"value\": 3165\n },\n {\n \"id\": \"VisibilityFilter\",\n \"value\": 3509\n }\n ]\n },\n {\n \"id\": \"IOperator\",\n \"value\": 1286\n },\n {\n \"id\": \"label\",\n \"children\": [\n {\n \"id\": \"Labeler\",\n \"value\": 9956\n },\n {\n \"id\": \"RadialLabeler\",\n \"value\": 3899\n },\n {\n \"id\": \"StackedAreaLabeler\",\n \"value\": 3202\n }\n ]\n },\n {\n \"id\": \"layout\",\n \"children\": [\n {\n \"id\": \"AxisLayout\",\n \"value\": 6725\n },\n {\n \"id\": \"BundledEdgeRouter\",\n \"value\": 3727\n },\n {\n \"id\": \"CircleLayout\",\n \"value\": 9317\n },\n {\n \"id\": \"CirclePackingLayout\",\n \"value\": 12003\n },\n {\n \"id\": \"DendrogramLayout\",\n \"value\": 4853\n },\n {\n \"id\": \"ForceDirectedLayout\",\n \"value\": 8411\n },\n {\n \"id\": \"IcicleTreeLayout\",\n \"value\": 4864\n },\n {\n \"id\": \"IndentedTreeLayout\",\n \"value\": 3174\n },\n {\n \"id\": \"Layout\",\n \"value\": 7881\n },\n {\n \"id\": \"NodeLinkTreeLayout\",\n \"value\": 12870\n },\n {\n \"id\": \"PieLayout\",\n \"value\": 2728\n },\n {\n \"id\": \"RadialTreeLayout\",\n \"value\": 12348\n },\n {\n \"id\": \"RandomLayout\",\n \"value\": 870\n },\n {\n \"id\": \"StackedAreaLayout\",\n \"value\": 9121\n },\n {\n \"id\": \"TreeMapLayout\",\n \"value\": 9191\n }\n ]\n },\n {\n \"id\": \"Operator\",\n \"value\": 2490\n },\n {\n \"id\": \"OperatorList\",\n \"value\": 5248\n },\n {\n \"id\": \"OperatorSequence\",\n \"value\": 4190\n },\n {\n \"id\": \"OperatorSwitch\",\n \"value\": 2581\n },\n {\n \"id\": \"SortOperator\",\n \"value\": 2023\n }\n ]\n },\n {\n \"id\": \"Visualization\",\n \"value\": 16540\n }\n ]\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n padding: 50,\n data: treeToGraphData(data),\n node: {\n style: {\n size: 12,\n labelText: (d) => d.id,\n labelBackground: true,\n labelFontSize: 14,\n labelFontFamily: 'Gill Sans',\n },\n },\n edge: {\n type: 'cubic-radial',\n style: {\n lineWidth: 3,\n },\n },\n layout: {\n type: 'dendrogram',\n radial: true,\n preLayout: false,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n key: 'hover-activate',\n type: 'hover-activate',\n degree: 5,\n direction: 'in',\n inactiveState: 'inactive',\n },\n ],\n transforms: ['place-radial-labels'],\n animation: false,\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'flare',\n children: [\n {\n id: 'analytics',\n children: [\n {\n id: 'cluster',\n children: [\n { id: 'AgglomerativeCluster', value: 3938 },\n { id: 'CommunityStructure', value: 3812 },\n { id: 'HierarchicalCluster', value: 6714 },\n { id: 'MergeEdge', value: 743 }\n ]\n },\n {\n id: 'graph',\n children: [\n { id: 'BetweennessCentrality', value: 3534 },\n { id: 'LinkDistance', value: 5731 },\n { id: 'MaxFlowMinCut', value: 7840 },\n { id: 'ShortestPaths', value: 5914 },\n { id: 'SpanningTree', value: 3416 }\n ]\n },\n {\n id: 'optimization',\n children: [{ id: 'AspectRatioBanker', value: 7074 }]\n }\n ]\n },\n {\n id: 'animate',\n children: [\n { id: 'Easing', value: 17010 },\n { id: 'FunctionSequence', value: 5842 },\n {\n id: 'interpolate',\n children: [\n { id: 'ArrayInterpolator', value: 1983 },\n { id: 'ColorInterpolator', value: 2047 },\n { id: 'DateInterpolator', value: 1375 },\n { id: 'Interpolator', value: 8746 },\n { id: 'MatrixInterpolator', value: 2202 },\n { id: 'NumberInterpolator', value: 1382 },\n { id: 'ObjectInterpolator', value: 1629 },\n { id: 'PointInterpolator', value: 1675 },\n { id: 'RectangleInterpolator', value: 2042 }\n ]\n },\n { id: 'ISchedulable', value: 1041 },\n { id: 'Parallel', value: 5176 },\n { id: 'Pause', value: 449 }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n data: treeToGraphData(treeData),\n node: {\n style: {\n size: (d) => {\n if (d.data?.value) {\n return Math.sqrt(d.data.value) / 3 + 8;\n }\n return 16;\n },\n fill: (d) => {\n if (d.children && d.children.length > 0) {\n return '#1783FF';\n }\n return '#91d5ff';\n },\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'right',\n labelOffsetX: 8,\n labelFill: '#333',\n labelFontSize: 12,\n labelBackground: true,\n labelBackgroundFill: 'rgba(255,255,255,0.8)',\n labelBackgroundPadding: [2, 4]\n },\n state: {\n highlight: {\n fill: '#ff4d4f',\n stroke: '#ff4d4f',\n lineWidth: 3,\n labelFill: '#ff4d4f'\n }\n }\n },\n edge: {\n type: 'cubic',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n endArrow: false\n },\n state: {\n highlight: {\n stroke: '#ff4d4f',\n lineWidth: 2\n }\n }\n },\n layout: {\n type: 'dendrogram',\n radial: true,\n nodeSep: 30,\n rankSep: 80,\n direction: 'LR'\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'hover-activate',\n degree: 1,\n state: 'highlight',\n edgeState: 'highlight',\n nodeState: 'highlight'\n }\n ],\n animation: {\n duration: 500,\n easing: 'ease-in-out'\n }\n});\n\ngraph.render();", + "duration": 15826, + "retrievedSkillIds": [ + "g6-layout-mindmap", + "g6-layout-dagre", + "g6-layout-force", + "g6-core-data-structure", + "g6-layout-grid" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 3212, + "expectedLength": 22377, + "similarity": 0.529139959070702, + "extractedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'flare',\n children: [\n {\n id: 'analytics',\n children: [\n {\n id: 'cluster',\n children: [\n { id: 'AgglomerativeCluster', value: 3938 },\n { id: 'CommunityStructure', value: 3812 },\n { id: 'HierarchicalCluster', value: 6714 },\n { id: 'MergeEdge', value: 743 }\n ]\n },\n {\n id: 'graph',\n children: [\n { id: 'BetweennessCentrality', value: 3534 },\n { id: 'LinkDistance', value: 5731 },\n { id: 'MaxFlowMinCut', value: 7840 },\n { id: 'ShortestPaths', value: 5914 },\n { id: 'SpanningTree', value: 3416 }\n ]\n },\n {\n id: 'optimization',\n children: [{ id: 'AspectRatioBanker', value: 7074 }]\n }\n ]\n },\n {\n id: 'animate',\n children: [\n { id: 'Easing', value: 17010 },\n { id: 'FunctionSequence', value: 5842 },\n {\n id: 'interpolate',\n children: [\n { id: 'ArrayInterpolator', value: 1983 },\n { id: 'ColorInterpolator', value: 2047 },\n { id: 'DateInterpolator', value: 1375 },\n { id: 'Interpolator', value: 8746 },\n { id: 'MatrixInterpolator', value: 2202 },\n { id: 'NumberInterpolator', value: 1382 },\n { id: 'ObjectInterpolator', value: 1629 },\n { id: 'PointInterpolator', value: 1675 },\n { id: 'RectangleInterpolator', value: 2042 }\n ]\n },\n { id: 'ISchedulable', value: 1041 },\n { id: 'Parallel', value: 5176 },\n { id: 'Pause', value: 449 }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n data: treeToGraphData(treeData),\n node: {\n style: {\n size: (d) => {\n if (d.data?.value) {\n return Math.sqrt(d.data.value) / 3 + 8;\n }\n return 16;\n },\n fill: (d) => {\n if (d.children && d.children.length > 0) {\n return '#1783FF';\n }\n return '#91d5ff';\n },\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'right',\n labelOffsetX: 8,\n labelFill: '#333',\n labelFontSize: 12,\n labelBackground: true,\n labelBackgroundFill: 'rgba(255,255,255,0.8)',\n labelBackgroundPadding: [2, 4]\n },\n state: {\n highlight: {\n fill: '#ff4d4f',\n stroke: '#ff4d4f',\n lineWidth: 3,\n labelFill: '#ff4d4f'\n }\n }\n },\n edge: {\n type: 'cubic',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n endArrow: false\n },\n state: {\n highlight: {\n stroke: '#ff4d4f',\n lineWidth: 2\n }\n }\n },\n layout: {\n type: 'dendrogram',\n radial: true,\n nodeSep: 30,\n rankSep: 80,\n direction: 'LR'\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'hover-activate',\n degree: 1,\n state: 'highlight',\n edgeState: 'highlight',\n nodeState: 'highlight'\n }\n ],\n animation: {\n duration: 500,\n easing: 'ease-in-out'\n }\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "treeToGraphData" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "treeToGraphData", + "sqrt", + "rgba", + "render" + ], + "objectKeys": [ + "id", + "children", + "id", + "children", + "id", + "children", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "children", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "children", + "id", + "value", + "id", + "children", + "id", + "value", + "id", + "value", + "id", + "children", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "value", + "id", + "value", + "container", + "data", + "node", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelOffsetX", + "labelFill", + "labelFontSize", + "labelBackground", + "labelBackgroundFill", + "labelBackgroundPadding", + "state", + "highlight", + "fill", + "stroke", + "lineWidth", + "labelFill", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "state", + "highlight", + "stroke", + "lineWidth", + "layout", + "type", + "radial", + "nodeSep", + "rankSep", + "direction", + "behaviors", + "type", + "degree", + "state", + "edgeState", + "nodeState", + "animation", + "duration", + "easing" + ], + "stringLiterals": [], + "apiPatterns": [ + "view.children", + "new Graph" + ] + } + } + }, + { + "id": "case-58", + "query": "根据描述绘制图表,使用 G6 渲染一个力导向图,包含四种不同形状的节点和带类型标识的边,通过集群字段对节点和边进行颜色映射,并添加了可通过点击触发的图例插件来展示不同类型。参考数据:[{\"id\":\"1\",\"type\":\"circle\",\"data\":{\"cluster\":\"node-type1\"}},{\"id\":\"2\",\"type\":\"rect\",\"data\":{\"cluster\":\"node-type2\"}},{\"id\":\"3\",\"type\":\"triangle\",\"data\":{\"cluster\":\"node-type3\"}},{\"id\":\"4\",\"type\":\"diamond\",\"data\":{\"cluster\":\"node-type4\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '1', type: 'circle', data: { cluster: 'node-type1' } },\n { id: '2', type: 'rect', data: { cluster: 'node-type2' } },\n { id: '3', type: 'triangle', data: { cluster: 'node-type3' } },\n { id: '4', type: 'diamond', data: { cluster: 'node-type4' } },\n ],\n edges: [\n { source: '1', target: '2', type: 'quadratic', data: { cluster: 'edge-type1' } },\n { source: '1', target: '4', data: { cluster: 'edge-type2' } },\n { source: '3', target: '4' },\n { source: '2', target: '4', data: { cluster: 'edge-type3' } },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: { size: 32 },\n palette: { field: 'cluster' },\n },\n edge: {\n palette: { field: 'cluster' },\n },\n layout: {\n type: 'force',\n },\n plugins: [\n {\n type: 'legend',\n nodeField: 'cluster',\n edgeField: 'cluster',\n trigger: 'click',\n gridRow: 1,\n gridCol: 4,\n itemLabelFontSize: 12,\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '1', type: 'circle', data: { cluster: 'node-type1', label: 'C1' } },\n { id: '2', type: 'rect', data: { cluster: 'node-type2', label: 'R1' } },\n { id: '3', type: 'triangle', data: { cluster: 'node-type3', label: 'T1' } },\n { id: '4', type: 'diamond', data: { cluster: 'node-type4', label: 'D1' } },\n { id: '5', type: 'circle', data: { cluster: 'node-type1', label: 'C2' } },\n { id: '6', type: 'rect', data: { cluster: 'node-type2', label: 'R2' } },\n { id: '7', type: 'triangle', data: { cluster: 'node-type3', label: 'T2' } },\n { id: '8', type: 'diamond', data: { cluster: 'node-type4', label: 'D2' } },\n { id: '9', type: 'circle', data: { cluster: 'node-type1', label: 'C3' } },\n { id: '10', type: 'rect', data: { cluster: 'node-type2', label: 'R3' } },\n ],\n edges: [\n { source: '1', target: '2', data: { type: 'edge-type1' } },\n { source: '1', target: '3', data: { type: 'edge-type2' } },\n { source: '2', target: '4', data: { type: 'edge-type3' } },\n { source: '3', target: '4', data: { type: 'edge-type1' } },\n { source: '5', target: '6', data: { type: 'edge-type2' } },\n { source: '5', target: '7', data: { type: 'edge-type3' } },\n { source: '6', target: '8', data: { type: 'edge-type1' } },\n { source: '7', target: '8', data: { type: 'edge-type2' } },\n { source: '1', target: '5', data: { type: 'edge-type3' } },\n { source: '2', target: '6', data: { type: 'edge-type2' } },\n { source: '3', target: '7', data: { type: 'edge-type1' } },\n { source: '4', target: '8', data: { type: 'edge-type3' } },\n { source: '9', target: '10', data: { type: 'edge-type1' } },\n { source: '9', target: '1', data: { type: 'edge-type2' } },\n { source: '10', target: '2', data: { type: 'edge-type3' } },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n width: 800,\n height: 600,\n data,\n node: {\n type: (d) => d.type,\n style: {\n size: (d) => {\n if (d.type === 'rect') return [50, 40];\n if (d.type === 'diamond') return [50, 40];\n return 40;\n },\n labelText: (d) => d.data?.label,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n palette: {\n type: 'group',\n field: 'cluster',\n color: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A'],\n },\n },\n edge: {\n style: {\n stroke: (d) => {\n const colorMap = {\n 'edge-type1': '#5B8FF9',\n 'edge-type2': '#5AD8A6',\n 'edge-type3': '#F6BD16',\n };\n return colorMap[d.data?.type] || '#999';\n },\n lineWidth: 2,\n endArrow: true,\n },\n },\n layout: {\n type: 'force',\n linkDistance: 150,\n nodeStrength: 100,\n edgeStrength: 0.5,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element-force'],\n plugins: [\n {\n type: 'legend',\n position: 'top-left',\n node: {\n field: 'cluster',\n color: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A'],\n },\n edge: {\n field: 'type',\n color: ['#5B8FF9', '#5AD8A6', '#F6BD16'],\n },\n },\n ],\n});\n\ngraph.render();", + "duration": 35248, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-node-html", + "g6-node-rect", + "g6-node-image", + "g6-behavior-drag-element" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 3161, + "expectedLength": 1045, + "similarity": 1, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '1', type: 'circle', data: { cluster: 'node-type1', label: 'C1' } },\n { id: '2', type: 'rect', data: { cluster: 'node-type2', label: 'R1' } },\n { id: '3', type: 'triangle', data: { cluster: 'node-type3', label: 'T1' } },\n { id: '4', type: 'diamond', data: { cluster: 'node-type4', label: 'D1' } },\n { id: '5', type: 'circle', data: { cluster: 'node-type1', label: 'C2' } },\n { id: '6', type: 'rect', data: { cluster: 'node-type2', label: 'R2' } },\n { id: '7', type: 'triangle', data: { cluster: 'node-type3', label: 'T2' } },\n { id: '8', type: 'diamond', data: { cluster: 'node-type4', label: 'D2' } },\n { id: '9', type: 'circle', data: { cluster: 'node-type1', label: 'C3' } },\n { id: '10', type: 'rect', data: { cluster: 'node-type2', label: 'R3' } },\n ],\n edges: [\n { source: '1', target: '2', data: { type: 'edge-type1' } },\n { source: '1', target: '3', data: { type: 'edge-type2' } },\n { source: '2', target: '4', data: { type: 'edge-type3' } },\n { source: '3', target: '4', data: { type: 'edge-type1' } },\n { source: '5', target: '6', data: { type: 'edge-type2' } },\n { source: '5', target: '7', data: { type: 'edge-type3' } },\n { source: '6', target: '8', data: { type: 'edge-type1' } },\n { source: '7', target: '8', data: { type: 'edge-type2' } },\n { source: '1', target: '5', data: { type: 'edge-type3' } },\n { source: '2', target: '6', data: { type: 'edge-type2' } },\n { source: '3', target: '7', data: { type: 'edge-type1' } },\n { source: '4', target: '8', data: { type: 'edge-type3' } },\n { source: '9', target: '10', data: { type: 'edge-type1' } },\n { source: '9', target: '1', data: { type: 'edge-type2' } },\n { source: '10', target: '2', data: { type: 'edge-type3' } },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n width: 800,\n height: 600,\n data,\n node: {\n type: (d) => d.type,\n style: {\n size: (d) => {\n if (d.type === 'rect') return [50, 40];\n if (d.type === 'diamond') return [50, 40];\n return 40;\n },\n labelText: (d) => d.data?.label,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n palette: {\n type: 'group',\n field: 'cluster',\n color: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A'],\n },\n },\n edge: {\n style: {\n stroke: (d) => {\n const colorMap = {\n 'edge-type1': '#5B8FF9',\n 'edge-type2': '#5AD8A6',\n 'edge-type3': '#F6BD16',\n };\n return colorMap[d.data?.type] || '#999';\n },\n lineWidth: 2,\n endArrow: true,\n },\n },\n layout: {\n type: 'force',\n linkDistance: 150,\n nodeStrength: 100,\n edgeStrength: 0.5,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element-force'],\n plugins: [\n {\n type: 'legend',\n position: 'top-left',\n node: {\n field: 'cluster',\n color: ['#5B8FF9', '#5AD8A6', '#F6BD16', '#E8684A'],\n },\n edge: {\n field: 'type',\n color: ['#5B8FF9', '#5AD8A6', '#F6BD16'],\n },\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "type", + "data", + "cluster", + "label", + "id", + "type", + "data", + "cluster", + "label", + "id", + "type", + "data", + "cluster", + "label", + "id", + "type", + "data", + "cluster", + "label", + "id", + "type", + "data", + "cluster", + "label", + "id", + "type", + "data", + "cluster", + "label", + "id", + "type", + "data", + "cluster", + "label", + "id", + "type", + "data", + "cluster", + "label", + "id", + "type", + "data", + "cluster", + "label", + "id", + "type", + "data", + "cluster", + "label", + "edges", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "container", + "width", + "height", + "node", + "type", + "style", + "size", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "palette", + "type", + "field", + "color", + "edge", + "style", + "stroke", + "lineWidth", + "endArrow", + "layout", + "type", + "linkDistance", + "nodeStrength", + "edgeStrength", + "behaviors", + "plugins", + "type", + "position", + "node", + "field", + "color", + "edge", + "field", + "color" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-59", + "query": "根据描述绘制图表,使用 AntV G6 渲染一个树形结构图,数据以嵌套的 children 形式组织,节点显示 id 字段作为文本标签,采用 LR 方向的缩进布局,支持画布拖拽、缩放以及节点的展开收起交互。参考数据:[{\"id\":\"Modeling Methods\",\"children\":[{\"id\":\"Classification\",\"children\":[{\"id\":\"Logistic regression\"},{\"id\":\"Linear discriminant analysis\"},{\"id\":\"Rules\"},{\"id\":\"Decision trees\"},{\"id\":\"Naive Bayes\"},{\"id\":\"K nearest neighbor\"},{\"id\":\"Probabilistic neural network\"},{\"id\":\"Support vector machine\"}]},{\"id\":\"Consensus\",\"children\":[{\"id\":\"Models diversity\",\"children\":[{\"id\":\"Different initializations\"},{\"id\":\"Different parameter choices\"},{\"id\":\"Different architectures\"},{\"id\":\"Different modeling methods\"},{\"id\":\"Different training sets\"},{\"id\":\"Different feature sets\"}]},{\"id\":\"Methods\",\"children\":[{\"id\":\"Classifier selection\"},{\"id\":\"Classifier fusion\"}]},{\"id\":\"Common\",\"children\":[{\"id\":\"Bagging\"},{\"id\":\"Boosting\"},{\"id\":\"AdaBoost\"}]}]},{\"id\":\"Regression\",\"children\":[{\"id\":\"Multiple linear regression\"},{\"id\":\"Partial least squares\"},{\"id\":\"Multi-layer feedforward neural network\"},{\"id\":\"General regression neural network\"},{\"id\":\"Support vector regression\"}]}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst data = {\n \"id\": \"Modeling Methods\",\n \"children\": [\n {\n \"id\": \"Classification\",\n \"children\": [\n {\n \"id\": \"Logistic regression\"\n },\n {\n \"id\": \"Linear discriminant analysis\"\n },\n {\n \"id\": \"Rules\"\n },\n {\n \"id\": \"Decision trees\"\n },\n {\n \"id\": \"Naive Bayes\"\n },\n {\n \"id\": \"K nearest neighbor\"\n },\n {\n \"id\": \"Probabilistic neural network\"\n },\n {\n \"id\": \"Support vector machine\"\n }\n ]\n },\n {\n \"id\": \"Consensus\",\n \"children\": [\n {\n \"id\": \"Models diversity\",\n \"children\": [\n {\n \"id\": \"Different initializations\"\n },\n {\n \"id\": \"Different parameter choices\"\n },\n {\n \"id\": \"Different architectures\"\n },\n {\n \"id\": \"Different modeling methods\"\n },\n {\n \"id\": \"Different training sets\"\n },\n {\n \"id\": \"Different feature sets\"\n }\n ]\n },\n {\n \"id\": \"Methods\",\n \"children\": [\n {\n \"id\": \"Classifier selection\"\n },\n {\n \"id\": \"Classifier fusion\"\n }\n ]\n },\n {\n \"id\": \"Common\",\n \"children\": [\n {\n \"id\": \"Bagging\"\n },\n {\n \"id\": \"Boosting\"\n },\n {\n \"id\": \"AdaBoost\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"Regression\",\n \"children\": [\n {\n \"id\": \"Multiple linear regression\"\n },\n {\n \"id\": \"Partial least squares\"\n },\n {\n \"id\": \"Multi-layer feedforward neural network\"\n },\n {\n \"id\": \"General regression neural network\"\n },\n {\n \"id\": \"Support vector regression\"\n }\n ]\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data: treeToGraphData(data),\n autoFit: 'view',\n node: {\n style: {\n labelText: (d) => d.id,\n labelPlacement: 'right',\n labelBackground: true,\n },\n animation: {\n enter: false,\n },\n },\n edge: {\n type: 'polyline',\n style: {\n radius: 4,\n router: {\n type: 'orth',\n },\n },\n animation: {\n enter: false,\n },\n },\n layout: {\n type: 'indented',\n direction: 'LR',\n indent: 80,\n getHeight: () => 16,\n getWidth: () => 32,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'collapse-expand'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst data = {\n id: \"Modeling Methods\",\n children: [\n {\n id: \"Classification\",\n children: [\n { id: \"Logistic regression\" },\n { id: \"Linear discriminant analysis\" },\n { id: \"Rules\" },\n { id: \"Decision trees\" },\n { id: \"Naive Bayes\" },\n { id: \"K nearest neighbor\" },\n { id: \"Probabilistic neural network\" },\n { id: \"Support vector machine\" }\n ]\n },\n {\n id: \"Consensus\",\n children: [\n {\n id: \"Models diversity\",\n children: [\n { id: \"Different initializations\" },\n { id: \"Different parameter choices\" },\n { id: \"Different architectures\" },\n { id: \"Different modeling methods\" },\n { id: \"Different training sets\" },\n { id: \"Different feature sets\" }\n ]\n },\n {\n id: \"Methods\",\n children: [\n { id: \"Classifier selection\" },\n { id: \"Classifier fusion\" }\n ]\n },\n {\n id: \"Common\",\n children: [\n { id: \"Bagging\" },\n { id: \"Boosting\" },\n { id: \"AdaBoost\" }\n ]\n }\n ]\n },\n {\n id: \"Regression\",\n children: [\n { id: \"Multiple linear regression\" },\n { id: \"Partial least squares\" },\n { id: \"Multi-layer feedforward neural network\" },\n { id: \"General regression neural network\" },\n { id: \"Support vector regression\" }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n data: treeToGraphData(data),\n node: {\n type: 'rect',\n style: {\n size: [200, 36],\n radius: 4,\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#333',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'indented',\n direction: 'LR',\n indent: 40,\n getHeight: () => 36,\n getWidth: () => 200,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'collapse-expand',\n ],\n});\n\ngraph.render();", + "duration": 13674, + "retrievedSkillIds": [ + "g6-node-rect", + "g6-layout-mindmap", + "g6-node-circle", + "g6-node-html", + "g6-behavior-canvas-nav" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2259, + "expectedLength": 2930, + "similarity": 0.7860248447204968, + "extractedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst data = {\n id: \"Modeling Methods\",\n children: [\n {\n id: \"Classification\",\n children: [\n { id: \"Logistic regression\" },\n { id: \"Linear discriminant analysis\" },\n { id: \"Rules\" },\n { id: \"Decision trees\" },\n { id: \"Naive Bayes\" },\n { id: \"K nearest neighbor\" },\n { id: \"Probabilistic neural network\" },\n { id: \"Support vector machine\" }\n ]\n },\n {\n id: \"Consensus\",\n children: [\n {\n id: \"Models diversity\",\n children: [\n { id: \"Different initializations\" },\n { id: \"Different parameter choices\" },\n { id: \"Different architectures\" },\n { id: \"Different modeling methods\" },\n { id: \"Different training sets\" },\n { id: \"Different feature sets\" }\n ]\n },\n {\n id: \"Methods\",\n children: [\n { id: \"Classifier selection\" },\n { id: \"Classifier fusion\" }\n ]\n },\n {\n id: \"Common\",\n children: [\n { id: \"Bagging\" },\n { id: \"Boosting\" },\n { id: \"AdaBoost\" }\n ]\n }\n ]\n },\n {\n id: \"Regression\",\n children: [\n { id: \"Multiple linear regression\" },\n { id: \"Partial least squares\" },\n { id: \"Multi-layer feedforward neural network\" },\n { id: \"General regression neural network\" },\n { id: \"Support vector regression\" }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n data: treeToGraphData(data),\n node: {\n type: 'rect',\n style: {\n size: [200, 36],\n radius: 4,\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#333',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'indented',\n direction: 'LR',\n indent: 40,\n getHeight: () => 36,\n getWidth: () => 200,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'collapse-expand',\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "treeToGraphData" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "treeToGraphData", + "render" + ], + "objectKeys": [ + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "container", + "data", + "node", + "type", + "style", + "size", + "radius", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "direction", + "indent", + "getHeight", + "getWidth", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "view.children", + "new Graph" + ] + } + } + }, + { + "id": "case-60", + "query": "根据描述绘制图表,使用 G6 创建一个图实例,设置容器和基础配置。定义了六个节点和五条边的数据,采用网格布局展示节点。添加了点击触发的自定义提示框插件,用于显示节点或边的描述信息。启用画布和元素拖拽行为,最后执行渲染操作。参考数据:[{\"id\":\"0\",\"data\":{\"label\":\"node-0\",\"description\":\"This is node-0.\"}},{\"id\":\"1\",\"data\":{\"label\":\"node-1\",\"description\":\"This is node-1.\"}},{\"id\":\"2\",\"data\":{\"label\":\"node-2\",\"description\":\"This is node-2.\"}},{\"id\":\"3\",\"data\":{\"label\":\"node-3\",\"description\":\"This is node-3.\"}},{\"id\":\"4\",\"data\":{\"label\":\"node-4\",\"description\":\"This is node-4.\"}},{\"id\":\"5\",\"data\":{\"label\":\"node-5\",\"description\":\"This is node-5.\"}},{\"source\":\"0\",\"target\":\"1\",\"data\":{\"description\":\"This is edge from node 0 to node 1.\"}},{\"source\":\"0\",\"target\":\"2\",\"data\":{\"description\":\"This is edge from node 0 to node 2.\"}},{\"source\":\"0\",\"target\":\"3\",\"data\":{\"description\":\"This is edge from node 0 to node 3.\"}},{\"source\":\"0\",\"target\":\"4\",\"data\":{\"description\":\"This is edge from node 0 to node 4.\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: '0', data: { label: 'node-0', description: 'This is node-0.' } },\n { id: '1', data: { label: 'node-1', description: 'This is node-1.' } },\n { id: '2', data: { label: 'node-2', description: 'This is node-2.' } },\n { id: '3', data: { label: 'node-3', description: 'This is node-3.' } },\n { id: '4', data: { label: 'node-4', description: 'This is node-4.' } },\n { id: '5', data: { label: 'node-5', description: 'This is node-5.' } },\n ],\n edges: [\n { source: '0', target: '1', data: { description: 'This is edge from node 0 to node 1.' } },\n { source: '0', target: '2', data: { description: 'This is edge from node 0 to node 2.' } },\n { source: '0', target: '3', data: { description: 'This is edge from node 0 to node 3.' } },\n { source: '0', target: '4', data: { description: 'This is edge from node 0 to node 4.' } },\n { source: '0', target: '5', data: { description: 'This is edge from node 0 to node 5.' } },\n ],\n },\n layout: {\n type: 'grid',\n },\n plugins: [\n {\n type: 'tooltip',\n trigger: 'click',\n getContent: (e, items) => {\n let result = `

Custom Content

`;\n items.forEach((item) => {\n result += `

Type: ${item.data.description}

`;\n });\n return result;\n },\n },\n ],\n behaviors: ['drag-canvas', 'drag-element'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0', data: { label: 'node-0', description: 'This is node-0.' } },\n { id: '1', data: { label: 'node-1', description: 'This is node-1.' } },\n { id: '2', data: { label: 'node-2', description: 'This is node-2.' } },\n { id: '3', data: { label: 'node-3', description: 'This is node-3.' } },\n { id: '4', data: { label: 'node-4', description: 'This is node-4.' } },\n { id: '5', data: { label: 'node-5', description: 'This is node-5.' } },\n ],\n edges: [\n { source: '0', target: '1', data: { description: 'This is edge from node 0 to node 1.' } },\n { source: '0', target: '2', data: { description: 'This is edge from node 0 to node 2.' } },\n { source: '0', target: '3', data: { description: 'This is edge from node 0 to node 3.' } },\n { source: '0', target: '4', data: { description: 'This is edge from node 0 to node 4.' } },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'grid',\n cols: 3,\n },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: [\n {\n type: 'tooltip',\n trigger: 'click',\n getContent: (event, items) => {\n const item = items[0];\n if (!item) return '';\n const description = item.data?.description || '';\n const isNode = !item.source;\n const title = isNode ? (item.data?.label || item.id) : `Edge: ${item.source} → ${item.target}`;\n return `\n
\n
${title}
\n
${description}
\n
\n `;\n },\n },\n ],\n});\n\ngraph.render();", + "duration": 18316, + "retrievedSkillIds": [ + "g6-node-html", + "g6-node-react", + "g6-core-graph-init", + "g6-core-custom-element", + "g6-plugin-tooltip" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2237, + "expectedLength": 1501, + "similarity": 0.7601071914700545, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0', data: { label: 'node-0', description: 'This is node-0.' } },\n { id: '1', data: { label: 'node-1', description: 'This is node-1.' } },\n { id: '2', data: { label: 'node-2', description: 'This is node-2.' } },\n { id: '3', data: { label: 'node-3', description: 'This is node-3.' } },\n { id: '4', data: { label: 'node-4', description: 'This is node-4.' } },\n { id: '5', data: { label: 'node-5', description: 'This is node-5.' } },\n ],\n edges: [\n { source: '0', target: '1', data: { description: 'This is edge from node 0 to node 1.' } },\n { source: '0', target: '2', data: { description: 'This is edge from node 0 to node 2.' } },\n { source: '0', target: '3', data: { description: 'This is edge from node 0 to node 3.' } },\n { source: '0', target: '4', data: { description: 'This is edge from node 0 to node 4.' } },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'grid',\n cols: 3,\n },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: [\n {\n type: 'tooltip',\n trigger: 'click',\n getContent: (event, items) => {\n const item = items[0];\n if (!item) return '';\n const description = item.data?.description || '';\n const isNode = !item.source;\n const title = isNode ? (item.data?.label || item.id) : `Edge: ${item.source} → ${item.target}`;\n return `\n
\n
${title}
\n
${description}
\n
\n `;\n },\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "rgba", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "description", + "id", + "data", + "label", + "description", + "id", + "data", + "label", + "description", + "id", + "data", + "label", + "description", + "id", + "data", + "label", + "description", + "id", + "data", + "label", + "description", + "edges", + "source", + "target", + "data", + "description", + "source", + "target", + "data", + "description", + "source", + "target", + "data", + "description", + "source", + "target", + "data", + "description", + "container", + "layout", + "type", + "cols", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "behaviors", + "plugins", + "type", + "trigger", + "getContent", + "Edge", + "padding", + "background", + "radius", + "shadow", + "width", + "weight", + "bottom", + "color", + "size", + "color", + "size", + "height" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-61", + "query": "根据描述绘制图表,使用 G6 图表库渲染一个静态网络关系图,数据中包含了明确的节点和边信息。节点具有初始坐标位置,边上定义了样式和状态交互效果。支持画布的缩放、拖拽以及元素的点击选中等交互行为。点击画布空白处会重置所有元素的状态。参考数据:[{\"id\":\"Myriel\",\"style\":{},\"x\":341.7797540563859,\"y\":88.40484154329839,\"index\":0,\"vy\":-0.0026536736834920516,\"vx\":0.007217118636326791},{\"id\":\"Napoleon\",\"style\":{},\"x\":248.97810835021264,\"y\":82.76562289238294,\"index\":1,\"vy\":-0.00143144174159004,\"vx\":0.007397873896910892},{\"id\":\"Mlle.Baptistine\",\"style\":{},\"x\":406.6704069379315,\"y\":162.51299037506624,\"index\":2,\"vy\":0.0003804887886203794,\"vx\":0.00046418063897863716},{\"id\":\"Mme.Magloire\",\"style\":{},\"x\":443.61889712945293,\"y\":115.33167513151791,\"index\":3,\"vy\":0.0013631332119810136,\"vx\":0.003967666654092471},{\"id\":\"CountessdeLo\",\"style\":{},\"x\":252.9044392426123,\"y\":62.14332107207468,\"index\":4,\"vy\":0.0014322587151732859,\"vx\":0.00588047795241134},{\"id\":\"Count\",\"style\":{},\"x\":327.75236114126585,\"y\":3.1600634694811585,\"index\":8,\"vy\":-0.002851164764627703,\"vx\":0.0021682139750627437},{\"id\":\"Marguerite\",\"style\":{},\"x\":510.5502612458404,\"y\":145.46385801178863,\"index\":12,\"vy\":0.0033620546528436226,\"vx\":-0.002519213714953831},{\"id\":\"Tholomyes\",\"style\":{},\"x\":355.3762033919247,\"y\":229.7133559428652,\"index\":16,\"vy\":0.0011425075346545577,\"vx\":-0.0020487253234258524},{\"id\":\"Favourite\",\"style\":{},\"x\":318.9381037111104,\"y\":175.07908672908448,\"index\":20,\"vy\":0.0009552014513141638,\"vx\":-0.0007987087714658255},{\"id\":\"Mme.Thenardier\",\"style\":{},\"x\":582.7659215233698,\"y\":245.53836531948036,\"index\":24,\"vy\":0.00165798126254825,\"vx\":0.0031672572454220214}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { CanvasEvent, Graph } from '@antv/g6';\n\nconst format = ({ nodes, edges }) => {\n return {\n nodes: nodes.map((node) => ({\n ...node,\n style: {\n x: node.x,\n y: node.y,\n },\n })),\n edges,\n };\n};\n\nconst rawData = {\n \"nodes\": [\n {\n \"id\": \"Myriel\",\n \"style\": {},\n \"x\": 341.7797540563859,\n \"y\": 88.40484154329839,\n \"index\": 0,\n \"vy\": -0.0026536736834920516,\n \"vx\": 0.007217118636326791\n },\n {\n \"id\": \"Napoleon\",\n \"style\": {},\n \"x\": 248.97810835021264,\n \"y\": 82.76562289238294,\n \"index\": 1,\n \"vy\": -0.00143144174159004,\n \"vx\": 0.007397873896910892\n },\n {\n \"id\": \"Mlle.Baptistine\",\n \"style\": {},\n \"x\": 406.6704069379315,\n \"y\": 162.51299037506624,\n \"index\": 2,\n \"vy\": 0.0003804887886203794,\n \"vx\": 0.00046418063897863716\n },\n {\n \"id\": \"Mme.Magloire\",\n \"style\": {},\n \"x\": 443.61889712945293,\n \"y\": 115.33167513151791,\n \"index\": 3,\n \"vy\": 0.0013631332119810136,\n \"vx\": 0.003967666654092471\n },\n {\n \"id\": \"CountessdeLo\",\n \"style\": {},\n \"x\": 252.9044392426123,\n \"y\": 62.14332107207468,\n \"index\": 4,\n \"vy\": 0.0014322587151732859,\n \"vx\": 0.00588047795241134\n },\n {\n \"id\": \"Count\",\n \"style\": {},\n \"x\": 327.75236114126585,\n \"y\": 3.1600634694811585,\n \"index\": 8,\n \"vy\": -0.002851164764627703,\n \"vx\": 0.0021682139750627437\n },\n {\n \"id\": \"Marguerite\",\n \"style\": {},\n \"x\": 510.5502612458404,\n \"y\": 145.46385801178863,\n \"index\": 12,\n \"vy\": 0.0033620546528436226,\n \"vx\": -0.002519213714953831\n },\n {\n \"id\": \"Tholomyes\",\n \"style\": {},\n \"x\": 355.3762033919247,\n \"y\": 229.7133559428652,\n \"index\": 16,\n \"vy\": 0.0011425075346545577,\n \"vx\": -0.0020487253234258524\n },\n {\n \"id\": \"Favourite\",\n \"style\": {},\n \"x\": 318.9381037111104,\n \"y\": 175.07908672908448,\n \"index\": 20,\n \"vy\": 0.0009552014513141638,\n \"vx\": -0.0007987087714658255\n },\n {\n \"id\": \"Mme.Thenardier\",\n \"style\": {},\n \"x\": 582.7659215233698,\n \"y\": 245.53836531948036,\n \"index\": 24,\n \"vy\": 0.00165798126254825,\n \"vx\": 0.0031672572454220214\n },\n {\n \"id\": \"Fauchelevent\",\n \"style\": {},\n \"x\": 614.0236652929069,\n \"y\": 166.87502126390078,\n \"index\": 28,\n \"vy\": 0.0017334240037424444,\n \"vx\": -0.0005948875015234048\n },\n {\n \"id\": \"Scaufflaire\",\n \"style\": {},\n \"x\": 494.8919289216817,\n \"y\": 133.03980878911418,\n \"index\": 32,\n \"vy\": 0.0004034782396806429,\n \"vx\": -0.0005895905327994073\n },\n {\n \"id\": \"Brevet\",\n \"style\": {},\n \"x\": 486.8696648214383,\n \"y\": 151.35016916228733,\n \"index\": 36,\n \"vy\": 0.00040138543743586854,\n \"vx\": -0.0012563279875123007\n },\n {\n \"id\": \"Boulatruelle\",\n \"style\": {},\n \"x\": 638.5935390156632,\n \"y\": 314.05075219932075,\n \"index\": 40,\n \"vy\": 0.00664666803740925,\n \"vx\": -0.0002480017914159759\n },\n {\n \"id\": \"MotherInnocent\",\n \"style\": {},\n \"x\": 622.092507678866,\n \"y\": 217.5793855361109,\n \"index\": 44,\n \"vy\": 0.003129477882807177,\n \"vx\": -0.00627067663872749\n },\n {\n \"id\": \"Gavroche\",\n \"style\": {},\n \"x\": 433.37197461243807,\n \"y\": 389.9427984319848,\n \"index\": 48,\n \"vy\": 0.004669580359184078,\n \"vx\": 0.0014364625123955235\n },\n {\n \"id\": \"Mme.Pontmercy\",\n \"style\": {},\n \"x\": 464.6697739989339,\n \"y\": 369.241174110655,\n \"index\": 52,\n \"vy\": 0.002998439583071046,\n \"vx\": -0.0022757784939187215\n },\n {\n \"id\": \"BaronessT\",\n \"style\": {},\n \"x\": 520.7480807613272,\n \"y\": 357.7202821612359,\n \"index\": 56,\n \"vy\": -0.00023096610675057532,\n \"vx\": -0.002602417599552747\n },\n {\n \"id\": \"Prouvaire\",\n \"style\": {},\n \"x\": 322.907253614181,\n \"y\": 450.79425317836336,\n \"index\": 60,\n \"vy\": 0.00256317938306875,\n \"vx\": -0.0013977764116248944\n },\n {\n \"id\": \"Bossuet\",\n \"style\": {},\n \"x\": 382.6104305035556,\n \"y\": 382.09904792459525,\n \"index\": 64,\n \"vy\": 0.002978358713884358,\n \"vx\": -0.0017378084279446265\n },\n {\n \"id\": \"Child1\",\n \"style\": {},\n \"x\": 425.4403525411061,\n \"y\": 479.6050040458139,\n \"index\": 73,\n \"vy\": 0.004532087365750634,\n \"vx\": -0.0014516036333269665\n },\n {\n \"id\": \"Child2\",\n \"style\": {},\n \"x\": 499.60722582584543,\n \"y\": 452.24700755326205,\n \"index\": 74,\n \"vy\": 0.006563397353121591,\n \"vx\": -0.00040422146900036954\n },\n {\n \"id\": \"Brujon\",\n \"style\": {},\n \"x\": 522.6020397052654,\n \"y\": 415.7583359824014,\n \"index\": 75,\n \"vy\": 0.00516672246978952,\n \"vx\": 0.004328106287514071\n },\n {\n \"id\": \"Mme.Hucheloup\",\n \"style\": {},\n \"x\": 335.6328256253445,\n \"y\": 466.21290024068867,\n \"index\": 76,\n \"vy\": 0.0017489948842239029,\n \"vx\": -0.00004345042395707578\n }\n ],\n \"edges\": [\n {\n \"source\": \"Napoleon\",\n \"target\": \"Myriel\",\n \"value\": 1,\n \"id\": \"0\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 248.97810835021266,\n \"y\": 82.76562289238294\n },\n \"endPoint\": {\n \"x\": 341.7797540563859,\n \"y\": 88.40484154329839\n }\n },\n {\n \"source\": \"Mlle.Baptistine\",\n \"target\": \"Myriel\",\n \"value\": 8,\n \"id\": \"1\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 406.6704069379315,\n \"y\": 162.51299037506624\n },\n \"endPoint\": {\n \"x\": 341.7797540563859,\n \"y\": 88.40484154329839\n }\n },\n {\n \"source\": \"Mme.Magloire\",\n \"target\": \"Myriel\",\n \"value\": 10,\n \"id\": \"2\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 443.61889712945293,\n \"y\": 115.33167513151791\n },\n \"endPoint\": {\n \"x\": 341.7797540563859,\n \"y\": 88.40484154329839\n }\n },\n {\n \"source\": \"Mme.Magloire\",\n \"target\": \"Mlle.Baptistine\",\n \"value\": 6,\n \"id\": \"3\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 443.61889712945293,\n \"y\": 115.33167513151791\n },\n \"endPoint\": {\n \"x\": 406.6704069379315,\n \"y\": 162.51299037506624\n }\n },\n {\n \"source\": \"CountessdeLo\",\n \"target\": \"Myriel\",\n \"value\": 1,\n \"id\": \"4\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 252.90443924261228,\n \"y\": 62.143321072074684\n },\n \"endPoint\": {\n \"x\": 341.7797540563859,\n \"y\": 88.40484154329839\n }\n },\n {\n \"source\": \"Count\",\n \"target\": \"Myriel\",\n \"value\": 2,\n \"id\": \"8\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 327.75236114126585,\n \"y\": 3.160063469481159\n },\n \"endPoint\": {\n \"x\": 341.7797540563859,\n \"y\": 88.40484154329839\n }\n },\n {\n \"source\": \"Favourite\",\n \"target\": \"Tholomyes\",\n \"value\": 3,\n \"id\": \"24\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 318.9381037111104,\n \"y\": 175.07908672908448\n },\n \"endPoint\": {\n \"x\": 355.3762033919247,\n \"y\": 229.7133559428652\n }\n },\n {\n \"source\": \"MotherInnocent\",\n \"target\": \"Fauchelevent\",\n \"value\": 3,\n \"id\": \"105\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 622.092507678866,\n \"y\": 217.5793855361109\n },\n \"endPoint\": {\n \"x\": 614.0236652929069,\n \"y\": 166.87502126390078\n }\n },\n {\n \"source\": \"Prouvaire\",\n \"target\": \"Gavroche\",\n \"value\": 1,\n \"id\": \"150\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 322.907253614181,\n \"y\": 450.79425317836336\n },\n \"endPoint\": {\n \"x\": 433.37197461243807,\n \"y\": 389.9427984319848\n }\n },\n {\n \"source\": \"Bossuet\",\n \"target\": \"Gavroche\",\n \"value\": 5,\n \"id\": \"177\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 382.6104305035556,\n \"y\": 382.09904792459525\n },\n \"endPoint\": {\n \"x\": 433.37197461243807,\n \"y\": 389.9427984319848\n }\n },\n {\n \"source\": \"Bossuet\",\n \"target\": \"Prouvaire\",\n \"value\": 2,\n \"id\": \"181\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 382.6104305035556,\n \"y\": 382.09904792459525\n },\n \"endPoint\": {\n \"x\": 322.907253614181,\n \"y\": 450.79425317836336\n }\n },\n {\n \"source\": \"Child1\",\n \"target\": \"Gavroche\",\n \"value\": 2,\n \"id\": \"237\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 425.4403525411061,\n \"y\": 479.6050040458139\n },\n \"endPoint\": {\n \"x\": 433.37197461243807,\n \"y\": 389.9427984319848\n }\n },\n {\n \"source\": \"Child2\",\n \"target\": \"Gavroche\",\n \"value\": 2,\n \"id\": \"238\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 499.60722582584543,\n \"y\": 452.24700755326205\n },\n \"endPoint\": {\n \"x\": 433.37197461243807,\n \"y\": 389.9427984319848\n }\n },\n {\n \"source\": \"Child2\",\n \"target\": \"Child1\",\n \"value\": 3,\n \"id\": \"239\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 499.60722582584543,\n \"y\": 452.24700755326205\n },\n \"endPoint\": {\n \"x\": 425.4403525411061,\n \"y\": 479.6050040458139\n }\n },\n {\n \"source\": \"Brujon\",\n \"target\": \"Gavroche\",\n \"value\": 1,\n \"id\": \"243\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 522.6020397052654,\n \"y\": 415.7583359824014\n },\n \"endPoint\": {\n \"x\": 433.37197461243807,\n \"y\": 389.9427984319848\n }\n },\n {\n \"source\": \"Mme.Hucheloup\",\n \"target\": \"Bossuet\",\n \"value\": 1,\n \"id\": \"247\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 335.6328256253445,\n \"y\": 466.21290024068867\n },\n \"endPoint\": {\n \"x\": 382.6104305035556,\n \"y\": 382.09904792459525\n }\n },\n {\n \"source\": \"Mme.Hucheloup\",\n \"target\": \"Gavroche\",\n \"value\": 1,\n \"id\": \"252\",\n \"style\": {\n \"active\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 1\n },\n \"selected\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"shadowColor\": \"rgb(95, 149, 255)\",\n \"shadowBlur\": 10,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"highlight\": {\n \"stroke\": \"rgb(95, 149, 255)\",\n \"lineWidth\": 2,\n \"text-shape\": {\n \"fontWeight\": 500\n }\n },\n \"inactive\": {\n \"stroke\": \"rgb(234, 234, 234)\",\n \"lineWidth\": 1\n },\n \"disable\": {\n \"stroke\": \"rgb(245, 245, 245)\",\n \"lineWidth\": 1\n }\n },\n \"startPoint\": {\n \"x\": 335.6328256253445,\n \"y\": 466.21290024068867\n },\n \"endPoint\": {\n \"x\": 433.37197461243807,\n \"y\": 389.9427984319848\n }\n }\n ]\n };\nconst data = format(rawData);\n\nconst graph = new Graph({\n container: 'container',\n animation: false,\n data,\n node: {\n style: {\n size: 12,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', { type: 'click-select', multiple: true }],\n autoFit: 'view',\n});\ngraph.render();\nconst resetStates = () => {\n graph.setElementState(Object.fromEntries([...data.nodes, ...data.edges].map((element) => [element.id, []])));\n};\ngraph.on(CanvasEvent.CLICK, () => {\n resetStates();\n});\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'Myriel', x: 341.7797540563859, y: 88.40484154329839 },\n { id: 'Napoleon', x: 248.97810835021264, y: 82.76562289238294 },\n { id: 'Mlle.Baptistine', x: 406.6704069379315, y: 162.51299037506624 },\n { id: 'Mme.Magloire', x: 443.61889712945293, y: 115.33167513151791 },\n { id: 'CountessdeLo', x: 252.9044392426123, y: 62.14332107207468 },\n { id: 'Count', x: 327.75236114126585, y: 3.1600634694811585 },\n { id: 'Marguerite', x: 510.5502612458404, y: 145.46385801178863 },\n { id: 'Tholomyes', x: 355.3762033919247, y: 229.7133559428652 },\n { id: 'Favourite', x: 318.9381037111104, y: 175.07908672908448 },\n { id: 'Mme.Thenardier', x: 582.7659215233698, y: 245.53836531948036 }\n ],\n edges: [\n { source: 'Myriel', target: 'Napoleon' },\n { source: 'Myriel', target: 'Mlle.Baptistine' },\n { source: 'Myriel', target: 'Mme.Magloire' },\n { source: 'Napoleon', target: 'CountessdeLo' },\n { source: 'CountessdeLo', target: 'Count' },\n { source: 'Mlle.Baptistine', target: 'Marguerite' },\n { source: 'Mme.Magloire', target: 'Tholomyes' },\n { source: 'Tholomyes', target: 'Favourite' },\n { source: 'Favourite', target: 'Mme.Thenardier' },\n { source: 'Marguerite', target: 'Mme.Thenardier' },\n { source: 'Myriel', target: 'Count' },\n { source: 'Napoleon', target: 'Count' }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n autoFit: 'view',\n data,\n node: {\n type: 'circle',\n style: {\n size: 20,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n labelOffsetY: 8\n },\n state: {\n selected: {\n fill: '#ff7875',\n stroke: '#ff4d4f',\n lineWidth: 3,\n halo: true,\n haloFill: '#ff7875',\n haloOpacity: 0.2\n },\n hover: {\n fill: '#40a9ff',\n cursor: 'pointer'\n }\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true\n },\n state: {\n selected: {\n stroke: '#ff4d4f',\n lineWidth: 3\n },\n hover: {\n stroke: '#666',\n lineWidth: 2\n }\n }\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'click-select',\n multiple: false,\n trigger: 'click',\n deselect: true\n },\n 'hover-activate'\n ]\n});\n\ngraph.render();", + "duration": 28169, + "retrievedSkillIds": [ + "g6-behavior-drag-element", + "g6-node-circle", + "g6-core-transforms-animation", + "g6-core-data-structure", + "g6-behavior-canvas-nav" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2503, + "expectedLength": 24138, + "similarity": 0.43843059818527713, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'Myriel', x: 341.7797540563859, y: 88.40484154329839 },\n { id: 'Napoleon', x: 248.97810835021264, y: 82.76562289238294 },\n { id: 'Mlle.Baptistine', x: 406.6704069379315, y: 162.51299037506624 },\n { id: 'Mme.Magloire', x: 443.61889712945293, y: 115.33167513151791 },\n { id: 'CountessdeLo', x: 252.9044392426123, y: 62.14332107207468 },\n { id: 'Count', x: 327.75236114126585, y: 3.1600634694811585 },\n { id: 'Marguerite', x: 510.5502612458404, y: 145.46385801178863 },\n { id: 'Tholomyes', x: 355.3762033919247, y: 229.7133559428652 },\n { id: 'Favourite', x: 318.9381037111104, y: 175.07908672908448 },\n { id: 'Mme.Thenardier', x: 582.7659215233698, y: 245.53836531948036 }\n ],\n edges: [\n { source: 'Myriel', target: 'Napoleon' },\n { source: 'Myriel', target: 'Mlle.Baptistine' },\n { source: 'Myriel', target: 'Mme.Magloire' },\n { source: 'Napoleon', target: 'CountessdeLo' },\n { source: 'CountessdeLo', target: 'Count' },\n { source: 'Mlle.Baptistine', target: 'Marguerite' },\n { source: 'Mme.Magloire', target: 'Tholomyes' },\n { source: 'Tholomyes', target: 'Favourite' },\n { source: 'Favourite', target: 'Mme.Thenardier' },\n { source: 'Marguerite', target: 'Mme.Thenardier' },\n { source: 'Myriel', target: 'Count' },\n { source: 'Napoleon', target: 'Count' }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n autoFit: 'view',\n data,\n node: {\n type: 'circle',\n style: {\n size: 20,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n labelOffsetY: 8\n },\n state: {\n selected: {\n fill: '#ff7875',\n stroke: '#ff4d4f',\n lineWidth: 3,\n halo: true,\n haloFill: '#ff7875',\n haloOpacity: 0.2\n },\n hover: {\n fill: '#40a9ff',\n cursor: 'pointer'\n }\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true\n },\n state: {\n selected: {\n stroke: '#ff4d4f',\n lineWidth: 3\n },\n hover: {\n stroke: '#666',\n lineWidth: 2\n }\n }\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'click-select',\n multiple: false,\n trigger: 'click',\n deselect: true\n },\n 'hover-activate'\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "x", + "y", + "id", + "x", + "y", + "id", + "x", + "y", + "id", + "x", + "y", + "id", + "x", + "y", + "id", + "x", + "y", + "id", + "x", + "y", + "id", + "x", + "y", + "id", + "x", + "y", + "id", + "x", + "y", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "container", + "autoFit", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "labelOffsetY", + "state", + "selected", + "fill", + "stroke", + "lineWidth", + "halo", + "haloFill", + "haloOpacity", + "hover", + "fill", + "cursor", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "state", + "selected", + "stroke", + "lineWidth", + "hover", + "stroke", + "lineWidth", + "behaviors", + "type", + "multiple", + "trigger", + "deselect" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-62", + "query": "根据描述绘制图表,使用 G6 构建了一个基于网格布局的关系图,节点根据 cluster 字段进行分组着色,支持画布的缩放、拖拽以及元素拖动等交互操作。参考数据:[{\"id\":\"0\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"1\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"2\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"3\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"4\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"5\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"6\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"7\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"8\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"9\",\"data\":{\"cluster\":\"a\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"0\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"1\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"2\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"3\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"4\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"5\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"6\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"7\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"8\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"9\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"10\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"11\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"12\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"13\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"14\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"15\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"16\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"17\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"18\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"19\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"20\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"21\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"22\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"23\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"24\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"25\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"26\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"27\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"28\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"29\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"30\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"31\",\n \"data\": {\n \"cluster\": \"d\"\n }\n },\n {\n \"id\": \"32\",\n \"data\": {\n \"cluster\": \"d\"\n }\n },\n {\n \"id\": \"33\",\n \"data\": {\n \"cluster\": \"d\"\n }\n }\n ],\n \"edges\": [\n {\n \"source\": \"0\",\n \"target\": \"1\"\n },\n {\n \"source\": \"0\",\n \"target\": \"2\"\n },\n {\n \"source\": \"0\",\n \"target\": \"3\"\n },\n {\n \"source\": \"0\",\n \"target\": \"4\"\n },\n {\n \"source\": \"0\",\n \"target\": \"5\"\n },\n {\n \"source\": \"0\",\n \"target\": \"7\"\n },\n {\n \"source\": \"0\",\n \"target\": \"8\"\n },\n {\n \"source\": \"0\",\n \"target\": \"9\"\n },\n {\n \"source\": \"0\",\n \"target\": \"10\"\n },\n {\n \"source\": \"0\",\n \"target\": \"11\"\n },\n {\n \"source\": \"0\",\n \"target\": \"13\"\n },\n {\n \"source\": \"0\",\n \"target\": \"14\"\n },\n {\n \"source\": \"0\",\n \"target\": \"15\"\n },\n {\n \"source\": \"0\",\n \"target\": \"16\"\n },\n {\n \"source\": \"2\",\n \"target\": \"3\"\n },\n {\n \"source\": \"4\",\n \"target\": \"5\"\n },\n {\n \"source\": \"4\",\n \"target\": \"6\"\n },\n {\n \"source\": \"5\",\n \"target\": \"6\"\n },\n {\n \"source\": \"7\",\n \"target\": \"13\"\n },\n {\n \"source\": \"8\",\n \"target\": \"14\"\n },\n {\n \"source\": \"9\",\n \"target\": \"10\"\n },\n {\n \"source\": \"10\",\n \"target\": \"22\"\n },\n {\n \"source\": \"10\",\n \"target\": \"14\"\n },\n {\n \"source\": \"10\",\n \"target\": \"12\"\n },\n {\n \"source\": \"10\",\n \"target\": \"24\"\n },\n {\n \"source\": \"10\",\n \"target\": \"21\"\n },\n {\n \"source\": \"10\",\n \"target\": \"20\"\n },\n {\n \"source\": \"11\",\n \"target\": \"24\"\n },\n {\n \"source\": \"11\",\n \"target\": \"22\"\n },\n {\n \"source\": \"11\",\n \"target\": \"14\"\n },\n {\n \"source\": \"12\",\n \"target\": \"13\"\n },\n {\n \"source\": \"16\",\n \"target\": \"17\"\n },\n {\n \"source\": \"16\",\n \"target\": \"18\"\n },\n {\n \"source\": \"16\",\n \"target\": \"21\"\n },\n {\n \"source\": \"16\",\n \"target\": \"22\"\n },\n {\n \"source\": \"17\",\n \"target\": \"18\"\n },\n {\n \"source\": \"17\",\n \"target\": \"20\"\n },\n {\n \"source\": \"18\",\n \"target\": \"19\"\n },\n {\n \"source\": \"19\",\n \"target\": \"20\"\n },\n {\n \"source\": \"19\",\n \"target\": \"33\"\n },\n {\n \"source\": \"19\",\n \"target\": \"22\"\n },\n {\n \"source\": \"19\",\n \"target\": \"23\"\n },\n {\n \"source\": \"20\",\n \"target\": \"21\"\n },\n {\n \"source\": \"21\",\n \"target\": \"22\"\n },\n {\n \"source\": \"22\",\n \"target\": \"24\"\n },\n {\n \"source\": \"22\",\n \"target\": \"25\"\n },\n {\n \"source\": \"22\",\n \"target\": \"26\"\n },\n {\n \"source\": \"22\",\n \"target\": \"23\"\n },\n {\n \"source\": \"22\",\n \"target\": \"28\"\n },\n {\n \"source\": \"22\",\n \"target\": \"30\"\n },\n {\n \"source\": \"22\",\n \"target\": \"31\"\n },\n {\n \"source\": \"22\",\n \"target\": \"32\"\n },\n {\n \"source\": \"22\",\n \"target\": \"33\"\n },\n {\n \"source\": \"23\",\n \"target\": \"28\"\n },\n {\n \"source\": \"23\",\n \"target\": \"27\"\n },\n {\n \"source\": \"23\",\n \"target\": \"29\"\n },\n {\n \"source\": \"23\",\n \"target\": \"30\"\n },\n {\n \"source\": \"23\",\n \"target\": \"31\"\n },\n {\n \"source\": \"23\",\n \"target\": \"33\"\n },\n {\n \"source\": \"32\",\n \"target\": \"33\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n labelText: (d) => d.id,\n labelBackground: true,\n },\n palette: {\n type: 'group',\n field: 'cluster',\n },\n },\n layout: {\n type: 'grid',\n sortBy: 'id',\n nodeSize: 32,\n },\n behaviors: ['zoom-canvas', 'drag-canvas', 'drag-element'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [\n { id: '0', data: { cluster: 'a' } },\n { id: '1', data: { cluster: 'a' } },\n { id: '2', data: { cluster: 'a' } },\n { id: '3', data: { cluster: 'a' } },\n { id: '4', data: { cluster: 'a' } },\n { id: '5', data: { cluster: 'a' } },\n { id: '6', data: { cluster: 'a' } },\n { id: '7', data: { cluster: 'a' } },\n { id: '8', data: { cluster: 'a' } },\n { id: '9', data: { cluster: 'a' } },\n];\n\nconst edges = [\n { source: '0', target: '1' },\n { source: '0', target: '2' },\n { source: '1', target: '3' },\n { source: '2', target: '4' },\n { source: '3', target: '5' },\n { source: '4', target: '6' },\n { source: '5', target: '7' },\n { source: '6', target: '8' },\n { source: '7', target: '9' },\n { source: '8', target: '9' },\n];\n\nconst graph = new Graph({\n container: container,\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: 40,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n },\n palette: {\n type: 'group',\n field: (d) => d.data.cluster,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#ccc',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 5,\n rowGap: 80,\n colGap: 80,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "duration": 14288, + "retrievedSkillIds": [ + "g6-layout-grid", + "g6-behavior-canvas-nav", + "g6-layout-combo-fishbone", + "g6-layout-force", + "g6-layout-mindmap" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1344, + "expectedLength": 6879, + "similarity": 0.5964964119881806, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [\n { id: '0', data: { cluster: 'a' } },\n { id: '1', data: { cluster: 'a' } },\n { id: '2', data: { cluster: 'a' } },\n { id: '3', data: { cluster: 'a' } },\n { id: '4', data: { cluster: 'a' } },\n { id: '5', data: { cluster: 'a' } },\n { id: '6', data: { cluster: 'a' } },\n { id: '7', data: { cluster: 'a' } },\n { id: '8', data: { cluster: 'a' } },\n { id: '9', data: { cluster: 'a' } },\n];\n\nconst edges = [\n { source: '0', target: '1' },\n { source: '0', target: '2' },\n { source: '1', target: '3' },\n { source: '2', target: '4' },\n { source: '3', target: '5' },\n { source: '4', target: '6' },\n { source: '5', target: '7' },\n { source: '6', target: '8' },\n { source: '7', target: '9' },\n { source: '8', target: '9' },\n];\n\nconst graph = new Graph({\n container: container,\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: 40,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n },\n palette: {\n type: 'group',\n field: (d) => d.data.cluster,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#ccc',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 5,\n rowGap: 80,\n colGap: 80,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "container", + "data", + "node", + "type", + "style", + "size", + "labelText", + "labelPlacement", + "palette", + "type", + "field", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "rows", + "cols", + "rowGap", + "colGap", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-63", + "query": "根据描述绘制图表,构建了一个使用力导向布局展示独角兽公司及其投资机构之间关系的网络图,节点根据类型区分颜色和图标,具备基础交互功能如悬停高亮、画布拖拽和缩放。参考数据:[{\"id\":\"e6351e4d-1ee5-47b9-9a06-ef950fc32d09\",\"data\":{\"type\":\"Company\",\"name\":\"Swiggy\",\"description\":null,\"image\":null,\"reference\":null,\"properties\":{},\"degree\":3}},{\"id\":\"476a5c9b-48fd-467b-9513-3e21d7cb9049\",\"data\":{\"type\":\"Company\",\"name\":\"Lime\",\"description\":null,\"image\":null,\"reference\":null,\"properties\":{},\"degree\":3}},{\"id\":\"1f3b85b8-10fb-4b3d-b9f1-6ee6212a030a\",\"data\":{\"type\":\"Company\",\"name\":\"Zhuan Zhuan\",\"description\":null,\"image\":null,\"reference\":null,\"properties\":{},\"degree\":2}},{\"id\":\"660299b9-7bdc-4392-8a82-4a6285d73167\",\"data\":{\"type\":\"Company\",\"name\":\"Udemy\",\"description\":null,\"image\":null,\"reference\":null,\"properties\":{},\"degree\":3}},{\"id\":\"0be578b1-0206-4eec-8329-592c135bddc6\",\"data\":{\"type\":\"Company\",\"name\":\"NuCom Group\",\"description\":null,\"image\":null,\"reference\":null,\"properties\":{},\"degree\":1}},{\"id\":\"8a90286d-d304-4030-abc7-779ad5a0a4c2\",\"data\":{\"type\":\"Company\",\"name\":\"RigUp\",\"description\":null,\"image\":null,\"reference\":null,\"properties\":{},\"degree\":3}},{\"id\":\"48b557b5-2939-40d2-872f-e08597c57224\",\"data\":{\"type\":\"Company\",\"name\":\"STX Entertainment\",\"description\":null,\"image\":null,\"reference\":null,\"properties\":{},\"degree\":3}},{\"id\":\"5efb9038-676c-49b6-a67e-0f7fde1d7d5b\",\"data\":{\"type\":\"Company\",\"name\":\"Atom Bank\",\"description\":null,\"image\":null,\"reference\":null,\"properties\":{},\"degree\":3}},{\"id\":\"3befff07-86fe-4546-959b-01819a409bbd\",\"data\":{\"type\":\"Company\",\"name\":\"VANCL\",\"description\":null,\"image\":null,\"reference\":null,\"properties\":{},\"degree\":3}},{\"id\":\"3b75ffc1-4bda-4889-b011-b3daceddb513\",\"data\":{\"type\":\"Company\",\"name\":\"Omio\",\"description\":null,\"image\":null,\"reference\":null,\"properties\":{},\"degree\":3}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\n/**\n * Inspired by https://graphcommons.com/graphs/be8bc972-5b26-4f5c-837d-a34704f33a9e\n */\nconst data = {\n \"nodes\": [\n {\n \"id\": \"e6351e4d-1ee5-47b9-9a06-ef950fc32d09\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Swiggy\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"476a5c9b-48fd-467b-9513-3e21d7cb9049\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Lime\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"1f3b85b8-10fb-4b3d-b9f1-6ee6212a030a\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Zhuan Zhuan\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 2\n }\n },\n {\n \"id\": \"660299b9-7bdc-4392-8a82-4a6285d73167\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Udemy\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"0be578b1-0206-4eec-8329-592c135bddc6\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"NuCom Group\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"8a90286d-d304-4030-abc7-779ad5a0a4c2\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"RigUp\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"48b557b5-2939-40d2-872f-e08597c57224\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"STX Entertainment\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"5efb9038-676c-49b6-a67e-0f7fde1d7d5b\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Atom Bank\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"3befff07-86fe-4546-959b-01819a409bbd\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"VANCL\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"3b75ffc1-4bda-4889-b011-b3daceddb513\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Omio\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"b4fdd1bf-165a-4bec-aa51-e7f010acb11c\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Coupang\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"b563ac68-2c98-4ec4-9d2f-b28951353a97\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Aijia Life\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"b309cfb4-3234-4975-9b94-b42aea1ea4b6\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"KnowBe4\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"8111f4b1-3051-4b85-82d5-00126dc133da\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"MUSINSA\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"be716aa4-fad4-498e-9ac8-8a0c03706222\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Fair\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"07abf887-c3cd-43f9-84f7-4899f863abef\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Liquid\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"b6e0e945-ca73-4e24-ac58-6e1654d18803\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Samsara Networks\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 2\n }\n },\n {\n \"id\": \"5e63785e-1ba8-4dd1-8127-5e1c1867269d\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Maimai\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"ae25cb27-0e52-4daf-9519-3fe5729e79fd\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"TalkDesk\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"c156bb21-e68b-4cb2-9427-2151b90f3788\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Banma Network Technologies\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"c86f4057-87f0-4ceb-9789-6cbe191f6a1c\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Brex\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"a9871e26-e730-4223-a4df-253910bd00d7\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Ding Xiang Yuan\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 2\n }\n },\n {\n \"id\": \"7ebc4dc1-acc6-4f26-9c83-2df3a38d4747\",\n \"data\": {\n \"type\": \"Company\",\n \"name\": \"Beike Zhaofang\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"8d45ca2b-6758-4d50-bf2b-8e0aa96e102e\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"IDG Capital Partners\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 2\n }\n },\n {\n \"id\": \"08f4f061-0650-4739-8a74-cec7ce312bfd\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Intel Capital\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 4\n }\n },\n {\n \"id\": \"9f93b521-442f-4723-91af-693c4abf929a\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"AID Partners\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"1ac8d82e-e246-40f2-ae77-9857c40a1614\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Warmsun Holding\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"a419741c-5b88-414a-bd4b-b8a7d3f192bc\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"8VC\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"fc6e9f53-b7a9-4e53-bdcd-94bc632ab142\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Emtek Group\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"ce6ecfe2-50d9-40a7-b298-b8030e067594\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Northgate Capital\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"03b7786a-0552-42c8-b28e-fb083df33cf2\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Yunfeng Capital\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"ba0c531f-b802-44fc-a3eb-557d588f5b75\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Caterpillar\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"830d5985-d0e0-4162-8903-4f93ff3b9e5b\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"ZhenFund\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 3\n }\n },\n {\n \"id\": \"893a879b-2f65-42e4-a769-1fc0efdcc928\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Lindeman Asia Investment\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"61b74829-303c-4cf7-9782-b93ba985b56d\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Andreessen Horowitz\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 17\n }\n },\n {\n \"id\": \"5ee74a57-0f78-4b3f-88a5-4f04ca1095d0\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Berkshire Partners\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"a493d447-138f-4c22-93e0-575d7b87e8ef\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Fosun RZ Capital\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"4875a289-85dd-44d1-b790-a6e6d48de2aa\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Future Capital Discovery Fund\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"07571d72-0c66-43dd-93cb-2ef4bceb4a4c\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Kleiner Perkins Caufield & Byers\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 9\n }\n },\n {\n \"id\": \"bba108aa-b856-41d9-9677-e41d2e9bd54c\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Chengwei Capital\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"2f20e509-784f-4af8-a31a-d83b48ae3acc\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Formation Group\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"8d775572-cfe8-4fb5-b002-dc1f0762f0aa\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Franklin Square\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"efd07cf4-286c-4dd1-a7ad-6d52295d181b\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Oceanwide Holdings\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"35c5421c-e372-40ef-a8dd-6ce5dac897b8\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Horizons Ventures\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 2\n }\n },\n {\n \"id\": \"bf4f40f5-a32f-4c6d-b48d-42c1f4fd3166\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Venture51\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"88890e75-8051-4f8d-b865-650bf3ddcfee\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"iNovia Capital\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"696cceff-faf7-4041-8a68-3783b9236057\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Scale Venture Partners\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"291307f9-b16f-4ecb-b823-c5362939132f\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"VentureHealth\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"652afc2c-d78f-4e1b-a12d-3f927877637d\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Dark Horse Technology Group\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n },\n {\n \"id\": \"883280de-a71e-486b-aef2-c8c033f7529f\",\n \"data\": {\n \"type\": \"Investor\",\n \"name\": \"Blue Lake Capital\",\n \"description\": null,\n \"image\": null,\n \"reference\": null,\n \"properties\": {},\n \"degree\": 1\n }\n }\n ],\n \"edges\": [\n {\n \"id\": \"dc2e73d8-651e-42b4-9e45-3c9c60a91c4f\",\n \"data\": {\n \"type\": \"Investor\",\n \"weight\": 1,\n \"properties\": {}\n },\n \"source\": \"c156bb21-e68b-4cb2-9427-2151b90f3788\",\n \"target\": \"03b7786a-0552-42c8-b28e-fb083df33cf2\"\n },\n {\n \"id\": \"49762fc4-78fb-4af4-9b90-2d714129bf41\",\n \"data\": {\n \"type\": \"Investor\",\n \"weight\": 1,\n \"properties\": {}\n },\n \"source\": \"b6e0e945-ca73-4e24-ac58-6e1654d18803\",\n \"target\": \"61b74829-303c-4cf7-9782-b93ba985b56d\"\n },\n {\n \"id\": \"d39c2d12-6c41-41b4-b63d-2bf2695064ae\",\n \"data\": {\n \"type\": \"Investor\",\n \"weight\": 1,\n \"properties\": {}\n },\n \"source\": \"476a5c9b-48fd-467b-9513-3e21d7cb9049\",\n \"target\": \"61b74829-303c-4cf7-9782-b93ba985b56d\"\n }\n ]\n };\n\nconst size = (node) => Math.max(...node.style.size);\nconst graph = new Graph({\n data,\n autoFit: 'view',\n node: {\n style: {\n fillOpacity: 1,\n label: true,\n labelText: (d) => d.data?.name,\n labelBackground: true,\n icon: true,\n iconText: (d) => (d.data?.type === 'Investor' ? '💰' : '🦄️'),\n fill: (d) => (d.data?.type === 'Investor' ? '#6495ED' : '#FFA07A'),\n },\n state: {\n inactive: {\n fillOpacity: 0.3,\n icon: false,\n label: false,\n },\n },\n },\n edge: {\n style: {\n label: false,\n labelText: (d) => d.data?.type,\n labelBackground: true,\n },\n state: {\n active: {\n label: true,\n },\n inactive: {\n strokeOpacity: 0,\n },\n },\n },\n layout: {\n type: 'd3-force',\n link: { distance: (edge) => size(edge.source) + size(edge.target) },\n collide: { radius: (node) => size(node) },\n manyBody: { strength: (node) => -4 * size(node) },\n animation: false,\n },\n transforms: [\n {\n type: 'map-node-size',\n scale: 'linear',\n maxSize: 60,\n minSize: 20,\n mapLabelSize: [12, 24],\n },\n ],\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n function () {\n return {\n key: 'hover-activate',\n type: 'hover-activate',\n enable: (e) => e.targetType === 'node',\n degree: 1,\n inactiveState: 'inactive',\n onHover: (e) => {\n this.frontElement(e.target.id);\n e.view.setCursor('pointer');\n },\n onHoverEnd: (e) => {\n e.view.setCursor('default');\n },\n };\n },\n {\n type: 'fix-element-size',\n enable: true,\n },\n 'auto-adapt-label',\n ],\n animation: false,\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\n// 独角兽公司数据\nconst companyData = [\n {\"id\":\"e6351e4d-1ee5-47b9-9a06-ef950fc32d09\",\"data\":{\"type\":\"Company\",\"name\":\"Swiggy\",\"degree\":3}},\n {\"id\":\"476a5c9b-48fd-467b-9513-3e21d7cb9049\",\"data\":{\"type\":\"Company\",\"name\":\"Lime\",\"degree\":3}},\n {\"id\":\"1f3b85b8-10fb-4b3d-b9f1-6ee6212a030a\",\"data\":{\"type\":\"Company\",\"name\":\"Zhuan Zhuan\",\"degree\":2}},\n {\"id\":\"660299b9-7bdc-4392-8a82-4a6285d73167\",\"data\":{\"type\":\"Company\",\"name\":\"Udemy\",\"degree\":3}},\n {\"id\":\"0be578b1-0206-4eec-8329-592c135bddc6\",\"data\":{\"type\":\"Company\",\"name\":\"NuCom Group\",\"degree\":1}},\n {\"id\":\"8a90286d-d304-4030-abc7-779ad5a0a4c2\",\"data\":{\"type\":\"Company\",\"name\":\"RigUp\",\"degree\":3}},\n {\"id\":\"48b557b5-2939-40d2-872f-e08597c57224\",\"data\":{\"type\":\"Company\",\"name\":\"STX Entertainment\",\"degree\":3}},\n {\"id\":\"5efb9038-676c-49b6-a67e-0f7fde1d7d5b\",\"data\":{\"type\":\"Company\",\"name\":\"Atom Bank\",\"degree\":3}},\n {\"id\":\"3befff07-86fe-4546-959b-01819a409bbd\",\"data\":{\"type\":\"Company\",\"name\":\"VANCL\",\"degree\":3}},\n {\"id\":\"3b75ffc1-4bda-4889-b011-b3daceddb513\",\"data\":{\"type\":\"Company\",\"name\":\"Omio\",\"degree\":3}}\n];\n\n// 投资机构数据\nconst investorData = [\n { id: 'inv1', data: { type: 'Investor', name: 'Sequoia Capital', degree: 4 } },\n { id: 'inv2', data: { type: 'Investor', name: 'Accel Partners', degree: 3 } },\n { id: 'inv3', data: { type: 'Investor', name: 'Andreessen Horowitz', degree: 3 } },\n { id: 'inv4', data: { type: 'Investor', name: 'SoftBank Vision', degree: 2 } },\n { id: 'inv5', data: { type: 'Investor', name: 'Goldman Sachs', degree: 2 } }\n];\n\n// 投资关系边\nconst edges = [\n { source: 'inv1', target: 'e6351e4d-1ee5-47b9-9a06-ef950fc32d09', data: { relation: '投资' } },\n { source: 'inv1', target: '476a5c9b-48fd-467b-9513-3e21d7cb9049', data: { relation: '投资' } },\n { source: 'inv2', target: '476a5c9b-48fd-467b-9513-3e21d7cb9049', data: { relation: '投资' } },\n { source: 'inv2', target: '660299b9-7bdc-4392-8a82-4a6285d73167', data: { relation: '投资' } },\n { source: 'inv3', target: '8a90286d-d304-4030-abc7-779ad5a0a4c2', data: { relation: '投资' } },\n { source: 'inv3', target: '5efb9038-676c-49b6-a67e-0f7fde1d7d5b', data: { relation: '投资' } },\n { source: 'inv4', target: 'e6351e4d-1ee5-47b9-9a06-ef950fc32d09', data: { relation: '领投' } },\n { source: 'inv1', target: '3b75ffc1-4bda-4889-b011-b3daceddb513', data: { relation: '投资' } },\n { source: 'inv5', target: '48b557b5-2939-40d2-872f-e08597c57224', data: { relation: '投资' } },\n { source: 'inv2', target: '1f3b85b8-10fb-4b3d-b9f1-6ee6212a030a', data: { relation: '投资' } },\n { source: 'inv3', target: '3befff07-86fe-4546-959b-01819a409bbd', data: { relation: '投资' } }\n];\n\nconst nodes = [...companyData, ...investorData];\n\nconst graph = new Graph({\n container: 'container',\n width: 900,\n height: 600,\n data: { nodes, edges },\n \n node: {\n type: 'circle',\n style: {\n size: (d) => d.data.type === 'Company' ? 32 + (d.data.degree || 1) * 6 : 28,\n fill: (d) => d.data.type === 'Company' ? '#1783FF' : '#FA8C16',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.name,\n labelPlacement: 'bottom',\n labelFontSize: 11,\n labelFill: '#333',\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.85,\n cursor: 'pointer',\n iconText: (d) => d.data.type === 'Company' ? '●' : '◆',\n iconFill: '#fff',\n iconFontSize: 12\n },\n state: {\n active: {\n lineWidth: 3,\n stroke: '#ff7875',\n halo: true,\n haloOpacity: 0.25,\n haloLineWidth: 12,\n haloFill: '#ff7875'\n },\n inactive: {\n opacity: 0.2\n }\n }\n },\n \n edge: {\n type: 'line',\n style: {\n stroke: '#bfbfbf',\n lineWidth: 1.5,\n endArrow: true,\n labelText: (d) => d.data.relation,\n labelFontSize: 10,\n labelFill: '#8c8c8c'\n },\n state: {\n active: {\n stroke: '#1783FF',\n lineWidth: 2.5\n },\n inactive: {\n opacity: 0.1\n }\n }\n },\n \n layout: {\n type: 'd3-force',\n link: {\n distance: 130,\n strength: 0.6\n },\n manyBody: {\n strength: -350,\n distanceMax: 450\n },\n center: {\n x: 450,\n y: 300,\n strength: 0.1\n },\n collide: {\n radius: 40,\n strength: 0.8\n }\n },\n \n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force',\n {\n type: 'hover-activate',\n degree: 1,\n state: 'active'\n }\n ],\n \n plugins: [\n {\n type: 'tooltip',\n getContent: (event, items) => {\n const [item] = items;\n if (!item) return '';\n const d = item.data;\n const typeLabel = d.type === 'Company' ? '独角兽公司' : '投资机构';\n return `\n
\n
\n ${d.name}\n
\n
\n
类型:${typeLabel}
\n
连接数:${d.degree || 0}
\n
\n
\n `;\n }\n }\n ]\n});\n\ngraph.render();", + "duration": 53371, + "retrievedSkillIds": [ + "g6-layout-force", + "g6-node-circle", + "g6-pattern-network-graph", + "g6-layout-mindmap", + "g6-layout-grid" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 5255, + "expectedLength": 17126, + "similarity": 0.4147193705417389, + "extractedCode": "import { Graph } from '@antv/g6';\n\n// 独角兽公司数据\nconst companyData = [\n {\"id\":\"e6351e4d-1ee5-47b9-9a06-ef950fc32d09\",\"data\":{\"type\":\"Company\",\"name\":\"Swiggy\",\"degree\":3}},\n {\"id\":\"476a5c9b-48fd-467b-9513-3e21d7cb9049\",\"data\":{\"type\":\"Company\",\"name\":\"Lime\",\"degree\":3}},\n {\"id\":\"1f3b85b8-10fb-4b3d-b9f1-6ee6212a030a\",\"data\":{\"type\":\"Company\",\"name\":\"Zhuan Zhuan\",\"degree\":2}},\n {\"id\":\"660299b9-7bdc-4392-8a82-4a6285d73167\",\"data\":{\"type\":\"Company\",\"name\":\"Udemy\",\"degree\":3}},\n {\"id\":\"0be578b1-0206-4eec-8329-592c135bddc6\",\"data\":{\"type\":\"Company\",\"name\":\"NuCom Group\",\"degree\":1}},\n {\"id\":\"8a90286d-d304-4030-abc7-779ad5a0a4c2\",\"data\":{\"type\":\"Company\",\"name\":\"RigUp\",\"degree\":3}},\n {\"id\":\"48b557b5-2939-40d2-872f-e08597c57224\",\"data\":{\"type\":\"Company\",\"name\":\"STX Entertainment\",\"degree\":3}},\n {\"id\":\"5efb9038-676c-49b6-a67e-0f7fde1d7d5b\",\"data\":{\"type\":\"Company\",\"name\":\"Atom Bank\",\"degree\":3}},\n {\"id\":\"3befff07-86fe-4546-959b-01819a409bbd\",\"data\":{\"type\":\"Company\",\"name\":\"VANCL\",\"degree\":3}},\n {\"id\":\"3b75ffc1-4bda-4889-b011-b3daceddb513\",\"data\":{\"type\":\"Company\",\"name\":\"Omio\",\"degree\":3}}\n];\n\n// 投资机构数据\nconst investorData = [\n { id: 'inv1', data: { type: 'Investor', name: 'Sequoia Capital', degree: 4 } },\n { id: 'inv2', data: { type: 'Investor', name: 'Accel Partners', degree: 3 } },\n { id: 'inv3', data: { type: 'Investor', name: 'Andreessen Horowitz', degree: 3 } },\n { id: 'inv4', data: { type: 'Investor', name: 'SoftBank Vision', degree: 2 } },\n { id: 'inv5', data: { type: 'Investor', name: 'Goldman Sachs', degree: 2 } }\n];\n\n// 投资关系边\nconst edges = [\n { source: 'inv1', target: 'e6351e4d-1ee5-47b9-9a06-ef950fc32d09', data: { relation: '投资' } },\n { source: 'inv1', target: '476a5c9b-48fd-467b-9513-3e21d7cb9049', data: { relation: '投资' } },\n { source: 'inv2', target: '476a5c9b-48fd-467b-9513-3e21d7cb9049', data: { relation: '投资' } },\n { source: 'inv2', target: '660299b9-7bdc-4392-8a82-4a6285d73167', data: { relation: '投资' } },\n { source: 'inv3', target: '8a90286d-d304-4030-abc7-779ad5a0a4c2', data: { relation: '投资' } },\n { source: 'inv3', target: '5efb9038-676c-49b6-a67e-0f7fde1d7d5b', data: { relation: '投资' } },\n { source: 'inv4', target: 'e6351e4d-1ee5-47b9-9a06-ef950fc32d09', data: { relation: '领投' } },\n { source: 'inv1', target: '3b75ffc1-4bda-4889-b011-b3daceddb513', data: { relation: '投资' } },\n { source: 'inv5', target: '48b557b5-2939-40d2-872f-e08597c57224', data: { relation: '投资' } },\n { source: 'inv2', target: '1f3b85b8-10fb-4b3d-b9f1-6ee6212a030a', data: { relation: '投资' } },\n { source: 'inv3', target: '3befff07-86fe-4546-959b-01819a409bbd', data: { relation: '投资' } }\n];\n\nconst nodes = [...companyData, ...investorData];\n\nconst graph = new Graph({\n container: 'container',\n width: 900,\n height: 600,\n data: { nodes, edges },\n \n node: {\n type: 'circle',\n style: {\n size: (d) => d.data.type === 'Company' ? 32 + (d.data.degree || 1) * 6 : 28,\n fill: (d) => d.data.type === 'Company' ? '#1783FF' : '#FA8C16',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.name,\n labelPlacement: 'bottom',\n labelFontSize: 11,\n labelFill: '#333',\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.85,\n cursor: 'pointer',\n iconText: (d) => d.data.type === 'Company' ? '●' : '◆',\n iconFill: '#fff',\n iconFontSize: 12\n },\n state: {\n active: {\n lineWidth: 3,\n stroke: '#ff7875',\n halo: true,\n haloOpacity: 0.25,\n haloLineWidth: 12,\n haloFill: '#ff7875'\n },\n inactive: {\n opacity: 0.2\n }\n }\n },\n \n edge: {\n type: 'line',\n style: {\n stroke: '#bfbfbf',\n lineWidth: 1.5,\n endArrow: true,\n labelText: (d) => d.data.relation,\n labelFontSize: 10,\n labelFill: '#8c8c8c'\n },\n state: {\n active: {\n stroke: '#1783FF',\n lineWidth: 2.5\n },\n inactive: {\n opacity: 0.1\n }\n }\n },\n \n layout: {\n type: 'd3-force',\n link: {\n distance: 130,\n strength: 0.6\n },\n manyBody: {\n strength: -350,\n distanceMax: 450\n },\n center: {\n x: 450,\n y: 300,\n strength: 0.1\n },\n collide: {\n radius: 40,\n strength: 0.8\n }\n },\n \n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force',\n {\n type: 'hover-activate',\n degree: 1,\n state: 'active'\n }\n ],\n \n plugins: [\n {\n type: 'tooltip',\n getContent: (event, items) => {\n const [item] = items;\n if (!item) return '';\n const d = item.data;\n const typeLabel = d.type === 'Company' ? '独角兽公司' : '投资机构';\n return `\n
\n
\n ${d.name}\n
\n
\n
类型:${typeLabel}
\n
连接数:${d.degree || 0}
\n
\n
\n `;\n }\n }\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "rgba", + "render" + ], + "objectKeys": [ + "id", + "data", + "type", + "name", + "degree", + "id", + "data", + "type", + "name", + "degree", + "id", + "data", + "type", + "name", + "degree", + "id", + "data", + "type", + "name", + "degree", + "id", + "data", + "type", + "name", + "degree", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "container", + "width", + "height", + "data", + "node", + "type", + "style", + "size", + "6", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFontSize", + "labelFill", + "labelBackground", + "labelBackgroundFill", + "labelBackgroundOpacity", + "cursor", + "iconText", + "iconFill", + "iconFontSize", + "state", + "active", + "lineWidth", + "stroke", + "halo", + "haloOpacity", + "haloLineWidth", + "haloFill", + "inactive", + "opacity", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "labelText", + "labelFontSize", + "labelFill", + "state", + "active", + "stroke", + "lineWidth", + "inactive", + "opacity", + "layout", + "type", + "link", + "distance", + "strength", + "manyBody", + "strength", + "distanceMax", + "center", + "x", + "y", + "strength", + "collide", + "radius", + "strength", + "behaviors", + "type", + "degree", + "state", + "plugins", + "type", + "getContent", + "padding", + "width", + "background", + "radius", + "shadow", + "weight", + "size", + "bottom", + "color", + "color", + "size", + "height" + ], + "stringLiterals": [ + "id", + "data", + "type", + "name", + "degree", + "id", + "data", + "type", + "name", + "degree", + "id", + "data", + "type", + "name", + "degree", + "id", + "data", + "type", + "name", + "degree", + "id", + "data", + "type", + "name", + "degree", + "id", + "data", + "type", + "name", + "degree", + "id", + "data", + "type", + "name", + "degree", + "id", + "data", + "type", + "name", + "degree", + "id", + "data", + "type", + "name", + "degree", + "id", + "data", + "type", + "name", + "degree" + ], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-64", + "query": "根据描述绘制图表,创建了一个自定义的蚂蚁线动画效果的边,并将其注册到图实例中。通过设置节点和边的数据,渲染一个包含三个节点和三条边的简单图形结构。参考数据:[{\"id\":\"node-1\",\"style\":{\"x\":50,\"y\":50}},{\"id\":\"node-2\",\"style\":{\"x\":200,\"y\":50}},{\"id\":\"node-3\",\"style\":{\"x\":125,\"y\":150}},{\"source\":\"node-1\",\"target\":\"node-2\"},{\"source\":\"node-2\",\"target\":\"node-3\"},{\"source\":\"node-3\",\"target\":\"node-1\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { ExtensionCategory, Graph, Line, register } from '@antv/g6';\n\nclass AntLine extends Line {\n onCreate() {\n const shape = this.shapeMap.key;\n shape.animate([{ lineDashOffset: -20 }, { lineDashOffset: 0 }], {\n duration: 500,\n iterations: Infinity,\n });\n }\n}\n\nregister(ExtensionCategory.EDGE, 'ant-line', AntLine);\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node-1', style: { x: 50, y: 50 } },\n { id: 'node-2', style: { x: 200, y: 50 } },\n { id: 'node-3', style: { x: 125, y: 150 } },\n ],\n edges: [\n { source: 'node-1', target: 'node-2' },\n { source: 'node-2', target: 'node-3' },\n { source: 'node-3', target: 'node-1' },\n ],\n },\n edge: {\n type: 'ant-line',\n style: {\n lineDash: [10, 10],\n },\n },\n});\n\ngraph.render();\n", + "generatedCode": "import { BaseEdge, ExtensionCategory, Graph, register } from '@antv/g6';\n\nclass AntLineEdge extends BaseEdge {\n getKeyPath(attributes) {\n const [sourcePoint, targetPoint] = this.getEndpoints(attributes, false);\n if (!sourcePoint || !targetPoint) return [['M', 0, 0]];\n const [sx, sy] = sourcePoint;\n const [tx, ty] = targetPoint;\n return [['M', sx, sy], ['L', tx, ty]];\n }\n\n render(attributes, container) {\n super.render(attributes, container);\n const keyShape = this.shapeMap['key'];\n if (keyShape) {\n keyShape.style.lineDash = [10, 10];\n keyShape.animate(\n [{ lineDashOffset: 0 }, { lineDashOffset: -20 }],\n { duration: 1000, iterations: Infinity }\n );\n }\n }\n}\n\nregister(ExtensionCategory.EDGE, 'ant-line', AntLineEdge);\n\nconst graph = new Graph({\n container: container,\n data: {\n nodes: [\n { id: 'node-1', style: { x: 50, y: 50 } },\n { id: 'node-2', style: { x: 200, y: 50 } },\n { id: 'node-3', style: { x: 125, y: 150 } },\n ],\n edges: [\n { id: 'e1', source: 'node-1', target: 'node-2' },\n { id: 'e2', source: 'node-2', target: 'node-3' },\n { id: 'e3', source: 'node-3', target: 'node-1' },\n ],\n },\n node: {\n style: {\n size: 20,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n },\n },\n edge: {\n type: 'ant-line',\n style: {\n stroke: '#999',\n lineWidth: 2,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas'],\n});\n\ngraph.render();", + "duration": 12421, + "retrievedSkillIds": [ + "g6-core-custom-element", + "g6-edge-line", + "g6-core-graph-init", + "g6-behavior-create-edge-focus", + "g6-core-data-structure" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1487, + "expectedLength": 840, + "similarity": 0.7338439001523497, + "extractedCode": "import { BaseEdge, ExtensionCategory, Graph, register } from '@antv/g6';\n\nclass AntLineEdge extends BaseEdge {\n getKeyPath(attributes) {\n const [sourcePoint, targetPoint] = this.getEndpoints(attributes, false);\n if (!sourcePoint || !targetPoint) return [['M', 0, 0]];\n const [sx, sy] = sourcePoint;\n const [tx, ty] = targetPoint;\n return [['M', sx, sy], ['L', tx, ty]];\n }\n\n render(attributes, container) {\n super.render(attributes, container);\n const keyShape = this.shapeMap['key'];\n if (keyShape) {\n keyShape.style.lineDash = [10, 10];\n keyShape.animate(\n [{ lineDashOffset: 0 }, { lineDashOffset: -20 }],\n { duration: 1000, iterations: Infinity }\n );\n }\n }\n}\n\nregister(ExtensionCategory.EDGE, 'ant-line', AntLineEdge);\n\nconst graph = new Graph({\n container: container,\n data: {\n nodes: [\n { id: 'node-1', style: { x: 50, y: 50 } },\n { id: 'node-2', style: { x: 200, y: 50 } },\n { id: 'node-3', style: { x: 125, y: 150 } },\n ],\n edges: [\n { id: 'e1', source: 'node-1', target: 'node-2' },\n { id: 'e2', source: 'node-2', target: 'node-3' },\n { id: 'e3', source: 'node-3', target: 'node-1' },\n ],\n },\n node: {\n style: {\n size: 20,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n },\n },\n edge: {\n type: 'ant-line',\n style: {\n stroke: '#999',\n lineWidth: 2,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "BaseEdge", + "ExtensionCategory", + "Graph", + "register" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "getKeyPath", + "getEndpoints", + "render", + "render", + "animate", + "register", + "Graph", + "render" + ], + "objectKeys": [ + "lineDashOffset", + "lineDashOffset", + "duration", + "iterations", + "container", + "data", + "nodes", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "id", + "style", + "x", + "y", + "edges", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "node", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "node.animate", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-65", + "query": "根据描述绘制图表,使用 G6 构建了一个带有时间轴的网格布局图,通过时间轴插件展示随时间变化的数据,同时支持画布拖拽和缩放等交互行为。参考数据:[{\"time\":\"2023-08-01T00:00:00.000Z\",\"value\":10,\"label\":\"2023/8/1 00:00:00\"},{\"time\":\"2023-08-02T00:00:00.000Z\",\"value\":2,\"label\":\"2023/8/2 00:00:00\"},{\"time\":\"2023-08-03T00:00:00.000Z\",\"value\":3,\"label\":\"2023/8/3 00:00:00\"},{\"time\":\"2023-08-04T00:00:00.000Z\",\"value\":4,\"label\":\"2023/8/4 00:00:00\"},{\"time\":\"2023-08-05T00:00:00.000Z\",\"value\":15,\"label\":\"2023/8/5 00:00:00\"},{\"time\":\"2023-08-06T00:00:00.000Z\",\"value\":10,\"label\":\"2023/8/6 00:00:00\"},{\"time\":\"2023-08-07T00:00:00.000Z\",\"value\":5,\"label\":\"2023/8/7 00:00:00\"},{\"time\":\"2023-08-08T00:00:00.000Z\",\"value\":0,\"label\":\"2023/8/8 00:00:00\"},{\"time\":\"2023-08-09T00:00:00.000Z\",\"value\":3,\"label\":\"2023/8/9 00:00:00\"},{\"time\":\"2023-08-10T00:00:00.000Z\",\"value\":1,\"label\":\"2023/8/10 00:00:00\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst startTime = new Date('2023-08-01').getTime();\nconst diff = 3600 * 24 * 1000;\nconst timebarData = [10, 2, 3, 4, 15, 10, 5, 0, 3, 1].map((value, index) => ({\n time: new Date(startTime + index * diff),\n value,\n label: new Date(startTime + index * diff).toLocaleString(),\n}));\nconst graphData = {\n nodes: new Array(49).fill(0).map((_, index) => ({\n id: `node-${index}`,\n data: {\n timestamp: startTime + (index % 10) * diff,\n value: index % 20,\n label: new Date(startTime + (index % 10) * diff).toLocaleString(),\n },\n })),\n edges: new Array(49).fill(0).map((_, i) => ({\n id: `edge-${i}`,\n source: `node-${i % 30}`,\n target: `node-${(i % 20) + 29}`,\n data: {\n edgeType: 'e1',\n },\n })),\n};\n\nconst graph = new Graph({\n container: 'container',\n data: graphData,\n behaviors: ['drag-canvas', 'drag-element', 'zoom-canvas'],\n layout: {\n type: 'grid',\n cols: 7,\n },\n plugins: [\n {\n type: 'timebar',\n key: 'timebar',\n data: timebarData,\n width: 450,\n loop: true,\n },\n ],\n autoFit: 'view',\n padding: [10, 0, 65, 0],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst rawData = [\n {\"time\":\"2023-08-01T00:00:00.000Z\",\"value\":10,\"label\":\"2023/8/1\"},\n {\"time\":\"2023-08-02T00:00:00.000Z\",\"value\":2,\"label\":\"2023/8/2\"},\n {\"time\":\"2023-08-03T00:00:00.000Z\",\"value\":3,\"label\":\"2023/8/3\"},\n {\"time\":\"2023-08-04T00:00:00.000Z\",\"value\":4,\"label\":\"2023/8/4\"},\n {\"time\":\"2023-08-05T00:00:00.000Z\",\"value\":15,\"label\":\"2023/8/5\"},\n {\"time\":\"2023-08-06T00:00:00.000Z\",\"value\":10,\"label\":\"2023/8/6\"},\n {\"time\":\"2023-08-07T00:00:00.000Z\",\"value\":5,\"label\":\"2023/8/7\"},\n {\"time\":\"2023-08-08T00:00:00.000Z\",\"value\":0,\"label\":\"2023/8/8\"},\n {\"time\":\"2023-08-09T00:00:00.000Z\",\"value\":3,\"label\":\"2023/8/9\"},\n {\"time\":\"2023-08-10T00:00:00.000Z\",\"value\":1,\"label\":\"2023/8/10\"}\n];\n\nconst nodes = rawData.map((item, index) => ({\n id: `node-${index}`,\n data: {\n timestamp: new Date(item.time).getTime(),\n label: item.label,\n value: item.value\n }\n}));\n\nconst timebarData = rawData.map(item => ({\n time: new Date(item.time).getTime(),\n value: item.value\n}));\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes,\n edges: []\n },\n node: {\n type: 'circle',\n style: {\n size: (d) => 20 + d.data.value * 2,\n fill: (d) => d.data.value > 10 ? '#F5222D' : '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFontSize: 11,\n labelFill: '#666'\n }\n },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 5,\n rowGap: 100,\n colGap: 80\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: [\n {\n type: 'timebar',\n data: timebarData,\n getTime: (datum) => datum.data.timestamp,\n values: [new Date('2023-08-01').getTime(), new Date('2023-08-10').getTime()],\n elementTypes: ['node'],\n mode: 'modify',\n timebarType: 'chart',\n position: 'bottom',\n width: 700,\n height: 80,\n labelFormatter: (t) => new Date(t).toLocaleDateString('zh-CN'),\n onChange: (values) => {\n console.log('当前时间范围:', values);\n }\n }\n ]\n});\n\ngraph.render();", + "duration": 18943, + "retrievedSkillIds": [ + "g6-plugin-timebar-gridline", + "g6-layout-grid", + "g6-behavior-canvas-nav", + "g6-plugin-minimap", + "g6-layout-force" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2112, + "expectedLength": 1160, + "similarity": 0.5333910501689892, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst rawData = [\n {\"time\":\"2023-08-01T00:00:00.000Z\",\"value\":10,\"label\":\"2023/8/1\"},\n {\"time\":\"2023-08-02T00:00:00.000Z\",\"value\":2,\"label\":\"2023/8/2\"},\n {\"time\":\"2023-08-03T00:00:00.000Z\",\"value\":3,\"label\":\"2023/8/3\"},\n {\"time\":\"2023-08-04T00:00:00.000Z\",\"value\":4,\"label\":\"2023/8/4\"},\n {\"time\":\"2023-08-05T00:00:00.000Z\",\"value\":15,\"label\":\"2023/8/5\"},\n {\"time\":\"2023-08-06T00:00:00.000Z\",\"value\":10,\"label\":\"2023/8/6\"},\n {\"time\":\"2023-08-07T00:00:00.000Z\",\"value\":5,\"label\":\"2023/8/7\"},\n {\"time\":\"2023-08-08T00:00:00.000Z\",\"value\":0,\"label\":\"2023/8/8\"},\n {\"time\":\"2023-08-09T00:00:00.000Z\",\"value\":3,\"label\":\"2023/8/9\"},\n {\"time\":\"2023-08-10T00:00:00.000Z\",\"value\":1,\"label\":\"2023/8/10\"}\n];\n\nconst nodes = rawData.map((item, index) => ({\n id: `node-${index}`,\n data: {\n timestamp: new Date(item.time).getTime(),\n label: item.label,\n value: item.value\n }\n}));\n\nconst timebarData = rawData.map(item => ({\n time: new Date(item.time).getTime(),\n value: item.value\n}));\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes,\n edges: []\n },\n node: {\n type: 'circle',\n style: {\n size: (d) => 20 + d.data.value * 2,\n fill: (d) => d.data.value > 10 ? '#F5222D' : '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFontSize: 11,\n labelFill: '#666'\n }\n },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 5,\n rowGap: 100,\n colGap: 80\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: [\n {\n type: 'timebar',\n data: timebarData,\n getTime: (datum) => datum.data.timestamp,\n values: [new Date('2023-08-01').getTime(), new Date('2023-08-10').getTime()],\n elementTypes: ['node'],\n mode: 'modify',\n timebarType: 'chart',\n position: 'bottom',\n width: 700,\n height: 80,\n labelFormatter: (t) => new Date(t).toLocaleDateString('zh-CN'),\n onChange: (values) => {\n console.log('当前时间范围:', values);\n }\n }\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "map", + "Date", + "getTime", + "map", + "Date", + "getTime", + "Graph", + "Date", + "getTime", + "Date", + "getTime", + "Date", + "toLocaleDateString", + "log", + "render" + ], + "objectKeys": [ + "01T00", + "00", + "02T00", + "00", + "03T00", + "00", + "04T00", + "00", + "05T00", + "00", + "06T00", + "00", + "07T00", + "00", + "08T00", + "00", + "09T00", + "00", + "10T00", + "00", + "id", + "data", + "timestamp", + "label", + "value", + "time", + "value", + "container", + "data", + "edges", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFontSize", + "labelFill", + "layout", + "type", + "rows", + "cols", + "rowGap", + "colGap", + "behaviors", + "plugins", + "type", + "data", + "getTime", + "values", + "elementTypes", + "mode", + "timebarType", + "position", + "width", + "height", + "labelFormatter", + "onChange" + ], + "stringLiterals": [ + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label", + "time", + "value", + "label" + ], + "apiPatterns": [ + "new Graph", + "x6.label" + ] + } + } + }, + { + "id": "case-66", + "query": "根据描述绘制图表,使用 G6 创建了一个包含节点和组合的图结构,并启用了拖拽和展开收起行为。节点根据所属组合进行分组,组合以矩形形式展示并具有内边距,节点显示其 ID 作为文本标签。参考数据:[{\"id\":\"node1\",\"combo\":\"combo1\",\"style\":{\"x\":250,\"y\":150}},{\"id\":\"node2\",\"combo\":\"combo1\",\"style\":{\"x\":350,\"y\":150}},{\"id\":\"node3\",\"combo\":\"combo2\",\"style\":{\"x\":250,\"y\":300}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 250, y: 150 } },\n { id: 'node2', combo: 'combo1', style: { x: 350, y: 150 } },\n { id: 'node3', combo: 'combo2', style: { x: 250, y: 300 } },\n ],\n edges: [],\n combos: [{ id: 'combo1', combo: 'combo2' }, { id: 'combo2' }],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n labelText: (d) => d.id,\n },\n },\n combo: {\n type: 'rect',\n style: {\n padding: 20,\n },\n },\n behaviors: ['drag-element', 'collapse-expand'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 250, y: 150 } },\n { id: 'node2', combo: 'combo1', style: { x: 350, y: 150 } },\n { id: 'node3', combo: 'combo2', style: { x: 250, y: 300 } },\n ],\n combos: [\n { id: 'combo1' },\n { id: 'combo2' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n },\n combo: {\n type: 'rect',\n style: {\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 2,\n padding: [30, 20],\n radius: 8,\n labelText: (d) => d.id,\n labelPlacement: 'top',\n labelFill: '#333',\n labelFontSize: 14,\n labelFontWeight: 'bold',\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n type: 'collapse-expand',\n trigger: 'click',\n },\n ],\n});\n\ngraph.render();", + "duration": 26304, + "retrievedSkillIds": [ + "g6-node-rect", + "g6-node-circle", + "g6-pattern-tree-graph", + "g6-node-react", + "g6-node-html" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1084, + "expectedLength": 612, + "similarity": 0.9104166666666667, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', combo: 'combo1', style: { x: 250, y: 150 } },\n { id: 'node2', combo: 'combo1', style: { x: 350, y: 150 } },\n { id: 'node3', combo: 'combo2', style: { x: 250, y: 300 } },\n ],\n combos: [\n { id: 'combo1' },\n { id: 'combo2' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n },\n combo: {\n type: 'rect',\n style: {\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 2,\n padding: [30, 20],\n radius: 8,\n labelText: (d) => d.id,\n labelPlacement: 'top',\n labelFill: '#333',\n labelFontSize: 14,\n labelFontWeight: 'bold',\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n type: 'collapse-expand',\n trigger: 'click',\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "combo", + "style", + "x", + "y", + "id", + "combo", + "style", + "x", + "y", + "id", + "combo", + "style", + "x", + "y", + "combos", + "id", + "id", + "container", + "node", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "combo", + "type", + "style", + "fill", + "stroke", + "lineWidth", + "padding", + "radius", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "labelFontWeight", + "behaviors", + "type", + "trigger" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph" + ] + } + } + }, + { + "id": "case-67", + "query": "根据描述绘制图表,定义了一个自定义的折线边类型,并在图实例中使用该边连接两个节点,同时设置了边的样式和交互行为。参考数据:[{\"id\":\"node-0\",\"style\":{\"x\":100,\"y\":100,\"ports\":[{\"key\":\"right\",\"placement\":[1,0.5]}]}},{\"id\":\"node-1\",\"style\":{\"x\":250,\"y\":200,\"ports\":[{\"key\":\"left\",\"placement\":[0,0.5]}]}},{\"source\":\"node-0\",\"target\":\"node-1\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { BaseEdge, ExtensionCategory, Graph, register } from '@antv/g6';\n\nclass PolylineEdge extends BaseEdge {\n getKeyPath(attributes) {\n const [sourcePoint, targetPoint] = this.getEndpoints(attributes);\n\n return [\n ['M', sourcePoint[0], sourcePoint[1]],\n ['L', targetPoint[0] / 2 + (1 / 2) * sourcePoint[0], sourcePoint[1]],\n ['L', targetPoint[0] / 2 + (1 / 2) * sourcePoint[0], targetPoint[1]],\n ['L', targetPoint[0], targetPoint[1]],\n ];\n }\n}\n\nregister(ExtensionCategory.EDGE, 'custom-polyline', PolylineEdge);\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node-0', style: { x: 100, y: 100, ports: [{ key: 'right', placement: [1, 0.5] }] } },\n { id: 'node-1', style: { x: 250, y: 200, ports: [{ key: 'left', placement: [0, 0.5] }] } },\n ],\n edges: [{ source: 'node-0', target: 'node-1' }],\n },\n edge: {\n type: 'custom-polyline',\n style: {\n startArrow: true,\n endArrow: true,\n stroke: '#F6BD16',\n },\n },\n behaviors: ['drag-element'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph, BaseEdge, ExtensionCategory, register } from '@antv/g6';\n\n// 定义自定义折线边类型\nclass CustomPolylineEdge extends BaseEdge {\n getKeyPath(attributes) {\n // 获取起点和终点坐标(自动考虑连接桩配置)\n const [sourcePoint, targetPoint] = this.getEndpoints(attributes);\n if (!sourcePoint || !targetPoint) return [['M', 0, 0]];\n \n const [sx, sy] = sourcePoint;\n const [tx, ty] = targetPoint;\n \n // 计算中点,实现正交折线效果\n const midX = (sx + tx) / 2;\n \n // 返回折线路径:水平 -> 垂直 -> 水平\n return [\n ['M', sx, sy],\n ['L', midX, sy],\n ['L', midX, ty],\n ['L', tx, ty],\n ];\n }\n}\n\n// 注册自定义边类型\nregister(ExtensionCategory.EDGE, 'custom-polyline', CustomPolylineEdge);\n\n// 参考数据转换\nconst rawData = [\n {\"id\":\"node-0\",\"style\":{\"x\":100,\"y\":100,\"ports\":[{\"key\":\"right\",\"placement\":[1,0.5]}]}},\n {\"id\":\"node-1\",\"style\":{\"x\":250,\"y\":200,\"ports\":[{\"key\":\"left\",\"placement\":[0,0.5]}]}},\n {\"source\":\"node-0\",\"target\":\"node-1\"}\n];\n\n// 转换节点数据\nconst nodes = rawData\n .filter(item => item.id)\n .map(item => ({\n id: item.id,\n style: {\n x: item.style.x,\n y: item.style.y,\n ports: item.style.ports,\n }\n }));\n\n// 转换边数据,指定连接桩\nconst edges = rawData\n .filter(item => item.source)\n .map((item, index) => ({\n id: `edge-${index}`,\n source: item.source,\n target: item.target,\n sourcePortKey: 'right', // 连接 node-0 的 right 端口\n targetPortKey: 'left', // 连接 node-1 的 left 端口\n }));\n\n// 创建图实例\nconst graph = new Graph({\n container: container,\n width: 400,\n height: 320,\n data: {\n nodes,\n edges,\n },\n node: {\n type: 'circle',\n style: {\n size: 36,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'custom-polyline', // 使用自定义折线边\n style: {\n stroke: '#666',\n lineWidth: 2,\n radius: 8, // 折角圆角\n endArrow: true, // 显示终点箭头\n lineDash: [4, 4], // 虚线样式\n labelText: '连接',\n labelFontSize: 10,\n labelFill: '#666',\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.8,\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n 'click-select',\n ],\n});\n\ngraph.render();", + "duration": 21400, + "retrievedSkillIds": [ + "g6-edge-line", + "g6-edge-polyline", + "g6-core-custom-element", + "g6-behavior-drag-element", + "g6-core-graph-init" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2292, + "expectedLength": 1071, + "similarity": 0.7764867203981176, + "extractedCode": "import { Graph, BaseEdge, ExtensionCategory, register } from '@antv/g6';\n\n// 定义自定义折线边类型\nclass CustomPolylineEdge extends BaseEdge {\n getKeyPath(attributes) {\n // 获取起点和终点坐标(自动考虑连接桩配置)\n const [sourcePoint, targetPoint] = this.getEndpoints(attributes);\n if (!sourcePoint || !targetPoint) return [['M', 0, 0]];\n \n const [sx, sy] = sourcePoint;\n const [tx, ty] = targetPoint;\n \n // 计算中点,实现正交折线效果\n const midX = (sx + tx) / 2;\n \n // 返回折线路径:水平 -> 垂直 -> 水平\n return [\n ['M', sx, sy],\n ['L', midX, sy],\n ['L', midX, ty],\n ['L', tx, ty],\n ];\n }\n}\n\n// 注册自定义边类型\nregister(ExtensionCategory.EDGE, 'custom-polyline', CustomPolylineEdge);\n\n// 参考数据转换\nconst rawData = [\n {\"id\":\"node-0\",\"style\":{\"x\":100,\"y\":100,\"ports\":[{\"key\":\"right\",\"placement\":[1,0.5]}]}},\n {\"id\":\"node-1\",\"style\":{\"x\":250,\"y\":200,\"ports\":[{\"key\":\"left\",\"placement\":[0,0.5]}]}},\n {\"source\":\"node-0\",\"target\":\"node-1\"}\n];\n\n// 转换节点数据\nconst nodes = rawData\n .filter(item => item.id)\n .map(item => ({\n id: item.id,\n style: {\n x: item.style.x,\n y: item.style.y,\n ports: item.style.ports,\n }\n }));\n\n// 转换边数据,指定连接桩\nconst edges = rawData\n .filter(item => item.source)\n .map((item, index) => ({\n id: `edge-${index}`,\n source: item.source,\n target: item.target,\n sourcePortKey: 'right', // 连接 node-0 的 right 端口\n targetPortKey: 'left', // 连接 node-1 的 left 端口\n }));\n\n// 创建图实例\nconst graph = new Graph({\n container: container,\n width: 400,\n height: 320,\n data: {\n nodes,\n edges,\n },\n node: {\n type: 'circle',\n style: {\n size: 36,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'custom-polyline', // 使用自定义折线边\n style: {\n stroke: '#666',\n lineWidth: 2,\n radius: 8, // 折角圆角\n endArrow: true, // 显示终点箭头\n lineDash: [4, 4], // 虚线样式\n labelText: '连接',\n labelFontSize: 10,\n labelFill: '#666',\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.8,\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n 'click-select',\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "BaseEdge", + "ExtensionCategory", + "register" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "getKeyPath", + "getEndpoints", + "register", + "filter", + "map", + "filter", + "map", + "Graph", + "render" + ], + "objectKeys": [ + "id", + "style", + "x", + "y", + "ports", + "id", + "source", + "target", + "sourcePortKey", + "targetPortKey", + "container", + "width", + "height", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "radius", + "endArrow", + "lineDash", + "labelText", + "labelFontSize", + "labelFill", + "labelBackgroundFill", + "labelBackgroundOpacity", + "behaviors" + ], + "stringLiterals": [ + "id", + "style", + "x", + "y", + "ports", + "key", + "placement", + "id", + "style", + "x", + "y", + "ports", + "key", + "placement", + "source", + "target" + ], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-68", + "query": "根据描述绘制图表,使用 G6 创建一个包含节点、边和组合的图形结构,并支持拖拽和展开收起交互。通过定义节点与组合之间的关系,构建了一个具有层级结构的图。参考数据:[{\"id\":\"node-1\",\"combo\":\"combo-2\",\"style\":{\"x\":120,\"y\":100}},{\"id\":\"node-2\",\"combo\":\"combo-1\",\"style\":{\"x\":300,\"y\":200}},{\"id\":\"node-3\",\"combo\":\"combo-1\",\"style\":{\"x\":200,\"y\":300}},{\"id\":\"edge-1\",\"source\":\"node-1\",\"target\":\"node-2\"},{\"id\":\"edge-2\",\"source\":\"node-2\",\"target\":\"node-3\"},{\"id\":\"combo-1\",\"type\":\"rect\",\"combo\":\"combo-2\",\"style\":{\"collapsed\":true}},{\"id\":\"combo-2\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node-1', combo: 'combo-2', style: { x: 120, y: 100 } },\n { id: 'node-2', combo: 'combo-1', style: { x: 300, y: 200 } },\n { id: 'node-3', combo: 'combo-1', style: { x: 200, y: 300 } },\n ],\n edges: [\n { id: 'edge-1', source: 'node-1', target: 'node-2' },\n { id: 'edge-2', source: 'node-2', target: 'node-3' },\n ],\n combos: [\n {\n id: 'combo-1',\n type: 'rect',\n combo: 'combo-2',\n style: {\n collapsed: true,\n },\n },\n { id: 'combo-2' },\n ],\n },\n node: {\n style: {\n labelText: (d) => d.id,\n },\n },\n combo: {\n style: {\n labelText: (d) => d.id,\n lineDash: 0,\n collapsedLineDash: [5, 5],\n },\n },\n behaviors: [{ type: 'drag-element' }, 'collapse-expand'],\n});\n\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', combo: 'combo-2', style: { x: 120, y: 100 }, data: { label: 'Node 1' } },\n { id: 'node-2', combo: 'combo-1', style: { x: 300, y: 200 }, data: { label: 'Node 2' } },\n { id: 'node-3', combo: 'combo-1', style: { x: 200, y: 300 }, data: { label: 'Node 3' } },\n ],\n edges: [\n { id: 'edge-1', source: 'node-1', target: 'node-2' },\n { id: 'edge-2', source: 'node-2', target: 'node-3' },\n ],\n combos: [\n { id: 'combo-1', combo: 'combo-2', style: { collapsed: true }, data: { label: 'Combo 1' } },\n { id: 'combo-2', data: { label: 'Combo 2' } },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n width: 800,\n height: 600,\n data,\n node: {\n type: 'circle',\n style: {\n size: 24,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data?.label || d.id,\n labelPlacement: 'bottom',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 1,\n endArrow: true,\n },\n },\n combo: {\n type: 'rect',\n style: {\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n radius: 8,\n padding: 20,\n labelText: (d) => d.data?.label || d.id,\n labelPlacement: 'top',\n labelFill: '#1d39c4',\n labelFontWeight: 600,\n collapsedSize: [80, 40],\n collapsedFill: '#e6f4ff',\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n type: 'collapse-expand',\n trigger: 'dblclick',\n },\n ],\n});\n\ngraph.render();", + "duration": 19264, + "retrievedSkillIds": [ + "g6-pattern-tree-graph", + "g6-combo-overview", + "g6-node-react", + "g6-node-rect", + "g6-pattern-network-graph" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1615, + "expectedLength": 923, + "similarity": 0.7729308412890503, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', combo: 'combo-2', style: { x: 120, y: 100 }, data: { label: 'Node 1' } },\n { id: 'node-2', combo: 'combo-1', style: { x: 300, y: 200 }, data: { label: 'Node 2' } },\n { id: 'node-3', combo: 'combo-1', style: { x: 200, y: 300 }, data: { label: 'Node 3' } },\n ],\n edges: [\n { id: 'edge-1', source: 'node-1', target: 'node-2' },\n { id: 'edge-2', source: 'node-2', target: 'node-3' },\n ],\n combos: [\n { id: 'combo-1', combo: 'combo-2', style: { collapsed: true }, data: { label: 'Combo 1' } },\n { id: 'combo-2', data: { label: 'Combo 2' } },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n width: 800,\n height: 600,\n data,\n node: {\n type: 'circle',\n style: {\n size: 24,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data?.label || d.id,\n labelPlacement: 'bottom',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 1,\n endArrow: true,\n },\n },\n combo: {\n type: 'rect',\n style: {\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n radius: 8,\n padding: 20,\n labelText: (d) => d.data?.label || d.id,\n labelPlacement: 'top',\n labelFill: '#1d39c4',\n labelFontWeight: 600,\n collapsedSize: [80, 40],\n collapsedFill: '#e6f4ff',\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n {\n type: 'collapse-expand',\n trigger: 'dblclick',\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "combo", + "style", + "x", + "y", + "data", + "label", + "id", + "combo", + "style", + "x", + "y", + "data", + "label", + "id", + "combo", + "style", + "x", + "y", + "data", + "label", + "edges", + "id", + "source", + "target", + "id", + "source", + "target", + "combos", + "id", + "combo", + "style", + "collapsed", + "data", + "label", + "id", + "data", + "label", + "container", + "width", + "height", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "combo", + "type", + "style", + "fill", + "stroke", + "lineWidth", + "radius", + "padding", + "labelText", + "labelPlacement", + "labelFill", + "labelFontWeight", + "collapsedSize", + "collapsedFill", + "behaviors", + "type", + "trigger" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-69", + "query": "根据描述绘制图表,使用 G6 构建了一个关系图,通过圆形布局展示节点与边的连接情况,并启用了画布拖拽和元素拖拽交互,同时应用了边捆绑插件来优化视觉效果。参考数据:[{\"id\":\"0\"},{\"id\":\"1\"},{\"id\":\"2\"},{\"id\":\"3\"},{\"id\":\"4\"},{\"id\":\"5\"},{\"id\":\"6\"},{\"id\":\"7\"},{\"id\":\"8\"},{\"id\":\"9\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"0\"\n },\n {\n \"id\": \"1\"\n },\n {\n \"id\": \"2\"\n },\n {\n \"id\": \"3\"\n },\n {\n \"id\": \"4\"\n },\n {\n \"id\": \"5\"\n },\n {\n \"id\": \"6\"\n },\n {\n \"id\": \"7\"\n },\n {\n \"id\": \"8\"\n },\n {\n \"id\": \"9\"\n },\n {\n \"id\": \"10\"\n },\n {\n \"id\": \"11\"\n },\n {\n \"id\": \"12\"\n },\n {\n \"id\": \"13\"\n },\n {\n \"id\": \"14\"\n },\n {\n \"id\": \"15\"\n },\n {\n \"id\": \"16\"\n },\n {\n \"id\": \"17\"\n },\n {\n \"id\": \"18\"\n },\n {\n \"id\": \"19\"\n },\n {\n \"id\": \"20\"\n },\n {\n \"id\": \"21\"\n },\n {\n \"id\": \"22\"\n },\n {\n \"id\": \"23\"\n },\n {\n \"id\": \"24\"\n },\n {\n \"id\": \"25\"\n },\n {\n \"id\": \"26\"\n },\n {\n \"id\": \"27\"\n },\n {\n \"id\": \"28\"\n },\n {\n \"id\": \"29\"\n },\n {\n \"id\": \"30\"\n },\n {\n \"id\": \"31\"\n },\n {\n \"id\": \"32\"\n },\n {\n \"id\": \"33\"\n }\n ],\n \"edges\": [\n {\n \"source\": \"0\",\n \"target\": \"1\"\n },\n {\n \"source\": \"0\",\n \"target\": \"2\"\n },\n {\n \"source\": \"0\",\n \"target\": \"3\"\n },\n {\n \"source\": \"0\",\n \"target\": \"4\"\n },\n {\n \"source\": \"0\",\n \"target\": \"5\"\n },\n {\n \"source\": \"0\",\n \"target\": \"7\"\n },\n {\n \"source\": \"0\",\n \"target\": \"8\"\n },\n {\n \"source\": \"0\",\n \"target\": \"9\"\n },\n {\n \"source\": \"0\",\n \"target\": \"10\"\n },\n {\n \"source\": \"0\",\n \"target\": \"11\"\n },\n {\n \"source\": \"0\",\n \"target\": \"13\"\n },\n {\n \"source\": \"0\",\n \"target\": \"14\"\n },\n {\n \"source\": \"0\",\n \"target\": \"15\"\n },\n {\n \"source\": \"0\",\n \"target\": \"16\"\n },\n {\n \"source\": \"2\",\n \"target\": \"3\"\n },\n {\n \"source\": \"4\",\n \"target\": \"5\"\n },\n {\n \"source\": \"4\",\n \"target\": \"6\"\n },\n {\n \"source\": \"5\",\n \"target\": \"6\"\n },\n {\n \"source\": \"7\",\n \"target\": \"13\"\n },\n {\n \"source\": \"8\",\n \"target\": \"14\"\n },\n {\n \"source\": \"9\",\n \"target\": \"10\"\n },\n {\n \"source\": \"10\",\n \"target\": \"22\"\n },\n {\n \"source\": \"10\",\n \"target\": \"14\"\n },\n {\n \"source\": \"10\",\n \"target\": \"12\"\n },\n {\n \"source\": \"10\",\n \"target\": \"24\"\n },\n {\n \"source\": \"10\",\n \"target\": \"21\"\n },\n {\n \"source\": \"10\",\n \"target\": \"20\"\n },\n {\n \"source\": \"11\",\n \"target\": \"24\"\n },\n {\n \"source\": \"11\",\n \"target\": \"22\"\n },\n {\n \"source\": \"11\",\n \"target\": \"14\"\n },\n {\n \"source\": \"12\",\n \"target\": \"13\"\n },\n {\n \"source\": \"16\",\n \"target\": \"17\"\n },\n {\n \"source\": \"16\",\n \"target\": \"18\"\n },\n {\n \"source\": \"16\",\n \"target\": \"21\"\n },\n {\n \"source\": \"16\",\n \"target\": \"22\"\n },\n {\n \"source\": \"17\",\n \"target\": \"18\"\n },\n {\n \"source\": \"17\",\n \"target\": \"20\"\n },\n {\n \"source\": \"18\",\n \"target\": \"19\"\n },\n {\n \"source\": \"19\",\n \"target\": \"20\"\n },\n {\n \"source\": \"19\",\n \"target\": \"33\"\n },\n {\n \"source\": \"19\",\n \"target\": \"22\"\n },\n {\n \"source\": \"19\",\n \"target\": \"23\"\n },\n {\n \"source\": \"20\",\n \"target\": \"21\"\n },\n {\n \"source\": \"21\",\n \"target\": \"22\"\n },\n {\n \"source\": \"22\",\n \"target\": \"24\"\n },\n {\n \"source\": \"22\",\n \"target\": \"25\"\n },\n {\n \"source\": \"22\",\n \"target\": \"26\"\n },\n {\n \"source\": \"22\",\n \"target\": \"23\"\n },\n {\n \"source\": \"22\",\n \"target\": \"28\"\n },\n {\n \"source\": \"22\",\n \"target\": \"30\"\n },\n {\n \"source\": \"22\",\n \"target\": \"31\"\n },\n {\n \"source\": \"22\",\n \"target\": \"32\"\n },\n {\n \"source\": \"22\",\n \"target\": \"33\"\n },\n {\n \"source\": \"23\",\n \"target\": \"28\"\n },\n {\n \"source\": \"23\",\n \"target\": \"27\"\n },\n {\n \"source\": \"23\",\n \"target\": \"29\"\n },\n {\n \"source\": \"23\",\n \"target\": \"30\"\n },\n {\n \"source\": \"23\",\n \"target\": \"31\"\n },\n {\n \"source\": \"23\",\n \"target\": \"33\"\n },\n {\n \"source\": \"32\",\n \"target\": \"33\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data,\n layout: {\n type: 'circular',\n },\n node: { style: { size: 20 } },\n behaviors: ['drag-canvas', 'drag-element'],\n plugins: [\n {\n key: 'edge-bundling',\n type: 'edge-bundling',\n bundleThreshold: 0.1,\n },\n ],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0' },\n { id: '1' },\n { id: '2' },\n { id: '3' },\n { id: '4' },\n { id: '5' },\n { id: '6' },\n { id: '7' },\n { id: '8' },\n { id: '9' }\n ],\n edges: [\n { source: '0', target: '1' },\n { source: '1', target: '2' },\n { source: '2', target: '3' },\n { source: '3', target: '4' },\n { source: '4', target: '5' },\n { source: '5', target: '6' },\n { source: '6', target: '7' },\n { source: '7', target: '8' },\n { source: '8', target: '9' },\n { source: '9', target: '0' },\n { source: '0', target: '5' },\n { source: '1', target: '6' },\n { source: '2', target: '7' },\n { source: '3', target: '8' },\n { source: '4', target: '9' }\n ]\n};\n\nconst graph = new Graph({\n container,\n autoFit: 'view',\n data,\n layout: {\n type: 'circular',\n radius: 200\n },\n node: {\n style: {\n size: 24,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff'\n }\n },\n edge: {\n style: {\n stroke: '#b0c4de',\n lineWidth: 1.5\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: [\n {\n type: 'edge-bundling',\n bundleThreshold: 0.6,\n K: 0.1,\n iterations: 90,\n stepSize: 0.1\n }\n ]\n});\n\ngraph.render();", + "duration": 25756, + "retrievedSkillIds": [ + "g6-behavior-drag-element", + "g6-behavior-canvas-nav", + "g6-layout-combo-fishbone", + "g6-layout-mindmap", + "g6-layout-force" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1388, + "expectedLength": 5105, + "similarity": 0.6086894586894587, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0' },\n { id: '1' },\n { id: '2' },\n { id: '3' },\n { id: '4' },\n { id: '5' },\n { id: '6' },\n { id: '7' },\n { id: '8' },\n { id: '9' }\n ],\n edges: [\n { source: '0', target: '1' },\n { source: '1', target: '2' },\n { source: '2', target: '3' },\n { source: '3', target: '4' },\n { source: '4', target: '5' },\n { source: '5', target: '6' },\n { source: '6', target: '7' },\n { source: '7', target: '8' },\n { source: '8', target: '9' },\n { source: '9', target: '0' },\n { source: '0', target: '5' },\n { source: '1', target: '6' },\n { source: '2', target: '7' },\n { source: '3', target: '8' },\n { source: '4', target: '9' }\n ]\n};\n\nconst graph = new Graph({\n container,\n autoFit: 'view',\n data,\n layout: {\n type: 'circular',\n radius: 200\n },\n node: {\n style: {\n size: 24,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff'\n }\n },\n edge: {\n style: {\n stroke: '#b0c4de',\n lineWidth: 1.5\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n plugins: [\n {\n type: 'edge-bundling',\n bundleThreshold: 0.6,\n K: 0.1,\n iterations: 90,\n stepSize: 0.1\n }\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "autoFit", + "layout", + "type", + "radius", + "node", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "edge", + "style", + "stroke", + "lineWidth", + "behaviors", + "plugins", + "type", + "bundleThreshold", + "K", + "iterations", + "stepSize" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-70", + "query": "根据描述绘制图表,使用 G6 渲染一个包含自环边的图形,节点类型为矩形,具有端口配置,边缘支持端口连接和特定方向的自环样式,采用网格布局排列节点。参考数据:[{\"id\":\"node1\"},{\"id\":\"node2\"},{\"id\":\"node3-ports\"},{\"id\":\"node4-ports\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, idOf } from '@antv/g6';\n\nconst data = {\n nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3-ports' }, { id: 'node4-ports' }],\n edges: [\n {\n id: 'loop-1',\n source: 'node1',\n target: 'node1',\n style: { placement: 'top' },\n },\n {\n id: 'loop-2',\n source: 'node1',\n target: 'node1',\n style: { placement: 'right' },\n },\n {\n id: 'loop-3',\n source: 'node1',\n target: 'node1',\n style: { placement: 'bottom' },\n },\n {\n id: 'loop-4',\n source: 'node1',\n target: 'node1',\n style: { placement: 'left' },\n },\n {\n id: 'loop-5',\n source: 'node2',\n target: 'node2',\n style: { placement: 'top-right' },\n },\n {\n id: 'loop-6',\n source: 'node2',\n target: 'node2',\n style: { placement: 'bottom-right' },\n },\n {\n id: 'loop-7',\n source: 'node2',\n target: 'node2',\n style: { placement: 'bottom-left' },\n },\n {\n id: 'loop-8',\n source: 'node2',\n target: 'node2',\n style: { placement: 'top-left' },\n },\n {\n id: 'loop-9',\n source: 'node3-ports',\n target: 'node3-ports',\n style: { sourcePort: 'port1', targetPort: 'port2' },\n },\n {\n id: 'loop-10',\n source: 'node4-ports',\n target: 'node4-ports',\n style: { sourcePort: 'port2', targetPort: 'port2' },\n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'rect',\n style: {\n size: [80, 30],\n port: (d) => idOf(d).includes('ports'),\n portR: 3,\n ports: [\n {\n key: 'port1',\n placement: [0.7, 0],\n },\n {\n key: 'port2',\n placement: 'right',\n },\n ],\n },\n },\n edge: {\n type: 'line',\n style: {\n sourcePort: (d) => d.style.sourcePort,\n targetPort: (d) => d.style.targetPort,\n endArrow: true,\n loopPlacement: (d) => d.style.placement,\n },\n },\n layout: {\n type: 'grid',\n },\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', data: { label: 'Node 1' } },\n { id: 'node2', data: { label: 'Node 2' } },\n { id: 'node3-ports', data: { label: 'Node 3 (Ports)' } },\n { id: 'node4-ports', data: { label: 'Node 4 (Ports)' } }\n ],\n edges: [\n { id: 'e1', source: 'node1', target: 'node2' },\n { id: 'e2', source: 'node3-ports', target: 'node3-ports', sourcePort: 'top', targetPort: 'right' },\n { id: 'e3', source: 'node4-ports', target: 'node4-ports', sourcePort: 'left', targetPort: 'bottom' },\n { id: 'e4', source: 'node3-ports', target: 'node4-ports', sourcePort: 'right', targetPort: 'left' },\n { id: 'e5', source: 'node2', target: 'node3-ports', targetPort: 'top' }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n width: 800,\n height: 600,\n data: data,\n node: {\n type: 'rect',\n style: {\n size: [120, 60],\n fill: '#e6f4ff',\n stroke: '#1890ff',\n lineWidth: 2,\n radius: 6,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#333',\n ports: (d) => {\n if (d.id.includes('ports')) {\n return [\n { key: 'top', placement: 'top', r: 4, fill: '#fff', stroke: '#1890ff', lineWidth: 1.5 },\n { key: 'bottom', placement: 'bottom', r: 4, fill: '#fff', stroke: '#1890ff', lineWidth: 1.5 },\n { key: 'left', placement: 'left', r: 4, fill: '#fff', stroke: '#1890ff', lineWidth: 1.5 },\n { key: 'right', placement: 'right', r: 4, fill: '#fff', stroke: '#1890ff', lineWidth: 1.5 }\n ];\n }\n return [];\n }\n }\n },\n edge: {\n type: 'cubic',\n style: {\n stroke: '#999',\n lineWidth: 2,\n endArrow: true,\n loopRadius: 30,\n loopClockwise: true,\n loopDist: 25\n }\n },\n layout: {\n type: 'grid',\n cols: 2,\n rowGap: 100,\n colGap: 150\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "duration": 30064, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-layout-circular", + "g6-edge-line", + "g6-core-custom-element", + "g6-node-rect" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1985, + "expectedLength": 2054, + "similarity": 0.6502797202797204, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', data: { label: 'Node 1' } },\n { id: 'node2', data: { label: 'Node 2' } },\n { id: 'node3-ports', data: { label: 'Node 3 (Ports)' } },\n { id: 'node4-ports', data: { label: 'Node 4 (Ports)' } }\n ],\n edges: [\n { id: 'e1', source: 'node1', target: 'node2' },\n { id: 'e2', source: 'node3-ports', target: 'node3-ports', sourcePort: 'top', targetPort: 'right' },\n { id: 'e3', source: 'node4-ports', target: 'node4-ports', sourcePort: 'left', targetPort: 'bottom' },\n { id: 'e4', source: 'node3-ports', target: 'node4-ports', sourcePort: 'right', targetPort: 'left' },\n { id: 'e5', source: 'node2', target: 'node3-ports', targetPort: 'top' }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n width: 800,\n height: 600,\n data: data,\n node: {\n type: 'rect',\n style: {\n size: [120, 60],\n fill: '#e6f4ff',\n stroke: '#1890ff',\n lineWidth: 2,\n radius: 6,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#333',\n ports: (d) => {\n if (d.id.includes('ports')) {\n return [\n { key: 'top', placement: 'top', r: 4, fill: '#fff', stroke: '#1890ff', lineWidth: 1.5 },\n { key: 'bottom', placement: 'bottom', r: 4, fill: '#fff', stroke: '#1890ff', lineWidth: 1.5 },\n { key: 'left', placement: 'left', r: 4, fill: '#fff', stroke: '#1890ff', lineWidth: 1.5 },\n { key: 'right', placement: 'right', r: 4, fill: '#fff', stroke: '#1890ff', lineWidth: 1.5 }\n ];\n }\n return [];\n }\n }\n },\n edge: {\n type: 'cubic',\n style: {\n stroke: '#999',\n lineWidth: 2,\n endArrow: true,\n loopRadius: 30,\n loopClockwise: true,\n loopDist: 25\n }\n },\n layout: {\n type: 'grid',\n cols: 2,\n rowGap: 100,\n colGap: 150\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "3", + "4", + "Graph", + "includes", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "edges", + "id", + "source", + "target", + "id", + "source", + "target", + "sourcePort", + "targetPort", + "id", + "source", + "target", + "sourcePort", + "targetPort", + "id", + "source", + "target", + "sourcePort", + "targetPort", + "id", + "source", + "target", + "targetPort", + "container", + "width", + "height", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "radius", + "labelText", + "labelPlacement", + "labelFill", + "ports", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "loopRadius", + "loopClockwise", + "loopDist", + "layout", + "type", + "cols", + "rowGap", + "colGap", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-71", + "query": "根据描述绘制图表,使用 G6 构建了一个径向布局的关系图,包含 6 个节点和 5 条边,每条边具有不同的状态样式,如实线、激活、选中、高亮和非激活状态,并通过 quadratic 类型的边连接,渲染在一个容器中。参考数据:[{\"id\":\"node1\"},{\"id\":\"node2\"},{\"id\":\"node3\"},{\"id\":\"node4\"},{\"id\":\"node5\"},{\"id\":\"node6\"},{\"id\":\"line-default\",\"source\":\"node1\",\"target\":\"node2\"},{\"id\":\"line-active\",\"source\":\"node1\",\"target\":\"node3\",\"states\":[\"active\"]},{\"id\":\"line-selected\",\"source\":\"node1\",\"target\":\"node4\",\"states\":[\"selected\"]},{\"id\":\"line-highlight\",\"source\":\"node1\",\"target\":\"node5\",\"states\":[\"highlight\"]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, iconfont } from '@antv/g6';\n\nconst style = document.createElement('style');\nstyle.innerHTML = `@import url('${iconfont.css}');`;\ndocument.head.appendChild(style);\n\nconst data = {\n nodes: [\n {\n id: 'node1',\n },\n {\n id: 'node2',\n },\n {\n id: 'node3',\n },\n {\n id: 'node4',\n },\n {\n id: 'node5',\n },\n {\n id: 'node6',\n },\n ],\n edges: [\n {\n id: 'line-default',\n source: 'node1',\n target: 'node2',\n },\n {\n id: 'line-active',\n source: 'node1',\n target: 'node3',\n states: ['active'],\n },\n {\n id: 'line-selected',\n source: 'node1',\n target: 'node4',\n states: ['selected'],\n },\n {\n id: 'line-highlight',\n source: 'node1',\n target: 'node5',\n states: ['highlight'],\n },\n {\n id: 'line-inactive',\n source: 'node1',\n target: 'node6',\n states: ['inactive'],\n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n edge: {\n type: 'quadratic',\n style: {\n labelText: (d) => d.id,\n labelBackground: true,\n endArrow: true,\n badge: true,\n badgeText: '\\ue603',\n badgeFontFamily: 'iconfont',\n badgeBackgroundWidth: 12,\n badgeBackgroundHeight: 12,\n },\n },\n layout: {\n type: 'radial',\n unitRadius: 220,\n linkDistance: 220,\n },\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', data: { label: 'Node 1' } },\n { id: 'node2', data: { label: 'Node 2' } },\n { id: 'node3', data: { label: 'Node 3' } },\n { id: 'node4', data: { label: 'Node 4' } },\n { id: 'node5', data: { label: 'Node 5' } },\n { id: 'node6', data: { label: 'Node 6' } },\n ],\n edges: [\n { id: 'line-default', source: 'node1', target: 'node2', data: { label: 'Default' } },\n { id: 'line-active', source: 'node1', target: 'node3', states: ['active'], data: { label: 'Active' } },\n { id: 'line-selected', source: 'node1', target: 'node4', states: ['selected'], data: { label: 'Selected' } },\n { id: 'line-highlight', source: 'node1', target: 'node5', states: ['highlight'], data: { label: 'Highlight' } },\n { id: 'line-inactive', source: 'node1', target: 'node6', states: ['inactive'], data: { label: 'Inactive' } },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n autoFit: 'view',\n data,\n layout: {\n type: 'radial',\n unitRadius: 120,\n preventOverlap: true,\n },\n node: {\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'quadratic',\n style: {\n stroke: '#999',\n lineWidth: 2,\n endArrow: true,\n labelText: (d) => d.data.label,\n labelFontSize: 10,\n labelFill: '#666',\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.9,\n },\n state: {\n active: {\n stroke: '#40a9ff',\n lineWidth: 3,\n strokeOpacity: 1,\n },\n selected: {\n stroke: '#1890ff',\n lineWidth: 3,\n strokeOpacity: 1,\n },\n highlight: {\n stroke: '#ff4d4f',\n lineWidth: 3,\n strokeOpacity: 1,\n },\n inactive: {\n stroke: '#999',\n lineWidth: 1,\n strokeOpacity: 0.2,\n },\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "duration": 17134, + "retrievedSkillIds": [ + "g6-edge-line", + "g6-pattern-flow-chart", + "g6-core-graph-init", + "g6-behavior-drag-element", + "g6-core-data-structure" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2130, + "expectedLength": 1409, + "similarity": 0.5882919254658385, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node1', data: { label: 'Node 1' } },\n { id: 'node2', data: { label: 'Node 2' } },\n { id: 'node3', data: { label: 'Node 3' } },\n { id: 'node4', data: { label: 'Node 4' } },\n { id: 'node5', data: { label: 'Node 5' } },\n { id: 'node6', data: { label: 'Node 6' } },\n ],\n edges: [\n { id: 'line-default', source: 'node1', target: 'node2', data: { label: 'Default' } },\n { id: 'line-active', source: 'node1', target: 'node3', states: ['active'], data: { label: 'Active' } },\n { id: 'line-selected', source: 'node1', target: 'node4', states: ['selected'], data: { label: 'Selected' } },\n { id: 'line-highlight', source: 'node1', target: 'node5', states: ['highlight'], data: { label: 'Highlight' } },\n { id: 'line-inactive', source: 'node1', target: 'node6', states: ['inactive'], data: { label: 'Inactive' } },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n autoFit: 'view',\n data,\n layout: {\n type: 'radial',\n unitRadius: 120,\n preventOverlap: true,\n },\n node: {\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'quadratic',\n style: {\n stroke: '#999',\n lineWidth: 2,\n endArrow: true,\n labelText: (d) => d.data.label,\n labelFontSize: 10,\n labelFill: '#666',\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.9,\n },\n state: {\n active: {\n stroke: '#40a9ff',\n lineWidth: 3,\n strokeOpacity: 1,\n },\n selected: {\n stroke: '#1890ff',\n lineWidth: 3,\n strokeOpacity: 1,\n },\n highlight: {\n stroke: '#ff4d4f',\n lineWidth: 3,\n strokeOpacity: 1,\n },\n inactive: {\n stroke: '#999',\n lineWidth: 1,\n strokeOpacity: 0.2,\n },\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "edges", + "id", + "source", + "target", + "data", + "label", + "id", + "source", + "target", + "states", + "data", + "label", + "id", + "source", + "target", + "states", + "data", + "label", + "id", + "source", + "target", + "states", + "data", + "label", + "id", + "source", + "target", + "states", + "data", + "label", + "container", + "autoFit", + "layout", + "type", + "unitRadius", + "preventOverlap", + "node", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "labelText", + "labelFontSize", + "labelFill", + "labelBackground", + "labelBackgroundFill", + "labelBackgroundOpacity", + "state", + "active", + "stroke", + "lineWidth", + "strokeOpacity", + "selected", + "stroke", + "lineWidth", + "strokeOpacity", + "highlight", + "stroke", + "lineWidth", + "strokeOpacity", + "inactive", + "stroke", + "lineWidth", + "strokeOpacity", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-72", + "query": "根据描述绘制图表,使用 G6 图表库创建一个有向图,包含节点和边的数据结构,并通过 dagre 布局算法进行排列。节点为矩形,带有标签和尺寸设置,边采用正交路由的折线样式。参考数据:[{\"id\":\"kspacey\",\"data\":{\"label\":\"Kevin Spacey\",\"width\":144,\"height\":100}},{\"id\":\"swilliams\",\"data\":{\"label\":\"Saul Williams\",\"width\":160,\"height\":100}},{\"id\":\"bpitt\",\"data\":{\"label\":\"Brad Pitt\",\"width\":108,\"height\":100}},{\"id\":\"hford\",\"data\":{\"label\":\"Harrison Ford\",\"width\":168,\"height\":100}},{\"id\":\"lwilson\",\"data\":{\"label\":\"Luke Wilson\",\"width\":144,\"height\":100}},{\"id\":\"kbacon\",\"data\":{\"label\":\"Kevin Bacon\",\"width\":121,\"height\":100}},{\"id\":\"kspacey->swilliams\",\"source\":\"kspacey\",\"target\":\"swilliams\"},{\"id\":\"swilliams->kbacon\",\"source\":\"swilliams\",\"target\":\"kbacon\"},{\"id\":\"bpitt->kbacon\",\"source\":\"bpitt\",\"target\":\"kbacon\"},{\"id\":\"hford->lwilson\",\"source\":\"hford\",\"target\":\"lwilson\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'kspacey', data: { label: 'Kevin Spacey', width: 144, height: 100 } },\n { id: 'swilliams', data: { label: 'Saul Williams', width: 160, height: 100 } },\n { id: 'bpitt', data: { label: 'Brad Pitt', width: 108, height: 100 } },\n { id: 'hford', data: { label: 'Harrison Ford', width: 168, height: 100 } },\n { id: 'lwilson', data: { label: 'Luke Wilson', width: 144, height: 100 } },\n { id: 'kbacon', data: { label: 'Kevin Bacon', width: 121, height: 100 } },\n ],\n edges: [\n { id: 'kspacey->swilliams', source: 'kspacey', target: 'swilliams' },\n { id: 'swilliams->kbacon', source: 'swilliams', target: 'kbacon' },\n { id: 'bpitt->kbacon', source: 'bpitt', target: 'kbacon' },\n { id: 'hford->lwilson', source: 'hford', target: 'lwilson' },\n { id: 'lwilson->kbacon', source: 'lwilson', target: 'kbacon' },\n ],\n};\n\nconst graph = new Graph({\n autoFit: 'center',\n container: 'container',\n data,\n node: {\n type: 'rect',\n style: {\n size: (d) => [d.data.width, d.data.height],\n radius: 10,\n iconText: (d) => d.data.label,\n iconFontSize: 14,\n },\n palette: {\n type: 'group',\n field: 'label',\n },\n },\n edge: {\n type: 'polyline',\n style: {\n router: {\n type: 'orth',\n },\n },\n },\n layout: {\n type: 'dagre',\n },\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'kspacey', data: { label: 'Kevin Spacey', width: 144, height: 100 } },\n { id: 'swilliams', data: { label: 'Saul Williams', width: 160, height: 100 } },\n { id: 'bpitt', data: { label: 'Brad Pitt', width: 108, height: 100 } },\n { id: 'hford', data: { label: 'Harrison Ford', width: 168, height: 100 } },\n { id: 'lwilson', data: { label: 'Luke Wilson', width: 144, height: 100 } },\n { id: 'kbacon', data: { label: 'Kevin Bacon', width: 121, height: 100 } },\n ],\n edges: [\n { id: 'kspacey->swilliams', source: 'kspacey', target: 'swilliams' },\n { id: 'swilliams->kbacon', source: 'swilliams', target: 'kbacon' },\n { id: 'bpitt->kbacon', source: 'bpitt', target: 'kbacon' },\n { id: 'hford->lwilson', source: 'hford', target: 'lwilson' },\n ],\n};\n\nconst graph = new Graph({\n container,\n autoFit: 'view',\n data,\n node: {\n type: 'rect',\n style: {\n size: (d) => [d.data.width, d.data.height],\n radius: 4,\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1.5,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#333',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'polyline',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n radius: 8,\n endArrow: true,\n },\n },\n layout: {\n type: 'dagre',\n rankdir: 'TB',\n ranksep: 60,\n nodesep: 40,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "duration": 15540, + "retrievedSkillIds": [ + "g6-pattern-flow-chart", + "g6-edge-polyline", + "g6-layout-dagre", + "g6-node-rect", + "g6-layout-circular" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1528, + "expectedLength": 1399, + "similarity": 0.985531914893617, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'kspacey', data: { label: 'Kevin Spacey', width: 144, height: 100 } },\n { id: 'swilliams', data: { label: 'Saul Williams', width: 160, height: 100 } },\n { id: 'bpitt', data: { label: 'Brad Pitt', width: 108, height: 100 } },\n { id: 'hford', data: { label: 'Harrison Ford', width: 168, height: 100 } },\n { id: 'lwilson', data: { label: 'Luke Wilson', width: 144, height: 100 } },\n { id: 'kbacon', data: { label: 'Kevin Bacon', width: 121, height: 100 } },\n ],\n edges: [\n { id: 'kspacey->swilliams', source: 'kspacey', target: 'swilliams' },\n { id: 'swilliams->kbacon', source: 'swilliams', target: 'kbacon' },\n { id: 'bpitt->kbacon', source: 'bpitt', target: 'kbacon' },\n { id: 'hford->lwilson', source: 'hford', target: 'lwilson' },\n ],\n};\n\nconst graph = new Graph({\n container,\n autoFit: 'view',\n data,\n node: {\n type: 'rect',\n style: {\n size: (d) => [d.data.width, d.data.height],\n radius: 4,\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1.5,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#333',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'polyline',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n radius: 8,\n endArrow: true,\n },\n },\n layout: {\n type: 'dagre',\n rankdir: 'TB',\n ranksep: 60,\n nodesep: 40,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "width", + "height", + "id", + "data", + "label", + "width", + "height", + "id", + "data", + "label", + "width", + "height", + "id", + "data", + "label", + "width", + "height", + "id", + "data", + "label", + "width", + "height", + "id", + "data", + "label", + "width", + "height", + "edges", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "autoFit", + "node", + "type", + "style", + "size", + "radius", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "radius", + "endArrow", + "layout", + "type", + "rankdir", + "ranksep", + "nodesep", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-73", + "query": "根据描述绘制图表,创建了一个基于力导向布局的图结构可视化,使用 G6 实现。节点根据 cluster 字段进行颜色区分,并支持点击节点调整其大小,同时重新布局。节点初始尺寸是随机生成的,点击后会在原始尺寸和固定大尺寸之间切换。参考数据:[{\"id\":\"0\",\"label\":\"0\",\"value\":10,\"cluster\":\"a\",\"description\":\"this is node 0, \\nand the value of it is 10\"},{\"id\":\"1\",\"label\":\"1\",\"value\":20,\"cluster\":\"b\",\"description\":\"this is node 1, \\nand the value of it is 20\"},{\"id\":\"2\",\"label\":\"2\",\"value\":5,\"cluster\":\"a\",\"description\":\"this is node 2, \\nand the value of it is 5\"},{\"id\":\"3\",\"label\":\"3\",\"value\":10,\"cluster\":\"a\",\"description\":\"this is node 3, \\nand the value of it is 10\"},{\"id\":\"4\",\"label\":\"4\",\"value\":12,\"cluster\":\"c\",\"subCluster\":\"sb\",\"description\":\"this is node 4, \\nand the value of it is 12\"},{\"id\":\"5\",\"label\":\"5\",\"value\":18,\"cluster\":\"c\",\"subCluster\":\"sa\",\"description\":\"this is node 5, \\nand the value of it is 18\"},{\"id\":\"6\",\"label\":\"6\",\"value\":3,\"cluster\":\"c\",\"subCluster\":\"sa\",\"description\":\"this is node 6, \\nand the value of it is 3\"},{\"id\":\"7\",\"label\":\"7\",\"value\":7,\"cluster\":\"b\",\"subCluster\":\"sa\",\"description\":\"this is node 7, \\nand the value of it is 7\"},{\"id\":\"8\",\"label\":\"8\",\"value\":21,\"cluster\":\"d\",\"subCluster\":\"sb\",\"description\":\"this is node 8, \\nand the value of it is 21\"},{\"id\":\"9\",\"label\":\"9\",\"value\":9,\"cluster\":\"d\",\"subCluster\":\"sb\",\"description\":\"this is node 9, \\nand the value of it is 9\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, NodeEvent } from '@antv/g6';\n\nconst data = {\n nodes: [\n {\n id: '0',\n label: '0',\n value: 10,\n cluster: 'a',\n description: 'this is node 0, \\nand the value of it is 10',\n },\n {\n id: '1',\n label: '1',\n value: 20,\n cluster: 'b',\n description: 'this is node 1, \\nand the value of it is 20',\n },\n {\n id: '2',\n label: '2',\n value: 5,\n cluster: 'a',\n description: 'this is node 2, \\nand the value of it is 5',\n },\n {\n id: '3',\n label: '3',\n value: 10,\n cluster: 'a',\n description: 'this is node 3, \\nand the value of it is 10',\n },\n {\n id: '4',\n label: '4',\n value: 12,\n cluster: 'c',\n subCluster: 'sb',\n description: 'this is node 4, \\nand the value of it is 12',\n },\n {\n id: '5',\n label: '5',\n value: 18,\n cluster: 'c',\n subCluster: 'sa',\n description: 'this is node 5, \\nand the value of it is 18',\n },\n {\n id: '6',\n label: '6',\n value: 3,\n cluster: 'c',\n subCluster: 'sa',\n description: 'this is node 6, \\nand the value of it is 3',\n },\n {\n id: '7',\n label: '7',\n value: 7,\n cluster: 'b',\n subCluster: 'sa',\n description: 'this is node 7, \\nand the value of it is 7',\n },\n {\n id: '8',\n label: '8',\n value: 21,\n cluster: 'd',\n subCluster: 'sb',\n description: 'this is node 8, \\nand the value of it is 21',\n },\n {\n id: '9',\n label: '9',\n value: 9,\n cluster: 'd',\n subCluster: 'sb',\n description: 'this is node 9, \\nand the value of it is 9',\n },\n ],\n edges: [],\n};\n\nconst oriSize = {};\n\nconst nodes = data.nodes;\n// randomize the node size\nnodes.forEach((node) => {\n node.size = Math.random() * 30 + 16;\n oriSize[node.id] = node.size;\n});\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n size: (d) => d.size,\n labelText: (d) => (d.size === 200 ? d.description : d.id),\n labelPlacement: 'middle',\n labelFill: '#fff',\n },\n palette: {\n field: (d) => d.cluster,\n },\n },\n layout: {\n type: 'd3-force',\n collide: {\n radius: (d) => d.size / 2,\n strength: 0.7,\n },\n manyBody: {\n strength: 30,\n },\n },\n behaviors: ['drag-element-force'],\n});\n\ngraph.on(NodeEvent.CLICK, async (e) => {\n const nodeId = e.target.id;\n const data = graph.getNodeData(nodeId);\n const size = data.size === oriSize[nodeId] ? 200 : oriSize[nodeId];\n graph.updateNodeData([{ id: nodeId, size }]);\n await graph.layout();\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst rawNodes = [\n {\"id\":\"0\",\"label\":\"0\",\"value\":10,\"cluster\":\"a\",\"description\":\"this is node 0, \\nand the value of it is 10\"},\n {\"id\":\"1\",\"label\":\"1\",\"value\":20,\"cluster\":\"b\",\"description\":\"this is node 1, \\nand the value of it is 20\"},\n {\"id\":\"2\",\"label\":\"2\",\"value\":5,\"cluster\":\"a\",\"description\":\"this is node 2, \\nand the value of it is 5\"},\n {\"id\":\"3\",\"label\":\"3\",\"value\":10,\"cluster\":\"a\",\"description\":\"this is node 3, \\nand the value of it is 10\"},\n {\"id\":\"4\",\"label\":\"4\",\"value\":12,\"cluster\":\"c\",\"subCluster\":\"sb\",\"description\":\"this is node 4, \\nand the value of it is 12\"},\n {\"id\":\"5\",\"label\":\"5\",\"value\":18,\"cluster\":\"c\",\"subCluster\":\"sa\",\"description\":\"this is node 5, \\nand the value of it is 18\"},\n {\"id\":\"6\",\"label\":\"6\",\"value\":3,\"cluster\":\"c\",\"subCluster\":\"sa\",\"description\":\"this is node 6, \\nand the value of it is 3\"},\n {\"id\":\"7\",\"label\":\"7\",\"value\":7,\"cluster\":\"b\",\"subCluster\":\"sa\",\"description\":\"this is node 7, \\nand the value of it is 7\"},\n {\"id\":\"8\",\"label\":\"8\",\"value\":21,\"cluster\":\"d\",\"subCluster\":\"sb\",\"description\":\"this is node 8, \\nand the value of it is 21\"},\n {\"id\":\"9\",\"label\":\"9\",\"value\":9,\"cluster\":\"d\",\"subCluster\":\"sb\",\"description\":\"this is node 9, \\nand the value of it is 9\"}\n];\n\nconst nodes = rawNodes.map(node => {\n const randomSize = 20 + Math.random() * 30;\n return {\n id: node.id,\n data: {\n ...node,\n originalSize: randomSize,\n currentSize: randomSize,\n isEnlarged: false\n }\n };\n});\n\nconst edges = [];\nlet edgeIndex = 0;\nfor (let i = 0; i < nodes.length; i++) {\n const targetCount = 1 + Math.floor(Math.random() * 2);\n for (let j = 0; j < targetCount; j++) {\n const targetIdx = Math.floor(Math.random() * nodes.length);\n if (targetIdx !== i) {\n edges.push({\n id: `edge-${edgeIndex++}`,\n source: nodes[i].id,\n target: nodes[targetIdx].id\n });\n }\n }\n}\n\nconst graph = new Graph({\n container: 'container',\n width: 800,\n height: 600,\n data: {\n nodes,\n edges\n },\n node: {\n type: 'circle',\n style: {\n size: (d) => d.data.currentSize,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n cursor: 'pointer'\n },\n palette: {\n type: 'group',\n field: 'cluster',\n color: ['#1783FF', '#00C9C9', '#F08F56', '#D580FF']\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#e2e2e2',\n lineWidth: 1\n }\n },\n layout: {\n type: 'force',\n linkDistance: 120,\n nodeStrength: 30,\n edgeStrength: 0.2,\n preventOverlap: true\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.on('node:click', (evt) => {\n const nodeId = evt.target.id;\n const nodeData = graph.getElementData(nodeId);\n \n if (!nodeData) return;\n \n const isEnlarged = nodeData.data.isEnlarged;\n const newSize = isEnlarged ? nodeData.data.originalSize : 60;\n \n graph.updateNodeData([{\n id: nodeId,\n data: {\n ...nodeData.data,\n currentSize: newSize,\n isEnlarged: !isEnlarged\n }\n }]);\n \n graph.draw();\n});\n\ngraph.render();", + "duration": 24332, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-node-rect", + "g6-layout-mindmap", + "g6-node-html", + "g6-core-graph-init" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 3135, + "expectedLength": 2669, + "similarity": 0.4789497357761191, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst rawNodes = [\n {\"id\":\"0\",\"label\":\"0\",\"value\":10,\"cluster\":\"a\",\"description\":\"this is node 0, \\nand the value of it is 10\"},\n {\"id\":\"1\",\"label\":\"1\",\"value\":20,\"cluster\":\"b\",\"description\":\"this is node 1, \\nand the value of it is 20\"},\n {\"id\":\"2\",\"label\":\"2\",\"value\":5,\"cluster\":\"a\",\"description\":\"this is node 2, \\nand the value of it is 5\"},\n {\"id\":\"3\",\"label\":\"3\",\"value\":10,\"cluster\":\"a\",\"description\":\"this is node 3, \\nand the value of it is 10\"},\n {\"id\":\"4\",\"label\":\"4\",\"value\":12,\"cluster\":\"c\",\"subCluster\":\"sb\",\"description\":\"this is node 4, \\nand the value of it is 12\"},\n {\"id\":\"5\",\"label\":\"5\",\"value\":18,\"cluster\":\"c\",\"subCluster\":\"sa\",\"description\":\"this is node 5, \\nand the value of it is 18\"},\n {\"id\":\"6\",\"label\":\"6\",\"value\":3,\"cluster\":\"c\",\"subCluster\":\"sa\",\"description\":\"this is node 6, \\nand the value of it is 3\"},\n {\"id\":\"7\",\"label\":\"7\",\"value\":7,\"cluster\":\"b\",\"subCluster\":\"sa\",\"description\":\"this is node 7, \\nand the value of it is 7\"},\n {\"id\":\"8\",\"label\":\"8\",\"value\":21,\"cluster\":\"d\",\"subCluster\":\"sb\",\"description\":\"this is node 8, \\nand the value of it is 21\"},\n {\"id\":\"9\",\"label\":\"9\",\"value\":9,\"cluster\":\"d\",\"subCluster\":\"sb\",\"description\":\"this is node 9, \\nand the value of it is 9\"}\n];\n\nconst nodes = rawNodes.map(node => {\n const randomSize = 20 + Math.random() * 30;\n return {\n id: node.id,\n data: {\n ...node,\n originalSize: randomSize,\n currentSize: randomSize,\n isEnlarged: false\n }\n };\n});\n\nconst edges = [];\nlet edgeIndex = 0;\nfor (let i = 0; i < nodes.length; i++) {\n const targetCount = 1 + Math.floor(Math.random() * 2);\n for (let j = 0; j < targetCount; j++) {\n const targetIdx = Math.floor(Math.random() * nodes.length);\n if (targetIdx !== i) {\n edges.push({\n id: `edge-${edgeIndex++}`,\n source: nodes[i].id,\n target: nodes[targetIdx].id\n });\n }\n }\n}\n\nconst graph = new Graph({\n container: 'container',\n width: 800,\n height: 600,\n data: {\n nodes,\n edges\n },\n node: {\n type: 'circle',\n style: {\n size: (d) => d.data.currentSize,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n cursor: 'pointer'\n },\n palette: {\n type: 'group',\n field: 'cluster',\n color: ['#1783FF', '#00C9C9', '#F08F56', '#D580FF']\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#e2e2e2',\n lineWidth: 1\n }\n },\n layout: {\n type: 'force',\n linkDistance: 120,\n nodeStrength: 30,\n edgeStrength: 0.2,\n preventOverlap: true\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.on('node:click', (evt) => {\n const nodeId = evt.target.id;\n const nodeData = graph.getElementData(nodeId);\n \n if (!nodeData) return;\n \n const isEnlarged = nodeData.data.isEnlarged;\n const newSize = isEnlarged ? nodeData.data.originalSize : 60;\n \n graph.updateNodeData([{\n id: nodeId,\n data: {\n ...nodeData.data,\n currentSize: newSize,\n isEnlarged: !isEnlarged\n }\n }]);\n \n graph.draw();\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "map", + "random", + "floor", + "random", + "floor", + "random", + "push", + "Graph", + "on", + "getElementData", + "updateNodeData", + "draw", + "render" + ], + "objectKeys": [ + "id", + "data", + "originalSize", + "currentSize", + "isEnlarged", + "id", + "source", + "target", + "container", + "width", + "height", + "data", + "node", + "type", + "style", + "size", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "cursor", + "palette", + "type", + "field", + "color", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "linkDistance", + "nodeStrength", + "edgeStrength", + "preventOverlap", + "behaviors", + "node", + "originalSize", + "id", + "data", + "currentSize", + "isEnlarged" + ], + "stringLiterals": [ + "id", + "label", + "value", + "cluster", + "description", + "id", + "label", + "value", + "cluster", + "description", + "id", + "label", + "value", + "cluster", + "description", + "id", + "label", + "value", + "cluster", + "description", + "id", + "label", + "value", + "cluster", + "subCluster", + "description", + "id", + "label", + "value", + "cluster", + "subCluster", + "description", + "id", + "label", + "value", + "cluster", + "subCluster", + "description", + "id", + "label", + "value", + "cluster", + "subCluster", + "description", + "id", + "label", + "value", + "cluster", + "subCluster", + "description", + "id", + "label", + "value", + "cluster", + "subCluster", + "description" + ], + "apiPatterns": [ + "type.line", + "new Graph", + "graph.on", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-74", + "query": "根据描述绘制图表,使用 AntV G6 渲染一个包含 16 个节点和 15 条边的图表,节点按蛇形布局排列,支持画布拖拽和元素拖拽交互。参考数据:[{\"id\":\"0\"},{\"id\":\"1\"},{\"id\":\"2\"},{\"id\":\"3\"},{\"id\":\"4\"},{\"id\":\"5\"},{\"id\":\"6\"},{\"id\":\"7\"},{\"id\":\"8\"},{\"id\":\"9\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: new Array(16).fill(0).map((_, i) => ({ id: `${i}` })),\n edges: new Array(15).fill(0).map((_, i) => ({ source: `${i}`, target: `${i + 1}` })),\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'center',\n data,\n node: {\n style: {\n labelFill: '#fff',\n labelPlacement: 'center',\n labelText: (d) => d.id,\n },\n },\n layout: {\n type: 'snake',\n cols: 3,\n rowGap: 80,\n colGap: 120,\n },\n behaviors: ['drag-canvas', 'drag-element'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\n// 生成 16 个节点和 15 条边,按蛇形布局排列\nconst nodes = [];\nconst edges = [];\nconst cols = 4;\nconst rowHeight = 80;\nconst colWidth = 100;\nconst startX = 50;\nconst startY = 50;\n\nfor (let i = 0; i < 16; i++) {\n const row = Math.floor(i / cols);\n const col = i % cols;\n \n // 蛇形排列:偶数行从左到右,奇数行从右到左\n let x;\n if (row % 2 === 0) {\n x = startX + col * colWidth;\n } else {\n x = startX + (cols - 1 - col) * colWidth;\n }\n const y = startY + row * rowHeight;\n \n nodes.push({\n id: `${i}`,\n style: {\n x: x,\n y: y,\n },\n data: {\n label: `${i}`,\n },\n });\n \n // 生成 15 条边,连接相邻节点形成蛇形路径\n if (i < 15) {\n edges.push({\n source: `${i}`,\n target: `${i + 1}`,\n });\n }\n}\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: {\n nodes,\n edges,\n },\n node: {\n style: {\n size: 32,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n radius: 4,\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n ],\n});\n\ngraph.render();", + "duration": 28109, + "retrievedSkillIds": [ + "g6-behavior-drag-element", + "g6-behavior-canvas-nav", + "g6-pattern-flow-chart", + "g6-node-circle", + "g6-node-html" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1270, + "expectedLength": 558, + "similarity": 0.48605118869136865, + "extractedCode": "import { Graph } from '@antv/g6';\n\n// 生成 16 个节点和 15 条边,按蛇形布局排列\nconst nodes = [];\nconst edges = [];\nconst cols = 4;\nconst rowHeight = 80;\nconst colWidth = 100;\nconst startX = 50;\nconst startY = 50;\n\nfor (let i = 0; i < 16; i++) {\n const row = Math.floor(i / cols);\n const col = i % cols;\n \n // 蛇形排列:偶数行从左到右,奇数行从右到左\n let x;\n if (row % 2 === 0) {\n x = startX + col * colWidth;\n } else {\n x = startX + (cols - 1 - col) * colWidth;\n }\n const y = startY + row * rowHeight;\n \n nodes.push({\n id: `${i}`,\n style: {\n x: x,\n y: y,\n },\n data: {\n label: `${i}`,\n },\n });\n \n // 生成 15 条边,连接相邻节点形成蛇形路径\n if (i < 15) {\n edges.push({\n source: `${i}`,\n target: `${i + 1}`,\n });\n }\n}\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: {\n nodes,\n edges,\n },\n node: {\n style: {\n size: 32,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n radius: 4,\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "floor", + "push", + "push", + "Graph", + "render" + ], + "objectKeys": [ + "id", + "style", + "x", + "y", + "data", + "label", + "source", + "target", + "container", + "autoFit", + "data", + "node", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "style", + "stroke", + "lineWidth", + "radius", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-75", + "query": "根据描述绘制图表,使用 G6 创建一个图实例,设置容器和网格布局,并定义了五个节点和六条边的数据结构。节点显示其 ID 作为标签文本,同时启用了画布的缩放、拖拽、滚动等交互行为,最后执行渲染操作将图表展示出来。参考数据:[{\"id\":\"node1\"},{\"id\":\"node2\"},{\"id\":\"node3\"},{\"id\":\"node4\"},{\"id\":\"node5\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n layout: {\n type: 'grid',\n },\n data: {\n nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3' }, { id: 'node4' }, { id: 'node5' }],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node1', target: 'node3' },\n { source: 'node1', target: 'node4' },\n { source: 'node2', target: 'node3' },\n { source: 'node3', target: 'node4' },\n { source: 'node4', target: 'node5' },\n ],\n },\n node: {\n style: {\n labelText: (datum) => datum.id,\n },\n },\n behaviors: ['zoom-canvas', 'drag-canvas', 'scroll-canvas', 'optimize-viewport-transform'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node1' },\n { id: 'node2' },\n { id: 'node3' },\n { id: 'node4' },\n { id: 'node5' },\n ],\n edges: [\n { id: 'edge1', source: 'node1', target: 'node2' },\n { id: 'edge2', source: 'node1', target: 'node3' },\n { id: 'edge3', source: 'node2', target: 'node4' },\n { id: 'edge4', source: 'node3', target: 'node4' },\n { id: 'edge5', source: 'node4', target: 'node5' },\n { id: 'edge6', source: 'node2', target: 'node5' },\n ],\n },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n rowGap: 50,\n colGap: 50,\n },\n node: {\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n edge: {\n style: {\n stroke: '#aaa',\n lineWidth: 1.5,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'scroll-canvas'],\n});\n\ngraph.render();", + "duration": 11909, + "retrievedSkillIds": [ + "g6-behavior-canvas-nav", + "g6-core-graph-init", + "g6-node-html", + "g6-layout-grid", + "g6-node-rect" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1056, + "expectedLength": 706, + "similarity": 0.8792685851318945, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes: [\n { id: 'node1' },\n { id: 'node2' },\n { id: 'node3' },\n { id: 'node4' },\n { id: 'node5' },\n ],\n edges: [\n { id: 'edge1', source: 'node1', target: 'node2' },\n { id: 'edge2', source: 'node1', target: 'node3' },\n { id: 'edge3', source: 'node2', target: 'node4' },\n { id: 'edge4', source: 'node3', target: 'node4' },\n { id: 'edge5', source: 'node4', target: 'node5' },\n { id: 'edge6', source: 'node2', target: 'node5' },\n ],\n },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n rowGap: 50,\n colGap: 50,\n },\n node: {\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n edge: {\n style: {\n stroke: '#aaa',\n lineWidth: 1.5,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'scroll-canvas'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "container", + "data", + "nodes", + "id", + "id", + "id", + "id", + "id", + "edges", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "layout", + "type", + "rows", + "cols", + "rowGap", + "colGap", + "node", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "edge", + "style", + "stroke", + "lineWidth", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-76", + "query": "根据描述绘制图表,使用 G6 构建了一个力导向图,展示了包含多个集群的节点和它们之间的连接关系。节点根据所属集群着色,图表支持画布的缩放与拖拽交互。参考数据:[{\"id\":\"0\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"1\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"2\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"3\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"4\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"5\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"6\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"7\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"8\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"9\",\"data\":{\"cluster\":\"a\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"0\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"1\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"2\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"3\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"4\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"5\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"6\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"7\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"8\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"9\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"10\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"11\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"12\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"13\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"14\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"15\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"16\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"17\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"18\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"19\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"20\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"21\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"22\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"23\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"24\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"25\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"26\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"27\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"28\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"29\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"30\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"31\",\n \"data\": {\n \"cluster\": \"d\"\n }\n },\n {\n \"id\": \"32\",\n \"data\": {\n \"cluster\": \"d\"\n }\n },\n {\n \"id\": \"33\",\n \"data\": {\n \"cluster\": \"d\"\n }\n }\n ],\n \"edges\": [\n {\n \"source\": \"0\",\n \"target\": \"1\"\n },\n {\n \"source\": \"0\",\n \"target\": \"2\"\n },\n {\n \"source\": \"0\",\n \"target\": \"3\"\n },\n {\n \"source\": \"0\",\n \"target\": \"4\"\n },\n {\n \"source\": \"0\",\n \"target\": \"5\"\n },\n {\n \"source\": \"0\",\n \"target\": \"7\"\n },\n {\n \"source\": \"0\",\n \"target\": \"8\"\n },\n {\n \"source\": \"0\",\n \"target\": \"9\"\n },\n {\n \"source\": \"0\",\n \"target\": \"10\"\n },\n {\n \"source\": \"0\",\n \"target\": \"11\"\n },\n {\n \"source\": \"0\",\n \"target\": \"13\"\n },\n {\n \"source\": \"0\",\n \"target\": \"14\"\n },\n {\n \"source\": \"0\",\n \"target\": \"15\"\n },\n {\n \"source\": \"0\",\n \"target\": \"16\"\n },\n {\n \"source\": \"2\",\n \"target\": \"3\"\n },\n {\n \"source\": \"4\",\n \"target\": \"5\"\n },\n {\n \"source\": \"4\",\n \"target\": \"6\"\n },\n {\n \"source\": \"5\",\n \"target\": \"6\"\n },\n {\n \"source\": \"7\",\n \"target\": \"13\"\n },\n {\n \"source\": \"8\",\n \"target\": \"14\"\n },\n {\n \"source\": \"9\",\n \"target\": \"10\"\n },\n {\n \"source\": \"10\",\n \"target\": \"22\"\n },\n {\n \"source\": \"10\",\n \"target\": \"14\"\n },\n {\n \"source\": \"10\",\n \"target\": \"12\"\n },\n {\n \"source\": \"10\",\n \"target\": \"24\"\n },\n {\n \"source\": \"10\",\n \"target\": \"21\"\n },\n {\n \"source\": \"10\",\n \"target\": \"20\"\n },\n {\n \"source\": \"11\",\n \"target\": \"24\"\n },\n {\n \"source\": \"11\",\n \"target\": \"22\"\n },\n {\n \"source\": \"11\",\n \"target\": \"14\"\n },\n {\n \"source\": \"12\",\n \"target\": \"13\"\n },\n {\n \"source\": \"16\",\n \"target\": \"17\"\n },\n {\n \"source\": \"16\",\n \"target\": \"18\"\n },\n {\n \"source\": \"16\",\n \"target\": \"21\"\n },\n {\n \"source\": \"16\",\n \"target\": \"22\"\n },\n {\n \"source\": \"17\",\n \"target\": \"18\"\n },\n {\n \"source\": \"17\",\n \"target\": \"20\"\n },\n {\n \"source\": \"18\",\n \"target\": \"19\"\n },\n {\n \"source\": \"19\",\n \"target\": \"20\"\n },\n {\n \"source\": \"19\",\n \"target\": \"33\"\n },\n {\n \"source\": \"19\",\n \"target\": \"22\"\n },\n {\n \"source\": \"19\",\n \"target\": \"23\"\n },\n {\n \"source\": \"20\",\n \"target\": \"21\"\n },\n {\n \"source\": \"21\",\n \"target\": \"22\"\n },\n {\n \"source\": \"22\",\n \"target\": \"24\"\n },\n {\n \"source\": \"22\",\n \"target\": \"25\"\n },\n {\n \"source\": \"22\",\n \"target\": \"26\"\n },\n {\n \"source\": \"22\",\n \"target\": \"23\"\n },\n {\n \"source\": \"22\",\n \"target\": \"28\"\n },\n {\n \"source\": \"22\",\n \"target\": \"30\"\n },\n {\n \"source\": \"22\",\n \"target\": \"31\"\n },\n {\n \"source\": \"22\",\n \"target\": \"32\"\n },\n {\n \"source\": \"22\",\n \"target\": \"33\"\n },\n {\n \"source\": \"23\",\n \"target\": \"28\"\n },\n {\n \"source\": \"23\",\n \"target\": \"27\"\n },\n {\n \"source\": \"23\",\n \"target\": \"29\"\n },\n {\n \"source\": \"23\",\n \"target\": \"30\"\n },\n {\n \"source\": \"23\",\n \"target\": \"31\"\n },\n {\n \"source\": \"23\",\n \"target\": \"33\"\n },\n {\n \"source\": \"32\",\n \"target\": \"33\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n labelText: (d) => d.id,\n ports: [],\n },\n palette: {\n type: 'group',\n field: 'cluster',\n },\n },\n layout: {\n type: 'force',\n linkDistance: 50,\n clustering: true,\n nodeClusterBy: 'cluster',\n clusterNodeStrength: 70,\n },\n behaviors: ['zoom-canvas', 'drag-canvas'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0', data: { cluster: 'a' } },\n { id: '1', data: { cluster: 'a' } },\n { id: '2', data: { cluster: 'a' } },\n { id: '3', data: { cluster: 'a' } },\n { id: '4', data: { cluster: 'a' } },\n { id: '5', data: { cluster: 'a' } },\n { id: '6', data: { cluster: 'a' } },\n { id: '7', data: { cluster: 'a' } },\n { id: '8', data: { cluster: 'a' } },\n { id: '9', data: { cluster: 'a' } },\n { id: '10', data: { cluster: 'b' } },\n { id: '11', data: { cluster: 'b' } },\n { id: '12', data: { cluster: 'b' } },\n { id: '13', data: { cluster: 'b' } },\n { id: '14', data: { cluster: 'b' } },\n { id: '15', data: { cluster: 'c' } },\n { id: '16', data: { cluster: 'c' } },\n { id: '17', data: { cluster: 'c' } },\n { id: '18', data: { cluster: 'c' } },\n { id: '19', data: { cluster: 'c' } },\n ],\n edges: [\n { source: '0', target: '1' },\n { source: '0', target: '2' },\n { source: '1', target: '3' },\n { source: '2', target: '4' },\n { source: '3', target: '5' },\n { source: '4', target: '6' },\n { source: '5', target: '7' },\n { source: '6', target: '8' },\n { source: '7', target: '9' },\n { source: '8', target: '9' },\n { source: '10', target: '11' },\n { source: '10', target: '12' },\n { source: '11', target: '13' },\n { source: '12', target: '14' },\n { source: '13', target: '14' },\n { source: '15', target: '16' },\n { source: '15', target: '17' },\n { source: '16', target: '18' },\n { source: '17', target: '19' },\n { source: '18', target: '19' },\n { source: '0', target: '10' },\n { source: '5', target: '15' },\n { source: '9', target: '19' },\n ],\n};\n\nconst clusterColors = {\n a: '#1783FF',\n b: '#00C9C9',\n c: '#F08F56',\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'circle',\n style: {\n size: 32,\n fill: (d) => clusterColors[d.data.cluster] || '#999',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#e2e2e2',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'force',\n linkDistance: 120,\n gravity: 20,\n nodeStrength: 50,\n edgeStrength: 0.2,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "duration": 18868, + "retrievedSkillIds": [ + "g6-layout-force", + "g6-pattern-tree-graph", + "g6-layout-grid", + "g6-layout-mindmap", + "g6-node-circle" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2444, + "expectedLength": 6919, + "similarity": 0.6266436251920122, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0', data: { cluster: 'a' } },\n { id: '1', data: { cluster: 'a' } },\n { id: '2', data: { cluster: 'a' } },\n { id: '3', data: { cluster: 'a' } },\n { id: '4', data: { cluster: 'a' } },\n { id: '5', data: { cluster: 'a' } },\n { id: '6', data: { cluster: 'a' } },\n { id: '7', data: { cluster: 'a' } },\n { id: '8', data: { cluster: 'a' } },\n { id: '9', data: { cluster: 'a' } },\n { id: '10', data: { cluster: 'b' } },\n { id: '11', data: { cluster: 'b' } },\n { id: '12', data: { cluster: 'b' } },\n { id: '13', data: { cluster: 'b' } },\n { id: '14', data: { cluster: 'b' } },\n { id: '15', data: { cluster: 'c' } },\n { id: '16', data: { cluster: 'c' } },\n { id: '17', data: { cluster: 'c' } },\n { id: '18', data: { cluster: 'c' } },\n { id: '19', data: { cluster: 'c' } },\n ],\n edges: [\n { source: '0', target: '1' },\n { source: '0', target: '2' },\n { source: '1', target: '3' },\n { source: '2', target: '4' },\n { source: '3', target: '5' },\n { source: '4', target: '6' },\n { source: '5', target: '7' },\n { source: '6', target: '8' },\n { source: '7', target: '9' },\n { source: '8', target: '9' },\n { source: '10', target: '11' },\n { source: '10', target: '12' },\n { source: '11', target: '13' },\n { source: '12', target: '14' },\n { source: '13', target: '14' },\n { source: '15', target: '16' },\n { source: '15', target: '17' },\n { source: '16', target: '18' },\n { source: '17', target: '19' },\n { source: '18', target: '19' },\n { source: '0', target: '10' },\n { source: '5', target: '15' },\n { source: '9', target: '19' },\n ],\n};\n\nconst clusterColors = {\n a: '#1783FF',\n b: '#00C9C9',\n c: '#F08F56',\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'circle',\n style: {\n size: 32,\n fill: (d) => clusterColors[d.data.cluster] || '#999',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#e2e2e2',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'force',\n linkDistance: 120,\n gravity: 20,\n nodeStrength: 50,\n edgeStrength: 0.2,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "a", + "b", + "c", + "container", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "linkDistance", + "gravity", + "nodeStrength", + "edgeStrength", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-77", + "query": "根据描述绘制图表,使用 G6 构建一个横向脑图(思维导图),展示机器学习方法的分类结构。节点根据其在树中的位置显示在左侧或右侧,边采用水平立方贝塞尔曲线连接,支持画布拖拽、缩放以及节点展开收起交互。参考数据:[{\"id\":\"Modeling Methods\",\"children\":[{\"id\":\"Classification\",\"children\":[{\"id\":\"Logistic regression\"},{\"id\":\"Linear discriminant analysis\"},{\"id\":\"Rules\"},{\"id\":\"Decision trees\"},{\"id\":\"Naive Bayes\"},{\"id\":\"K nearest neighbor\"},{\"id\":\"Probabilistic neural network\"},{\"id\":\"Support vector machine\"}]},{\"id\":\"Consensus\",\"children\":[{\"id\":\"Models diversity\",\"children\":[{\"id\":\"Different initializations\"},{\"id\":\"Different parameter choices\"},{\"id\":\"Different architectures\"},{\"id\":\"Different modeling methods\"},{\"id\":\"Different training sets\"},{\"id\":\"Different feature sets\"}]},{\"id\":\"Methods\",\"children\":[{\"id\":\"Classifier selection\"},{\"id\":\"Classifier fusion\"}]},{\"id\":\"Common\",\"children\":[{\"id\":\"Bagging\"},{\"id\":\"Boosting\"},{\"id\":\"AdaBoost\"}]}]},{\"id\":\"Regression\",\"children\":[{\"id\":\"Multiple linear regression\"},{\"id\":\"Partial least squares\"},{\"id\":\"Multi-layer feedforward neural network\"},{\"id\":\"General regression neural network\"},{\"id\":\"Support vector regression\"}]}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst getNodeSide = (graph, datum) => {\n const parentData = graph.getParentData(datum.id, 'tree');\n if (!parentData) return 'center';\n return datum.style.x > parentData.style.x ? 'right' : 'left';\n};\n\nconst data = {\n \"id\": \"Modeling Methods\",\n \"children\": [\n {\n \"id\": \"Classification\",\n \"children\": [\n {\n \"id\": \"Logistic regression\"\n },\n {\n \"id\": \"Linear discriminant analysis\"\n },\n {\n \"id\": \"Rules\"\n },\n {\n \"id\": \"Decision trees\"\n },\n {\n \"id\": \"Naive Bayes\"\n },\n {\n \"id\": \"K nearest neighbor\"\n },\n {\n \"id\": \"Probabilistic neural network\"\n },\n {\n \"id\": \"Support vector machine\"\n }\n ]\n },\n {\n \"id\": \"Consensus\",\n \"children\": [\n {\n \"id\": \"Models diversity\",\n \"children\": [\n {\n \"id\": \"Different initializations\"\n },\n {\n \"id\": \"Different parameter choices\"\n },\n {\n \"id\": \"Different architectures\"\n },\n {\n \"id\": \"Different modeling methods\"\n },\n {\n \"id\": \"Different training sets\"\n },\n {\n \"id\": \"Different feature sets\"\n }\n ]\n },\n {\n \"id\": \"Methods\",\n \"children\": [\n {\n \"id\": \"Classifier selection\"\n },\n {\n \"id\": \"Classifier fusion\"\n }\n ]\n },\n {\n \"id\": \"Common\",\n \"children\": [\n {\n \"id\": \"Bagging\"\n },\n {\n \"id\": \"Boosting\"\n },\n {\n \"id\": \"AdaBoost\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"Regression\",\n \"children\": [\n {\n \"id\": \"Multiple linear regression\"\n },\n {\n \"id\": \"Partial least squares\"\n },\n {\n \"id\": \"Multi-layer feedforward neural network\"\n },\n {\n \"id\": \"General regression neural network\"\n },\n {\n \"id\": \"Support vector regression\"\n }\n ]\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: treeToGraphData(data),\n node: {\n style: {\n labelText: (d) => d.id,\n labelBackground: true,\n labelPlacement: function (d) {\n const side = getNodeSide(this, d);\n return side === 'center' ? 'right' : side;\n },\n ports: [{ placement: 'right' }, { placement: 'left' }],\n },\n animation: {\n enter: false,\n },\n },\n edge: {\n type: 'cubic-horizontal',\n animation: {\n enter: false,\n },\n },\n layout: {\n type: 'mindmap',\n direction: 'H',\n getHeight: () => 32,\n getWidth: () => 32,\n getVGap: () => 4,\n getHGap: () => 64,\n },\n behaviors: ['collapse-expand', 'drag-canvas', 'zoom-canvas'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n width: 1200,\n height: 800,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'rect',\n style: {\n size: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return [160, 44];\n if (depth === 1) return [140, 36];\n return [120, 32];\n },\n radius: 18,\n fill: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return '#1783FF';\n if (depth === 1) return '#e6f4ff';\n return '#f5f5f5';\n },\n stroke: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return '#1783FF';\n if (depth === 1) return '#91caff';\n return '#d9d9d9';\n },\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return '#fff';\n if (depth === 1) return '#0958d9';\n return '#333';\n },\n labelFontSize: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return 16;\n if (depth === 1) return 14;\n return 12;\n },\n labelFontWeight: (d) => (d.depth === 0 ? 'bold' : 'normal'),\n cursor: 'pointer',\n },\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'mindmap',\n direction: 'H',\n getWidth: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return 160;\n if (depth === 1) return 140;\n return 120;\n },\n getHeight: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return 44;\n if (depth === 1) return 36;\n return 32;\n },\n getHGap: () => 60,\n getVGap: () => 16,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true,\n },\n ],\n});\n\ngraph.render();", + "duration": 46399, + "retrievedSkillIds": [ + "g6-layout-mindmap", + "g6-pattern-tree-graph", + "g6-layout-force", + "g6-behavior-drag-element", + "g6-node-rect" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 3515, + "expectedLength": 3240, + "similarity": 0.5716093835242771, + "extractedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' },\n { id: 'Different architectures' },\n { id: 'Different modeling methods' },\n { id: 'Different training sets' },\n { id: 'Different feature sets' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n width: 1200,\n height: 800,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'rect',\n style: {\n size: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return [160, 44];\n if (depth === 1) return [140, 36];\n return [120, 32];\n },\n radius: 18,\n fill: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return '#1783FF';\n if (depth === 1) return '#e6f4ff';\n return '#f5f5f5';\n },\n stroke: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return '#1783FF';\n if (depth === 1) return '#91caff';\n return '#d9d9d9';\n },\n lineWidth: 1,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return '#fff';\n if (depth === 1) return '#0958d9';\n return '#333';\n },\n labelFontSize: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return 16;\n if (depth === 1) return 14;\n return 12;\n },\n labelFontWeight: (d) => (d.depth === 0 ? 'bold' : 'normal'),\n cursor: 'pointer',\n },\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#adc6ff',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'mindmap',\n direction: 'H',\n getWidth: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return 160;\n if (depth === 1) return 140;\n return 120;\n },\n getHeight: (d) => {\n const depth = d.depth || 0;\n if (depth === 0) return 44;\n if (depth === 1) return 36;\n return 32;\n },\n getHGap: () => 60,\n getVGap: () => 16,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'collapse-expand',\n trigger: 'click',\n animation: true,\n },\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "treeToGraphData" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "treeToGraphData", + "render" + ], + "objectKeys": [ + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "container", + "width", + "height", + "autoFit", + "data", + "node", + "type", + "style", + "size", + "radius", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "labelFontWeight", + "cursor", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "direction", + "getWidth", + "getHeight", + "getHGap", + "getVGap", + "behaviors", + "type", + "trigger", + "animation" + ], + "stringLiterals": [], + "apiPatterns": [ + "view.children", + "new Graph" + ] + } + } + }, + { + "id": "case-78", + "query": "根据描述绘制图表,使用 AntV G6 渲染一个径向树图,展示机器学习建模方法的层次结构。数据以树形结构组织,包含分类、回归、共识等主要方法及其子项。支持画布拖拽、缩放和节点拖动交互。参考数据:[{\"id\":\"Modeling Methods\",\"children\":[{\"id\":\"Classification\",\"children\":[{\"id\":\"Logistic regression\"},{\"id\":\"Linear discriminant analysis\"},{\"id\":\"Rules\"},{\"id\":\"Decision trees\"},{\"id\":\"Naive Bayes\"},{\"id\":\"K nearest neighbor\"},{\"id\":\"Probabilistic neural network\"},{\"id\":\"Support vector machine\"}]},{\"id\":\"Consensus\",\"children\":[{\"id\":\"Models diversity\",\"children\":[{\"id\":\"Different initializations\"},{\"id\":\"Different parameter choices\"}]},{\"id\":\"Methods\",\"children\":[{\"id\":\"Classifier selection\"},{\"id\":\"Classifier fusion\"}]},{\"id\":\"Common\",\"children\":[{\"id\":\"Bagging\"},{\"id\":\"Boosting\"},{\"id\":\"AdaBoost\"}]}]},{\"id\":\"Regression\",\"children\":[{\"id\":\"Multiple linear regression\"},{\"id\":\"Partial least squares\"},{\"id\":\"Multi-layer feedforward neural network\"},{\"id\":\"General regression neural network\"},{\"id\":\"Support vector regression\"}]}]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst data = {\n \"id\": \"Modeling Methods\",\n \"children\": [\n {\n \"id\": \"Classification\",\n \"children\": [\n {\n \"id\": \"Logistic regression\"\n },\n {\n \"id\": \"Linear discriminant analysis\"\n },\n {\n \"id\": \"Rules\"\n },\n {\n \"id\": \"Decision trees\"\n },\n {\n \"id\": \"Naive Bayes\"\n },\n {\n \"id\": \"K nearest neighbor\"\n },\n {\n \"id\": \"Probabilistic neural network\"\n },\n {\n \"id\": \"Support vector machine\"\n }\n ]\n },\n {\n \"id\": \"Consensus\",\n \"children\": [\n {\n \"id\": \"Models diversity\",\n \"children\": [\n {\n \"id\": \"Different initializations\"\n },\n {\n \"id\": \"Different parameter choices\"\n },\n {\n \"id\": \"Different architectures\"\n },\n {\n \"id\": \"Different modeling methods\"\n },\n {\n \"id\": \"Different training sets\"\n },\n {\n \"id\": \"Different feature sets\"\n }\n ]\n },\n {\n \"id\": \"Methods\",\n \"children\": [\n {\n \"id\": \"Classifier selection\"\n },\n {\n \"id\": \"Classifier fusion\"\n }\n ]\n },\n {\n \"id\": \"Common\",\n \"children\": [\n {\n \"id\": \"Bagging\"\n },\n {\n \"id\": \"Boosting\"\n },\n {\n \"id\": \"AdaBoost\"\n }\n ]\n }\n ]\n },\n {\n \"id\": \"Regression\",\n \"children\": [\n {\n \"id\": \"Multiple linear regression\"\n },\n {\n \"id\": \"Partial least squares\"\n },\n {\n \"id\": \"Multi-layer feedforward neural network\"\n },\n {\n \"id\": \"General regression neural network\"\n },\n {\n \"id\": \"Support vector regression\"\n }\n ]\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: treeToGraphData(data),\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n node: {\n style: {\n labelText: (d) => d.id,\n labelBackground: true,\n },\n animation: {\n enter: false,\n },\n },\n layout: {\n type: 'dendrogram',\n radial: true,\n nodeSep: 40,\n rankSep: 140,\n },\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'circle',\n style: {\n size: (d) => {\n const depth = d.depth;\n if (depth === 0) return 40;\n if (depth === 1) return 28;\n if (depth === 2) return 22;\n return 18;\n },\n fill: (d) => {\n const depth = d.depth;\n const colors = ['#1677ff', '#52c41a', '#fa8c16', '#f5222d', '#722ed1'];\n return colors[depth] || '#8c8c8c';\n },\n stroke: '#ffffff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: (d) => d.depth === 0 ? 13 : 10,\n labelMaxWidth: 90,\n cursor: 'pointer'\n }\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#bfbfbf',\n lineWidth: 1.5,\n opacity: 0.8\n }\n },\n layout: {\n type: 'compact-box',\n radial: true,\n direction: 'LR',\n getHeight: () => 20,\n getWidth: () => 20,\n getVGap: () => 12,\n getHGap: () => 100\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n 'collapse-expand'\n ]\n});\n\ngraph.render();", + "duration": 34810, + "retrievedSkillIds": [ + "g6-pattern-tree-graph", + "g6-layout-mindmap", + "g6-node-rect", + "g6-behavior-drag-element", + "g6-layout-force" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2569, + "expectedLength": 2684, + "similarity": 0.6991184387014671, + "extractedCode": "import { Graph, treeToGraphData } from '@antv/g6';\n\nconst treeData = {\n id: 'Modeling Methods',\n children: [\n {\n id: 'Classification',\n children: [\n { id: 'Logistic regression' },\n { id: 'Linear discriminant analysis' },\n { id: 'Rules' },\n { id: 'Decision trees' },\n { id: 'Naive Bayes' },\n { id: 'K nearest neighbor' },\n { id: 'Probabilistic neural network' },\n { id: 'Support vector machine' }\n ]\n },\n {\n id: 'Consensus',\n children: [\n {\n id: 'Models diversity',\n children: [\n { id: 'Different initializations' },\n { id: 'Different parameter choices' }\n ]\n },\n {\n id: 'Methods',\n children: [\n { id: 'Classifier selection' },\n { id: 'Classifier fusion' }\n ]\n },\n {\n id: 'Common',\n children: [\n { id: 'Bagging' },\n { id: 'Boosting' },\n { id: 'AdaBoost' }\n ]\n }\n ]\n },\n {\n id: 'Regression',\n children: [\n { id: 'Multiple linear regression' },\n { id: 'Partial least squares' },\n { id: 'Multi-layer feedforward neural network' },\n { id: 'General regression neural network' },\n { id: 'Support vector regression' }\n ]\n }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n autoFit: 'view',\n data: treeToGraphData(treeData),\n node: {\n type: 'circle',\n style: {\n size: (d) => {\n const depth = d.depth;\n if (depth === 0) return 40;\n if (depth === 1) return 28;\n if (depth === 2) return 22;\n return 18;\n },\n fill: (d) => {\n const depth = d.depth;\n const colors = ['#1677ff', '#52c41a', '#fa8c16', '#f5222d', '#722ed1'];\n return colors[depth] || '#8c8c8c';\n },\n stroke: '#ffffff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: (d) => d.depth === 0 ? 13 : 10,\n labelMaxWidth: 90,\n cursor: 'pointer'\n }\n },\n edge: {\n type: 'cubic-horizontal',\n style: {\n stroke: '#bfbfbf',\n lineWidth: 1.5,\n opacity: 0.8\n }\n },\n layout: {\n type: 'compact-box',\n radial: true,\n direction: 'LR',\n getHeight: () => 20,\n getWidth: () => 20,\n getVGap: () => 12,\n getHGap: () => 100\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n 'collapse-expand'\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "treeToGraphData" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "treeToGraphData", + "render" + ], + "objectKeys": [ + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "children", + "id", + "children", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "children", + "id", + "id", + "id", + "id", + "id", + "container", + "autoFit", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "13", + "labelMaxWidth", + "cursor", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "opacity", + "layout", + "type", + "radial", + "direction", + "getHeight", + "getWidth", + "getVGap", + "getHGap", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "view.children", + "new Graph" + ] + } + } + }, + { + "id": "case-79", + "query": "根据描述绘制图表,使用 G6 图表库创建一个力导向图,展示节点和边的关系,其中节点根据 cluster 属性分组,布局采用 Fruchterman 算法,并支持画布拖拽和元素拖拽交互。参考数据:[{\"id\":\"0\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"1\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"2\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"3\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"4\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"5\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"6\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"7\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"8\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"9\",\"data\":{\"cluster\":\"a\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"0\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"1\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"2\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"3\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"4\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"5\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"6\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"7\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"8\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"9\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"10\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"11\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"12\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"13\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"14\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"15\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"16\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"17\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"18\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"19\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"20\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"21\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"22\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"23\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"24\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"25\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"26\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"27\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"28\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"29\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"30\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"31\",\n \"data\": {\n \"cluster\": \"d\"\n }\n },\n {\n \"id\": \"32\",\n \"data\": {\n \"cluster\": \"d\"\n }\n },\n {\n \"id\": \"33\",\n \"data\": {\n \"cluster\": \"d\"\n }\n }\n ],\n \"edges\": [\n {\n \"source\": \"0\",\n \"target\": \"1\"\n },\n {\n \"source\": \"0\",\n \"target\": \"2\"\n },\n {\n \"source\": \"0\",\n \"target\": \"3\"\n },\n {\n \"source\": \"0\",\n \"target\": \"4\"\n },\n {\n \"source\": \"0\",\n \"target\": \"5\"\n },\n {\n \"source\": \"0\",\n \"target\": \"7\"\n },\n {\n \"source\": \"0\",\n \"target\": \"8\"\n },\n {\n \"source\": \"0\",\n \"target\": \"9\"\n },\n {\n \"source\": \"0\",\n \"target\": \"10\"\n },\n {\n \"source\": \"0\",\n \"target\": \"11\"\n },\n {\n \"source\": \"0\",\n \"target\": \"13\"\n },\n {\n \"source\": \"0\",\n \"target\": \"14\"\n },\n {\n \"source\": \"0\",\n \"target\": \"15\"\n },\n {\n \"source\": \"0\",\n \"target\": \"16\"\n },\n {\n \"source\": \"2\",\n \"target\": \"3\"\n },\n {\n \"source\": \"4\",\n \"target\": \"5\"\n },\n {\n \"source\": \"4\",\n \"target\": \"6\"\n },\n {\n \"source\": \"5\",\n \"target\": \"6\"\n },\n {\n \"source\": \"7\",\n \"target\": \"13\"\n },\n {\n \"source\": \"8\",\n \"target\": \"14\"\n },\n {\n \"source\": \"9\",\n \"target\": \"10\"\n },\n {\n \"source\": \"10\",\n \"target\": \"22\"\n },\n {\n \"source\": \"10\",\n \"target\": \"14\"\n },\n {\n \"source\": \"10\",\n \"target\": \"12\"\n },\n {\n \"source\": \"10\",\n \"target\": \"24\"\n },\n {\n \"source\": \"10\",\n \"target\": \"21\"\n },\n {\n \"source\": \"10\",\n \"target\": \"20\"\n },\n {\n \"source\": \"11\",\n \"target\": \"24\"\n },\n {\n \"source\": \"11\",\n \"target\": \"22\"\n },\n {\n \"source\": \"11\",\n \"target\": \"14\"\n },\n {\n \"source\": \"12\",\n \"target\": \"13\"\n },\n {\n \"source\": \"16\",\n \"target\": \"17\"\n },\n {\n \"source\": \"16\",\n \"target\": \"18\"\n },\n {\n \"source\": \"16\",\n \"target\": \"21\"\n },\n {\n \"source\": \"16\",\n \"target\": \"22\"\n },\n {\n \"source\": \"17\",\n \"target\": \"18\"\n },\n {\n \"source\": \"17\",\n \"target\": \"20\"\n },\n {\n \"source\": \"18\",\n \"target\": \"19\"\n },\n {\n \"source\": \"19\",\n \"target\": \"20\"\n },\n {\n \"source\": \"19\",\n \"target\": \"33\"\n },\n {\n \"source\": \"19\",\n \"target\": \"22\"\n },\n {\n \"source\": \"19\",\n \"target\": \"23\"\n },\n {\n \"source\": \"20\",\n \"target\": \"21\"\n },\n {\n \"source\": \"21\",\n \"target\": \"22\"\n },\n {\n \"source\": \"22\",\n \"target\": \"24\"\n },\n {\n \"source\": \"22\",\n \"target\": \"25\"\n },\n {\n \"source\": \"22\",\n \"target\": \"26\"\n },\n {\n \"source\": \"22\",\n \"target\": \"23\"\n },\n {\n \"source\": \"22\",\n \"target\": \"28\"\n },\n {\n \"source\": \"22\",\n \"target\": \"30\"\n },\n {\n \"source\": \"22\",\n \"target\": \"31\"\n },\n {\n \"source\": \"22\",\n \"target\": \"32\"\n },\n {\n \"source\": \"22\",\n \"target\": \"33\"\n },\n {\n \"source\": \"23\",\n \"target\": \"28\"\n },\n {\n \"source\": \"23\",\n \"target\": \"27\"\n },\n {\n \"source\": \"23\",\n \"target\": \"29\"\n },\n {\n \"source\": \"23\",\n \"target\": \"30\"\n },\n {\n \"source\": \"23\",\n \"target\": \"31\"\n },\n {\n \"source\": \"23\",\n \"target\": \"33\"\n },\n {\n \"source\": \"32\",\n \"target\": \"33\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'fruchterman',\n gravity: 5,\n speed: 5,\n animation: true,\n },\n node: {\n style: {\n labelFill: '#fff',\n labelPlacement: 'center',\n labelText: (d) => d.id,\n },\n },\n behaviors: ['drag-canvas', 'drag-element'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [\n { id: '0', data: { cluster: 'a' } },\n { id: '1', data: { cluster: 'a' } },\n { id: '2', data: { cluster: 'a' } },\n { id: '3', data: { cluster: 'a' } },\n { id: '4', data: { cluster: 'a' } },\n { id: '5', data: { cluster: 'a' } },\n { id: '6', data: { cluster: 'a' } },\n { id: '7', data: { cluster: 'a' } },\n { id: '8', data: { cluster: 'a' } },\n { id: '9', data: { cluster: 'a' } }\n];\n\nconst edges = [];\nconst edgeSet = new Set();\nfor (let i = 0; i < nodes.length; i++) {\n const numEdges = 1 + Math.floor(Math.random() * 2);\n for (let j = 0; j < numEdges; j++) {\n const targetIndex = Math.floor(Math.random() * nodes.length);\n if (targetIndex !== i) {\n const source = nodes[i].id;\n const target = nodes[targetIndex].id;\n const key = `${source}-${target}`;\n const reverseKey = `${target}-${source}`;\n if (!edgeSet.has(key) && !edgeSet.has(reverseKey)) {\n edgeSet.add(key);\n edges.push({ source, target });\n }\n }\n }\n}\n\nconst clusterColors = {\n a: '#1783FF',\n b: '#00C9C9',\n c: '#F08F56',\n d: '#F5222D'\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: {\n nodes,\n edges\n },\n node: {\n type: 'circle',\n style: {\n size: 32,\n fill: (d) => clusterColors[d.data?.cluster] || '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#bfbfbf',\n lineWidth: 1,\n opacity: 0.6\n }\n },\n layout: {\n type: 'fruchterman',\n gravity: 5,\n speed: 5,\n clustering: true,\n clusterGravity: 8,\n maxIteration: 1000\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force'\n ]\n});\n\ngraph.render();", + "duration": 22383, + "retrievedSkillIds": [ + "g6-behavior-drag-element", + "g6-layout-force", + "g6-layout-mindmap", + "g6-layout-grid", + "g6-layout-dagre" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1874, + "expectedLength": 6847, + "similarity": 0.5274967061923583, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [\n { id: '0', data: { cluster: 'a' } },\n { id: '1', data: { cluster: 'a' } },\n { id: '2', data: { cluster: 'a' } },\n { id: '3', data: { cluster: 'a' } },\n { id: '4', data: { cluster: 'a' } },\n { id: '5', data: { cluster: 'a' } },\n { id: '6', data: { cluster: 'a' } },\n { id: '7', data: { cluster: 'a' } },\n { id: '8', data: { cluster: 'a' } },\n { id: '9', data: { cluster: 'a' } }\n];\n\nconst edges = [];\nconst edgeSet = new Set();\nfor (let i = 0; i < nodes.length; i++) {\n const numEdges = 1 + Math.floor(Math.random() * 2);\n for (let j = 0; j < numEdges; j++) {\n const targetIndex = Math.floor(Math.random() * nodes.length);\n if (targetIndex !== i) {\n const source = nodes[i].id;\n const target = nodes[targetIndex].id;\n const key = `${source}-${target}`;\n const reverseKey = `${target}-${source}`;\n if (!edgeSet.has(key) && !edgeSet.has(reverseKey)) {\n edgeSet.add(key);\n edges.push({ source, target });\n }\n }\n }\n}\n\nconst clusterColors = {\n a: '#1783FF',\n b: '#00C9C9',\n c: '#F08F56',\n d: '#F5222D'\n};\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: {\n nodes,\n edges\n },\n node: {\n type: 'circle',\n style: {\n size: 32,\n fill: (d) => clusterColors[d.data?.cluster] || '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#bfbfbf',\n lineWidth: 1,\n opacity: 0.6\n }\n },\n layout: {\n type: 'fruchterman',\n gravity: 5,\n speed: 5,\n clustering: true,\n clusterGravity: 8,\n maxIteration: 1000\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force'\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Set", + "floor", + "random", + "floor", + "random", + "has", + "has", + "add", + "push", + "Graph", + "render" + ], + "objectKeys": [ + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "a", + "b", + "c", + "d", + "container", + "autoFit", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "opacity", + "layout", + "type", + "gravity", + "speed", + "clustering", + "clusterGravity", + "maxIteration", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph" + ] + } + } + }, + { + "id": "case-80", + "query": "根据描述绘制图表,使用 G6 图表库渲染一个力导向图,展示公司与个人之间的关系网络。数据经过格式化处理,节点包括公司和个人类型,边表示雇佣、法人或投资关系。启用防止节点重叠的力导向布局,并关闭了动画效果。参考数据:[{\"id\":\"27800994\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"7e023446a248dd2e873ede3a08eeadc5\",\"registCapi\":\"5000.0\",\"name\":\"成都倍达资产管理有限公司\",\"econKind\":\"有限责任公司(非自然人投资或控股的法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"成都倍达资产管理有限公司\",\"degree\":4},{\"id\":\"13956312\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"3fc8e6b450a351dffaf97ebba7bd5675\",\"registCapi\":\"21000.0\",\"name\":\"小米科技(武汉)有限公司\",\"econKind\":\"有限责任公司(外商投资企业法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"小米科技(武汉)有限公司\",\"degree\":4},{\"id\":\"71848026\",\"labels\":[\"Person\"],\"properties\":{\"keyNo\":\"p26b3775f4ea1307e28aef63a6cf2cb8\",\"role\":\"自然人股东\",\"name\":\"刘敏\"},\"type\":\"Person\",\"name\":\"刘敏\",\"degree\":5},{\"id\":\"44830398\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"cac4c7d67320964eddebc475fa66d3f9\",\"registCapi\":\"1000.0\",\"name\":\"北京金山数字娱乐科技有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"北京金山数字娱乐科技有限公司\",\"degree\":4},{\"id\":\"47387343\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"d64da78333777354bf3634e371d736a6\",\"registCapi\":\"0.0\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"econKind\":\"有限合伙企业\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"degree\":3},{\"id\":\"26295729\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"77472fbe731c1b8f4bfc2723f3b65415\",\"registCapi\":\"21550.0\",\"name\":\"珠海金山软件有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"珠海金山软件有限公司\",\"degree\":5},{\"id\":\"24305985\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"6e62fda57887baa0909cb79bef96b07c\",\"registCapi\":\"5000.0\",\"name\":\"小米影业有限责任公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"小米影业有限责任公司\",\"degree\":10},{\"id\":\"9036981\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"29328112375d07205ab125dcb575d59b\",\"registCapi\":\"1000.0\",\"name\":\"图扑尚贸易(上海)有限公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"图扑尚贸易(上海)有限公司\",\"degree\":3},{\"id\":\"53463922\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"f1ba2f7dfcecba582edbf89b03009980\",\"registCapi\":\"43757.56\",\"name\":\"广州华凌空调设备有限公司\",\"econKind\":\"其他有限责任公司\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广州华凌空调设备有限公司\",\"degree\":4},{\"id\":\"2791598\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"0cc68eb8e8f9d0445d1916a9872d207c\",\"registCapi\":\"6926.0\",\"name\":\"广东美的生活电器制造有限公司\",\"econKind\":\"有限责任公司(台港澳与境内合资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广东美的生活电器制造有限公司\",\"degree\":4}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst format = (data) => {\n const { nodes, edges } = data;\n return {\n nodes: nodes.map(({ id, ...node }) => ({ id, data: node })),\n edges: edges.map(({ id, source, target, ...edge }) => ({ id, source, target, data: edge })),\n };\n};\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"27800994\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"7e023446a248dd2e873ede3a08eeadc5\",\n \"registCapi\": \"5000.0\",\n \"name\": \"成都倍达资产管理有限公司\",\n \"econKind\": \"有限责任公司(非自然人投资或控股的法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"成都倍达资产管理有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"13956312\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"3fc8e6b450a351dffaf97ebba7bd5675\",\n \"registCapi\": \"21000.0\",\n \"name\": \"小米科技(武汉)有限公司\",\n \"econKind\": \"有限责任公司(外商投资企业法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"小米科技(武汉)有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"71848026\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p26b3775f4ea1307e28aef63a6cf2cb8\",\n \"role\": \"自然人股东\",\n \"name\": \"刘敏\"\n },\n \"type\": \"Person\",\n \"name\": \"刘敏\",\n \"degree\": 5\n },\n {\n \"id\": \"44830398\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"cac4c7d67320964eddebc475fa66d3f9\",\n \"registCapi\": \"1000.0\",\n \"name\": \"北京金山数字娱乐科技有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京金山数字娱乐科技有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"47387343\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"d64da78333777354bf3634e371d736a6\",\n \"registCapi\": \"0.0\",\n \"name\": \"上海晨熹创业投资中心(有限合伙)\",\n \"econKind\": \"有限合伙企业\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"上海晨熹创业投资中心(有限合伙)\",\n \"degree\": 3\n },\n {\n \"id\": \"26295729\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"77472fbe731c1b8f4bfc2723f3b65415\",\n \"registCapi\": \"21550.0\",\n \"name\": \"珠海金山软件有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"珠海金山软件有限公司\",\n \"degree\": 5\n },\n {\n \"id\": \"24305985\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"6e62fda57887baa0909cb79bef96b07c\",\n \"registCapi\": \"5000.0\",\n \"name\": \"小米影业有限责任公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"小米影业有限责任公司\",\n \"degree\": 10\n },\n {\n \"id\": \"9036981\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"29328112375d07205ab125dcb575d59b\",\n \"registCapi\": \"1000.0\",\n \"name\": \"图扑尚贸易(上海)有限公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"图扑尚贸易(上海)有限公司\",\n \"degree\": 3\n },\n {\n \"id\": \"53463922\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"f1ba2f7dfcecba582edbf89b03009980\",\n \"registCapi\": \"43757.56\",\n \"name\": \"广州华凌空调设备有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"广州华凌空调设备有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"2791598\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"0cc68eb8e8f9d0445d1916a9872d207c\",\n \"registCapi\": \"6926.0\",\n \"name\": \"广东美的生活电器制造有限公司\",\n \"econKind\": \"有限责任公司(台港澳与境内合资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"广东美的生活电器制造有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"52763524\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"ee92647afee609db9b431e4234557374\",\n \"registCapi\": \"200.0\",\n \"name\": \"北京创派力量科技有限公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京创派力量科技有限公司\",\n \"degree\": 5\n },\n {\n \"id\": \"50182662\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"e2f02283910a7f2c6759440681edf7eb\",\n \"registCapi\": \"534.4822\",\n \"name\": \"西安蜂语信息科技有限公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"西安蜂语信息科技有限公司\",\n \"degree\": 2\n },\n {\n \"id\": \"40184690\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"b5cede7322c0f76d5adfe81632de5d21\",\n \"registCapi\": \"44000.0\",\n \"name\": \"上海新飞凡电子商务有限公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股的法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"上海新飞凡电子商务有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"9323996\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"2a821429194d8afebf174c226dee21bb\",\n \"registCapi\": \"560.0\",\n \"name\": \"珠海金山快快科技有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"注销\"\n },\n \"type\": \"Company\",\n \"name\": \"珠海金山快快科技有限公司\",\n \"degree\": 3\n },\n {\n \"id\": \"1471865\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"06c739fdd7af2d3a52139a939196165f\",\n \"registCapi\": \"50.0\",\n \"name\": \"深圳英鹏玩聚互娱科技有限公司\",\n \"econKind\": \"有限责任公司\",\n \"status\": \"注销\"\n },\n \"type\": \"Company\",\n \"name\": \"深圳英鹏玩聚互娱科技有限公司\",\n \"degree\": 9\n },\n {\n \"id\": \"16406890\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"4acdaf5e031fc214abdb6287e9a9276f\",\n \"registCapi\": \"45000.0\",\n \"name\": \"重庆市小米小额贷款有限公司\",\n \"econKind\": \"有限责任公司(台港澳法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"重庆市小米小额贷款有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"46583563\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"d2adf1c22178335067fa214da6cffab5\",\n \"registCapi\": \"5000.0\",\n \"name\": \"小米信用管理有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"小米信用管理有限公司\",\n \"degree\": 7\n },\n {\n \"id\": \"61422172\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p077472cd738bf6c70d757a42c6acaf4\",\n \"role\": \"\",\n \"name\": \"林斌\"\n },\n \"type\": \"Person\",\n \"name\": \"林斌\",\n \"degree\": 10\n },\n {\n \"id\": \"40800362\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"b894dee03e3d201af50ab60638820740\",\n \"registCapi\": \"2592.0\",\n \"name\": \"合肥荣事达洗衣机有限公司\",\n \"econKind\": \"有限责任公司(中外合资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"合肥荣事达洗衣机有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"50714910\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"e558d7a7bf37fc3b8ccfcd7e7a85b7cc\",\n \"registCapi\": \"42000.0\",\n \"name\": \"广东美的微波炉制造有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"广东美的微波炉制造有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"53320045\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"f1141d6decb76ff22e70e5f8b656b68c\",\n \"registCapi\": \"2700.0\",\n \"name\": \"北京小米电子产品有限公司\",\n \"econKind\": \"有限责任公司(台港澳法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京小米电子产品有限公司\",\n \"degree\": 6\n },\n {\n \"id\": \"93817\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"006f4aa686287cb359b449ce6ce347d1\",\n \"registCapi\": \"200000.0\",\n \"name\": \"四川银米科技有限责任公司\",\n \"econKind\": \"有限责任公司(非自然人投资或控股的法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"四川银米科技有限责任公司\",\n \"degree\": 5\n },\n {\n \"id\": \"26623797\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"78bd7f41ad3bd438e8b63e2a2b5ae644\",\n \"registCapi\": \"1135.9266\",\n \"name\": \"舒可士(深圳)科技有限公司\",\n \"econKind\": \"有限责任公司(台港澳与境内合资)外资比例低于25%\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"舒可士(深圳)科技有限公司\",\n \"degree\": 3\n },\n {\n \"id\": \"5154548\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"17773b52b0164d5d0c39a14cbc1d12c8\",\n \"registCapi\": \"28800.0\",\n \"name\": \"北京小米移动软件有限公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京小米移动软件有限公司\",\n \"degree\": 6\n },\n {\n \"id\": \"42426456\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"bfeb8fa5f2ef0a07606c0a7aa4253621\",\n \"registCapi\": \"8000.0\",\n \"name\": \"邯郸美的制冷设备有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"邯郸美的制冷设备有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"67299081\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p1910534b4ae98fea35ddbeb1d61cd44\",\n \"role\": \"执行董事\",\n \"name\": \"雷军\"\n },\n \"type\": \"Person\",\n \"name\": \"雷军\",\n \"degree\": 57\n },\n {\n \"id\": \"74635102\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p2f10e89de841bdc628df613420b0040\",\n \"role\": \"\",\n \"name\": \"朱凤涛\"\n },\n \"type\": \"Person\",\n \"name\": \"朱凤涛\",\n \"degree\": 2\n },\n {\n \"id\": \"653142\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"02ff6e6bed57a655db1bc67dfa829984\",\n \"registCapi\": \"100000.0\",\n \"name\": \"广东小米科技有限责任公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"广东小米科技有限责任公司\",\n \"degree\": 5\n },\n {\n \"id\": \"9296707\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"2a620cfbe8a8678ce9bb3312da633871\",\n \"registCapi\": \"931250.6158\",\n \"name\": \"上海万达网络金融服务有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"上海万达网络金融服务有限公司\",\n \"degree\": 5\n },\n {\n \"id\": \"95397448\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p6d7e0b8f1d5f085cef08c25afc20309\",\n \"role\": \"副董事长\",\n \"name\": \"刘德\"\n },\n \"type\": \"Person\",\n \"name\": \"刘德\",\n \"degree\": 26\n },\n {\n \"id\": \"101641703\",\n \"labels\": [\n \"Person\"\n ],\n \"properties\": {\n \"keyNo\": \"p804a400c7a446c6eb28cfa455ffc91f\",\n \"role\": \"自然人股东\",\n \"name\": \"张震阳\"\n },\n \"type\": \"Person\",\n \"name\": \"张震阳\",\n \"degree\": 3\n },\n {\n \"id\": \"21768893\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"630537e4747092679451cea00432584b\",\n \"registCapi\": \"67650.0\",\n \"name\": \"安得智联科技股份有限公司\",\n \"econKind\": \"股份有限公司(台港澳与境内合资、未上市)\",\n \"status\": \"存续\"\n },\n \"type\": \"Company\",\n \"name\": \"安得智联科技股份有限公司\",\n \"degree\": 4\n },\n {\n \"id\": \"26627684\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"78c200dd24178853e4a985d918c6bc2e\",\n \"registCapi\": \"500000.0\",\n \"name\": \"中央汇金资产管理有限责任公司\",\n \"econKind\": \"有限责任公司(法人独资)\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"中央汇金资产管理有限责任公司\",\n \"degree\": 3\n },\n {\n \"id\": \"38315442\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"ad622acd512e8f07fb287627b6901a7d\",\n \"registCapi\": \"100.0\",\n \"name\": \"西藏小米科技有限责任公司\",\n \"econKind\": \"有限责任公司(自然人投资或控股的法人独资)\",\n \"status\": \"注销\"\n },\n \"type\": \"Company\",\n \"name\": \"西藏小米科技有限责任公司\",\n \"degree\": 4\n },\n {\n \"id\": \"30954022\",\n \"labels\": [\n \"Company\"\n ],\n \"properties\": {\n \"keyNo\": \"8c3516cd93679b88af8eb26e8ec8e86b\",\n \"registCapi\": \"1000.0\",\n \"name\": \"北京金山软件有限公司\",\n \"econKind\": \"其他有限责任公司\",\n \"status\": \"在业\"\n },\n \"type\": \"Company\",\n \"name\": \"北京金山软件有限公司\",\n \"degree\": 4\n }\n ],\n \"edges\": [\n {\n \"id\": \"202765330\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"30954022\"\n },\n {\n \"id\": \"211823788\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事长\"\n },\n \"source\": \"67299081\",\n \"target\": \"93817\"\n },\n {\n \"id\": \"211823791\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"93817\"\n },\n {\n \"id\": \"131295128\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"67299081\",\n \"target\": \"38315442\"\n },\n {\n \"id\": \"256349818\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"9036981\"\n },\n {\n \"id\": \"180159485\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"46583563\"\n },\n {\n \"id\": \"180159486\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事长\"\n },\n \"source\": \"67299081\",\n \"target\": \"46583563\"\n },\n {\n \"id\": \"4981020\",\n \"type\": \"INVEST\",\n \"properties\": {\n \"role\": \"企业法人\",\n \"stockPercent\": 100,\n \"shouldCapi\": 44000\n },\n \"source\": \"9296707\",\n \"target\": \"40184690\"\n },\n {\n \"id\": \"121849387\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"67299081\",\n \"target\": \"93817\"\n },\n {\n \"id\": \"151712616\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"27800994\"\n },\n {\n \"id\": \"160158693\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"16406890\"\n },\n {\n \"id\": \"160158692\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"61422172\",\n \"target\": \"16406890\"\n },\n {\n \"id\": \"110517278\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"95397448\",\n \"target\": \"53320045\"\n },\n {\n \"id\": \"130289005\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"67299081\",\n \"target\": \"13956312\"\n },\n {\n \"id\": \"241050886\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"44830398\"\n },\n {\n \"id\": \"233524846\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"26295729\"\n },\n {\n \"id\": \"97660530\",\n \"type\": \"LEGAL\",\n \"properties\": {\n \"role\": \"\"\n },\n \"source\": \"67299081\",\n \"target\": \"653142\"\n },\n {\n \"id\": \"170221103\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事,经理\"\n },\n \"source\": \"74635102\",\n \"target\": \"50714910\"\n },\n {\n \"id\": \"188473211\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"61422172\",\n \"target\": \"53320045\"\n },\n {\n \"id\": \"188473209\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事长\"\n },\n \"source\": \"67299081\",\n \"target\": \"53320045\"\n },\n {\n \"id\": \"188473212\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"总经理\"\n },\n \"source\": \"95397448\",\n \"target\": \"53320045\"\n },\n {\n \"id\": \"3474831\",\n \"type\": \"INVEST\",\n \"properties\": {\n \"role\": \"企业法人\",\n \"stockPercent\": 80,\n \"shouldCapi\": 800\n },\n \"source\": \"26295729\",\n \"target\": \"30954022\"\n },\n {\n \"id\": \"2840015\",\n \"type\": \"INVEST\",\n \"properties\": {\n \"role\": \"企业法人\",\n \"stockPercent\": 62.5,\n \"shouldCapi\": 350\n },\n \"source\": \"44830398\",\n \"target\": \"9323996\"\n },\n {\n \"id\": \"85633798\",\n \"type\": \"INVEST\",\n \"properties\": {\n \"role\": \"自然人股东\",\n \"stockPercent\": 2.01,\n \"shouldCapi\": 100.5\n },\n \"source\": \"95397448\",\n \"target\": \"24305985\"\n },\n {\n \"id\": \"180159488\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"61422172\",\n \"target\": \"46583563\"\n },\n {\n \"id\": \"229272386\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事兼总经理\"\n },\n \"source\": \"67299081\",\n \"target\": \"13956312\"\n },\n {\n \"id\": \"229272385\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"13956312\"\n },\n {\n \"id\": \"252833811\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事长\"\n },\n \"source\": \"67299081\",\n \"target\": \"24305985\"\n },\n {\n \"id\": \"252833810\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"监事\"\n },\n \"source\": \"95397448\",\n \"target\": \"24305985\"\n },\n {\n \"id\": \"161979950\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"经理\"\n },\n \"source\": \"95397448\",\n \"target\": \"653142\"\n },\n {\n \"id\": \"161979949\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"653142\"\n },\n {\n \"id\": \"231346748\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"执行董事兼总经理\"\n },\n \"source\": \"67299081\",\n \"target\": \"38315442\"\n },\n {\n \"id\": \"192021637\",\n \"type\": \"EMPLOY\",\n \"properties\": {\n \"role\": \"董事\"\n },\n \"source\": \"67299081\",\n \"target\": \"9323996\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data: format(data),\n behaviors: ['hover-activate'],\n layout: {\n type: 'force',\n preventOverlap: true,\n nodeSize: 24,\n },\n animation: false,\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst rawData = [\n {\"id\":\"27800994\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"7e023446a248dd2e873ede3a08eeadc5\",\"registCapi\":\"5000.0\",\"name\":\"成都倍达资产管理有限公司\",\"econKind\":\"有限责任公司(非自然人投资或控股的法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"成都倍达资产管理有限公司\",\"degree\":4},\n {\"id\":\"13956312\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"3fc8e6b450a351dffaf97ebba7bd5675\",\"registCapi\":\"21000.0\",\"name\":\"小米科技(武汉)有限公司\",\"econKind\":\"有限责任公司(外商投资企业法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"小米科技(武汉)有限公司\",\"degree\":4},\n {\"id\":\"71848026\",\"labels\":[\"Person\"],\"properties\":{\"keyNo\":\"p26b3775f4ea1307e28aef63a6cf2cb8\",\"role\":\"自然人股东\",\"name\":\"刘敏\"},\"type\":\"Person\",\"name\":\"刘敏\",\"degree\":5},\n {\"id\":\"44830398\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"cac4c7d67320964eddebc475fa66d3f9\",\"registCapi\":\"1000.0\",\"name\":\"北京金山数字娱乐科技有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"北京金山数字娱乐科技有限公司\",\"degree\":4},\n {\"id\":\"47387343\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"d64da78333777354bf3634e371d736a6\",\"registCapi\":\"0.0\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"econKind\":\"有限合伙企业\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"degree\":3},\n {\"id\":\"26295729\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"77472fbe731c1b8f4bfc2723f3b65415\",\"registCapi\":\"21550.0\",\"name\":\"珠海金山软件有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"珠海金山软件有限公司\",\"degree\":5},\n {\"id\":\"24305985\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"6e62fda57887baa0909cb79bef96b07c\",\"registCapi\":\"5000.0\",\"name\":\"小米影业有限责任公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"小米影业有限责任公司\",\"degree\":10},\n {\"id\":\"9036981\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"29328112375d07205ab125dcb575d59b\",\"registCapi\":\"1000.0\",\"name\":\"图扑尚贸易(上海)有限公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"图扑尚贸易(上海)有限公司\",\"degree\":3},\n {\"id\":\"53463922\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"f1ba2f7dfcecba582edbf89b03009980\",\"registCapi\":\"43757.56\",\"name\":\"广州华凌空调设备有限公司\",\"econKind\":\"其他有限责任公司\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广州华凌空调设备有限公司\",\"degree\":4},\n {\"id\":\"2791598\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"0cc68eb8e8f9d0445d1916a9872d207c\",\"registCapi\":\"6926.0\",\"name\":\"广东美的生活电器制造有限公司\",\"econKind\":\"有限责任公司(台港澳与境内合资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广东美的生活电器制造有限公司\",\"degree\":4}\n];\n\nconst nodes = rawData.map(item => ({\n id: item.id,\n data: {\n name: item.name,\n type: item.type,\n degree: item.degree,\n registCapi: item.properties.registCapi,\n econKind: item.properties.econKind,\n status: item.properties.status,\n role: item.properties.role\n }\n}));\n\nconst edges = [\n { source: '71848026', target: '24305985', data: { relation: '投资' } },\n { source: '71848026', target: '27800994', data: { relation: '法人' } },\n { source: '13956312', target: '24305985', data: { relation: '投资' } },\n { source: '26295729', target: '44830398', data: { relation: '投资' } },\n { source: '2791598', target: '53463922', data: { relation: '控股' } },\n { source: '47387343', target: '9036981', data: { relation: '投资' } },\n { source: '71848026', target: '47387343', data: { relation: '合伙人' } },\n { source: '27800994', target: '13956312', data: { relation: '关联' } }\n];\n\nconst graph = new Graph({\n container: container,\n width: 900,\n height: 600,\n data: { nodes, edges },\n animation: false,\n \n node: {\n type: 'circle',\n style: {\n size: (d) => 25 + d.data.degree * 3,\n fill: (d) => d.data.type === 'Company' ? '#1783FF' : '#FA8C16',\n stroke: '#fff',\n lineWidth: 2,\n shadowColor: 'rgba(0,0,0,0.1)',\n shadowBlur: 10,\n labelText: (d) => d.data.name,\n labelPlacement: 'bottom',\n labelFontSize: 11,\n labelFill: '#333',\n labelMaxWidth: 120,\n cursor: 'pointer'\n }\n },\n \n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true,\n endArrowSize: 8,\n labelText: (d) => d.data.relation,\n labelFontSize: 10,\n labelFill: '#666',\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.8\n }\n },\n \n layout: {\n type: 'd3-force',\n link: {\n distance: 150,\n strength: 0.5\n },\n manyBody: {\n strength: -400,\n distanceMax: 600\n },\n collide: {\n radius: 40,\n strength: 0.8\n },\n center: {\n strength: 0.1\n }\n },\n \n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force'\n ]\n});\n\ngraph.render();", + "duration": 30716, + "retrievedSkillIds": [ + "g6-pattern-network-graph", + "g6-layout-force", + "g6-layout-grid", + "g6-core-transforms-animation", + "g6-layout-mindmap" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 4513, + "expectedLength": 19457, + "similarity": 0.39387613093270013, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst rawData = [\n {\"id\":\"27800994\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"7e023446a248dd2e873ede3a08eeadc5\",\"registCapi\":\"5000.0\",\"name\":\"成都倍达资产管理有限公司\",\"econKind\":\"有限责任公司(非自然人投资或控股的法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"成都倍达资产管理有限公司\",\"degree\":4},\n {\"id\":\"13956312\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"3fc8e6b450a351dffaf97ebba7bd5675\",\"registCapi\":\"21000.0\",\"name\":\"小米科技(武汉)有限公司\",\"econKind\":\"有限责任公司(外商投资企业法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"小米科技(武汉)有限公司\",\"degree\":4},\n {\"id\":\"71848026\",\"labels\":[\"Person\"],\"properties\":{\"keyNo\":\"p26b3775f4ea1307e28aef63a6cf2cb8\",\"role\":\"自然人股东\",\"name\":\"刘敏\"},\"type\":\"Person\",\"name\":\"刘敏\",\"degree\":5},\n {\"id\":\"44830398\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"cac4c7d67320964eddebc475fa66d3f9\",\"registCapi\":\"1000.0\",\"name\":\"北京金山数字娱乐科技有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"北京金山数字娱乐科技有限公司\",\"degree\":4},\n {\"id\":\"47387343\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"d64da78333777354bf3634e371d736a6\",\"registCapi\":\"0.0\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"econKind\":\"有限合伙企业\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"上海晨熹创业投资中心(有限合伙)\",\"degree\":3},\n {\"id\":\"26295729\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"77472fbe731c1b8f4bfc2723f3b65415\",\"registCapi\":\"21550.0\",\"name\":\"珠海金山软件有限公司\",\"econKind\":\"有限责任公司(法人独资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"珠海金山软件有限公司\",\"degree\":5},\n {\"id\":\"24305985\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"6e62fda57887baa0909cb79bef96b07c\",\"registCapi\":\"5000.0\",\"name\":\"小米影业有限责任公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"在业\"},\"type\":\"Company\",\"name\":\"小米影业有限责任公司\",\"degree\":10},\n {\"id\":\"9036981\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"29328112375d07205ab125dcb575d59b\",\"registCapi\":\"1000.0\",\"name\":\"图扑尚贸易(上海)有限公司\",\"econKind\":\"有限责任公司(自然人投资或控股)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"图扑尚贸易(上海)有限公司\",\"degree\":3},\n {\"id\":\"53463922\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"f1ba2f7dfcecba582edbf89b03009980\",\"registCapi\":\"43757.56\",\"name\":\"广州华凌空调设备有限公司\",\"econKind\":\"其他有限责任公司\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广州华凌空调设备有限公司\",\"degree\":4},\n {\"id\":\"2791598\",\"labels\":[\"Company\"],\"properties\":{\"keyNo\":\"0cc68eb8e8f9d0445d1916a9872d207c\",\"registCapi\":\"6926.0\",\"name\":\"广东美的生活电器制造有限公司\",\"econKind\":\"有限责任公司(台港澳与境内合资)\",\"status\":\"存续\"},\"type\":\"Company\",\"name\":\"广东美的生活电器制造有限公司\",\"degree\":4}\n];\n\nconst nodes = rawData.map(item => ({\n id: item.id,\n data: {\n name: item.name,\n type: item.type,\n degree: item.degree,\n registCapi: item.properties.registCapi,\n econKind: item.properties.econKind,\n status: item.properties.status,\n role: item.properties.role\n }\n}));\n\nconst edges = [\n { source: '71848026', target: '24305985', data: { relation: '投资' } },\n { source: '71848026', target: '27800994', data: { relation: '法人' } },\n { source: '13956312', target: '24305985', data: { relation: '投资' } },\n { source: '26295729', target: '44830398', data: { relation: '投资' } },\n { source: '2791598', target: '53463922', data: { relation: '控股' } },\n { source: '47387343', target: '9036981', data: { relation: '投资' } },\n { source: '71848026', target: '47387343', data: { relation: '合伙人' } },\n { source: '27800994', target: '13956312', data: { relation: '关联' } }\n];\n\nconst graph = new Graph({\n container: container,\n width: 900,\n height: 600,\n data: { nodes, edges },\n animation: false,\n \n node: {\n type: 'circle',\n style: {\n size: (d) => 25 + d.data.degree * 3,\n fill: (d) => d.data.type === 'Company' ? '#1783FF' : '#FA8C16',\n stroke: '#fff',\n lineWidth: 2,\n shadowColor: 'rgba(0,0,0,0.1)',\n shadowBlur: 10,\n labelText: (d) => d.data.name,\n labelPlacement: 'bottom',\n labelFontSize: 11,\n labelFill: '#333',\n labelMaxWidth: 120,\n cursor: 'pointer'\n }\n },\n \n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 1.5,\n endArrow: true,\n endArrowSize: 8,\n labelText: (d) => d.data.relation,\n labelFontSize: 10,\n labelFill: '#666',\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.8\n }\n },\n \n layout: {\n type: 'd3-force',\n link: {\n distance: 150,\n strength: 0.5\n },\n manyBody: {\n strength: -400,\n distanceMax: 600\n },\n collide: {\n radius: 40,\n strength: 0.8\n },\n center: {\n strength: 0.1\n }\n },\n \n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force'\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "map", + "Graph", + "rgba", + "render" + ], + "objectKeys": [ + "id", + "data", + "name", + "type", + "degree", + "registCapi", + "econKind", + "status", + "role", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "source", + "target", + "data", + "relation", + "container", + "width", + "height", + "data", + "animation", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "shadowColor", + "shadowBlur", + "labelText", + "labelPlacement", + "labelFontSize", + "labelFill", + "labelMaxWidth", + "cursor", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "endArrowSize", + "labelText", + "labelFontSize", + "labelFill", + "labelBackground", + "labelBackgroundFill", + "labelBackgroundOpacity", + "layout", + "type", + "link", + "distance", + "strength", + "manyBody", + "strength", + "distanceMax", + "collide", + "radius", + "strength", + "center", + "strength", + "behaviors" + ], + "stringLiterals": [ + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "role", + "name", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree", + "id", + "labels", + "properties", + "keyNo", + "registCapi", + "name", + "econKind", + "status", + "type", + "name", + "degree" + ], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-81", + "query": "根据描述绘制图表,使用 G6 图表库创建一个力导向图,展示节点和边的关系。通过将节点按 cluster 字段分组,为每个群组添加 hull 包围盒,并设置不同的颜色样式。启用了画布缩放、拖拽以及元素拖拽等交互行为,同时根据节点类型动态调整链接距离以优化布局。参考数据:[{\"id\":\"node-0\",\"data\":{\"cluster\":\"a\"},\"style\":{\"size\":50}},{\"id\":\"node-1\",\"data\":{\"cluster\":\"b\"},\"style\":{\"size\":30}},{\"id\":\"node-2\",\"data\":{\"cluster\":\"c\"},\"style\":{\"size\":30}},{\"id\":\"node-3\",\"data\":{\"cluster\":\"d\"},\"style\":{\"size\":30}},{\"id\":\"node-4\",\"data\":{\"cluster\":\"a\"},\"style\":{\"size\":30}},{\"id\":\"node-5\",\"data\":{\"cluster\":\"b\"},\"style\":{\"size\":30}},{\"id\":\"node-6\",\"data\":{\"cluster\":\"b\"},\"style\":{\"size\":15}},{\"id\":\"node-7\",\"data\":{\"cluster\":\"b\"},\"style\":{\"size\":15}},{\"id\":\"node-8\",\"data\":{\"cluster\":\"c\"},\"style\":{\"size\":15}},{\"id\":\"node-9\",\"data\":{\"cluster\":\"c\"},\"style\":{\"size\":15}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"node-0\",\n \"data\": {\n \"cluster\": \"a\"\n },\n \"style\": {\n \"size\": 50\n }\n },\n {\n \"id\": \"node-1\",\n \"data\": {\n \"cluster\": \"b\"\n },\n \"style\": {\n \"size\": 30\n }\n },\n {\n \"id\": \"node-2\",\n \"data\": {\n \"cluster\": \"c\"\n },\n \"style\": {\n \"size\": 30\n }\n },\n {\n \"id\": \"node-3\",\n \"data\": {\n \"cluster\": \"d\"\n },\n \"style\": {\n \"size\": 30\n }\n },\n {\n \"id\": \"node-4\",\n \"data\": {\n \"cluster\": \"a\"\n },\n \"style\": {\n \"size\": 30\n }\n },\n {\n \"id\": \"node-5\",\n \"data\": {\n \"cluster\": \"b\"\n },\n \"style\": {\n \"size\": 30\n }\n },\n {\n \"id\": \"node-6\",\n \"data\": {\n \"cluster\": \"b\"\n },\n \"style\": {\n \"size\": 15\n }\n },\n {\n \"id\": \"node-7\",\n \"data\": {\n \"cluster\": \"b\"\n },\n \"style\": {\n \"size\": 15\n }\n },\n {\n \"id\": \"node-8\",\n \"data\": {\n \"cluster\": \"c\"\n },\n \"style\": {\n \"size\": 15\n }\n },\n {\n \"id\": \"node-9\",\n \"data\": {\n \"cluster\": \"c\"\n },\n \"style\": {\n \"size\": 15\n }\n },\n {\n \"id\": \"node-10\",\n \"data\": {\n \"cluster\": \"c\"\n },\n \"style\": {\n \"size\": 15\n }\n },\n {\n \"id\": \"node-11\",\n \"data\": {\n \"cluster\": \"c\"\n },\n \"style\": {\n \"size\": 15\n }\n },\n {\n \"id\": \"node-12\",\n \"data\": {\n \"cluster\": \"c\"\n },\n \"style\": {\n \"size\": 15\n }\n },\n {\n \"id\": \"node-13\",\n \"data\": {\n \"cluster\": \"c\"\n },\n \"style\": {\n \"size\": 15\n }\n },\n {\n \"id\": \"node-14\",\n \"data\": {\n \"cluster\": \"d\"\n },\n \"style\": {\n \"size\": 15\n }\n },\n {\n \"id\": \"node-15\",\n \"data\": {\n \"cluster\": \"d\"\n },\n \"style\": {\n \"size\": 15\n }\n },\n {\n \"id\": \"node-16\",\n \"data\": {\n \"cluster\": \"d\"\n },\n \"style\": {\n \"size\": 15\n }\n }\n ],\n \"edges\": [\n {\n \"source\": \"node-0\",\n \"target\": \"node-1\"\n },\n {\n \"source\": \"node-0\",\n \"target\": \"node-2\"\n },\n {\n \"source\": \"node-0\",\n \"target\": \"node-3\"\n },\n {\n \"source\": \"node-0\",\n \"target\": \"node-4\"\n },\n {\n \"source\": \"node-0\",\n \"target\": \"node-5\"\n },\n {\n \"source\": \"node-1\",\n \"target\": \"node-6\"\n },\n {\n \"source\": \"node-1\",\n \"target\": \"node-7\"\n },\n {\n \"source\": \"node-2\",\n \"target\": \"node-8\"\n },\n {\n \"source\": \"node-2\",\n \"target\": \"node-9\"\n },\n {\n \"source\": \"node-2\",\n \"target\": \"node-10\"\n },\n {\n \"source\": \"node-2\",\n \"target\": \"node-11\"\n },\n {\n \"source\": \"node-2\",\n \"target\": \"node-12\"\n },\n {\n \"source\": \"node-2\",\n \"target\": \"node-13\"\n },\n {\n \"source\": \"node-3\",\n \"target\": \"node-14\"\n },\n {\n \"source\": \"node-3\",\n \"target\": \"node-15\"\n },\n {\n \"source\": \"node-3\",\n \"target\": \"node-16\"\n }\n ]\n };\n\nconst groupedNodesByCluster = data.nodes.reduce((acc, node) => {\n const cluster = node.data.cluster;\n acc[cluster] ||= [];\n acc[cluster].push(node.id);\n return acc;\n}, {});\nconst createStyle = (baseColor) => ({\n fill: baseColor,\n stroke: baseColor,\n labelFill: '#fff',\n labelPadding: 2,\n labelBackgroundFill: baseColor,\n labelBackgroundRadius: 5,\n});\nconst graph = new Graph({\n container: 'container',\n data,\n behaviors: ['zoom-canvas', 'drag-canvas', 'drag-element'],\n node: {\n palette: { field: 'cluster' },\n },\n layout: {\n type: 'force',\n preventOverlap: true,\n linkDistance: (d) => {\n if (d.source === 'node0' || d.target === 'node0') {\n return 200;\n }\n return 80;\n },\n },\n plugins: [\n {\n key: 'hull-a',\n type: 'hull',\n members: groupedNodesByCluster['a'],\n labelText: 'cluster-a',\n ...createStyle('#1783FF'),\n },\n {\n key: 'hull-b',\n type: 'hull',\n members: groupedNodesByCluster['b'],\n labelText: 'cluster-b',\n ...createStyle('#00C9C9'),\n },\n {\n key: 'hull-c',\n type: 'hull',\n members: groupedNodesByCluster['c'],\n labelText: 'cluster-c',\n ...createStyle('#F08F56'),\n },\n {\n key: 'hull-d',\n type: 'hull',\n members: groupedNodesByCluster['d'],\n labelText: 'cluster-d',\n ...createStyle('#D580FF'),\n },\n ],\n autoFit: 'center',\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst rawNodes = [\n {\"id\":\"node-0\",\"data\":{\"cluster\":\"a\"},\"style\":{\"size\":50}},\n {\"id\":\"node-1\",\"data\":{\"cluster\":\"b\"},\"style\":{\"size\":30}},\n {\"id\":\"node-2\",\"data\":{\"cluster\":\"c\"},\"style\":{\"size\":30}},\n {\"id\":\"node-3\",\"data\":{\"cluster\":\"d\"},\"style\":{\"size\":30}},\n {\"id\":\"node-4\",\"data\":{\"cluster\":\"a\"},\"style\":{\"size\":30}},\n {\"id\":\"node-5\",\"data\":{\"cluster\":\"b\"},\"style\":{\"size\":30}},\n {\"id\":\"node-6\",\"data\":{\"cluster\":\"b\"},\"style\":{\"size\":15}},\n {\"id\":\"node-7\",\"data\":{\"cluster\":\"b\"},\"style\":{\"size\":15}},\n {\"id\":\"node-8\",\"data\":{\"cluster\":\"c\"},\"style\":{\"size\":15}},\n {\"id\":\"node-9\",\"data\":{\"cluster\":\"c\"},\"style\":{\"size\":15}}\n];\n\nconst clusterColors = {\n a: '#1783FF',\n b: '#00C9C9',\n c: '#F08F56',\n d: '#F6BD16'\n};\n\nconst nodes = rawNodes.map(node => ({\n ...node,\n style: {\n ...node.style,\n fill: clusterColors[node.data.cluster],\n stroke: clusterColors[node.data.cluster],\n labelText: node.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n lineWidth: 2\n }\n}));\n\nconst edges = [\n { source: 'node-0', target: 'node-4' },\n { source: 'node-0', target: 'node-1' },\n { source: 'node-1', target: 'node-5' },\n { source: 'node-1', target: 'node-6' },\n { source: 'node-1', target: 'node-7' },\n { source: 'node-2', target: 'node-8' },\n { source: 'node-2', target: 'node-9' },\n { source: 'node-2', target: 'node-3' },\n { source: 'node-5', target: 'node-6' },\n { source: 'node-6', target: 'node-7' },\n { source: 'node-8', target: 'node-9' }\n];\n\nconst graph = new Graph({\n container: container,\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: (d) => d.style?.size || 30,\n fill: (d) => clusterColors[d.data.cluster],\n stroke: (d) => clusterColors[d.data.cluster],\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff'\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#ccc',\n lineWidth: 1\n }\n },\n layout: {\n type: 'force',\n linkDistance: (d) => {\n const sourceCluster = d.source.data.cluster;\n const targetCluster = d.target.data.cluster;\n return sourceCluster === targetCluster ? 80 : 150;\n },\n gravity: 10,\n coulombDisScale: 0.005\n },\n plugins: [\n {\n type: 'hull',\n key: 'hull-a',\n memberType: 'node',\n getCluster: (d) => d.data.cluster === 'a',\n padding: 15,\n style: {\n fill: clusterColors.a,\n fillOpacity: 0.15,\n stroke: clusterColors.a,\n lineWidth: 2,\n lineDash: [5, 5]\n }\n },\n {\n type: 'hull',\n key: 'hull-b',\n memberType: 'node',\n getCluster: (d) => d.data.cluster === 'b',\n padding: 15,\n style: {\n fill: clusterColors.b,\n fillOpacity: 0.15,\n stroke: clusterColors.b,\n lineWidth: 2,\n lineDash: [5, 5]\n }\n },\n {\n type: 'hull',\n key: 'hull-c',\n memberType: 'node',\n getCluster: (d) => d.data.cluster === 'c',\n padding: 15,\n style: {\n fill: clusterColors.c,\n fillOpacity: 0.15,\n stroke: clusterColors.c,\n lineWidth: 2,\n lineDash: [5, 5]\n }\n },\n {\n type: 'hull',\n key: 'hull-d',\n memberType: 'node',\n getCluster: (d) => d.data.cluster === 'd',\n padding: 15,\n style: {\n fill: clusterColors.d,\n fillOpacity: 0.15,\n stroke: clusterColors.d,\n lineWidth: 2,\n lineDash: [5, 5]\n }\n }\n ],\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force'\n ]\n});\n\ngraph.render();", + "duration": 23133, + "retrievedSkillIds": [ + "g6-layout-grid", + "g6-layout-force", + "g6-behavior-drag-element", + "g6-layout-mindmap", + "g6-behavior-canvas-nav" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 3621, + "expectedLength": 4937, + "similarity": 0.5359696579361671, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst rawNodes = [\n {\"id\":\"node-0\",\"data\":{\"cluster\":\"a\"},\"style\":{\"size\":50}},\n {\"id\":\"node-1\",\"data\":{\"cluster\":\"b\"},\"style\":{\"size\":30}},\n {\"id\":\"node-2\",\"data\":{\"cluster\":\"c\"},\"style\":{\"size\":30}},\n {\"id\":\"node-3\",\"data\":{\"cluster\":\"d\"},\"style\":{\"size\":30}},\n {\"id\":\"node-4\",\"data\":{\"cluster\":\"a\"},\"style\":{\"size\":30}},\n {\"id\":\"node-5\",\"data\":{\"cluster\":\"b\"},\"style\":{\"size\":30}},\n {\"id\":\"node-6\",\"data\":{\"cluster\":\"b\"},\"style\":{\"size\":15}},\n {\"id\":\"node-7\",\"data\":{\"cluster\":\"b\"},\"style\":{\"size\":15}},\n {\"id\":\"node-8\",\"data\":{\"cluster\":\"c\"},\"style\":{\"size\":15}},\n {\"id\":\"node-9\",\"data\":{\"cluster\":\"c\"},\"style\":{\"size\":15}}\n];\n\nconst clusterColors = {\n a: '#1783FF',\n b: '#00C9C9',\n c: '#F08F56',\n d: '#F6BD16'\n};\n\nconst nodes = rawNodes.map(node => ({\n ...node,\n style: {\n ...node.style,\n fill: clusterColors[node.data.cluster],\n stroke: clusterColors[node.data.cluster],\n labelText: node.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n lineWidth: 2\n }\n}));\n\nconst edges = [\n { source: 'node-0', target: 'node-4' },\n { source: 'node-0', target: 'node-1' },\n { source: 'node-1', target: 'node-5' },\n { source: 'node-1', target: 'node-6' },\n { source: 'node-1', target: 'node-7' },\n { source: 'node-2', target: 'node-8' },\n { source: 'node-2', target: 'node-9' },\n { source: 'node-2', target: 'node-3' },\n { source: 'node-5', target: 'node-6' },\n { source: 'node-6', target: 'node-7' },\n { source: 'node-8', target: 'node-9' }\n];\n\nconst graph = new Graph({\n container: container,\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: (d) => d.style?.size || 30,\n fill: (d) => clusterColors[d.data.cluster],\n stroke: (d) => clusterColors[d.data.cluster],\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff'\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#ccc',\n lineWidth: 1\n }\n },\n layout: {\n type: 'force',\n linkDistance: (d) => {\n const sourceCluster = d.source.data.cluster;\n const targetCluster = d.target.data.cluster;\n return sourceCluster === targetCluster ? 80 : 150;\n },\n gravity: 10,\n coulombDisScale: 0.005\n },\n plugins: [\n {\n type: 'hull',\n key: 'hull-a',\n memberType: 'node',\n getCluster: (d) => d.data.cluster === 'a',\n padding: 15,\n style: {\n fill: clusterColors.a,\n fillOpacity: 0.15,\n stroke: clusterColors.a,\n lineWidth: 2,\n lineDash: [5, 5]\n }\n },\n {\n type: 'hull',\n key: 'hull-b',\n memberType: 'node',\n getCluster: (d) => d.data.cluster === 'b',\n padding: 15,\n style: {\n fill: clusterColors.b,\n fillOpacity: 0.15,\n stroke: clusterColors.b,\n lineWidth: 2,\n lineDash: [5, 5]\n }\n },\n {\n type: 'hull',\n key: 'hull-c',\n memberType: 'node',\n getCluster: (d) => d.data.cluster === 'c',\n padding: 15,\n style: {\n fill: clusterColors.c,\n fillOpacity: 0.15,\n stroke: clusterColors.c,\n lineWidth: 2,\n lineDash: [5, 5]\n }\n },\n {\n type: 'hull',\n key: 'hull-d',\n memberType: 'node',\n getCluster: (d) => d.data.cluster === 'd',\n padding: 15,\n style: {\n fill: clusterColors.d,\n fillOpacity: 0.15,\n stroke: clusterColors.d,\n lineWidth: 2,\n lineDash: [5, 5]\n }\n }\n ],\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force'\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "map", + "Graph", + "render" + ], + "objectKeys": [ + "a", + "b", + "c", + "d", + "style", + "fill", + "stroke", + "labelText", + "labelPlacement", + "labelFill", + "lineWidth", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "container", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "linkDistance", + "80", + "gravity", + "coulombDisScale", + "plugins", + "type", + "key", + "memberType", + "getCluster", + "padding", + "style", + "fill", + "fillOpacity", + "stroke", + "lineWidth", + "lineDash", + "type", + "key", + "memberType", + "getCluster", + "padding", + "style", + "fill", + "fillOpacity", + "stroke", + "lineWidth", + "lineDash", + "type", + "key", + "memberType", + "getCluster", + "padding", + "style", + "fill", + "fillOpacity", + "stroke", + "lineWidth", + "lineDash", + "type", + "key", + "memberType", + "getCluster", + "padding", + "style", + "fill", + "fillOpacity", + "stroke", + "lineWidth", + "lineDash", + "behaviors" + ], + "stringLiterals": [ + "id", + "data", + "cluster", + "style", + "size", + "id", + "data", + "cluster", + "style", + "size", + "id", + "data", + "cluster", + "style", + "size", + "id", + "data", + "cluster", + "style", + "size", + "id", + "data", + "cluster", + "style", + "size", + "id", + "data", + "cluster", + "style", + "size", + "id", + "data", + "cluster", + "style", + "size", + "id", + "data", + "cluster", + "style", + "size", + "id", + "data", + "cluster", + "style", + "size", + "id", + "data", + "cluster", + "style", + "size" + ], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-82", + "query": "根据描述绘制图表,使用 G6 构建了一个力导向图,展示了包含多个集群的节点和边的关系网络。通过 Fruchterman 布局算法进行布局,并根据节点的 cluster 属性进行颜色分组,同时支持画布和元素的拖拽交互。参考数据:[{\"id\":\"0\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"1\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"2\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"3\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"4\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"5\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"6\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"7\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"8\",\"data\":{\"cluster\":\"a\"}},{\"id\":\"9\",\"data\":{\"cluster\":\"a\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"0\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"1\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"2\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"3\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"4\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"5\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"6\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"7\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"8\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"9\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"10\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"11\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"12\",\n \"data\": {\n \"cluster\": \"a\"\n }\n },\n {\n \"id\": \"13\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"14\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"15\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"16\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"17\",\n \"data\": {\n \"cluster\": \"b\"\n }\n },\n {\n \"id\": \"18\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"19\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"20\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"21\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"22\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"23\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"24\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"25\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"26\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"27\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"28\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"29\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"30\",\n \"data\": {\n \"cluster\": \"c\"\n }\n },\n {\n \"id\": \"31\",\n \"data\": {\n \"cluster\": \"d\"\n }\n },\n {\n \"id\": \"32\",\n \"data\": {\n \"cluster\": \"d\"\n }\n },\n {\n \"id\": \"33\",\n \"data\": {\n \"cluster\": \"d\"\n }\n }\n ],\n \"edges\": [\n {\n \"source\": \"0\",\n \"target\": \"1\"\n },\n {\n \"source\": \"0\",\n \"target\": \"2\"\n },\n {\n \"source\": \"0\",\n \"target\": \"3\"\n },\n {\n \"source\": \"0\",\n \"target\": \"4\"\n },\n {\n \"source\": \"0\",\n \"target\": \"5\"\n },\n {\n \"source\": \"0\",\n \"target\": \"7\"\n },\n {\n \"source\": \"0\",\n \"target\": \"8\"\n },\n {\n \"source\": \"0\",\n \"target\": \"9\"\n },\n {\n \"source\": \"0\",\n \"target\": \"10\"\n },\n {\n \"source\": \"0\",\n \"target\": \"11\"\n },\n {\n \"source\": \"0\",\n \"target\": \"13\"\n },\n {\n \"source\": \"0\",\n \"target\": \"14\"\n },\n {\n \"source\": \"0\",\n \"target\": \"15\"\n },\n {\n \"source\": \"0\",\n \"target\": \"16\"\n },\n {\n \"source\": \"2\",\n \"target\": \"3\"\n },\n {\n \"source\": \"4\",\n \"target\": \"5\"\n },\n {\n \"source\": \"4\",\n \"target\": \"6\"\n },\n {\n \"source\": \"5\",\n \"target\": \"6\"\n },\n {\n \"source\": \"7\",\n \"target\": \"13\"\n },\n {\n \"source\": \"8\",\n \"target\": \"14\"\n },\n {\n \"source\": \"9\",\n \"target\": \"10\"\n },\n {\n \"source\": \"10\",\n \"target\": \"22\"\n },\n {\n \"source\": \"10\",\n \"target\": \"14\"\n },\n {\n \"source\": \"10\",\n \"target\": \"12\"\n },\n {\n \"source\": \"10\",\n \"target\": \"24\"\n },\n {\n \"source\": \"10\",\n \"target\": \"21\"\n },\n {\n \"source\": \"10\",\n \"target\": \"20\"\n },\n {\n \"source\": \"11\",\n \"target\": \"24\"\n },\n {\n \"source\": \"11\",\n \"target\": \"22\"\n },\n {\n \"source\": \"11\",\n \"target\": \"14\"\n },\n {\n \"source\": \"12\",\n \"target\": \"13\"\n },\n {\n \"source\": \"16\",\n \"target\": \"17\"\n },\n {\n \"source\": \"16\",\n \"target\": \"18\"\n },\n {\n \"source\": \"16\",\n \"target\": \"21\"\n },\n {\n \"source\": \"16\",\n \"target\": \"22\"\n },\n {\n \"source\": \"17\",\n \"target\": \"18\"\n },\n {\n \"source\": \"17\",\n \"target\": \"20\"\n },\n {\n \"source\": \"18\",\n \"target\": \"19\"\n },\n {\n \"source\": \"19\",\n \"target\": \"20\"\n },\n {\n \"source\": \"19\",\n \"target\": \"33\"\n },\n {\n \"source\": \"19\",\n \"target\": \"22\"\n },\n {\n \"source\": \"19\",\n \"target\": \"23\"\n },\n {\n \"source\": \"20\",\n \"target\": \"21\"\n },\n {\n \"source\": \"21\",\n \"target\": \"22\"\n },\n {\n \"source\": \"22\",\n \"target\": \"24\"\n },\n {\n \"source\": \"22\",\n \"target\": \"25\"\n },\n {\n \"source\": \"22\",\n \"target\": \"26\"\n },\n {\n \"source\": \"22\",\n \"target\": \"23\"\n },\n {\n \"source\": \"22\",\n \"target\": \"28\"\n },\n {\n \"source\": \"22\",\n \"target\": \"30\"\n },\n {\n \"source\": \"22\",\n \"target\": \"31\"\n },\n {\n \"source\": \"22\",\n \"target\": \"32\"\n },\n {\n \"source\": \"22\",\n \"target\": \"33\"\n },\n {\n \"source\": \"23\",\n \"target\": \"28\"\n },\n {\n \"source\": \"23\",\n \"target\": \"27\"\n },\n {\n \"source\": \"23\",\n \"target\": \"29\"\n },\n {\n \"source\": \"23\",\n \"target\": \"30\"\n },\n {\n \"source\": \"23\",\n \"target\": \"31\"\n },\n {\n \"source\": \"23\",\n \"target\": \"33\"\n },\n {\n \"source\": \"32\",\n \"target\": \"33\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'fruchterman',\n gravity: 5,\n speed: 5,\n clustering: true,\n nodeClusterBy: 'cluster',\n clusterGravity: 16,\n },\n node: {\n style: {\n labelFill: '#fff',\n labelPlacement: 'center',\n labelText: (d) => d.id,\n },\n palette: {\n type: 'group',\n field: 'cluster',\n },\n },\n edge: {\n style: {\n endArrow: true,\n },\n },\n behaviors: ['drag-canvas', 'drag-element'],\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\n// 基础数据(包含用户提供的 cluster a 节点)\nconst baseNodes = [\n { id: '0', data: { cluster: 'a' } },\n { id: '1', data: { cluster: 'a' } },\n { id: '2', data: { cluster: 'a' } },\n { id: '3', data: { cluster: 'a' } },\n { id: '4', data: { cluster: 'a' } },\n { id: '5', data: { cluster: 'a' } },\n { id: '6', data: { cluster: 'a' } },\n { id: '7', data: { cluster: 'a' } },\n { id: '8', data: { cluster: 'a' } },\n { id: '9', data: { cluster: 'a' } },\n // 补充其他集群节点以展示多集群效果\n { id: '10', data: { cluster: 'b' } },\n { id: '11', data: { cluster: 'b' } },\n { id: '12', data: { cluster: 'b' } },\n { id: '13', data: { cluster: 'b' } },\n { id: '14', data: { cluster: 'b' } },\n { id: '15', data: { cluster: 'c' } },\n { id: '16', data: { cluster: 'c' } },\n { id: '17', data: { cluster: 'c' } },\n { id: '18', data: { cluster: 'c' } },\n { id: '19', data: { cluster: 'c' } },\n];\n\n// 构建边关系:集群内部密集连接,集群间稀疏连接\nconst edges = [\n // Cluster a 内部\n { source: '0', target: '1' }, { source: '0', target: '2' },\n { source: '1', target: '3' }, { source: '2', target: '3' },\n { source: '3', target: '4' }, { source: '4', target: '5' },\n { source: '5', target: '6' }, { source: '6', target: '7' },\n { source: '7', target: '8' }, { source: '8', target: '9' },\n { source: '0', target: '5' }, { source: '2', target: '7' },\n // Cluster b 内部\n { source: '10', target: '11' }, { source: '11', target: '12' },\n { source: '12', target: '13' }, { source: '13', target: '14' },\n { source: '10', target: '12' }, { source: '11', target: '14' },\n // Cluster c 内部\n { source: '15', target: '16' }, { source: '16', target: '17' },\n { source: '17', target: '18' }, { source: '18', target: '19' },\n { source: '15', target: '17' }, { source: '16', target: '19' },\n // 集群间连接(桥接边)\n { source: '3', target: '11' },\n { source: '7', target: '16' },\n { source: '12', target: '17' },\n];\n\nconst graph = new Graph({\n container,\n data: {\n nodes: baseNodes,\n edges,\n },\n node: {\n style: {\n size: 24,\n lineWidth: 2,\n stroke: '#fff',\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFontSize: 12,\n },\n palette: {\n type: 'group',\n field: (d) => d.data.cluster,\n },\n },\n edge: {\n style: {\n stroke: '#ccc',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'fruchterman',\n gravity: 1,\n speed: 5,\n clustering: true,\n clusterGravity: 10,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "duration": 30327, + "retrievedSkillIds": [ + "g6-layout-force", + "g6-layout-grid", + "g6-layout-mindmap", + "g6-layout-dagre", + "g6-layout-combo-fishbone" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2509, + "expectedLength": 7026, + "similarity": 0.6691177194018103, + "extractedCode": "import { Graph } from '@antv/g6';\n\n// 基础数据(包含用户提供的 cluster a 节点)\nconst baseNodes = [\n { id: '0', data: { cluster: 'a' } },\n { id: '1', data: { cluster: 'a' } },\n { id: '2', data: { cluster: 'a' } },\n { id: '3', data: { cluster: 'a' } },\n { id: '4', data: { cluster: 'a' } },\n { id: '5', data: { cluster: 'a' } },\n { id: '6', data: { cluster: 'a' } },\n { id: '7', data: { cluster: 'a' } },\n { id: '8', data: { cluster: 'a' } },\n { id: '9', data: { cluster: 'a' } },\n // 补充其他集群节点以展示多集群效果\n { id: '10', data: { cluster: 'b' } },\n { id: '11', data: { cluster: 'b' } },\n { id: '12', data: { cluster: 'b' } },\n { id: '13', data: { cluster: 'b' } },\n { id: '14', data: { cluster: 'b' } },\n { id: '15', data: { cluster: 'c' } },\n { id: '16', data: { cluster: 'c' } },\n { id: '17', data: { cluster: 'c' } },\n { id: '18', data: { cluster: 'c' } },\n { id: '19', data: { cluster: 'c' } },\n];\n\n// 构建边关系:集群内部密集连接,集群间稀疏连接\nconst edges = [\n // Cluster a 内部\n { source: '0', target: '1' }, { source: '0', target: '2' },\n { source: '1', target: '3' }, { source: '2', target: '3' },\n { source: '3', target: '4' }, { source: '4', target: '5' },\n { source: '5', target: '6' }, { source: '6', target: '7' },\n { source: '7', target: '8' }, { source: '8', target: '9' },\n { source: '0', target: '5' }, { source: '2', target: '7' },\n // Cluster b 内部\n { source: '10', target: '11' }, { source: '11', target: '12' },\n { source: '12', target: '13' }, { source: '13', target: '14' },\n { source: '10', target: '12' }, { source: '11', target: '14' },\n // Cluster c 内部\n { source: '15', target: '16' }, { source: '16', target: '17' },\n { source: '17', target: '18' }, { source: '18', target: '19' },\n { source: '15', target: '17' }, { source: '16', target: '19' },\n // 集群间连接(桥接边)\n { source: '3', target: '11' },\n { source: '7', target: '16' },\n { source: '12', target: '17' },\n];\n\nconst graph = new Graph({\n container,\n data: {\n nodes: baseNodes,\n edges,\n },\n node: {\n style: {\n size: 24,\n lineWidth: 2,\n stroke: '#fff',\n labelText: (d) => d.id,\n labelPlacement: 'bottom',\n labelFontSize: 12,\n },\n palette: {\n type: 'group',\n field: (d) => d.data.cluster,\n },\n },\n edge: {\n style: {\n stroke: '#ccc',\n lineWidth: 1.5,\n },\n },\n layout: {\n type: 'fruchterman',\n gravity: 1,\n speed: 5,\n clustering: true,\n clusterGravity: 10,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "data", + "nodes", + "node", + "style", + "size", + "lineWidth", + "stroke", + "labelText", + "labelPlacement", + "labelFontSize", + "palette", + "type", + "field", + "edge", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "gravity", + "speed", + "clustering", + "clusterGravity", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-83", + "query": "根据描述绘制图表,使用 AntV G6 渲染一个包含 16 个节点和 15 条边的线性链状图形,节点按蛇形布局排列,支持画布和元素拖拽交互。参考数据:[{\"id\":\"0\"},{\"id\":\"1\"},{\"id\":\"2\"},{\"id\":\"3\"},{\"id\":\"4\"},{\"id\":\"5\"},{\"id\":\"6\"},{\"id\":\"7\"},{\"id\":\"8\"},{\"id\":\"9\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: new Array(16).fill(0).map((_, i) => ({ id: `${i}` })),\n edges: new Array(15).fill(0).map((_, i) => ({ source: `${i}`, target: `${i + 1}` })),\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n labelFill: '#fff',\n labelPlacement: 'center',\n labelText: (d) => d.id,\n },\n },\n layout: {\n type: 'snake',\n padding: 50,\n },\n behaviors: ['drag-canvas', 'drag-element'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [];\nfor (let i = 0; i < 16; i++) {\n nodes.push({ id: `${i}` });\n}\n\nconst edges = [];\nfor (let i = 0; i < 15; i++) {\n edges.push({ source: `${i}`, target: `${i + 1}` });\n}\n\nconst graph = new Graph({\n container,\n width: 800,\n height: 600,\n data: {\n nodes,\n edges,\n },\n node: {\n type: 'circle',\n style: {\n size: 36,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelFill: '#fff',\n labelPlacement: 'center',\n labelFontSize: 14,\n },\n },\n edge: {\n style: {\n stroke: '#ccc',\n lineWidth: 2,\n },\n },\n layout: {\n type: 'grid',\n cols: 4,\n snake: true,\n nodeSize: 40,\n preventOverlap: true,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "duration": 15174, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-behavior-drag-element", + "g6-pattern-flow-chart", + "g6-node-html", + "g6-layout-combo-fishbone" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 843, + "expectedLength": 508, + "similarity": 0.6069190953973562, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [];\nfor (let i = 0; i < 16; i++) {\n nodes.push({ id: `${i}` });\n}\n\nconst edges = [];\nfor (let i = 0; i < 15; i++) {\n edges.push({ source: `${i}`, target: `${i + 1}` });\n}\n\nconst graph = new Graph({\n container,\n width: 800,\n height: 600,\n data: {\n nodes,\n edges,\n },\n node: {\n type: 'circle',\n style: {\n size: 36,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelFill: '#fff',\n labelPlacement: 'center',\n labelFontSize: 14,\n },\n },\n edge: {\n style: {\n stroke: '#ccc',\n lineWidth: 2,\n },\n },\n layout: {\n type: 'grid',\n cols: 4,\n snake: true,\n nodeSize: 40,\n preventOverlap: true,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "push", + "push", + "Graph", + "render" + ], + "objectKeys": [ + "id", + "source", + "target", + "width", + "height", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelFill", + "labelPlacement", + "labelFontSize", + "edge", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "cols", + "snake", + "nodeSize", + "preventOverlap", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-84", + "query": "根据描述绘制图表,使用 G6 创建一个网格布局的图实例,包含 5 个节点和 4 条边,定义了节点的样式及交互行为,如点击选中、拖拽等,最后将图表渲染到页面容器中。参考数据:[{\"id\":\"node1\"},{\"id\":\"node2\"},{\"id\":\"node3\"},{\"id\":\"node4\"},{\"id\":\"node5\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n layout: {\n type: 'grid',\n },\n data: {\n nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3' }, { id: 'node4' }, { id: 'node5' }],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node2', target: 'node3' },\n { source: 'node3', target: 'node4' },\n { source: 'node4', target: 'node5' },\n ],\n },\n node: {\n style: {\n fill: '#E4504D',\n },\n state: {\n active: {\n fill: '#0b0',\n },\n },\n },\n behaviors: [\n {\n type: 'click-select',\n degree: 1,\n state: 'selected', // 选中的状态\n neighborState: 'active', // 相邻节点附着状态\n unselectedState: 'inactive', // 未选中节点状态\n multiple: true,\n trigger: ['shift'],\n },\n 'drag-element',\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [\n { id: 'node1', data: { label: '节点1' } },\n { id: 'node2', data: { label: '节点2' } },\n { id: 'node3', data: { label: '节点3' } },\n { id: 'node4', data: { label: '节点4' } },\n { id: 'node5', data: { label: '节点5' } },\n];\n\nconst edges = [\n { id: 'e1', source: 'node1', target: 'node2' },\n { id: 'e2', source: 'node2', target: 'node3' },\n { id: 'e3', source: 'node3', target: 'node4' },\n { id: 'e4', source: 'node4', target: 'node5' },\n];\n\nconst graph = new Graph({\n container: container,\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#aaa',\n lineWidth: 1.5,\n endArrow: true,\n },\n },\n layout: {\n type: 'grid',\n rows: 2,\n rowGap: 60,\n colGap: 80,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'click-select',\n 'drag-element',\n ],\n autoFit: 'view',\n});\n\ngraph.render();", + "duration": 10977, + "retrievedSkillIds": [ + "g6-layout-grid", + "g6-behavior-drag-element", + "g6-core-graph-init", + "g6-node-react", + "g6-node-html" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1158, + "expectedLength": 846, + "similarity": 0.6414155486756106, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [\n { id: 'node1', data: { label: '节点1' } },\n { id: 'node2', data: { label: '节点2' } },\n { id: 'node3', data: { label: '节点3' } },\n { id: 'node4', data: { label: '节点4' } },\n { id: 'node5', data: { label: '节点5' } },\n];\n\nconst edges = [\n { id: 'e1', source: 'node1', target: 'node2' },\n { id: 'e2', source: 'node2', target: 'node3' },\n { id: 'e3', source: 'node3', target: 'node4' },\n { id: 'e4', source: 'node4', target: 'node5' },\n];\n\nconst graph = new Graph({\n container: container,\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#aaa',\n lineWidth: 1.5,\n endArrow: true,\n },\n },\n layout: {\n type: 'grid',\n rows: 2,\n rowGap: 60,\n colGap: 80,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'click-select',\n 'drag-element',\n ],\n autoFit: 'view',\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "container", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "layout", + "type", + "rows", + "rowGap", + "colGap", + "behaviors", + "autoFit" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-85", + "query": "根据描述绘制图表,使用 G6 渲染一个静态的节点和边构成的关系图,其中部分节点和边带有 selected 状态。设置了基础的交互行为,包括画布的缩放、拖拽,以及点击选中元素的功能,并根据缩放比例动态调整元素大小。参考数据:[{\"id\":\"node0\",\"size\":50,\"label\":\"0\",\"style\":{\"x\":326,\"y\":268},\"states\":[\"selected\"]},{\"id\":\"node1\",\"size\":30,\"label\":\"1\",\"style\":{\"x\":280,\"y\":384},\"states\":[\"selected\"]},{\"id\":\"node2\",\"size\":30,\"label\":\"2\",\"style\":{\"x\":234,\"y\":167}},{\"id\":\"node3\",\"size\":30,\"label\":\"3\",\"style\":{\"x\":391,\"y\":368}},{\"id\":\"node4\",\"size\":30,\"label\":\"4\",\"style\":{\"x\":444,\"y\":209}},{\"id\":\"node5\",\"size\":30,\"label\":\"5\",\"style\":{\"x\":378,\"y\":157}},{\"id\":\"node6\",\"size\":15,\"label\":\"6\",\"style\":{\"x\":229,\"y\":400}},{\"id\":\"node7\",\"size\":15,\"label\":\"7\",\"style\":{\"x\":281,\"y\":440}},{\"id\":\"node8\",\"size\":15,\"label\":\"8\",\"style\":{\"x\":188,\"y\":119}},{\"id\":\"node9\",\"size\":15,\"label\":\"9\",\"style\":{\"x\":287,\"y\":157}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node0', size: 50, label: '0', style: { x: 326, y: 268 }, states: ['selected'] },\n { id: 'node1', size: 30, label: '1', style: { x: 280, y: 384 }, states: ['selected'] },\n { id: 'node2', size: 30, label: '2', style: { x: 234, y: 167 } },\n { id: 'node3', size: 30, label: '3', style: { x: 391, y: 368 } },\n { id: 'node4', size: 30, label: '4', style: { x: 444, y: 209 } },\n { id: 'node5', size: 30, label: '5', style: { x: 378, y: 157 } },\n { id: 'node6', size: 15, label: '6', style: { x: 229, y: 400 } },\n { id: 'node7', size: 15, label: '7', style: { x: 281, y: 440 } },\n { id: 'node8', size: 15, label: '8', style: { x: 188, y: 119 } },\n { id: 'node9', size: 15, label: '9', style: { x: 287, y: 157 } },\n { id: 'node10', size: 15, label: '10', style: { x: 185, y: 200 } },\n { id: 'node11', size: 15, label: '11', style: { x: 238, y: 110 } },\n { id: 'node12', size: 15, label: '12', style: { x: 239, y: 221 } },\n { id: 'node13', size: 15, label: '13', style: { x: 176, y: 160 } },\n { id: 'node14', size: 15, label: '14', style: { x: 389, y: 423 } },\n { id: 'node15', size: 15, label: '15', style: { x: 441, y: 341 } },\n { id: 'node16', size: 15, label: '16', style: { x: 442, y: 398 } },\n ],\n edges: [\n { source: 'node0', target: 'node1', label: '0-1', states: ['selected'] },\n { source: 'node0', target: 'node2', label: '0-2' },\n { source: 'node0', target: 'node3', label: '0-3' },\n { source: 'node0', target: 'node4', label: '0-4' },\n { source: 'node0', target: 'node5', label: '0-5' },\n { source: 'node1', target: 'node6', label: '1-6' },\n { source: 'node1', target: 'node7', label: '1-7' },\n { source: 'node2', target: 'node8', label: '2-8' },\n { source: 'node2', target: 'node9', label: '2-9' },\n { source: 'node2', target: 'node10', label: '2-10' },\n { source: 'node2', target: 'node11', label: '2-11' },\n { source: 'node2', target: 'node12', label: '2-12' },\n { source: 'node2', target: 'node13', label: '2-13' },\n { source: 'node3', target: 'node14', label: '3-14' },\n { source: 'node3', target: 'node15', label: '3-15' },\n { source: 'node3', target: 'node16', label: '3-16' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n labelText: (d) => d.label,\n size: (d) => d.size,\n lineWidth: 1,\n },\n },\n edge: { style: { labelText: (d) => d.label } },\n behaviors: [\n 'zoom-canvas',\n 'drag-canvas',\n {\n key: 'fix-element-size',\n type: 'fix-element-size',\n enable: (event) => event.data.scale < 1,\n state: 'selected',\n reset: true,\n },\n { type: 'click-select', key: 'click-select', multiple: true },\n ],\n autoFit: 'center',\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst rawNodes = [\n {\"id\":\"node0\",\"size\":50,\"label\":\"0\",\"style\":{\"x\":326,\"y\":268},\"states\":[\"selected\"]},\n {\"id\":\"node1\",\"size\":30,\"label\":\"1\",\"style\":{\"x\":280,\"y\":384},\"states\":[\"selected\"]},\n {\"id\":\"node2\",\"size\":30,\"label\":\"2\",\"style\":{\"x\":234,\"y\":167}},\n {\"id\":\"node3\",\"size\":30,\"label\":\"3\",\"style\":{\"x\":391,\"y\":368}},\n {\"id\":\"node4\",\"size\":30,\"label\":\"4\",\"style\":{\"x\":444,\"y\":209}},\n {\"id\":\"node5\",\"size\":30,\"label\":\"5\",\"style\":{\"x\":378,\"y\":157}},\n {\"id\":\"node6\",\"size\":15,\"label\":\"6\",\"style\":{\"x\":229,\"y\":400}},\n {\"id\":\"node7\",\"size\":15,\"label\":\"7\",\"style\":{\"x\":281,\"y\":440}},\n {\"id\":\"node8\",\"size\":15,\"label\":\"8\",\"style\":{\"x\":188,\"y\":119}},\n {\"id\":\"node9\",\"size\":15,\"label\":\"9\",\"style\":{\"x\":287,\"y\":157}}\n];\n\nconst nodes = rawNodes.map(n => ({\n id: n.id,\n x: n.style.x,\n y: n.style.y,\n data: {\n label: n.label,\n size: n.size\n },\n states: n.states || []\n}));\n\nconst edges = [\n { id: 'e0-1', source: 'node0', target: 'node1', states: ['selected'] },\n { id: 'e0-2', source: 'node0', target: 'node2' },\n { id: 'e0-5', source: 'node0', target: 'node5' },\n { id: 'e1-3', source: 'node1', target: 'node3' },\n { id: 'e1-6', source: 'node1', target: 'node6' },\n { id: 'e1-7', source: 'node1', target: 'node7' },\n { id: 'e2-8', source: 'node2', target: 'node8' },\n { id: 'e2-9', source: 'node2', target: 'node9' },\n { id: 'e3-4', source: 'node3', target: 'node4' },\n { id: 'e5-4', source: 'node5', target: 'node4' }\n];\n\nconst graph = new Graph({\n container: 'container',\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: (d) => d.data.size,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelFill: '#fff',\n labelPlacement: 'center',\n labelFontSize: (d) => Math.max(10, d.data.size / 3)\n },\n state: {\n selected: {\n fill: '#ff4d4f',\n stroke: '#ff7875',\n lineWidth: 4,\n shadowColor: 'rgba(255, 77, 79, 0.3)',\n shadowBlur: 10\n }\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#ccc',\n lineWidth: 1.5,\n endArrow: true\n },\n state: {\n selected: {\n stroke: '#ff4d4f',\n lineWidth: 3\n }\n }\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'click-select',\n multiple: true,\n state: 'selected'\n }\n ],\n layout: {\n type: 'preset'\n },\n autoFit: 'center'\n});\n\ngraph.render();", + "duration": 35901, + "retrievedSkillIds": [ + "g6-behavior-drag-element", + "g6-behavior-canvas-nav", + "g6-core-data-structure", + "g6-core-graph-init", + "g6-core-transforms-animation" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2487, + "expectedLength": 2825, + "similarity": 0.6601408108069432, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst rawNodes = [\n {\"id\":\"node0\",\"size\":50,\"label\":\"0\",\"style\":{\"x\":326,\"y\":268},\"states\":[\"selected\"]},\n {\"id\":\"node1\",\"size\":30,\"label\":\"1\",\"style\":{\"x\":280,\"y\":384},\"states\":[\"selected\"]},\n {\"id\":\"node2\",\"size\":30,\"label\":\"2\",\"style\":{\"x\":234,\"y\":167}},\n {\"id\":\"node3\",\"size\":30,\"label\":\"3\",\"style\":{\"x\":391,\"y\":368}},\n {\"id\":\"node4\",\"size\":30,\"label\":\"4\",\"style\":{\"x\":444,\"y\":209}},\n {\"id\":\"node5\",\"size\":30,\"label\":\"5\",\"style\":{\"x\":378,\"y\":157}},\n {\"id\":\"node6\",\"size\":15,\"label\":\"6\",\"style\":{\"x\":229,\"y\":400}},\n {\"id\":\"node7\",\"size\":15,\"label\":\"7\",\"style\":{\"x\":281,\"y\":440}},\n {\"id\":\"node8\",\"size\":15,\"label\":\"8\",\"style\":{\"x\":188,\"y\":119}},\n {\"id\":\"node9\",\"size\":15,\"label\":\"9\",\"style\":{\"x\":287,\"y\":157}}\n];\n\nconst nodes = rawNodes.map(n => ({\n id: n.id,\n x: n.style.x,\n y: n.style.y,\n data: {\n label: n.label,\n size: n.size\n },\n states: n.states || []\n}));\n\nconst edges = [\n { id: 'e0-1', source: 'node0', target: 'node1', states: ['selected'] },\n { id: 'e0-2', source: 'node0', target: 'node2' },\n { id: 'e0-5', source: 'node0', target: 'node5' },\n { id: 'e1-3', source: 'node1', target: 'node3' },\n { id: 'e1-6', source: 'node1', target: 'node6' },\n { id: 'e1-7', source: 'node1', target: 'node7' },\n { id: 'e2-8', source: 'node2', target: 'node8' },\n { id: 'e2-9', source: 'node2', target: 'node9' },\n { id: 'e3-4', source: 'node3', target: 'node4' },\n { id: 'e5-4', source: 'node5', target: 'node4' }\n];\n\nconst graph = new Graph({\n container: 'container',\n data: { nodes, edges },\n node: {\n type: 'circle',\n style: {\n size: (d) => d.data.size,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelFill: '#fff',\n labelPlacement: 'center',\n labelFontSize: (d) => Math.max(10, d.data.size / 3)\n },\n state: {\n selected: {\n fill: '#ff4d4f',\n stroke: '#ff7875',\n lineWidth: 4,\n shadowColor: 'rgba(255, 77, 79, 0.3)',\n shadowBlur: 10\n }\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#ccc',\n lineWidth: 1.5,\n endArrow: true\n },\n state: {\n selected: {\n stroke: '#ff4d4f',\n lineWidth: 3\n }\n }\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n {\n type: 'click-select',\n multiple: true,\n state: 'selected'\n }\n ],\n layout: {\n type: 'preset'\n },\n autoFit: 'center'\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "map", + "Graph", + "max", + "rgba", + "render" + ], + "objectKeys": [ + "id", + "x", + "y", + "data", + "label", + "size", + "states", + "id", + "source", + "target", + "states", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "container", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelFill", + "labelPlacement", + "labelFontSize", + "state", + "selected", + "fill", + "stroke", + "lineWidth", + "shadowColor", + "shadowBlur", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "state", + "selected", + "stroke", + "lineWidth", + "behaviors", + "type", + "multiple", + "state", + "layout", + "type", + "autoFit" + ], + "stringLiterals": [ + "id", + "size", + "label", + "style", + "x", + "y", + "states", + "id", + "size", + "label", + "style", + "x", + "y", + "states", + "id", + "size", + "label", + "style", + "x", + "y", + "id", + "size", + "label", + "style", + "x", + "y", + "id", + "size", + "label", + "style", + "x", + "y", + "id", + "size", + "label", + "style", + "x", + "y", + "id", + "size", + "label", + "style", + "x", + "y", + "id", + "size", + "label", + "style", + "x", + "y", + "id", + "size", + "label", + "style", + "x", + "y", + "id", + "size", + "label", + "style", + "x", + "y" + ], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-86", + "query": "根据描述绘制图表,使用 G6 图表库创建一个网格布局的图结构,包含 6 个节点和 3 条边,每条边配置了不同的自定义箭头样式,并启用了边标签显示。参考数据:[{\"id\":\"node1\"},{\"id\":\"node2\"},{\"id\":\"node3\"},{\"id\":\"node4\"},{\"id\":\"node5\"},{\"id\":\"node6\"},{\"id\":\"custom-arrow-1\",\"source\":\"node1\",\"target\":\"node2\",\"style\":{\"endArrowD\":\"M-14,0 L-4,-4 L0,-14 L4,-4 L14,0 L4,4 L0,14 L-4,4 Z\",\"endArrowOffset\":14}},{\"id\":\"custom-arrow-2\",\"source\":\"node3\",\"target\":\"node4\",\"style\":{\"endArrowD\":\"M 3,-5 L 3,5 L 15,10 L 15,-10 Z\",\"endArrowOffset\":10}},{\"id\":\"image-arrow\",\"source\":\"node5\",\"target\":\"node6\",\"style\":{\"endArrowSrc\":\"https://gw.alipayobjects.com/mdn/rms_6ae20b/afts/img/A*N4ZMS7gHsUIAAAAAAAAAAABkARQnAQ\",\"endArrowSize\":28,\"endArrowTransform\":[[\"rotate\",90]]}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: new Array(6).fill(0).map((_, i) => ({ id: `node${i + 1}` })),\n edges: [\n {\n id: 'custom-arrow-1',\n source: 'node1',\n target: 'node2',\n style: {\n endArrowD: 'M-14,0 L-4,-4 L0,-14 L4,-4 L14,0 L4,4 L0,14 L-4,4 Z',\n endArrowOffset: 14,\n },\n },\n {\n id: 'custom-arrow-2',\n source: 'node3',\n target: 'node4',\n style: {\n endArrowD: 'M 3,-5 L 3,5 L 15,10 L 15,-10 Z',\n endArrowOffset: 10,\n },\n },\n {\n id: 'image-arrow',\n source: 'node5',\n target: 'node6',\n style: {\n endArrowSrc: 'https://gw.alipayobjects.com/mdn/rms_6ae20b/afts/img/A*N4ZMS7gHsUIAAAAAAAAAAABkARQnAQ',\n endArrowSize: 28,\n endArrowTransform: [['rotate', 90]],\n },\n },\n ],\n};\n\nconst graph = new Graph({\n data,\n container: 'container',\n edge: {\n style: {\n stroke: '#F6BD16',\n labelText: (d) => d.id,\n labelBackground: true,\n endArrow: true,\n },\n },\n layout: {\n type: 'grid',\n cols: 2,\n },\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\n// 参考数据:分离节点和边\nconst rawData = [\n {\"id\":\"node1\"},{\"id\":\"node2\"},{\"id\":\"node3\"},{\"id\":\"node4\"},{\"id\":\"node5\"},{\"id\":\"node6\"},\n {\"id\":\"custom-arrow-1\",\"source\":\"node1\",\"target\":\"node2\",\"style\":{\"endArrowD\":\"M-14,0 L-4,-4 L0,-14 L4,-4 L14,0 L4,4 L0,14 L-4,4 Z\",\"endArrowOffset\":14}},\n {\"id\":\"custom-arrow-2\",\"source\":\"node3\",\"target\":\"node4\",\"style\":{\"endArrowD\":\"M 3,-5 L 3,5 L 15,10 L 15,-10 Z\",\"endArrowOffset\":10}},\n {\"id\":\"image-arrow\",\"source\":\"node5\",\"target\":\"node6\",\"style\":{\"endArrowSrc\":\"https://gw.alipayobjects.com/mdn/rms_6ae20b/afts/img/A*N4ZMS7gHsUIAAAAAAAAAAABkARQnAQ\",\"endArrowSize\":28,\"endArrowTransform\":[[\"rotate\",90]]}}\n];\n\nconst nodes = rawData.filter(d => !d.source).map(d => ({\n id: d.id,\n data: { label: d.id }\n}));\n\nconst edges = rawData.filter(d => d.source).map(d => ({\n id: d.id,\n source: d.source,\n target: d.target,\n data: { \n label: d.id,\n arrowConfig: d.style\n }\n}));\n\nconst graph = new Graph({\n container: 'container',\n width: 800,\n height: 600,\n data: { nodes, edges },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n nodeSize: 100,\n padding: 50\n },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 14\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#666',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelFontSize: 12,\n labelFill: '#1890ff',\n labelPlacement: 'middle',\n labelOffsetY: -15,\n endArrow: (d) => {\n const cfg = d.data.arrowConfig;\n if (cfg.endArrowSrc) {\n return {\n type: 'image',\n src: cfg.endArrowSrc,\n width: cfg.endArrowSize,\n height: cfg.endArrowSize,\n transform: cfg.endArrowTransform\n };\n }\n if (cfg.endArrowD) {\n return {\n type: 'path',\n d: cfg.endArrowD,\n offset: cfg.endArrowOffset,\n fill: '#666',\n stroke: '#666'\n };\n }\n return true;\n }\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "duration": 22095, + "retrievedSkillIds": [ + "g6-core-graph-init", + "g6-node-circle", + "g6-edge-line", + "g6-node-rect", + "g6-layout-circular" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2299, + "expectedLength": 1106, + "similarity": 0.5194829026220653, + "extractedCode": "import { Graph } from '@antv/g6';\n\n// 参考数据:分离节点和边\nconst rawData = [\n {\"id\":\"node1\"},{\"id\":\"node2\"},{\"id\":\"node3\"},{\"id\":\"node4\"},{\"id\":\"node5\"},{\"id\":\"node6\"},\n {\"id\":\"custom-arrow-1\",\"source\":\"node1\",\"target\":\"node2\",\"style\":{\"endArrowD\":\"M-14,0 L-4,-4 L0,-14 L4,-4 L14,0 L4,4 L0,14 L-4,4 Z\",\"endArrowOffset\":14}},\n {\"id\":\"custom-arrow-2\",\"source\":\"node3\",\"target\":\"node4\",\"style\":{\"endArrowD\":\"M 3,-5 L 3,5 L 15,10 L 15,-10 Z\",\"endArrowOffset\":10}},\n {\"id\":\"image-arrow\",\"source\":\"node5\",\"target\":\"node6\",\"style\":{\"endArrowSrc\":\"https://gw.alipayobjects.com/mdn/rms_6ae20b/afts/img/A*N4ZMS7gHsUIAAAAAAAAAAABkARQnAQ\",\"endArrowSize\":28,\"endArrowTransform\":[[\"rotate\",90]]}}\n];\n\nconst nodes = rawData.filter(d => !d.source).map(d => ({\n id: d.id,\n data: { label: d.id }\n}));\n\nconst edges = rawData.filter(d => d.source).map(d => ({\n id: d.id,\n source: d.source,\n target: d.target,\n data: { \n label: d.id,\n arrowConfig: d.style\n }\n}));\n\nconst graph = new Graph({\n container: 'container',\n width: 800,\n height: 600,\n data: { nodes, edges },\n layout: {\n type: 'grid',\n rows: 2,\n cols: 3,\n nodeSize: 100,\n padding: 50\n },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 14\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#666',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelFontSize: 12,\n labelFill: '#1890ff',\n labelPlacement: 'middle',\n labelOffsetY: -15,\n endArrow: (d) => {\n const cfg = d.data.arrowConfig;\n if (cfg.endArrowSrc) {\n return {\n type: 'image',\n src: cfg.endArrowSrc,\n width: cfg.endArrowSize,\n height: cfg.endArrowSize,\n transform: cfg.endArrowTransform\n };\n }\n if (cfg.endArrowD) {\n return {\n type: 'path',\n d: cfg.endArrowD,\n offset: cfg.endArrowOffset,\n fill: '#666',\n stroke: '#666'\n };\n }\n return true;\n }\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "filter", + "map", + "filter", + "map", + "Graph", + "render" + ], + "objectKeys": [ + "https", + "id", + "data", + "label", + "id", + "source", + "target", + "data", + "label", + "arrowConfig", + "container", + "width", + "height", + "data", + "layout", + "type", + "rows", + "cols", + "nodeSize", + "padding", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "labelText", + "labelFontSize", + "labelFill", + "labelPlacement", + "labelOffsetY", + "endArrow", + "type", + "src", + "width", + "height", + "transform", + "type", + "d", + "offset", + "fill", + "stroke", + "behaviors" + ], + "stringLiterals": [ + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "source", + "target", + "style", + "endArrowD", + "endArrowOffset", + "id", + "source", + "target", + "style", + "endArrowD", + "endArrowOffset", + "id", + "source", + "target", + "style", + "endArrowSrc", + "endArrowSize", + "endArrowTransform" + ], + "apiPatterns": [ + "transform", + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-87", + "query": "根据描述绘制图表,使用 G6 图表库创建一个力导向图,通过定义节点和边的数据结构来展示图关系,并应用了力导向布局进行自动排布。参考数据:[{\"id\":\"node0\",\"style\":{\"size\":50},\"data\":{\"cluster\":\"node0\"}},{\"id\":\"node1\",\"style\":{\"size\":30},\"data\":{\"cluster\":\"node1\"}},{\"id\":\"node2\",\"style\":{\"size\":30},\"data\":{\"cluster\":\"node2\"}},{\"id\":\"node3\",\"style\":{\"size\":30},\"data\":{\"cluster\":\"node3\"}},{\"id\":\"node4\",\"style\":{\"size\":30},\"data\":{\"cluster\":\"node4\"}},{\"id\":\"node5\",\"style\":{\"size\":30},\"data\":{\"isLeaf\":true,\"cluster\":\"node5\"}},{\"id\":\"node6\",\"style\":{\"size\":15},\"data\":{\"isLeaf\":true,\"cluster\":\"node6\"}},{\"id\":\"node7\",\"style\":{\"size\":15},\"data\":{\"isLeaf\":true,\"cluster\":\"node7\"}},{\"id\":\"node8\",\"style\":{\"size\":15},\"data\":{\"isLeaf\":true,\"cluster\":\"node8\"}},{\"id\":\"node9\",\"style\":{\"size\":15},\"data\":{\"isLeaf\":true,\"cluster\":\"node9\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"node0\",\n \"style\": {\n \"size\": 50\n },\n \"data\": {\n \"cluster\": \"node0\"\n }\n },\n {\n \"id\": \"node1\",\n \"style\": {\n \"size\": 30\n },\n \"data\": {\n \"cluster\": \"node1\"\n }\n },\n {\n \"id\": \"node2\",\n \"style\": {\n \"size\": 30\n },\n \"data\": {\n \"cluster\": \"node2\"\n }\n },\n {\n \"id\": \"node3\",\n \"style\": {\n \"size\": 30\n },\n \"data\": {\n \"cluster\": \"node3\"\n }\n },\n {\n \"id\": \"node4\",\n \"style\": {\n \"size\": 30\n },\n \"data\": {\n \"cluster\": \"node4\"\n }\n },\n {\n \"id\": \"node5\",\n \"style\": {\n \"size\": 30\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node5\"\n }\n },\n {\n \"id\": \"node6\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node6\"\n }\n },\n {\n \"id\": \"node7\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node7\"\n }\n },\n {\n \"id\": \"node8\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node8\"\n }\n },\n {\n \"id\": \"node9\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node9\"\n }\n },\n {\n \"id\": \"node10\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node10\"\n }\n },\n {\n \"id\": \"node11\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node11\"\n }\n },\n {\n \"id\": \"node12\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node12\"\n }\n },\n {\n \"id\": \"node13\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node13\"\n }\n },\n {\n \"id\": \"node14\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node14\"\n }\n },\n {\n \"id\": \"node15\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node15\"\n }\n },\n {\n \"id\": \"node16\",\n \"style\": {\n \"size\": 15\n },\n \"data\": {\n \"isLeaf\": true,\n \"cluster\": \"node16\"\n }\n }\n ],\n \"edges\": [\n {\n \"source\": \"node0\",\n \"target\": \"node1\"\n },\n {\n \"source\": \"node0\",\n \"target\": \"node2\"\n },\n {\n \"source\": \"node0\",\n \"target\": \"node3\"\n },\n {\n \"source\": \"node0\",\n \"target\": \"node4\"\n },\n {\n \"source\": \"node0\",\n \"target\": \"node5\"\n },\n {\n \"source\": \"node1\",\n \"target\": \"node6\"\n },\n {\n \"source\": \"node1\",\n \"target\": \"node7\"\n },\n {\n \"source\": \"node2\",\n \"target\": \"node8\"\n },\n {\n \"source\": \"node2\",\n \"target\": \"node9\"\n },\n {\n \"source\": \"node2\",\n \"target\": \"node10\"\n },\n {\n \"source\": \"node2\",\n \"target\": \"node11\"\n },\n {\n \"source\": \"node2\",\n \"target\": \"node12\"\n },\n {\n \"source\": \"node2\",\n \"target\": \"node13\"\n },\n {\n \"source\": \"node3\",\n \"target\": \"node14\"\n },\n {\n \"source\": \"node3\",\n \"target\": \"node15\"\n },\n {\n \"source\": \"node3\",\n \"target\": \"node16\"\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'force',\n },\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node0', style: { size: 50 }, data: { cluster: 'node0' } },\n { id: 'node1', style: { size: 30 }, data: { cluster: 'node1' } },\n { id: 'node2', style: { size: 30 }, data: { cluster: 'node2' } },\n { id: 'node3', style: { size: 30 }, data: { cluster: 'node3' } },\n { id: 'node4', style: { size: 30 }, data: { cluster: 'node4' } },\n { id: 'node5', style: { size: 30 }, data: { isLeaf: true, cluster: 'node5' } },\n { id: 'node6', style: { size: 15 }, data: { isLeaf: true, cluster: 'node6' } },\n { id: 'node7', style: { size: 15 }, data: { isLeaf: true, cluster: 'node7' } },\n { id: 'node8', style: { size: 15 }, data: { isLeaf: true, cluster: 'node8' } },\n { id: 'node9', style: { size: 15 }, data: { isLeaf: true, cluster: 'node9' } }\n ],\n edges: [\n { source: 'node0', target: 'node1' },\n { source: 'node0', target: 'node2' },\n { source: 'node0', target: 'node3' },\n { source: 'node0', target: 'node4' },\n { source: 'node1', target: 'node5' },\n { source: 'node1', target: 'node6' },\n { source: 'node2', target: 'node7' },\n { source: 'node3', target: 'node8' },\n { source: 'node4', target: 'node9' }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'circle',\n style: {\n size: (d) => d.style?.size || 30,\n fill: (d) => {\n const clusterColors = {\n node0: '#1783FF',\n node1: '#52C41A',\n node2: '#FAAD14',\n node3: '#F5222D',\n node4: '#722ED1',\n node5: '#13C2C2',\n node6: '#EB2F96',\n node7: '#F5222D',\n node8: '#FA8C16',\n node9: '#52C41A'\n };\n return clusterColors[d.data?.cluster] || '#999';\n },\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: (d) => (d.style?.size > 20 ? 12 : 10)\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#e0e0e0',\n lineWidth: 1.5,\n endArrow: true\n }\n },\n layout: {\n type: 'force',\n linkDistance: 120,\n gravity: 10,\n coulombDisScale: 0.005\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element-force']\n});\n\ngraph.render();", + "duration": 29829, + "retrievedSkillIds": [ + "g6-layout-force", + "g6-layout-mindmap", + "g6-behavior-drag-element", + "g6-pattern-tree-graph", + "g6-pattern-network-graph" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2291, + "expectedLength": 3949, + "similarity": 0.573936014921742, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node0', style: { size: 50 }, data: { cluster: 'node0' } },\n { id: 'node1', style: { size: 30 }, data: { cluster: 'node1' } },\n { id: 'node2', style: { size: 30 }, data: { cluster: 'node2' } },\n { id: 'node3', style: { size: 30 }, data: { cluster: 'node3' } },\n { id: 'node4', style: { size: 30 }, data: { cluster: 'node4' } },\n { id: 'node5', style: { size: 30 }, data: { isLeaf: true, cluster: 'node5' } },\n { id: 'node6', style: { size: 15 }, data: { isLeaf: true, cluster: 'node6' } },\n { id: 'node7', style: { size: 15 }, data: { isLeaf: true, cluster: 'node7' } },\n { id: 'node8', style: { size: 15 }, data: { isLeaf: true, cluster: 'node8' } },\n { id: 'node9', style: { size: 15 }, data: { isLeaf: true, cluster: 'node9' } }\n ],\n edges: [\n { source: 'node0', target: 'node1' },\n { source: 'node0', target: 'node2' },\n { source: 'node0', target: 'node3' },\n { source: 'node0', target: 'node4' },\n { source: 'node1', target: 'node5' },\n { source: 'node1', target: 'node6' },\n { source: 'node2', target: 'node7' },\n { source: 'node3', target: 'node8' },\n { source: 'node4', target: 'node9' }\n ]\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'circle',\n style: {\n size: (d) => d.style?.size || 30,\n fill: (d) => {\n const clusterColors = {\n node0: '#1783FF',\n node1: '#52C41A',\n node2: '#FAAD14',\n node3: '#F5222D',\n node4: '#722ED1',\n node5: '#13C2C2',\n node6: '#EB2F96',\n node7: '#F5222D',\n node8: '#FA8C16',\n node9: '#52C41A'\n };\n return clusterColors[d.data?.cluster] || '#999';\n },\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: (d) => (d.style?.size > 20 ? 12 : 10)\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#e0e0e0',\n lineWidth: 1.5,\n endArrow: true\n }\n },\n layout: {\n type: 'force',\n linkDistance: 120,\n gravity: 10,\n coulombDisScale: 0.005\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element-force']\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "style", + "size", + "data", + "cluster", + "id", + "style", + "size", + "data", + "cluster", + "id", + "style", + "size", + "data", + "cluster", + "id", + "style", + "size", + "data", + "cluster", + "id", + "style", + "size", + "data", + "cluster", + "id", + "style", + "size", + "data", + "isLeaf", + "cluster", + "id", + "style", + "size", + "data", + "isLeaf", + "cluster", + "id", + "style", + "size", + "data", + "isLeaf", + "cluster", + "id", + "style", + "size", + "data", + "isLeaf", + "cluster", + "id", + "style", + "size", + "data", + "isLeaf", + "cluster", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "container", + "node", + "type", + "style", + "size", + "fill", + "node0", + "node1", + "node2", + "node3", + "node4", + "node5", + "node6", + "node7", + "node8", + "node9", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "12", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "layout", + "type", + "linkDistance", + "gravity", + "coulombDisScale", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-88", + "query": "根据描述绘制图表,使用 G6 图表库创建一个包含节点、边和组合组的图形结构,并应用 combo-combined 布局来展示分组关系。节点根据所属组合着色,支持画布拖拽、元素拖拽和缩放等交互操作。参考数据:[{\"id\":\"0\",\"combo\":\"a\"},{\"id\":\"1\",\"combo\":\"a\"},{\"id\":\"2\",\"combo\":\"a\"},{\"id\":\"3\",\"combo\":\"a\"},{\"id\":\"4\",\"combo\":\"a\"},{\"id\":\"5\",\"combo\":\"a\"},{\"id\":\"6\",\"combo\":\"a\"},{\"id\":\"7\",\"combo\":\"a\"},{\"id\":\"8\",\"combo\":\"a\"},{\"id\":\"9\",\"combo\":\"a\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n \"nodes\": [\n {\n \"id\": \"0\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"1\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"2\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"3\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"4\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"5\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"6\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"7\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"8\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"9\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"10\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"11\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"12\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"13\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"14\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"15\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"16\",\n \"combo\": \"b\"\n },\n {\n \"id\": \"17\",\n \"combo\": \"b\"\n },\n {\n \"id\": \"18\",\n \"combo\": \"b\"\n },\n {\n \"id\": \"19\",\n \"combo\": \"b\"\n },\n {\n \"id\": \"20\"\n },\n {\n \"id\": \"21\"\n },\n {\n \"id\": \"22\"\n },\n {\n \"id\": \"23\",\n \"combo\": \"c\"\n },\n {\n \"id\": \"24\",\n \"combo\": \"a\"\n },\n {\n \"id\": \"25\"\n },\n {\n \"id\": \"26\"\n },\n {\n \"id\": \"27\",\n \"combo\": \"c\"\n },\n {\n \"id\": \"28\",\n \"combo\": \"c\"\n },\n {\n \"id\": \"29\",\n \"combo\": \"c\"\n },\n {\n \"id\": \"30\",\n \"combo\": \"c\"\n },\n {\n \"id\": \"31\",\n \"combo\": \"c\"\n },\n {\n \"id\": \"32\",\n \"combo\": \"d\"\n },\n {\n \"id\": \"33\",\n \"combo\": \"d\"\n }\n ],\n \"edges\": [\n {\n \"source\": \"0\",\n \"target\": \"1\"\n },\n {\n \"source\": \"0\",\n \"target\": \"2\"\n },\n {\n \"source\": \"0\",\n \"target\": \"3\"\n },\n {\n \"source\": \"0\",\n \"target\": \"4\"\n },\n {\n \"source\": \"0\",\n \"target\": \"5\"\n },\n {\n \"source\": \"0\",\n \"target\": \"7\"\n },\n {\n \"source\": \"0\",\n \"target\": \"8\"\n },\n {\n \"source\": \"0\",\n \"target\": \"9\"\n },\n {\n \"source\": \"0\",\n \"target\": \"10\"\n },\n {\n \"source\": \"0\",\n \"target\": \"11\"\n },\n {\n \"source\": \"0\",\n \"target\": \"13\"\n },\n {\n \"source\": \"0\",\n \"target\": \"14\"\n },\n {\n \"source\": \"0\",\n \"target\": \"15\"\n },\n {\n \"source\": \"0\",\n \"target\": \"16\"\n },\n {\n \"source\": \"2\",\n \"target\": \"3\"\n },\n {\n \"source\": \"4\",\n \"target\": \"5\"\n },\n {\n \"source\": \"4\",\n \"target\": \"6\"\n },\n {\n \"source\": \"5\",\n \"target\": \"6\"\n },\n {\n \"source\": \"7\",\n \"target\": \"13\"\n },\n {\n \"source\": \"8\",\n \"target\": \"14\"\n },\n {\n \"source\": \"9\",\n \"target\": \"10\"\n },\n {\n \"source\": \"10\",\n \"target\": \"22\"\n },\n {\n \"source\": \"10\",\n \"target\": \"14\"\n },\n {\n \"source\": \"10\",\n \"target\": \"12\"\n },\n {\n \"source\": \"10\",\n \"target\": \"24\"\n },\n {\n \"source\": \"10\",\n \"target\": \"21\"\n },\n {\n \"source\": \"10\",\n \"target\": \"20\"\n },\n {\n \"source\": \"11\",\n \"target\": \"24\"\n },\n {\n \"source\": \"11\",\n \"target\": \"22\"\n },\n {\n \"source\": \"11\",\n \"target\": \"14\"\n },\n {\n \"source\": \"12\",\n \"target\": \"13\"\n },\n {\n \"source\": \"16\",\n \"target\": \"17\"\n },\n {\n \"source\": \"16\",\n \"target\": \"18\"\n },\n {\n \"source\": \"16\",\n \"target\": \"21\"\n },\n {\n \"source\": \"16\",\n \"target\": \"22\"\n },\n {\n \"source\": \"17\",\n \"target\": \"18\"\n },\n {\n \"source\": \"17\",\n \"target\": \"20\"\n },\n {\n \"source\": \"18\",\n \"target\": \"19\"\n },\n {\n \"source\": \"19\",\n \"target\": \"20\"\n },\n {\n \"source\": \"19\",\n \"target\": \"33\"\n },\n {\n \"source\": \"19\",\n \"target\": \"22\"\n },\n {\n \"source\": \"19\",\n \"target\": \"23\"\n },\n {\n \"source\": \"20\",\n \"target\": \"21\"\n },\n {\n \"source\": \"21\",\n \"target\": \"22\"\n },\n {\n \"source\": \"22\",\n \"target\": \"24\"\n },\n {\n \"source\": \"22\",\n \"target\": \"25\"\n },\n {\n \"source\": \"22\",\n \"target\": \"26\"\n },\n {\n \"source\": \"22\",\n \"target\": \"23\"\n },\n {\n \"source\": \"22\",\n \"target\": \"28\"\n },\n {\n \"source\": \"22\",\n \"target\": \"30\"\n },\n {\n \"source\": \"22\",\n \"target\": \"31\"\n },\n {\n \"source\": \"22\",\n \"target\": \"32\"\n },\n {\n \"source\": \"22\",\n \"target\": \"33\"\n },\n {\n \"source\": \"23\",\n \"target\": \"28\"\n },\n {\n \"source\": \"23\",\n \"target\": \"27\"\n },\n {\n \"source\": \"23\",\n \"target\": \"29\"\n },\n {\n \"source\": \"23\",\n \"target\": \"30\"\n },\n {\n \"source\": \"23\",\n \"target\": \"31\"\n },\n {\n \"source\": \"23\",\n \"target\": \"33\"\n },\n {\n \"source\": \"32\",\n \"target\": \"33\"\n }\n ],\n \"combos\": [\n {\n \"id\": \"a\",\n \"data\": {\n \"label\": \"Combo A\"\n }\n },\n {\n \"id\": \"b\",\n \"data\": {\n \"label\": \"Combo B\"\n }\n },\n {\n \"id\": \"c\",\n \"data\": {\n \"label\": \"Combo D\"\n }\n },\n {\n \"id\": \"d\",\n \"combo\": \"b\",\n \"data\": {\n \"label\": \"Combo D\"\n }\n }\n ]\n };\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'combo-combined',\n comboPadding: 2,\n },\n node: {\n style: {\n size: 20,\n labelText: (d) => d.id,\n },\n palette: {\n type: 'group',\n field: (d) => d.combo,\n },\n },\n edge: {\n style: (model) => {\n const { size, color } = model.data;\n return {\n stroke: color || '#99ADD1',\n lineWidth: size || 1,\n };\n },\n },\n behaviors: ['drag-element', 'drag-canvas', 'zoom-canvas'],\n autoFit: 'view',\n});\ngraph.render();\n\n", + "generatedCode": "import { Graph, GraphEvent } from '@antv/g6';\n\nconst nodes = [\n { id: '0', combo: 'a', data: { label: '节点0' } },\n { id: '1', combo: 'a', data: { label: '节点1' } },\n { id: '2', combo: 'a', data: { label: '节点2' } },\n { id: '3', combo: 'a', data: { label: '节点3' } },\n { id: '4', combo: 'a', data: { label: '节点4' } },\n { id: '5', combo: 'a', data: { label: '节点5' } },\n { id: '6', combo: 'a', data: { label: '节点6' } },\n { id: '7', combo: 'a', data: { label: '节点7' } },\n { id: '8', combo: 'a', data: { label: '节点8' } },\n { id: '9', combo: 'a', data: { label: '节点9' } },\n];\n\nconst edges = [\n { source: '0', target: '1' },\n { source: '1', target: '2' },\n { source: '2', target: '3' },\n { source: '3', target: '4' },\n { source: '4', target: '5' },\n { source: '5', target: '6' },\n { source: '6', target: '7' },\n { source: '7', target: '8' },\n { source: '8', target: '9' },\n { source: '9', target: '0' },\n { source: '0', target: '5' },\n { source: '2', target: '7' },\n];\n\nconst combos = [\n { id: 'a', data: { label: '组合A' } },\n];\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes,\n edges,\n combos,\n },\n node: {\n type: 'circle',\n style: {\n size: 24,\n lineWidth: 2,\n stroke: '#fff',\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFontSize: 12,\n },\n palette: {\n type: 'group',\n field: (d) => d.combo,\n },\n },\n combo: {\n type: 'rect',\n style: {\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n radius: 8,\n padding: 20,\n labelText: (d) => d.data.label,\n labelPlacement: 'top',\n labelFill: '#1d39c4',\n labelFontWeight: 600,\n },\n },\n layout: {\n type: 'combo-combined',\n comboPadding: 10,\n nodeSize: 24,\n spacing: 8,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n ],\n});\n\ngraph.on(GraphEvent.AFTER_LAYOUT, () => {\n graph.fitView({ padding: 20 });\n});\n\ngraph.render();", + "duration": 14281, + "retrievedSkillIds": [ + "g6-combo-overview", + "g6-layout-combo-fishbone", + "g6-pattern-tree-graph", + "g6-layout-mindmap", + "g6-layout-grid" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1983, + "expectedLength": 6327, + "similarity": 0.5263495419309373, + "extractedCode": "import { Graph, GraphEvent } from '@antv/g6';\n\nconst nodes = [\n { id: '0', combo: 'a', data: { label: '节点0' } },\n { id: '1', combo: 'a', data: { label: '节点1' } },\n { id: '2', combo: 'a', data: { label: '节点2' } },\n { id: '3', combo: 'a', data: { label: '节点3' } },\n { id: '4', combo: 'a', data: { label: '节点4' } },\n { id: '5', combo: 'a', data: { label: '节点5' } },\n { id: '6', combo: 'a', data: { label: '节点6' } },\n { id: '7', combo: 'a', data: { label: '节点7' } },\n { id: '8', combo: 'a', data: { label: '节点8' } },\n { id: '9', combo: 'a', data: { label: '节点9' } },\n];\n\nconst edges = [\n { source: '0', target: '1' },\n { source: '1', target: '2' },\n { source: '2', target: '3' },\n { source: '3', target: '4' },\n { source: '4', target: '5' },\n { source: '5', target: '6' },\n { source: '6', target: '7' },\n { source: '7', target: '8' },\n { source: '8', target: '9' },\n { source: '9', target: '0' },\n { source: '0', target: '5' },\n { source: '2', target: '7' },\n];\n\nconst combos = [\n { id: 'a', data: { label: '组合A' } },\n];\n\nconst graph = new Graph({\n container: 'container',\n data: {\n nodes,\n edges,\n combos,\n },\n node: {\n type: 'circle',\n style: {\n size: 24,\n lineWidth: 2,\n stroke: '#fff',\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFontSize: 12,\n },\n palette: {\n type: 'group',\n field: (d) => d.combo,\n },\n },\n combo: {\n type: 'rect',\n style: {\n fill: '#f0f5ff',\n stroke: '#adc6ff',\n lineWidth: 1,\n radius: 8,\n padding: 20,\n labelText: (d) => d.data.label,\n labelPlacement: 'top',\n labelFill: '#1d39c4',\n labelFontWeight: 600,\n },\n },\n layout: {\n type: 'combo-combined',\n comboPadding: 10,\n nodeSize: 24,\n spacing: 8,\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n ],\n});\n\ngraph.on(GraphEvent.AFTER_LAYOUT, () => {\n graph.fitView({ padding: 20 });\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph", + "GraphEvent" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "on", + "fitView", + "render" + ], + "objectKeys": [ + "id", + "combo", + "data", + "label", + "id", + "combo", + "data", + "label", + "id", + "combo", + "data", + "label", + "id", + "combo", + "data", + "label", + "id", + "combo", + "data", + "label", + "id", + "combo", + "data", + "label", + "id", + "combo", + "data", + "label", + "id", + "combo", + "data", + "label", + "id", + "combo", + "data", + "label", + "id", + "combo", + "data", + "label", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "id", + "data", + "label", + "container", + "data", + "node", + "type", + "style", + "size", + "lineWidth", + "stroke", + "labelText", + "labelPlacement", + "labelFontSize", + "palette", + "type", + "field", + "combo", + "type", + "style", + "fill", + "stroke", + "lineWidth", + "radius", + "padding", + "labelText", + "labelPlacement", + "labelFill", + "labelFontWeight", + "layout", + "type", + "comboPadding", + "nodeSize", + "spacing", + "behaviors", + "padding" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "graph.on", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-89", + "query": "根据描述绘制图表,使用 AntV G6 渲染一个静态的节点-边关系图,通过预定义的节点坐标和连接关系展示图结构,并支持画布的缩放与拖拽交互。参考数据:[{\"id\":\"node0\",\"size\":50,\"label\":\"0\",\"style\":{\"x\":326,\"y\":268}},{\"id\":\"node1\",\"size\":30,\"label\":\"1\",\"style\":{\"x\":280,\"y\":384}},{\"id\":\"node2\",\"size\":30,\"label\":\"2\",\"style\":{\"x\":234,\"y\":167}},{\"id\":\"node3\",\"size\":30,\"label\":\"3\",\"style\":{\"x\":391,\"y\":368}},{\"id\":\"node4\",\"size\":30,\"label\":\"4\",\"style\":{\"x\":444,\"y\":209}},{\"id\":\"node5\",\"size\":30,\"label\":\"5\",\"style\":{\"x\":378,\"y\":157}},{\"id\":\"node6\",\"size\":15,\"label\":\"6\",\"style\":{\"x\":229,\"y\":400}},{\"id\":\"node7\",\"size\":15,\"label\":\"7\",\"style\":{\"x\":281,\"y\":440}},{\"id\":\"node8\",\"size\":15,\"label\":\"8\",\"style\":{\"x\":188,\"y\":119}},{\"id\":\"node9\",\"size\":15,\"label\":\"9\",\"style\":{\"x\":287,\"y\":157}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node0', size: 50, label: '0', style: { x: 326, y: 268 } },\n { id: 'node1', size: 30, label: '1', style: { x: 280, y: 384 } },\n { id: 'node2', size: 30, label: '2', style: { x: 234, y: 167 } },\n { id: 'node3', size: 30, label: '3', style: { x: 391, y: 368 } },\n { id: 'node4', size: 30, label: '4', style: { x: 444, y: 209 } },\n { id: 'node5', size: 30, label: '5', style: { x: 378, y: 157 } },\n { id: 'node6', size: 15, label: '6', style: { x: 229, y: 400 } },\n { id: 'node7', size: 15, label: '7', style: { x: 281, y: 440 } },\n { id: 'node8', size: 15, label: '8', style: { x: 188, y: 119 } },\n { id: 'node9', size: 15, label: '9', style: { x: 287, y: 157 } },\n { id: 'node10', size: 15, label: '10', style: { x: 185, y: 200 } },\n { id: 'node11', size: 15, label: '11', style: { x: 238, y: 110 } },\n { id: 'node12', size: 15, label: '12', style: { x: 239, y: 221 } },\n { id: 'node13', size: 15, label: '13', style: { x: 176, y: 160 } },\n { id: 'node14', size: 15, label: '14', style: { x: 389, y: 423 } },\n { id: 'node15', size: 15, label: '15', style: { x: 441, y: 341 } },\n { id: 'node16', size: 15, label: '16', style: { x: 442, y: 398 } },\n ],\n edges: [\n { source: 'node0', target: 'node1', label: '0-1' },\n { source: 'node0', target: 'node2', label: '0-2' },\n { source: 'node0', target: 'node3', label: '0-3' },\n { source: 'node0', target: 'node4', label: '0-4' },\n { source: 'node0', target: 'node5', label: '0-5' },\n { source: 'node1', target: 'node6', label: '1-6' },\n { source: 'node1', target: 'node7', label: '1-7' },\n { source: 'node2', target: 'node8', label: '2-8' },\n { source: 'node2', target: 'node9', label: '2-9' },\n { source: 'node2', target: 'node10', label: '2-10' },\n { source: 'node2', target: 'node11', label: '2-11' },\n { source: 'node2', target: 'node12', label: '2-12' },\n { source: 'node2', target: 'node13', label: '2-13' },\n { source: 'node3', target: 'node14', label: '3-14' },\n { source: 'node3', target: 'node15', label: '3-15' },\n { source: 'node3', target: 'node16', label: '3-16' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n labelBackground: true,\n labelBackgroundFill: '#FFB6C1',\n labelBackgroundRadius: 4,\n labelFontFamily: 'Arial',\n labelPadding: [0, 4],\n labelText: (d) => d.id,\n size: (d) => d.size,\n },\n },\n behaviors: [\n 'zoom-canvas',\n 'drag-canvas',\n {\n key: 'fix-element-size',\n type: 'fix-element-size',\n enable: true,\n node: { shape: 'label' },\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node0', data: { label: '0' }, style: { x: 326, y: 268, size: 50, fill: '#1783FF', labelFill: '#fff' } },\n { id: 'node1', data: { label: '1' }, style: { x: 280, y: 384, size: 30, fill: '#00C9C9' } },\n { id: 'node2', data: { label: '2' }, style: { x: 234, y: 167, size: 30, fill: '#00C9C9' } },\n { id: 'node3', data: { label: '3' }, style: { x: 391, y: 368, size: 30, fill: '#00C9C9' } },\n { id: 'node4', data: { label: '4' }, style: { x: 444, y: 209, size: 30, fill: '#00C9C9' } },\n { id: 'node5', data: { label: '5' }, style: { x: 378, y: 157, size: 30, fill: '#00C9C9' } },\n { id: 'node6', data: { label: '6' }, style: { x: 229, y: 400, size: 15, fill: '#F08F56' } },\n { id: 'node7', data: { label: '7' }, style: { x: 281, y: 440, size: 15, fill: '#F08F56' } },\n { id: 'node8', data: { label: '8' }, style: { x: 188, y: 119, size: 15, fill: '#F08F56' } },\n { id: 'node9', data: { label: '9' }, style: { x: 287, y: 157, size: 15, fill: '#F08F56' } },\n ],\n edges: [\n { source: 'node0', target: 'node1' },\n { source: 'node0', target: 'node2' },\n { source: 'node0', target: 'node3' },\n { source: 'node0', target: 'node4' },\n { source: 'node0', target: 'node5' },\n { source: 'node1', target: 'node6' },\n { source: 'node1', target: 'node7' },\n { source: 'node2', target: 'node8' },\n { source: 'node2', target: 'node9' },\n { source: 'node4', target: 'node5' },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n autoFit: 'view',\n data: data,\n node: {\n type: 'circle',\n style: {\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n lineWidth: 2,\n stroke: '#fff',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#e2e2e2',\n lineWidth: 2,\n endArrow: {\n width: 8,\n height: 4,\n },\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas'],\n});\n\ngraph.render();", + "duration": 41038, + "retrievedSkillIds": [ + "g6-behavior-canvas-nav", + "g6-behavior-drag-element", + "g6-node-circle", + "g6-layout-force", + "g6-layout-mindmap" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1972, + "expectedLength": 2718, + "similarity": 0.9729722560213117, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node0', data: { label: '0' }, style: { x: 326, y: 268, size: 50, fill: '#1783FF', labelFill: '#fff' } },\n { id: 'node1', data: { label: '1' }, style: { x: 280, y: 384, size: 30, fill: '#00C9C9' } },\n { id: 'node2', data: { label: '2' }, style: { x: 234, y: 167, size: 30, fill: '#00C9C9' } },\n { id: 'node3', data: { label: '3' }, style: { x: 391, y: 368, size: 30, fill: '#00C9C9' } },\n { id: 'node4', data: { label: '4' }, style: { x: 444, y: 209, size: 30, fill: '#00C9C9' } },\n { id: 'node5', data: { label: '5' }, style: { x: 378, y: 157, size: 30, fill: '#00C9C9' } },\n { id: 'node6', data: { label: '6' }, style: { x: 229, y: 400, size: 15, fill: '#F08F56' } },\n { id: 'node7', data: { label: '7' }, style: { x: 281, y: 440, size: 15, fill: '#F08F56' } },\n { id: 'node8', data: { label: '8' }, style: { x: 188, y: 119, size: 15, fill: '#F08F56' } },\n { id: 'node9', data: { label: '9' }, style: { x: 287, y: 157, size: 15, fill: '#F08F56' } },\n ],\n edges: [\n { source: 'node0', target: 'node1' },\n { source: 'node0', target: 'node2' },\n { source: 'node0', target: 'node3' },\n { source: 'node0', target: 'node4' },\n { source: 'node0', target: 'node5' },\n { source: 'node1', target: 'node6' },\n { source: 'node1', target: 'node7' },\n { source: 'node2', target: 'node8' },\n { source: 'node2', target: 'node9' },\n { source: 'node4', target: 'node5' },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n autoFit: 'view',\n data: data,\n node: {\n type: 'circle',\n style: {\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n lineWidth: 2,\n stroke: '#fff',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#e2e2e2',\n lineWidth: 2,\n endArrow: {\n width: 8,\n height: 4,\n },\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas'],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "fill", + "labelFill", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "fill", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "fill", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "fill", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "fill", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "fill", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "fill", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "fill", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "fill", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "fill", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "container", + "autoFit", + "data", + "node", + "type", + "style", + "labelText", + "labelPlacement", + "lineWidth", + "stroke", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "width", + "height", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-90", + "query": "根据描述绘制图表,使用 G6 创建一个图实例,设置容器和基础配置。定义了包含 5 个节点和 6 条边的数据结构,并采用网格布局进行排列。添加了一个点击创建新边的交互行为,新边会以红色箭头样式展示。最后调用 render 方法将图表渲染到页面上。参考数据:[{\"id\":\"node1\"},{\"id\":\"node2\"},{\"id\":\"node3\"},{\"id\":\"node4\"},{\"id\":\"node5\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst graph = new Graph({\n container: 'container',\n\n data: {\n nodes: [{ id: 'node1' }, { id: 'node2' }, { id: 'node3' }, { id: 'node4' }, { id: 'node5' }],\n edges: [\n { source: 'node1', target: 'node2' },\n { source: 'node1', target: 'node3' },\n { source: 'node1', target: 'node4' },\n { source: 'node2', target: 'node3' },\n { source: 'node3', target: 'node4' },\n { source: 'node4', target: 'node5' },\n ],\n },\n layout: {\n type: 'grid',\n },\n behaviors: [\n {\n type: 'create-edge',\n trigger: 'click',\n onCreate: (edge) => {\n const { style, ...rest } = edge;\n return {\n ...rest,\n style: {\n ...style,\n stroke: 'red',\n lineWidth: 2,\n endArrow: true,\n },\n };\n },\n },\n ],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [\n { id: 'node1', data: { label: 'Node 1' } },\n { id: 'node2', data: { label: 'Node 2' } },\n { id: 'node3', data: { label: 'Node 3' } },\n { id: 'node4', data: { label: 'Node 4' } },\n { id: 'node5', data: { label: 'Node 5' } },\n];\n\nconst edges = [\n { id: 'e1', source: 'node1', target: 'node2' },\n { id: 'e2', source: 'node2', target: 'node3' },\n { id: 'e3', source: 'node3', target: 'node4' },\n { id: 'e4', source: 'node4', target: 'node5' },\n { id: 'e5', source: 'node1', target: 'node3' },\n { id: 'e6', source: 'node2', target: 'node5' },\n];\n\nconst graph = new Graph({\n container: 'container',\n data: { nodes, edges },\n layout: {\n type: 'grid',\n cols: 3,\n },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#aaa',\n lineWidth: 1.5,\n endArrow: true,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\nlet selectedNode = null;\n\ngraph.on('node:click', (evt) => {\n const nodeId = evt.target.id;\n \n if (!selectedNode) {\n selectedNode = nodeId;\n graph.setElementState(nodeId, 'selected');\n } else {\n if (selectedNode !== nodeId) {\n const edgeId = `edge-${selectedNode}-${nodeId}-${Date.now()}`;\n graph.addEdgeData([\n {\n id: edgeId,\n source: selectedNode,\n target: nodeId,\n style: {\n stroke: 'red',\n lineWidth: 2,\n endArrow: true,\n },\n },\n ]);\n graph.draw();\n }\n graph.setElementState(selectedNode, []);\n selectedNode = null;\n }\n});\n\ngraph.render();", + "duration": 14989, + "retrievedSkillIds": [ + "g6-core-graph-init", + "g6-node-circle", + "g6-node-react", + "g6-node-html", + "g6-node-rect" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1824, + "expectedLength": 885, + "similarity": 0.672251211475092, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst nodes = [\n { id: 'node1', data: { label: 'Node 1' } },\n { id: 'node2', data: { label: 'Node 2' } },\n { id: 'node3', data: { label: 'Node 3' } },\n { id: 'node4', data: { label: 'Node 4' } },\n { id: 'node5', data: { label: 'Node 5' } },\n];\n\nconst edges = [\n { id: 'e1', source: 'node1', target: 'node2' },\n { id: 'e2', source: 'node2', target: 'node3' },\n { id: 'e3', source: 'node3', target: 'node4' },\n { id: 'e4', source: 'node4', target: 'node5' },\n { id: 'e5', source: 'node1', target: 'node3' },\n { id: 'e6', source: 'node2', target: 'node5' },\n];\n\nconst graph = new Graph({\n container: 'container',\n data: { nodes, edges },\n layout: {\n type: 'grid',\n cols: 3,\n },\n node: {\n type: 'circle',\n style: {\n size: 40,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#aaa',\n lineWidth: 1.5,\n endArrow: true,\n },\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'],\n});\n\nlet selectedNode = null;\n\ngraph.on('node:click', (evt) => {\n const nodeId = evt.target.id;\n \n if (!selectedNode) {\n selectedNode = nodeId;\n graph.setElementState(nodeId, 'selected');\n } else {\n if (selectedNode !== nodeId) {\n const edgeId = `edge-${selectedNode}-${nodeId}-${Date.now()}`;\n graph.addEdgeData([\n {\n id: edgeId,\n source: selectedNode,\n target: nodeId,\n style: {\n stroke: 'red',\n lineWidth: 2,\n endArrow: true,\n },\n },\n ]);\n graph.draw();\n }\n graph.setElementState(selectedNode, []);\n selectedNode = null;\n }\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "on", + "setElementState", + "now", + "addEdgeData", + "draw", + "setElementState", + "render" + ], + "objectKeys": [ + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "id", + "source", + "target", + "container", + "data", + "layout", + "type", + "cols", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "endArrow", + "behaviors", + "node", + "id", + "source", + "target", + "style", + "stroke", + "lineWidth", + "endArrow" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "graph.on", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-91", + "query": "根据描述绘制图表,使用 G6 库创建一个包含两个节点和一条边的简单图形。节点为矩形,带有可换行的长文本标签,并设置了标签背景样式。边也带有长文本标签和背景设置。支持通过拖拽行为与元素进行交互。参考数据:[{\"id\":\"node-1\",\"style\":{\"x\":100,\"y\":150,\"size\":100}},{\"id\":\"node-2\",\"style\":{\"x\":400,\"y\":150,\"size\":150}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', style: { x: 100, y: 150, size: 100 } },\n { id: 'node-2', style: { x: 400, y: 150, size: 150 } },\n ],\n edges: [{ source: 'node-1', target: 'node-2' }],\n};\n\nconst graph = new Graph({\n container: 'container',\n fitCenter: true,\n data,\n node: {\n type: 'rect',\n style: {\n labelPlacement: 'bottom',\n labelText: 'This label is too long to be displayed',\n labelMaxWidth: '90%',\n labelBackground: true,\n labelBackgroundFill: '#eee',\n labelBackgroundFillOpacity: 0.5,\n labelBackgroundRadius: 4,\n labelWordWrap: true,\n labelMaxLines: 4,\n },\n },\n edge: {\n style: {\n labelOffsetY: -4,\n labelTextBaseline: 'bottom',\n labelText: 'This label is too long to be displayed',\n labelMaxWidth: '80%',\n labelBackground: true,\n labelBackgroundFill: 'red',\n labelBackgroundFillOpacity: 0.5,\n labelBackgroundRadius: 4,\n labelWordWrap: true,\n labelMaxLines: 4,\n },\n },\n behaviors: ['drag-element'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { \n id: 'node-1', \n style: { x: 100, y: 150, size: 100 },\n data: { \n label: '这是一个非常长的节点标签文本,需要自动换行显示,测试文本换行功能' \n }\n },\n { \n id: 'node-2', \n style: { x: 400, y: 150, size: 150 },\n data: { \n label: '这是另一个具有长文本标签的矩形节点,用于演示标签换行和背景样式' \n }\n }\n ],\n edges: [\n { \n source: 'node-1', \n target: 'node-2',\n data: {\n label: '这是一条连接两个节点的边,带有长文本标签和背景样式设置'\n }\n }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n width: 600,\n height: 400,\n data: data,\n node: {\n type: 'rect',\n style: {\n size: (d) => {\n const s = d.style?.size || 100;\n return [s, s * 0.6];\n },\n fill: '#e6f4ff',\n stroke: '#1890ff',\n lineWidth: 2,\n radius: 4,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#333',\n labelFontSize: 12,\n labelWordWrap: true,\n labelMaxWidth: (d) => (d.style?.size || 100) - 20,\n labelBackground: true,\n labelBackgroundFill: '#ffffff',\n labelBackgroundOpacity: 0.9,\n labelBackgroundRadius: 4,\n labelPadding: [4, 8],\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelFill: '#333',\n labelFontSize: 11,\n labelWordWrap: true,\n labelMaxWidth: 200,\n labelBackground: true,\n labelBackgroundFill: '#f0f0f0',\n labelBackgroundOpacity: 0.95,\n labelBackgroundRadius: 4,\n labelPadding: [2, 6],\n labelPlacement: 'center',\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "duration": 19725, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-node-rect", + "g6-node-html", + "g6-behavior-drag-element", + "g6-node-react" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1723, + "expectedLength": 1096, + "similarity": 0.746739874566381, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { \n id: 'node-1', \n style: { x: 100, y: 150, size: 100 },\n data: { \n label: '这是一个非常长的节点标签文本,需要自动换行显示,测试文本换行功能' \n }\n },\n { \n id: 'node-2', \n style: { x: 400, y: 150, size: 150 },\n data: { \n label: '这是另一个具有长文本标签的矩形节点,用于演示标签换行和背景样式' \n }\n }\n ],\n edges: [\n { \n source: 'node-1', \n target: 'node-2',\n data: {\n label: '这是一条连接两个节点的边,带有长文本标签和背景样式设置'\n }\n }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n width: 600,\n height: 400,\n data: data,\n node: {\n type: 'rect',\n style: {\n size: (d) => {\n const s = d.style?.size || 100;\n return [s, s * 0.6];\n },\n fill: '#e6f4ff',\n stroke: '#1890ff',\n lineWidth: 2,\n radius: 4,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#333',\n labelFontSize: 12,\n labelWordWrap: true,\n labelMaxWidth: (d) => (d.style?.size || 100) - 20,\n labelBackground: true,\n labelBackgroundFill: '#ffffff',\n labelBackgroundOpacity: 0.9,\n labelBackgroundRadius: 4,\n labelPadding: [4, 8],\n }\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#999',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelFill: '#333',\n labelFontSize: 11,\n labelWordWrap: true,\n labelMaxWidth: 200,\n labelBackground: true,\n labelBackgroundFill: '#f0f0f0',\n labelBackgroundOpacity: 0.95,\n labelBackgroundRadius: 4,\n labelPadding: [2, 6],\n labelPlacement: 'center',\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "style", + "x", + "y", + "size", + "data", + "label", + "id", + "style", + "x", + "y", + "size", + "data", + "label", + "edges", + "source", + "target", + "data", + "label", + "container", + "width", + "height", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "radius", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "labelWordWrap", + "labelMaxWidth", + "labelBackground", + "labelBackgroundFill", + "labelBackgroundOpacity", + "labelBackgroundRadius", + "labelPadding", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "labelText", + "labelFill", + "labelFontSize", + "labelWordWrap", + "labelMaxWidth", + "labelBackground", + "labelBackgroundFill", + "labelBackgroundOpacity", + "labelBackgroundRadius", + "labelPadding", + "labelPlacement", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-92", + "query": "根据描述绘制图表,使用 G6 绘制一个流程图,节点表示流程步骤,边表示执行顺序。根据是否已完成对节点和边进行不同颜色渲染,并自定义了折线边的形状以优化视觉流向。节点包含标签和时间信息,部分节点未完成因此显示为灰色。参考数据:[{\"id\":\"0\",\"data\":{\"label\":\"开始流程\",\"time\":\"17:00:00\"}},{\"id\":\"1\",\"data\":{\"label\":\"流程1\",\"time\":\"17:00:05\"}},{\"id\":\"2\",\"data\":{\"label\":\"流程2\",\"time\":\"17:00:12\"}},{\"id\":\"3\",\"data\":{\"label\":\"流程3\",\"time\":\"17:00:30\"}},{\"id\":\"4\",\"data\":{\"label\":\"流程4\",\"time\":\"17:02:00\"}},{\"id\":\"5\",\"data\":{\"label\":\"流程5\",\"time\":\"17:02:40\"}},{\"id\":\"6\",\"data\":{\"label\":\"流程6\",\"time\":\"17:05:50\"}},{\"id\":\"7\",\"data\":{\"label\":\"流程7\",\"time\":\"17:10:00\"}},{\"id\":\"8\",\"data\":{\"label\":\"流程8\",\"time\":\"17:11:20\"}},{\"id\":\"9\",\"data\":{\"label\":\"流程9\",\"time\":\"17:15:00\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { ExtensionCategory, Graph, Polyline, positionOf, register } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0', data: { label: '开始流程', time: '17:00:00' } },\n { id: '1', data: { label: '流程1', time: '17:00:05' } },\n { id: '2', data: { label: '流程2', time: '17:00:12' } },\n { id: '3', data: { label: '流程3', time: '17:00:30' } },\n { id: '4', data: { label: '流程4', time: '17:02:00' } },\n { id: '5', data: { label: '流程5', time: '17:02:40' } },\n { id: '6', data: { label: '流程6', time: '17:05:50' } },\n { id: '7', data: { label: '流程7', time: '17:10:00' } },\n { id: '8', data: { label: '流程8', time: '17:11:20' } },\n { id: '9', data: { label: '流程9', time: '17:15:00' } },\n { id: '10', data: { label: '流程10', time: '17:30:00' } },\n { id: '11', data: { label: '流程11' } },\n { id: '12', data: { label: '流程12' } },\n { id: '13', data: { label: '流程13' } },\n { id: '14', data: { label: '流程14' } },\n { id: '15', data: { label: '流程结束' } },\n ],\n edges: [\n { source: '0', target: '1', data: { done: true } },\n { source: '1', target: '2', data: { done: true } },\n { source: '2', target: '3', data: { done: true } },\n { source: '3', target: '4', data: { done: true } },\n { source: '4', target: '5', data: { done: true } },\n { source: '5', target: '6', data: { done: true } },\n { source: '6', target: '7', data: { done: true } },\n { source: '7', target: '8', data: { done: true } },\n { source: '8', target: '9', data: { done: true } },\n { source: '9', target: '10', data: { done: true } },\n { source: '10', target: '11', data: { done: false } },\n { source: '11', target: '12', data: { done: false } },\n { source: '12', target: '13', data: { done: false } },\n { source: '13', target: '14', data: { done: false } },\n { source: '14', target: '15', data: { done: false } },\n ],\n};\n\nclass SnakePolyline extends Polyline {\n getPoints(attributes) {\n const [sourcePoint, targetPoint] = this.getEndpoints(attributes, false);\n\n if (sourcePoint[1] === targetPoint[1]) return [sourcePoint, targetPoint];\n\n const prevPointId = this.context.model\n .getRelatedEdgesData(this.sourceNode.id)\n .filter((edge) => edge.target === this.sourceNode.id)[0]?.source;\n if (!prevPointId) return [sourcePoint, targetPoint];\n\n const prevPoint = positionOf(this.context.model.getNodeLikeDatum(prevPointId));\n const offset = -(prevPoint[0] - sourcePoint[0]) / 4;\n return [\n sourcePoint,\n [sourcePoint[0] + offset, sourcePoint[1]],\n [targetPoint[0] + offset, targetPoint[1]],\n targetPoint,\n ];\n }\n}\n\nregister(ExtensionCategory.EDGE, 's-polyline', SnakePolyline);\n\nconst graph = new Graph({\n container: 'container',\n data,\n background: '#fafafa',\n autoFit: 'center',\n node: {\n style: {\n fill: (d) => (d.data.time ? '#1783ff' : '#d9d9d9'),\n lineWidth: 2,\n size: 8,\n stroke: (d) => (d.data.time ? 'lightblue' : ''),\n labelFontWeight: 500,\n labelOffsetY: 8,\n labelText: (d) => d.data.label,\n badge: true,\n badges: (d) => [\n {\n background: false,\n fill: '#858ca6',\n fontSize: 10,\n offsetY: 39,\n placement: 'bottom',\n text: d.data.time || '--',\n },\n ],\n },\n },\n edge: {\n type: 's-polyline',\n style: {\n lineWidth: 2,\n stroke: (d) => (d.data.done ? '#1783ff' : '#d9d9d9'),\n },\n },\n layout: {\n type: 'snake',\n cols: 6,\n rowGap: 200,\n padding: [20, 140, 80],\n },\n behaviors: ['drag-canvas', 'zoom-canvas'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\n// 准备数据,模拟完成状态(前6个已完成,后4个未完成)\nconst rawData = [\n {\"id\":\"0\",\"data\":{\"label\":\"开始流程\",\"time\":\"17:00:00\"}},\n {\"id\":\"1\",\"data\":{\"label\":\"流程1\",\"time\":\"17:00:05\"}},\n {\"id\":\"2\",\"data\":{\"label\":\"流程2\",\"time\":\"17:00:12\"}},\n {\"id\":\"3\",\"data\":{\"label\":\"流程3\",\"time\":\"17:00:30\"}},\n {\"id\":\"4\",\"data\":{\"label\":\"流程4\",\"time\":\"17:02:00\"}},\n {\"id\":\"5\",\"data\":{\"label\":\"流程5\",\"time\":\"17:02:40\"}},\n {\"id\":\"6\",\"data\":{\"label\":\"流程6\",\"time\":\"17:05:50\"}},\n {\"id\":\"7\",\"data\":{\"label\":\"流程7\",\"time\":\"17:10:00\"}},\n {\"id\":\"8\",\"data\":{\"label\":\"流程8\",\"time\":\"17:11:20\"}},\n {\"id\":\"9\",\"data\":{\"label\":\"流程9\",\"time\":\"17:15:00\"}}\n];\n\nconst nodes = rawData.map((item, index) => ({\n ...item,\n data: {\n ...item.data,\n completed: index < 6\n }\n}));\n\n// 创建顺序执行的边\nconst edges = [];\nfor (let i = 0; i < nodes.length - 1; i++) {\n edges.push({\n source: nodes[i].id,\n target: nodes[i + 1].id,\n data: {\n completed: i < 5\n }\n });\n}\n\nconst data = { nodes, edges };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data,\n node: {\n type: 'rect',\n style: {\n size: [140, 60],\n radius: 6,\n fill: (d) => d.data.completed ? '#e6f4ff' : '#f5f5f5',\n stroke: (d) => d.data.completed ? '#1890ff' : '#d9d9d9',\n lineWidth: 2,\n labelText: (d) => `${d.data.label}\\n${d.data.time}`,\n labelPlacement: 'center',\n labelFill: (d) => d.data.completed ? '#1890ff' : '#999',\n labelFontSize: 12,\n labelLineHeight: 18,\n cursor: 'pointer',\n },\n state: {\n selected: { lineWidth: 3, stroke: '#ff4d4f' }\n }\n },\n edge: {\n type: 'polyline',\n style: {\n stroke: (d) => d.data.completed ? '#1890ff' : '#d9d9d9',\n lineWidth: 2,\n radius: 10,\n endArrow: true,\n endArrowSize: 8,\n labelText: (d) => d.data.completed ? '已完成' : '待执行',\n labelFontSize: 10,\n labelFill: (d) => d.data.completed ? '#1890ff' : '#999',\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.8,\n }\n },\n layout: {\n type: 'dagre',\n rankdir: 'TB',\n ranksep: 80,\n nodesep: 40,\n nodeSize: [140, 60],\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'click-select',\n 'drag-element'\n ],\n plugins: [\n {\n type: 'tooltip',\n getContent: (event, items) => {\n const [item] = items;\n if (!item) return '';\n const status = item.data.completed ? '已完成' : '未完成';\n return `
\n
${item.data.label}
\n
时间: ${item.data.time}
\n
状态: ${status}
\n
`;\n }\n }\n ]\n});\n\ngraph.render();", + "duration": 30286, + "retrievedSkillIds": [ + "g6-pattern-flow-chart", + "g6-node-rect", + "g6-node-circle", + "g6-core-custom-element", + "g6-edge-polyline" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 2811, + "expectedLength": 3590, + "similarity": 0.476845801036313, + "extractedCode": "import { Graph } from '@antv/g6';\n\n// 准备数据,模拟完成状态(前6个已完成,后4个未完成)\nconst rawData = [\n {\"id\":\"0\",\"data\":{\"label\":\"开始流程\",\"time\":\"17:00:00\"}},\n {\"id\":\"1\",\"data\":{\"label\":\"流程1\",\"time\":\"17:00:05\"}},\n {\"id\":\"2\",\"data\":{\"label\":\"流程2\",\"time\":\"17:00:12\"}},\n {\"id\":\"3\",\"data\":{\"label\":\"流程3\",\"time\":\"17:00:30\"}},\n {\"id\":\"4\",\"data\":{\"label\":\"流程4\",\"time\":\"17:02:00\"}},\n {\"id\":\"5\",\"data\":{\"label\":\"流程5\",\"time\":\"17:02:40\"}},\n {\"id\":\"6\",\"data\":{\"label\":\"流程6\",\"time\":\"17:05:50\"}},\n {\"id\":\"7\",\"data\":{\"label\":\"流程7\",\"time\":\"17:10:00\"}},\n {\"id\":\"8\",\"data\":{\"label\":\"流程8\",\"time\":\"17:11:20\"}},\n {\"id\":\"9\",\"data\":{\"label\":\"流程9\",\"time\":\"17:15:00\"}}\n];\n\nconst nodes = rawData.map((item, index) => ({\n ...item,\n data: {\n ...item.data,\n completed: index < 6\n }\n}));\n\n// 创建顺序执行的边\nconst edges = [];\nfor (let i = 0; i < nodes.length - 1; i++) {\n edges.push({\n source: nodes[i].id,\n target: nodes[i + 1].id,\n data: {\n completed: i < 5\n }\n });\n}\n\nconst data = { nodes, edges };\n\nconst graph = new Graph({\n container: 'container',\n autoFit: 'view',\n data,\n node: {\n type: 'rect',\n style: {\n size: [140, 60],\n radius: 6,\n fill: (d) => d.data.completed ? '#e6f4ff' : '#f5f5f5',\n stroke: (d) => d.data.completed ? '#1890ff' : '#d9d9d9',\n lineWidth: 2,\n labelText: (d) => `${d.data.label}\\n${d.data.time}`,\n labelPlacement: 'center',\n labelFill: (d) => d.data.completed ? '#1890ff' : '#999',\n labelFontSize: 12,\n labelLineHeight: 18,\n cursor: 'pointer',\n },\n state: {\n selected: { lineWidth: 3, stroke: '#ff4d4f' }\n }\n },\n edge: {\n type: 'polyline',\n style: {\n stroke: (d) => d.data.completed ? '#1890ff' : '#d9d9d9',\n lineWidth: 2,\n radius: 10,\n endArrow: true,\n endArrowSize: 8,\n labelText: (d) => d.data.completed ? '已完成' : '待执行',\n labelFontSize: 10,\n labelFill: (d) => d.data.completed ? '#1890ff' : '#999',\n labelBackground: true,\n labelBackgroundFill: '#fff',\n labelBackgroundOpacity: 0.8,\n }\n },\n layout: {\n type: 'dagre',\n rankdir: 'TB',\n ranksep: 80,\n nodesep: 40,\n nodeSize: [140, 60],\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'click-select',\n 'drag-element'\n ],\n plugins: [\n {\n type: 'tooltip',\n getContent: (event, items) => {\n const [item] = items;\n if (!item) return '';\n const status = item.data.completed ? '已完成' : '未完成';\n return `
\n
${item.data.label}
\n
时间: ${item.data.time}
\n
状态: ${status}
\n
`;\n }\n }\n ]\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "map", + "push", + "Graph", + "render" + ], + "objectKeys": [ + "17", + "00", + "17", + "00", + "17", + "00", + "17", + "00", + "17", + "02", + "17", + "02", + "17", + "05", + "17", + "10", + "17", + "11", + "17", + "15", + "data", + "completed", + "source", + "target", + "data", + "completed", + "container", + "autoFit", + "node", + "type", + "style", + "size", + "radius", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "labelLineHeight", + "cursor", + "state", + "selected", + "lineWidth", + "stroke", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "radius", + "endArrow", + "endArrowSize", + "labelText", + "labelFontSize", + "labelFill", + "labelBackground", + "labelBackgroundFill", + "labelBackgroundOpacity", + "layout", + "type", + "rankdir", + "ranksep", + "nodesep", + "nodeSize", + "behaviors", + "plugins", + "type", + "getContent", + "padding", + "weight", + "color", + "size", + "color", + "size" + ], + "stringLiterals": [ + "id", + "data", + "label", + "time", + "id", + "data", + "label", + "time", + "id", + "data", + "label", + "time", + "id", + "data", + "label", + "time", + "id", + "data", + "label", + "time", + "id", + "data", + "label", + "time", + "id", + "data", + "label", + "time", + "id", + "data", + "label", + "time", + "id", + "data", + "label", + "time", + "id", + "data", + "label", + "time" + ], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-93", + "query": "根据描述绘制图表,使用 G6 图编辑引擎创建一个基于网格布局的图像节点展示图,每个节点显示为固定大小的图片,并根据节点 ID 展示不同的状态样式、徽标和端口。参考数据:[{\"id\":\"default\"},{\"id\":\"halo\"},{\"id\":\"badges\"},{\"id\":\"ports\"},{\"id\":\"active\",\"states\":[\"active\"]},{\"id\":\"selected\",\"states\":[\"selected\"]},{\"id\":\"highlight\",\"states\":[\"highlight\"]},{\"id\":\"inactive\",\"states\":[\"inactive\"]},{\"id\":\"disabled\",\"states\":[\"disabled\"]}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph, iconfont } from '@antv/g6';\n\nconst style = document.createElement('style');\nstyle.innerHTML = `@import url('${iconfont.css}');`;\ndocument.head.appendChild(style);\n\nconst data = {\n nodes: [\n { id: 'default' },\n { id: 'halo' },\n { id: 'badges' },\n { id: 'ports' },\n {\n id: 'active',\n states: ['active'],\n },\n {\n id: 'selected',\n states: ['selected'],\n },\n {\n id: 'highlight',\n states: ['highlight'],\n },\n {\n id: 'inactive',\n states: ['inactive'],\n },\n {\n id: 'disabled',\n states: ['disabled'],\n },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n type: 'image',\n style: {\n size: 40,\n labelText: (d) => d.id,\n src: 'https://gw.alipayobjects.com/mdn/rms_6ae20b/afts/img/A*N4ZMS7gHsUIAAAAAAAAAAABkARQnAQ',\n haloStroke: '#227eff',\n halo: (d) => (d.id === 'halo' ? true : false),\n badges: (d) =>\n d.id === 'badges'\n ? [\n {\n text: 'A',\n placement: 'right-top',\n },\n {\n text: 'Important',\n placement: 'right',\n },\n {\n text: 'Notice',\n placement: 'right-bottom',\n },\n ]\n : [],\n badgeFontSize: 8,\n badgePadding: [1, 4],\n portR: 3,\n ports: (d) =>\n d.id === 'ports'\n ? [{ placement: 'left' }, { placement: 'right' }, { placement: 'top' }, { placement: 'bottom' }]\n : [],\n },\n state: {\n inactive: {\n fillOpacity: 0.5,\n },\n disabled: {\n fillOpacity: 0.2,\n },\n },\n },\n layout: {\n type: 'grid',\n },\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'default', data: { label: 'Default' } },\n { id: 'halo', data: { label: 'Halo' } },\n { id: 'badges', data: { label: 'Badges' } },\n { id: 'ports', data: { label: 'Ports' } },\n { id: 'active', data: { label: 'Active' } },\n { id: 'selected', data: { label: 'Selected' } },\n { id: 'highlight', data: { label: 'Highlight' } },\n { id: 'inactive', data: { label: 'Inactive' } },\n { id: 'disabled', data: { label: 'Disabled' } },\n ],\n edges: [\n { source: 'default', target: 'halo' },\n { source: 'halo', target: 'badges' },\n { source: 'badges', target: 'ports' },\n { source: 'ports', target: 'active' },\n { source: 'active', target: 'selected' },\n { source: 'selected', target: 'highlight' },\n { source: 'highlight', target: 'inactive' },\n { source: 'inactive', target: 'disabled' },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n width: 800,\n height: 600,\n data: data,\n node: {\n type: 'image',\n style: {\n size: 60,\n src: (d) => `https://api.dicebear.com/7.x/identicon/svg?seed=${d.id}`,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n badges: (d) => {\n if (d.id === 'badges') {\n return [\n {\n text: 'New',\n placement: 'right-top',\n fill: '#ff4d4f',\n textFill: '#fff',\n fontSize: 10,\n padding: [2, 4],\n },\n ];\n }\n return [];\n },\n ports: (d) => {\n if (d.id === 'ports') {\n return [\n { key: 'top', placement: 'top', r: 3, fill: '#1783FF', stroke: '#fff', lineWidth: 1 },\n { key: 'bottom', placement: 'bottom', r: 3, fill: '#1783FF', stroke: '#fff', lineWidth: 1 },\n { key: 'left', placement: 'left', r: 3, fill: '#1783FF', stroke: '#fff', lineWidth: 1 },\n { key: 'right', placement: 'right', r: 3, fill: '#1783FF', stroke: '#fff', lineWidth: 1 },\n ];\n }\n return [];\n },\n halo: (d) => d.id === 'halo',\n haloFill: '#1783FF',\n haloOpacity: 0.2,\n haloLineWidth: 8,\n },\n state: {\n active: {\n stroke: '#1783FF',\n lineWidth: 3,\n shadowColor: '#1783FF',\n shadowBlur: 10,\n },\n selected: {\n stroke: '#ff4d4f',\n lineWidth: 3,\n halo: true,\n haloFill: '#ff4d4f',\n haloOpacity: 0.25,\n haloLineWidth: 8,\n },\n highlight: {\n stroke: '#52c41a',\n lineWidth: 3,\n shadowColor: '#52c41a',\n shadowBlur: 15,\n },\n inactive: {\n opacity: 0.3,\n },\n disabled: {\n opacity: 0.5,\n filter: 'grayscale(100%)',\n },\n },\n },\n edge: {\n style: {\n stroke: '#e2e2e2',\n lineWidth: 1,\n },\n },\n layout: {\n type: 'grid',\n rows: 3,\n cols: 3,\n rowGap: 100,\n colGap: 100,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'click-select'],\n});\n\ngraph.render();\n\ngraph.setElementState('active', 'active');\ngraph.setElementState('selected', 'selected');\ngraph.setElementState('highlight', 'highlight');\ngraph.setElementState('inactive', 'inactive');\ngraph.setElementState('disabled', 'disabled');", + "duration": 31998, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-node-rect", + "g6-plugin-minimap", + "g6-node-image", + "g6-layout-grid" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 3349, + "expectedLength": 1777, + "similarity": 0.4596807181889149, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'default', data: { label: 'Default' } },\n { id: 'halo', data: { label: 'Halo' } },\n { id: 'badges', data: { label: 'Badges' } },\n { id: 'ports', data: { label: 'Ports' } },\n { id: 'active', data: { label: 'Active' } },\n { id: 'selected', data: { label: 'Selected' } },\n { id: 'highlight', data: { label: 'Highlight' } },\n { id: 'inactive', data: { label: 'Inactive' } },\n { id: 'disabled', data: { label: 'Disabled' } },\n ],\n edges: [\n { source: 'default', target: 'halo' },\n { source: 'halo', target: 'badges' },\n { source: 'badges', target: 'ports' },\n { source: 'ports', target: 'active' },\n { source: 'active', target: 'selected' },\n { source: 'selected', target: 'highlight' },\n { source: 'highlight', target: 'inactive' },\n { source: 'inactive', target: 'disabled' },\n ],\n};\n\nconst graph = new Graph({\n container: container,\n width: 800,\n height: 600,\n data: data,\n node: {\n type: 'image',\n style: {\n size: 60,\n src: (d) => `https://api.dicebear.com/7.x/identicon/svg?seed=${d.id}`,\n labelText: (d) => d.data.label,\n labelPlacement: 'bottom',\n labelFill: '#333',\n labelFontSize: 12,\n badges: (d) => {\n if (d.id === 'badges') {\n return [\n {\n text: 'New',\n placement: 'right-top',\n fill: '#ff4d4f',\n textFill: '#fff',\n fontSize: 10,\n padding: [2, 4],\n },\n ];\n }\n return [];\n },\n ports: (d) => {\n if (d.id === 'ports') {\n return [\n { key: 'top', placement: 'top', r: 3, fill: '#1783FF', stroke: '#fff', lineWidth: 1 },\n { key: 'bottom', placement: 'bottom', r: 3, fill: '#1783FF', stroke: '#fff', lineWidth: 1 },\n { key: 'left', placement: 'left', r: 3, fill: '#1783FF', stroke: '#fff', lineWidth: 1 },\n { key: 'right', placement: 'right', r: 3, fill: '#1783FF', stroke: '#fff', lineWidth: 1 },\n ];\n }\n return [];\n },\n halo: (d) => d.id === 'halo',\n haloFill: '#1783FF',\n haloOpacity: 0.2,\n haloLineWidth: 8,\n },\n state: {\n active: {\n stroke: '#1783FF',\n lineWidth: 3,\n shadowColor: '#1783FF',\n shadowBlur: 10,\n },\n selected: {\n stroke: '#ff4d4f',\n lineWidth: 3,\n halo: true,\n haloFill: '#ff4d4f',\n haloOpacity: 0.25,\n haloLineWidth: 8,\n },\n highlight: {\n stroke: '#52c41a',\n lineWidth: 3,\n shadowColor: '#52c41a',\n shadowBlur: 15,\n },\n inactive: {\n opacity: 0.3,\n },\n disabled: {\n opacity: 0.5,\n filter: 'grayscale(100%)',\n },\n },\n },\n edge: {\n style: {\n stroke: '#e2e2e2',\n lineWidth: 1,\n },\n },\n layout: {\n type: 'grid',\n rows: 3,\n cols: 3,\n rowGap: 100,\n colGap: 100,\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'click-select'],\n});\n\ngraph.render();\n\ngraph.setElementState('active', 'active');\ngraph.setElementState('selected', 'selected');\ngraph.setElementState('highlight', 'highlight');\ngraph.setElementState('inactive', 'inactive');\ngraph.setElementState('disabled', 'disabled');", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "grayscale", + "render", + "setElementState", + "setElementState", + "setElementState", + "setElementState", + "setElementState" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "id", + "data", + "label", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "container", + "width", + "height", + "data", + "node", + "type", + "style", + "size", + "src", + "https", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "badges", + "text", + "placement", + "fill", + "textFill", + "fontSize", + "padding", + "ports", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "key", + "placement", + "r", + "fill", + "stroke", + "lineWidth", + "halo", + "haloFill", + "haloOpacity", + "haloLineWidth", + "state", + "active", + "stroke", + "lineWidth", + "shadowColor", + "shadowBlur", + "selected", + "stroke", + "lineWidth", + "halo", + "haloFill", + "haloOpacity", + "haloLineWidth", + "highlight", + "stroke", + "lineWidth", + "shadowColor", + "shadowBlur", + "inactive", + "opacity", + "disabled", + "opacity", + "filter", + "edge", + "style", + "stroke", + "lineWidth", + "layout", + "type", + "rows", + "cols", + "rowGap", + "colGap", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-94", + "query": "根据描述绘制图表,使用自定义的双层布局算法对节点进行排列,将不同聚类的节点分别放置在上下两层,并通过G6渲染出带有颜色区分的节点和连接线的关系图。参考数据:[{\"id\":\"0\",\"data\":{\"cluster\":\"A\"}},{\"id\":\"1\",\"data\":{\"cluster\":\"A\"}},{\"id\":\"2\",\"data\":{\"cluster\":\"A\"}},{\"id\":\"3\",\"data\":{\"cluster\":\"A\"}},{\"id\":\"4\",\"data\":{\"cluster\":\"A\"}},{\"id\":\"5\",\"data\":{\"cluster\":\"A\"}},{\"id\":\"6\",\"data\":{\"cluster\":\"B\"}},{\"id\":\"7\",\"data\":{\"cluster\":\"B\"}},{\"id\":\"8\",\"data\":{\"cluster\":\"B\"}},{\"id\":\"9\",\"data\":{\"cluster\":\"B\"}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { BaseLayout, ExtensionCategory, Graph, register } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0', data: { cluster: 'A' } },\n { id: '1', data: { cluster: 'A' } },\n { id: '2', data: { cluster: 'A' } },\n { id: '3', data: { cluster: 'A' } },\n { id: '4', data: { cluster: 'A' } },\n { id: '5', data: { cluster: 'A' } },\n { id: '6', data: { cluster: 'B' } },\n { id: '7', data: { cluster: 'B' } },\n { id: '8', data: { cluster: 'B' } },\n { id: '9', data: { cluster: 'B' } },\n ],\n edges: [\n { source: '0', target: '6' },\n { source: '0', target: '7' },\n { source: '0', target: '9' },\n { source: '1', target: '6' },\n { source: '1', target: '9' },\n { source: '1', target: '7' },\n { source: '2', target: '8' },\n { source: '2', target: '9' },\n { source: '2', target: '6' },\n { source: '3', target: '8' },\n { source: '4', target: '6' },\n { source: '4', target: '7' },\n { source: '5', target: '9' },\n ],\n};\n\nclass BiLayout extends BaseLayout {\n id = 'bi-layout';\n\n async execute(data, options) {\n const { sep = 100, nodeSep = 20, nodeSize = 32 } = { ...this.options, ...options };\n\n const [A, B] = data.nodes.reduce(\n (acc, curr) => {\n acc[curr.data.cluster === 'A' ? 0 : 1].push(curr);\n return acc;\n },\n [[], []],\n );\n\n return {\n nodes: [\n ...A.map((node, i) => ({\n id: node.id,\n style: {\n x: i * (nodeSep + nodeSize),\n y: 0,\n },\n })),\n ...B.map((node, i) => ({\n id: node.id,\n style: {\n x: i * (nodeSep + nodeSize),\n y: sep,\n },\n })),\n ],\n };\n }\n}\n\nregister(ExtensionCategory.LAYOUT, 'bi', BiLayout);\n\nconst graph = new Graph({\n container: 'container',\n data,\n autoFit: 'center',\n node: {\n style: {\n labelFill: '#fff',\n labelPlacement: 'center',\n labelText: (d) => d.id,\n },\n palette: {\n type: 'group',\n field: 'cluster',\n color: ['#1783FF', '#D580FF'],\n },\n },\n layout: {\n type: 'bi',\n sep: 300,\n nodeSep: 20,\n nodeSize: 32,\n preLayout: true,\n },\n behaviors: ['drag-canvas', 'drag-element', 'zoom-canvas'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\n// 参考数据\nconst rawNodes = [\n {\"id\":\"0\",\"data\":{\"cluster\":\"A\"}},\n {\"id\":\"1\",\"data\":{\"cluster\":\"A\"}},\n {\"id\":\"2\",\"data\":{\"cluster\":\"A\"}},\n {\"id\":\"3\",\"data\":{\"cluster\":\"A\"}},\n {\"id\":\"4\",\"data\":{\"cluster\":\"A\"}},\n {\"id\":\"5\",\"data\":{\"cluster\":\"A\"}},\n {\"id\":\"6\",\"data\":{\"cluster\":\"B\"}},\n {\"id\":\"7\",\"data\":{\"cluster\":\"B\"}},\n {\"id\":\"8\",\"data\":{\"cluster\":\"B\"}},\n {\"id\":\"9\",\"data\":{\"cluster\":\"B\"}}\n];\n\n// 自定义双层布局算法实现\nconst width = 800;\nconst height = 600;\nconst centerX = width / 2;\nconst layerGap = height / 3;\n\n// 按聚类分组\nconst clusterANodes = rawNodes.filter(n => n.data.cluster === 'A');\nconst clusterBNodes = rawNodes.filter(n => n.data.cluster === 'B');\n\n// 为每个节点计算坐标位置:A聚类在上层,B聚类在下层\nconst nodes = rawNodes.map((node) => {\n const isClusterA = node.data.cluster === 'A';\n const group = isClusterA ? clusterANodes : clusterBNodes;\n const indexInGroup = group.findIndex(n => n.id === node.id);\n const groupSize = group.length;\n \n // 在层内水平均匀分布,留出边距\n const spacing = width / (groupSize + 1);\n const x = spacing * (indexInGroup + 1);\n \n // 上层(A)在 1/3 高度,下层(B)在 2/3 高度\n const y = isClusterA ? layerGap : layerGap * 2;\n \n return {\n ...node,\n style: {\n x,\n y,\n }\n };\n});\n\n// 构建边关系:包含聚类内部连接和跨聚类连接\nconst edges = [\n // Cluster A 内部连接(上层)\n { source: '0', target: '1', data: { type: 'intra' } },\n { source: '1', target: '2', data: { type: 'intra' } },\n { source: '2', target: '3', data: { type: 'intra' } },\n { source: '3', target: '4', data: { type: 'intra' } },\n { source: '4', target: '5', data: { type: 'intra' } },\n { source: '0', target: '3', data: { type: 'intra' } },\n { source: '1', target: '4', data: { type: 'intra' } },\n \n // Cluster B 内部连接(下层)\n { source: '6', target: '7', data: { type: 'intra' } },\n { source: '7', target: '8', data: { type: 'intra' } },\n { source: '8', target: '9', data: { type: 'intra' } },\n { source: '6', target: '9', data: { type: 'intra' } },\n \n // 跨聚类连接(层间)\n { source: '2', target: '7', data: { type: 'inter' } },\n { source: '3', target: '8', data: { type: 'inter' } },\n { source: '5', target: '6', data: { type: 'inter' } },\n { source: '0', target: '9', data: { type: 'inter' } },\n];\n\nconst graph = new Graph({\n container: container,\n width,\n height,\n data: {\n nodes,\n edges,\n },\n node: {\n type: 'circle',\n style: {\n size: 45,\n // 根据聚类设置不同颜色\n fill: (d) => d.data.cluster === 'A' ? '#1783FF' : '#FA8C16',\n stroke: (d) => d.data.cluster === 'A' ? '#0958D9' : '#D46B08',\n lineWidth: 3,\n labelText: (d) => `${d.id}(${d.data.cluster})`,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n // 添加阴影效果增强层次感\n shadowColor: (d) => d.data.cluster === 'A' ? 'rgba(23,131,255,0.4)' : 'rgba(250,140,22,0.4)',\n shadowBlur: 10,\n shadowOffsetX: 2,\n shadowOffsetY: 2,\n },\n },\n edge: {\n type: 'cubic-vertical', // 使用垂直曲线边,更适合上下层连接\n style: {\n lineWidth: 2,\n // 层内连接和层间连接使用不同样式\n stroke: (d) => d.data?.type === 'inter' ? '#BFBFBF' : '#595959',\n lineDash: (d) => d.data?.type === 'inter' ? [4, 4] : undefined,\n opacity: (d) => d.data?.type === 'inter' ? 0.6 : 0.8,\n endArrow: true,\n endArrowSize: 8,\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n 'hover-activate',\n ],\n});\n\ngraph.render();", + "duration": 28265, + "retrievedSkillIds": [ + "g6-layout-mindmap", + "g6-layout-dagre", + "g6-layout-grid", + "g6-node-react", + "g6-layout-force" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 3406, + "expectedLength": 2249, + "similarity": 0.578755980861244, + "extractedCode": "import { Graph } from '@antv/g6';\n\n// 参考数据\nconst rawNodes = [\n {\"id\":\"0\",\"data\":{\"cluster\":\"A\"}},\n {\"id\":\"1\",\"data\":{\"cluster\":\"A\"}},\n {\"id\":\"2\",\"data\":{\"cluster\":\"A\"}},\n {\"id\":\"3\",\"data\":{\"cluster\":\"A\"}},\n {\"id\":\"4\",\"data\":{\"cluster\":\"A\"}},\n {\"id\":\"5\",\"data\":{\"cluster\":\"A\"}},\n {\"id\":\"6\",\"data\":{\"cluster\":\"B\"}},\n {\"id\":\"7\",\"data\":{\"cluster\":\"B\"}},\n {\"id\":\"8\",\"data\":{\"cluster\":\"B\"}},\n {\"id\":\"9\",\"data\":{\"cluster\":\"B\"}}\n];\n\n// 自定义双层布局算法实现\nconst width = 800;\nconst height = 600;\nconst centerX = width / 2;\nconst layerGap = height / 3;\n\n// 按聚类分组\nconst clusterANodes = rawNodes.filter(n => n.data.cluster === 'A');\nconst clusterBNodes = rawNodes.filter(n => n.data.cluster === 'B');\n\n// 为每个节点计算坐标位置:A聚类在上层,B聚类在下层\nconst nodes = rawNodes.map((node) => {\n const isClusterA = node.data.cluster === 'A';\n const group = isClusterA ? clusterANodes : clusterBNodes;\n const indexInGroup = group.findIndex(n => n.id === node.id);\n const groupSize = group.length;\n \n // 在层内水平均匀分布,留出边距\n const spacing = width / (groupSize + 1);\n const x = spacing * (indexInGroup + 1);\n \n // 上层(A)在 1/3 高度,下层(B)在 2/3 高度\n const y = isClusterA ? layerGap : layerGap * 2;\n \n return {\n ...node,\n style: {\n x,\n y,\n }\n };\n});\n\n// 构建边关系:包含聚类内部连接和跨聚类连接\nconst edges = [\n // Cluster A 内部连接(上层)\n { source: '0', target: '1', data: { type: 'intra' } },\n { source: '1', target: '2', data: { type: 'intra' } },\n { source: '2', target: '3', data: { type: 'intra' } },\n { source: '3', target: '4', data: { type: 'intra' } },\n { source: '4', target: '5', data: { type: 'intra' } },\n { source: '0', target: '3', data: { type: 'intra' } },\n { source: '1', target: '4', data: { type: 'intra' } },\n \n // Cluster B 内部连接(下层)\n { source: '6', target: '7', data: { type: 'intra' } },\n { source: '7', target: '8', data: { type: 'intra' } },\n { source: '8', target: '9', data: { type: 'intra' } },\n { source: '6', target: '9', data: { type: 'intra' } },\n \n // 跨聚类连接(层间)\n { source: '2', target: '7', data: { type: 'inter' } },\n { source: '3', target: '8', data: { type: 'inter' } },\n { source: '5', target: '6', data: { type: 'inter' } },\n { source: '0', target: '9', data: { type: 'inter' } },\n];\n\nconst graph = new Graph({\n container: container,\n width,\n height,\n data: {\n nodes,\n edges,\n },\n node: {\n type: 'circle',\n style: {\n size: 45,\n // 根据聚类设置不同颜色\n fill: (d) => d.data.cluster === 'A' ? '#1783FF' : '#FA8C16',\n stroke: (d) => d.data.cluster === 'A' ? '#0958D9' : '#D46B08',\n lineWidth: 3,\n labelText: (d) => `${d.id}(${d.data.cluster})`,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 12,\n labelFontWeight: 'bold',\n // 添加阴影效果增强层次感\n shadowColor: (d) => d.data.cluster === 'A' ? 'rgba(23,131,255,0.4)' : 'rgba(250,140,22,0.4)',\n shadowBlur: 10,\n shadowOffsetX: 2,\n shadowOffsetY: 2,\n },\n },\n edge: {\n type: 'cubic-vertical', // 使用垂直曲线边,更适合上下层连接\n style: {\n lineWidth: 2,\n // 层内连接和层间连接使用不同样式\n stroke: (d) => d.data?.type === 'inter' ? '#BFBFBF' : '#595959',\n lineDash: (d) => d.data?.type === 'inter' ? [4, 4] : undefined,\n opacity: (d) => d.data?.type === 'inter' ? 0.6 : 0.8,\n endArrow: true,\n endArrowSize: 8,\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element',\n 'hover-activate',\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "filter", + "filter", + "map", + "findIndex", + "Graph", + "rgba", + "rgba", + "render" + ], + "objectKeys": [ + "clusterANodes", + "layerGap", + "style", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "source", + "target", + "data", + "type", + "container", + "data", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "labelFontWeight", + "shadowColor", + "shadowBlur", + "shadowOffsetX", + "shadowOffsetY", + "edge", + "type", + "style", + "lineWidth", + "stroke", + "lineDash", + "opacity", + "6", + "endArrow", + "endArrowSize", + "behaviors" + ], + "stringLiterals": [ + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster", + "id", + "data", + "cluster" + ], + "apiPatterns": [ + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-95", + "query": "根据描述绘制图表,使用 G6 构建一个基于力导向布局的二维网格图,节点通过 drag-element-force 行为支持拖拽,画布支持 zoom-canvas 缩放行为,采用 d3-force 布局算法进行节点排布。参考数据:[{\"id\":\"0\"},{\"id\":\"1\"},{\"id\":\"2\"},{\"id\":\"3\"},{\"id\":\"4\"},{\"id\":\"5\"},{\"id\":\"6\"},{\"id\":\"7\"},{\"id\":\"8\"},{\"id\":\"9\"}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nfunction getData(size = 10) {\n const nodes = Array.from({ length: size * size }, (_, i) => ({ id: `${i}` }));\n const edges = [];\n for (let y = 0; y < size; ++y) {\n for (let x = 0; x < size; ++x) {\n if (y > 0) edges.push({ source: `${(y - 1) * size + x}`, target: `${y * size + x}` });\n if (x > 0) edges.push({ source: `${y * size + (x - 1)}`, target: `${y * size + x}` });\n }\n }\n return { nodes, edges };\n}\n\nconst graph = new Graph({\n data: getData(),\n container: 'container',\n layout: {\n type: 'd3-force',\n manyBody: {\n strength: -30,\n },\n link: {\n strength: 1,\n distance: 20,\n iterations: 10,\n },\n },\n node: {\n style: {\n size: 10,\n fill: '#000',\n },\n },\n edge: {\n style: {\n stroke: '#000',\n },\n },\n behaviors: [{ type: 'drag-element-force' }, 'zoom-canvas'],\n});\n\ngraph.render();", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0' },\n { id: '1' },\n { id: '2' },\n { id: '3' },\n { id: '4' },\n { id: '5' },\n { id: '6' },\n { id: '7' },\n { id: '8' },\n { id: '9' },\n ],\n edges: [\n { source: '0', target: '1' },\n { source: '1', target: '2' },\n { source: '2', target: '3' },\n { source: '3', target: '4' },\n { source: '5', target: '6' },\n { source: '6', target: '7' },\n { source: '7', target: '8' },\n { source: '8', target: '9' },\n { source: '0', target: '5' },\n { source: '1', target: '6' },\n { source: '2', target: '7' },\n { source: '3', target: '8' },\n { source: '4', target: '9' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'd3-force',\n link: {\n distance: 100,\n strength: 0.8,\n },\n manyBody: {\n strength: -300,\n },\n collide: {\n radius: 20,\n strength: 0.7,\n },\n center: {\n strength: 0.1,\n },\n },\n node: {\n type: 'circle',\n style: {\n size: 30,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 14,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#ccc',\n lineWidth: 2,\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force',\n ],\n});\n\ngraph.render();", + "duration": 34224, + "retrievedSkillIds": [ + "g6-layout-force", + "g6-behavior-drag-element", + "g6-behavior-canvas-nav", + "g6-layout-grid", + "g6-behavior-advanced" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 1453, + "expectedLength": 908, + "similarity": 0.6834663677130045, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: '0' },\n { id: '1' },\n { id: '2' },\n { id: '3' },\n { id: '4' },\n { id: '5' },\n { id: '6' },\n { id: '7' },\n { id: '8' },\n { id: '9' },\n ],\n edges: [\n { source: '0', target: '1' },\n { source: '1', target: '2' },\n { source: '2', target: '3' },\n { source: '3', target: '4' },\n { source: '5', target: '6' },\n { source: '6', target: '7' },\n { source: '7', target: '8' },\n { source: '8', target: '9' },\n { source: '0', target: '5' },\n { source: '1', target: '6' },\n { source: '2', target: '7' },\n { source: '3', target: '8' },\n { source: '4', target: '9' },\n ],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n layout: {\n type: 'd3-force',\n link: {\n distance: 100,\n strength: 0.8,\n },\n manyBody: {\n strength: -300,\n },\n collide: {\n radius: 20,\n strength: 0.7,\n },\n center: {\n strength: 0.1,\n },\n },\n node: {\n type: 'circle',\n style: {\n size: 30,\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.id,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 14,\n },\n },\n edge: {\n type: 'line',\n style: {\n stroke: '#ccc',\n lineWidth: 2,\n },\n },\n behaviors: [\n 'drag-canvas',\n 'zoom-canvas',\n 'drag-element-force',\n ],\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "id", + "edges", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "source", + "target", + "container", + "layout", + "type", + "link", + "distance", + "strength", + "manyBody", + "strength", + "collide", + "radius", + "strength", + "center", + "strength", + "node", + "type", + "style", + "size", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "type", + "style", + "stroke", + "lineWidth", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "type.line", + "new Graph", + "x6.source", + "x6.target" + ] + } + } + }, + { + "id": "case-96", + "query": "根据描述绘制图表,使用 G6 渲染一个包含两个节点和一条边的简单图形,节点和边都配置了样式及文本标签,并启用拖拽交互。参考数据:[{\"id\":\"node-1\",\"style\":{\"x\":100,\"y\":150,\"size\":100}},{\"id\":\"node-2\",\"style\":{\"x\":400,\"y\":150,\"size\":150}}]", + "library": "g6", + "algorithm": "zvec", + "expectedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { id: 'node-1', style: { x: 100, y: 150, size: 100 } },\n { id: 'node-2', style: { x: 400, y: 150, size: 150 } },\n ],\n edges: [{ source: 'node-1', target: 'node-2' }],\n};\n\nconst graph = new Graph({\n container: 'container',\n data,\n node: {\n style: {\n labelPlacement: 'center',\n labelText: 'This label is too long to be displayed',\n labelWordWrap: true, // enable label ellipsis\n labelMaxWidth: '90%',\n labelBackground: true,\n labelBackgroundFill: '#eee',\n labelBackgroundFillOpacity: 0.5,\n labelBackgroundRadius: 4,\n },\n },\n edge: {\n style: {\n labelOffsetY: -4,\n labelTextBaseline: 'bottom',\n labelText: 'This label is too long to be displayed',\n labelWordWrap: true,\n labelMaxWidth: '80%',\n labelBackground: true,\n labelBackgroundFill: 'red',\n labelBackgroundFillOpacity: 0.5,\n labelBackgroundRadius: 4,\n },\n },\n behaviors: ['drag-element'],\n});\n\ngraph.render();\n", + "generatedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { \n id: 'node-1', \n data: { label: '节点 1' },\n style: { x: 100, y: 150, size: 100 } \n },\n { \n id: 'node-2', \n data: { label: '节点 2' },\n style: { x: 400, y: 150, size: 150 } \n }\n ],\n edges: [\n { \n source: 'node-1', \n target: 'node-2',\n data: { label: '连接线' }\n }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n width: 600,\n height: 400,\n data: data,\n node: {\n type: 'circle',\n style: {\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 14\n }\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelFill: '#666',\n labelFontSize: 12,\n endArrow: true\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "duration": 11754, + "retrievedSkillIds": [ + "g6-node-circle", + "g6-behavior-drag-element", + "g6-behavior-canvas-nav", + "g6-pattern-flow-chart", + "g6-node-html" + ], + "zvecStrategy": "hybrid", + "zvecTopK": 5, + "evaluation": { + "hasIssues": false, + "issues": [], + "warnings": [], + "codeLength": 991, + "expectedLength": 1036, + "similarity": 0.7276297976037366, + "extractedCode": "import { Graph } from '@antv/g6';\n\nconst data = {\n nodes: [\n { \n id: 'node-1', \n data: { label: '节点 1' },\n style: { x: 100, y: 150, size: 100 } \n },\n { \n id: 'node-2', \n data: { label: '节点 2' },\n style: { x: 400, y: 150, size: 150 } \n }\n ],\n edges: [\n { \n source: 'node-1', \n target: 'node-2',\n data: { label: '连接线' }\n }\n ]\n};\n\nconst graph = new Graph({\n container: container,\n width: 600,\n height: 400,\n data: data,\n node: {\n type: 'circle',\n style: {\n fill: '#1783FF',\n stroke: '#fff',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelPlacement: 'center',\n labelFill: '#fff',\n labelFontSize: 14\n }\n },\n edge: {\n style: {\n stroke: '#999',\n lineWidth: 2,\n labelText: (d) => d.data.label,\n labelFill: '#666',\n labelFontSize: 12,\n endArrow: true\n }\n },\n behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element']\n});\n\ngraph.render();", + "structuralFeatures": { + "imports": [ + { + "names": [ + "Graph" + ], + "source": "@antv/g6" + } + ], + "functionCalls": [ + "Graph", + "render" + ], + "objectKeys": [ + "nodes", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "id", + "data", + "label", + "style", + "x", + "y", + "size", + "edges", + "source", + "target", + "data", + "label", + "container", + "width", + "height", + "data", + "node", + "type", + "style", + "fill", + "stroke", + "lineWidth", + "labelText", + "labelPlacement", + "labelFill", + "labelFontSize", + "edge", + "style", + "stroke", + "lineWidth", + "labelText", + "labelFill", + "labelFontSize", + "endArrow", + "behaviors" + ], + "stringLiterals": [], + "apiPatterns": [ + "new Graph", + "x6.label", + "x6.source", + "x6.target" + ] + } + } + } + ] +} \ No newline at end of file diff --git a/package.json b/package.json index ad3948e..4793398 100644 --- a/package.json +++ b/package.json @@ -23,9 +23,7 @@ ], "scripts": { "build": "npm run build:index && tsc && npm run copy:index", - "build:index": "tsx src/scripts/build.ts && tsx src/scripts/build-zvec.ts", - "build:index:json": "tsx src/scripts/build.ts", - "build:index:zvec": "tsx src/scripts/build-zvec.ts", + "build:index": "tsx src/scripts/build-zvec.ts", "copy:index": "rm -rf dist/index && cp -R src/index dist/", "test": "vitest run", "test:watch": "vitest", @@ -33,13 +31,10 @@ "postinstall": "node scripts/download-model.mjs" }, "dependencies": { - "@huggingface/transformers": "^4.2.0", + "@antv/context": "^0.1.0", "commander": "^12.1.0", "gray-matter": "^4.0.3" }, - "optionalDependencies": { - "@zvec/zvec": "^0.5.0" - }, "devDependencies": { "@types/node": "^20.11.0", "tsx": "^4.21.0", diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 4962f69..99f338c 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -9,3 +9,5 @@ allowBuilds: onnxruntime-node: true protobufjs: true sharp: true +minimumReleaseAgeExclude: + - '@antv/context@0.1.0' diff --git a/skills/antv-g2-chart/SKILL.md b/skills/antv-g2-chart/SKILL.md index a88cc97..f4a0ce7 100644 --- a/skills/antv-g2-chart/SKILL.md +++ b/skills/antv-g2-chart/SKILL.md @@ -42,7 +42,7 @@ Skill content is retrieved via an antv HTTP API server using GET requests. ### `GET /api/v1/context/retrieve` -Retrieve skills by query (hybrid search = FTS + vector + RRF fusion). Setting `includeConstraints=true` will auto-prepend the library core constraints as the first result. +Retrieve skills by query (hybrid search = FTS + vector + RRF fusion). Constraints docs are indexed as regular skill documents and will appear in search results naturally. | Parameter | Type | Required | Description | |---|---|---|---| @@ -50,12 +50,11 @@ Retrieve skills by query (hybrid search = FTS + vector + RRF fusion). Setting `i | `library` | string | ✅ | Library name: `g2`, `g6`, `x6` | | `topK` | number | | Number of results to return (default: 5) | | `content` | boolean | | Return full reference doc markdown (default: true) | -| `includeConstraints` | boolean | | Prepend core constraints as the first result (default: true) | | `maxTokens` | number | | Max tokens per result (default: unlimited) | | `progressiveLevel` | number | | Progressive disclosure level: `0`=full, `1`=summary+code, `2`=summary-only | ```bash -curl "https://antv.antgroup.com/api/v1/context/retrieve?query=bar+chart+stacked&library=g2&includeConstraints=true" +curl "https://antv.antgroup.com/api/v1/context/retrieve?query=bar+chart+stacked&library=g2" ``` ## Critical Rules diff --git a/skills/antv-g6-graph/SKILL.md b/skills/antv-g6-graph/SKILL.md index 08f742b..192a806 100644 --- a/skills/antv-g6-graph/SKILL.md +++ b/skills/antv-g6-graph/SKILL.md @@ -49,7 +49,7 @@ Skill content is retrieved via an antv HTTP API server using GET requests. ### `GET /api/v1/context/retrieve` -Retrieve skills by query (hybrid search = FTS + vector + RRF fusion). Setting `includeConstraints=true` will auto-prepend the library core constraints as the first result. +Retrieve skills by query (hybrid search = FTS + vector + RRF fusion). Constraints docs are indexed as regular skill documents and will appear in search results naturally. | Parameter | Type | Required | Description | |---|---|---|---| @@ -57,12 +57,11 @@ Retrieve skills by query (hybrid search = FTS + vector + RRF fusion). Setting `i | `library` | string | ✅ | Library name: `g2`, `g6`, `x6` | | `topK` | number | | Number of results to return (default: 5) | | `content` | boolean | | Return full reference doc markdown (default: true) | -| `includeConstraints` | boolean | | Prepend core constraints as the first result (default: true) | | `maxTokens` | number | | Max tokens per result (default: unlimited) | | `progressiveLevel` | number | | Progressive disclosure level: `0`=full, `1`=summary+code, `2`=summary-only | ```bash -curl "https://antv.antgroup.com/api/v1/context/retrieve?query=force+layout+node+style&library=g6&includeConstraints=true" +curl "https://antv.antgroup.com/api/v1/context/retrieve?query=force+layout+node+style&library=g6" ``` ## Critical Rules diff --git a/skills/antv-x6-editor/SKILL.md b/skills/antv-x6-editor/SKILL.md index 8f085e4..aea6559 100644 --- a/skills/antv-x6-editor/SKILL.md +++ b/skills/antv-x6-editor/SKILL.md @@ -67,7 +67,7 @@ Skill content is retrieved via an antv HTTP API server using GET requests. ### `GET /api/v1/context/retrieve` -Retrieve skills by query (hybrid search = FTS + vector + RRF fusion). Setting `includeConstraints=true` will auto-prepend the library core constraints as the first result. +Retrieve skills by query (hybrid search = FTS + vector + RRF fusion). Constraints docs are indexed as regular skill documents and will appear in search results naturally. | Parameter | Type | Required | Description | |---|---|---|---| @@ -75,12 +75,11 @@ Retrieve skills by query (hybrid search = FTS + vector + RRF fusion). Setting `i | `library` | string | ✅ | Library name: `g2`, `g6`, `x6` | | `topK` | number | | Number of results to return (default: 5) | | `content` | boolean | | Return full reference doc markdown (default: true) | -| `includeConstraints` | boolean | | Prepend core constraints as the first result (default: true) | | `maxTokens` | number | | Max tokens per result (default: unlimited) | | `progressiveLevel` | number | | Progressive disclosure level: `0`=full, `1`=summary+code, `2`=summary-only | ```bash -curl "https://antv.antgroup.com/api/v1/context/retrieve?query=flowchart+stencil+port&library=x6&includeConstraints=true" +curl "https://antv.antgroup.com/api/v1/context/retrieve?query=flowchart+stencil+port&library=x6" ``` ## Critical Rules diff --git a/src/api.ts b/src/api.ts index a1f9fd3..6815c0c 100644 --- a/src/api.ts +++ b/src/api.ts @@ -1,18 +1,14 @@ import { retrieve as _retrieve, - getDocById as _getDocById, - getDocInfo, availableLibraries, - listDocs as _listDocs + invalidateCaches as _invalidateCaches, } from './core/retriever'; import type { Doc, - DocInfo, RetrieveOptions, - ListOptions } from './core/types'; -export type { Doc, DocInfo, RetrieveOptions, ListOptions }; +export type { Doc, RetrieveOptions }; /** * Retrieve docs based on a query. Returns doc content by default. @@ -43,29 +39,6 @@ export async function retrieve( return await _retrieve(query, libraryOrOpts); } -/** - * Get a single doc by its exact ID. - * - * @param id The doc ID (e.g. 'g2-mark-bar'). - * @param library Optional: restrict the search to a specific library. - * @returns The doc with full content, or undefined if not found. - * @example getDocById('g2-mark-bar') - */ -export function getDocById(id: string, library?: string): Doc | undefined { - return _getDocById(id, library); -} - -/** - * Get doc info embedded in the library index. - * - * @param library The library to get info for (default: 'g2'). - * @example info('g2') - * @returns The doc info, or undefined if not available. - */ -export function info(library = 'g2'): DocInfo | undefined { - return getDocInfo(library); -} - /** * Return the list of libraries that have a built index on disk. * @example libraries() // ['g2', 'g6'] @@ -75,10 +48,9 @@ export function libraries(): string[] { } /** - * List available docs, optionally filtered by library, category or tags. - * @param options Filter options. - * @example listDocs({ library: 'g2', tags: ['bar'] }) + * Invalidate all caches (Context instance). + * Useful when indexes are rebuilt at runtime. */ -export function listDocs(options: ListOptions = {}): Doc[] { - return _listDocs(options); +export async function invalidateCaches(): Promise { + return _invalidateCaches(); } diff --git a/src/commands/get.ts b/src/commands/get.ts deleted file mode 100644 index 382f7b7..0000000 --- a/src/commands/get.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Command } from 'commander'; -import { getDocById } from '../core/retriever'; - -export function registerGetCommand(program: Command): void { - program - .command('get ') - .description('Get a doc by its exact ID') - .option('--library ', 'Restrict search to a specific library') - .option('--output ', 'Output format: json | text', 'text') - .action((id: string, opts: { library?: string; output: string }) => { - const doc = getDocById(id, opts.library); - - if (!doc) { - const hint = opts.library ? ` in library "${opts.library}"` : ''; - console.error(`Doc not found: "${id}"${hint}`); - console.error('Tip: run `antv list` to browse available doc IDs.'); - process.exit(1); - } - - if (opts.output === 'json') { - console.log(JSON.stringify(doc, null, 2)); - return; - } - - console.log(`${'─'.repeat(50)}`); - console.log(`${doc.title} (${doc.id})`); - console.log(`Library : ${doc.library} v${doc.version}`); - console.log( - `Category : ${doc.category}${doc.subcategory ? '/' + doc.subcategory : ''}` - ); - console.log(`Tags : ${doc.tags.join(', ')}`); - console.log(`Desc : ${doc.description}`); - if (doc.use_cases.length) - console.log(`Cases : ${doc.use_cases.join(' / ')}`); - if (doc.anti_patterns.length) - console.log(`Avoid : ${doc.anti_patterns.join(' / ')}`); - if (doc.related.length) - console.log(`Related : ${doc.related.join(', ')}`); - if (doc.content) { - console.log(`\n${doc.content}`); - } - }); -} diff --git a/src/commands/info.ts b/src/commands/info.ts deleted file mode 100644 index bb985c8..0000000 --- a/src/commands/info.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Command } from 'commander'; -import { getDocInfo } from '../core/retriever'; - -export function registerInfoCommand(program: Command): void { - program - .command('info') - .description('Show doc info from DOC.md') - .option('--library ', 'Library to show info for (g2 or g6)', 'g2') - .option('--output ', 'Output format: json | text', 'text') - .action((opts: { library: string; output: string }) => { - const doc = getDocInfo(opts.library); - - if (!doc) { - console.error(`No doc info found for library: ${opts.library}`); - process.exit(1); - } - - if (opts.output === 'json') { - console.log(JSON.stringify(doc, null, 2)); - return; - } - - console.log(`${doc.name}: ${doc.description}\n\n${doc.content}`); - }); -} diff --git a/src/commands/list.ts b/src/commands/list.ts deleted file mode 100644 index 1e4ae84..0000000 --- a/src/commands/list.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Command } from 'commander'; -import { listDocs } from '../core/retriever'; -import { Doc } from '../api'; - -export function registerListCommand(program: Command): void { - program - .command('list') - .description('List all available docs') - .option('--library ', 'Filter by library (g2 or g6)') - .option('--category ', 'Filter by category') - .option('--tags ', 'Filter by tags (comma-separated)') - .option('--output ', 'Output format: json | text', 'text') - .action( - (opts: { - library?: string; - category?: string; - tags?: string; - output: string; - }) => { - const docs = listDocs({ - library: opts.library, - category: opts.category || null, - tags: opts.tags ? opts.tags.split(',').map((t) => t.trim()) : [] - }); - - if (opts.output === 'json') { - console.log(JSON.stringify(docs, null, 2)); - return; - } - - const groupedByLibrary: Record = docs.reduce( - (acc: Record, doc) => { - if (!acc[doc.library]) acc[doc.library] = []; - acc[doc.library].push(doc); - return acc; - }, - {} - ); - - console.log(`Total docs found: ${docs.length}\n`); - for (const [lib, libDocs] of Object.entries(groupedByLibrary)) { - console.log(`${lib.toUpperCase()} (${libDocs.length} docs)`); - for (const doc of libDocs) { - console.log(` ${doc.id.padEnd(48)} ${doc.title}`); - } - console.log(); - } - } - ); -} diff --git a/src/commands/retrieve.ts b/src/commands/retrieve.ts index fd65732..e2e1c2f 100644 --- a/src/commands/retrieve.ts +++ b/src/commands/retrieve.ts @@ -8,7 +8,7 @@ export function registerRetrieveCommand(program: Command): void { .option('--library ', 'Filter by library (g2, g6, x6)') .option('--topk ', 'Number of results to return', '7') .option('--strategy ', 'Retrieval strategy: hybrid | vector', 'hybrid') - .option('--content', 'Include markdown content of matched reference docs (constraints are always prepended when content is shown)') + .option('--content', 'Include markdown content of matched reference docs') .option('--output ', 'Output format: json | text', 'text') .action( async ( @@ -29,7 +29,6 @@ export function registerRetrieveCommand(program: Command): void { library: opts.library, topK, content: withContent, - includeConstraints: withContent, strategy, }); @@ -38,26 +37,13 @@ export function registerRetrieveCommand(program: Command): void { return; } - const refDocs = docs.filter((d) => !d.id.startsWith('__info__')); - const infoDocs = docs.filter((d) => d.id.startsWith('__info__')); - - if (infoDocs.length > 0) { - for (const infoDoc of infoDocs) { - console.log(`${'═'.repeat(60)}`); - console.log(` DOC CONSTRAINTS: ${infoDoc.title}`); - console.log(`${'═'.repeat(60)}`); - if (infoDoc.content) console.log(infoDoc.content); - console.log(); - } - } - - if (refDocs.length === 0) { - console.log('No reference documents found.'); + if (docs.length === 0) { + console.log('No documents found.'); return; } - console.log(`Total ${refDocs.length} documents found:`); - for (const [i, doc] of refDocs.entries()) { + console.log(`Total ${docs.length} documents found:`); + for (const [i, doc] of docs.entries()) { console.log(`\n${'─'.repeat(50)}`); console.log(`[${i + 1}] ${doc.title} (${doc.id})`); console.log( diff --git a/src/content/g2/constraints.md b/src/content/g2/constraints.md index 126d372..ad7b309 100644 --- a/src/content/g2/constraints.md +++ b/src/content/g2/constraints.md @@ -1,3 +1,19 @@ +--- +id: "g2-constraints" +title: "G2 v5 Core Constraints / 核心约束" +description: "G2 v5 必须遵守的核心约束规则,包括 Spec Mode、encode、transform、coordinate、scale.color.palette 等强制规范和禁止模式" +library: "g2" +version: "5.x" +category: "__constraints__" +tags: + - "constraints" + - "核心约束" + - "MUST" + - "禁止模式" +use_cases: [] +anti_patterns: [] +--- + ## Core Constraints / 核心约束 (MUST follow) 1. **`container` is mandatory**: `new Chart({ container: 'container', ... })` diff --git a/src/content/g6/constraints.md b/src/content/g6/constraints.md index 5bdc255..4778d37 100644 --- a/src/content/g6/constraints.md +++ b/src/content/g6/constraints.md @@ -1,3 +1,18 @@ +--- +id: "g6-constraints" +title: "G6 v5 核心约束(必须遵守)" +description: "G6 v5 必须遵守的核心约束规则,包括初始化规范、数据结构、节点/边样式、布局、交互行为、插件等强制规范" +library: "g6" +version: "5.x" +category: "__constraints__" +tags: + - "constraints" + - "核心约束" + - "MUST" +use_cases: [] +anti_patterns: [] +--- + ## 核心约束(必须遵守) ### 初始化规范 diff --git a/src/content/x6/constraints.md b/src/content/x6/constraints.md index 304c33c..0ac90e2 100644 --- a/src/content/x6/constraints.md +++ b/src/content/x6/constraints.md @@ -1,3 +1,19 @@ +--- +id: "x6-constraints" +title: "X6 3.x 核心约束(必须遵守)" +description: "X6 3.x 必须遵守的核心约束规则,包括初始化、节点操作、边操作、插件注册、DOM/CSS、序列化、事件、自定义shape等强制规范" +library: "x6" +version: "3.x" +category: "__constraints__" +tags: + - "constraints" + - "核心约束" + - "MUST" + - "禁止模式" +use_cases: [] +anti_patterns: [] +--- + ## 核心约束(必须遵守) diff --git a/src/core/index-loader.ts b/src/core/index-loader.ts deleted file mode 100644 index a4c7ae4..0000000 --- a/src/core/index-loader.ts +++ /dev/null @@ -1,155 +0,0 @@ -/** - * Index loader — loads doc index JSON files from disk with caching. - * - * Extracted from retriever.ts for independent testing and reuse. - * Key improvement: index files and doc maps are cached after first load - * instead of being re-read from disk on every retrieval call. - */ - -import fs from 'fs'; -import path from 'path'; -import type { Doc, DocIndex } from './types'; - -// Index files are always expected in a sibling index directory. -const DEFAULT_INDEX_DIR = path.resolve(__dirname, '../index'); - -const DEFAULT_LIBRARY = 'g2'; - -// --------------------------------------------------------------------------- -// Lazy-loading cache — avoids repeated JSON.parse + fs.readFileSync on -// every retrieve() call. This is especially important for HTTP Server and -// Playground multi-turn scenarios where retrieve() is called per message. -// --------------------------------------------------------------------------- - -const indexCache = new Map(); -const docMapCache = new Map>(); -let cachedLibraries: string[] | null = null; - -/** - * Invalidate all caches. Useful when the harness IndexAgent rebuilds indexes - * at runtime, or when tests need a clean slate. - */ -export function invalidateCache(): void { - indexCache.clear(); - docMapCache.clear(); - cachedLibraries = null; -} - -/** - * Return the list of libraries that have a built index on disk. - */ -export function availableLibraries(): string[] { - if (cachedLibraries) return cachedLibraries; - - if (!fs.existsSync(DEFAULT_INDEX_DIR)) { - cachedLibraries = []; - return cachedLibraries; - } - - cachedLibraries = fs - .readdirSync(DEFAULT_INDEX_DIR) - .filter((f) => f.endsWith('.index.json')) - .map((f) => f.replace('.index.json', '')) - .sort(); - - return cachedLibraries; -} - -/** - * Load the index JSON file for a library (with caching). - * - * @param library The library name. - * @returns The doc index for the specified library. - */ -export function loadIndex(library: string): DocIndex { - if (indexCache.has(library)) return indexCache.get(library)!; - - const indexFile = path.join(DEFAULT_INDEX_DIR, `${library}.index.json`); - - if (!fs.existsSync(indexFile)) { - // Only scan the directory on the error path to build a helpful message. - const libs = availableLibraries(); - throw new Error( - libs.length > 0 - ? `Unknown library: "${library}". Available: ${libs.join(', ')}` - : `Index file not found for "${library}". Run build first.` - ); - } - - const index: DocIndex = JSON.parse(fs.readFileSync(indexFile, 'utf-8')); - indexCache.set(library, index); - return index; -} - -/** - * Build a doc map (id → Doc) from index files for ID→Doc resolution. - * - * The map is cached per set of libraries; when called with the same - * library list it returns the cached version. - * - * @param libs Libraries to include in the map. - */ -export function buildDocMap(libs: string[]): Map { - // Cache key: sorted, comma-separated library list - const cacheKey = [...libs].sort().join(','); - if (docMapCache.has(cacheKey)) return docMapCache.get(cacheKey)!; - - const map = new Map(); - for (const lib of libs) { - for (const doc of loadIndex(lib).docs) { - map.set(doc.id, doc); - } - } - docMapCache.set(cacheKey, map); - return map; -} - -/** - * Get doc info embedded in the library index. - * - * @param library The library name (default: 'g2'). - * @returns The doc info, or undefined if not available. - */ -export function getDocInfo(library = DEFAULT_LIBRARY): DocIndex['info'] { - return loadIndex(library).info; -} - -/** - * Get a single doc by its exact ID, searching across all available libraries - * unless a specific library is provided. - * - * @param id The doc ID. - * @param library Optional library to restrict the search. - * @returns The doc (with content), or undefined if not found. - */ -export function getDocById(id: string, library?: string): Doc | undefined { - const libs = library ? [library] : availableLibraries(); - for (const lib of libs) { - const { docs } = loadIndex(lib); - const found = docs.find((s) => s.id === id); - if (found) return found; - } - return undefined; -} - -/** - * List all the docs, optionally filtered by library, category or tags. - * - * @param options Filter options. - * @returns An array of docs matching the filters. - */ -export function listDocs( - options: { library?: string; category?: string | null; tags?: string[] } = {} -): Doc[] { - const { library, category = null, tags = [] } = options; - - const libs = library ? [library] : availableLibraries(); - const allDocs = libs.flatMap((lib) => loadIndex(lib).docs); - - return allDocs.filter((doc) => { - if (category && doc.category !== category) return false; - if (tags.length > 0 && !tags.some((t) => doc.tags.includes(t))) - return false; - return true; - }); -} diff --git a/src/core/retrieval/embedder.ts b/src/core/retrieval/embedder.ts deleted file mode 100644 index 2d226ca..0000000 --- a/src/core/retrieval/embedder.ts +++ /dev/null @@ -1,546 +0,0 @@ -/** - * Embedder: text-to-vector conversion. - * - * Two implementations are provided: - * - TransformersEmbedder: uses @huggingface/transformers (bge-small-zh-v1.5, 512 dims, bilingual) - * - SimpleEmbedder: lightweight TF-IDF-style pseudo-embedding (no model download) - * - * Selection logic: - * getEmbedder() tries TransformersEmbedder first, falls back to SimpleEmbedder. - * Callers can also explicitly construct either implementation. - */ - -export interface Embedder { - readonly dimensions: number; - embed(text: string): Promise; - embedBatch(texts: string[]): Promise; -} - -// --------------------------------------------------------------------------- -// SimpleEmbedder – lightweight pseudo-embedding, no external dependencies -// --------------------------------------------------------------------------- - -const SIMPLE_DIMS = 512; - -/** - * Lightweight pseudo-embedder with weighted CJK n-grams, synonym expansion, - * and log-scale count compression. - * - * CJK n-grams are weighted by length (trigram > bigram > unigram) because - * longer n-grams are more discriminative ("矩形树图" >> "图"). - * Chart-type synonyms bridge the Chinese-English gap that pure character - * hashing cannot cross ("树图" ⇔ "treemap"). - * - * Still NOT a semantic embedder — it's a tuned bag-of-tokens fingerprint. - * TransformersEmbedder is the production-quality path. - */ -export class SimpleEmbedder implements Embedder { - readonly dimensions = SIMPLE_DIMS; - - async embed(text: string): Promise { - return this.embedSync(text); - } - - async embedBatch(texts: string[]): Promise { - return texts.map((t) => this.embedSync(t)); - } - - /** Synchronous embedding – no async overhead, usable in sync code paths. */ - embedSync(text: string): number[] { - const vec = new Array(SIMPLE_DIMS).fill(0); - const tokens = tokenizeWeighted(text); - - for (const { token, weight } of tokens) { - // 3 hash functions per token for collision resistance - for (let h = 0; h < 3; h++) { - vec[hashToken(token, h) % SIMPLE_DIMS] += weight; - } - } - - // Log-scale compression: prevents dimension saturation from - // high-frequency terms (a term appearing 50× contributes log(51) ≈ 3.93 - // instead of 50, giving rare terms proportionally more influence). - for (let i = 0; i < SIMPLE_DIMS; i++) { - if (vec[i] > 0) vec[i] = Math.log(1 + vec[i]); - } - - // L2-normalise - let norm = 0; - for (let i = 0; i < SIMPLE_DIMS; i++) norm += vec[i] * vec[i]; - norm = Math.sqrt(norm) || 1; - for (let i = 0; i < SIMPLE_DIMS; i++) { - vec[i] /= norm; - } - return vec; - } -} - -// --------------------------------------------------------------------------- -// TransformersEmbedder – local sentence-transformers model via @huggingface/transformers -// --------------------------------------------------------------------------- - -const MODEL_ID = 'onnx-community/bge-small-zh-v1.5-ONNX'; -const TRANSFORMERS_DIMS = 512; - -let _transformersModule: any = undefined; -let _transformersLoadFailed = false; - -async function loadTransformers(): Promise { - if (_transformersModule) return _transformersModule; - if (_transformersLoadFailed) return undefined; - - try { - // @huggingface/transformers v4 is an ESM-first package (type: "module"). - // Dynamic import() loads the proper ESM bundle where `pipeline` is a - // real async function. The CJS bundle (transformers.node.cjs) may not - // expose `pipeline` correctly on some platforms due to native-binding - // side-effects during require(). - _transformersModule = await import('@huggingface/transformers'); - } catch { - _transformersLoadFailed = true; - return undefined; - } - - // Apply HF_ENDPOINT mirror if set (e.g. https://hf-mirror.com for China). - // @huggingface/transformers v4 does NOT read HF_ENDPOINT automatically; - // it hardcodes "https://huggingface.co/" as env.remoteHost. - const hfEndpoint = process.env.HF_ENDPOINT; - if (hfEndpoint && _transformersModule?.env) { - _transformersModule.env.remoteHost = hfEndpoint; - } - - return _transformersModule; -} - -/** - * Embedder backed by onnx-community/all-MiniLM-L6-v2-ONNX (384-dims). - * - * Constructor is cheap – the model is loaded lazily on the first embed() call. - * When the optional dependency is not installed the embed()/embedBatch() calls - * throw an explicit error. - */ -export class TransformersEmbedder implements Embedder { - readonly dimensions = TRANSFORMERS_DIMS; - private _pipeline: any = null; - private _loadPromise: Promise | null = null; - - private async _getPipeline(): Promise { - if (this._pipeline) { - return this._pipeline; - } - - if (!this._loadPromise) { - this._loadPromise = (async () => { - const t = await loadTransformers(); - this._pipeline = await t.pipeline('feature-extraction', MODEL_ID); - return this._pipeline; - })(); - } - - const result = await this._loadPromise; - - return result; - } - - async embed(text: string): Promise { - return (await this.embedBatch([text]))[0]; - } - - async embedBatch(texts: string[]): Promise { - const pipe = await this._getPipeline(); - const outputs = await Reflect.apply(pipe, null, [ - texts, - { - pooling: 'mean', - normalize: true - } - ]); - return Array.from((outputs as any).tolist()); - } -} - -// --------------------------------------------------------------------------- -// Convenience getters -// --------------------------------------------------------------------------- - -let _defaultEmbedder: Embedder | null = null; -let _syncEmbedder: SimpleEmbedder | null = null; - -/** - * Return a shared Embedder instance (async). - * - * Tries TransformersEmbedder first (needs @huggingface/transformers installed - * AND the model downloadable from HuggingFace Hub). If either fails, falls - * back to SimpleEmbedder gracefully. - */ -export async function getEmbedder(): Promise { - if (_defaultEmbedder) return _defaultEmbedder; - - const t = await loadTransformers(); - if (t) { - try { - // Probe: attempt to load the model pipeline. If network is unavailable - // or the model can't be fetched, fall back to SimpleEmbedder instead - // of crashing the entire process. - const probe = new TransformersEmbedder(); - await probe.embed('probe'); // triggers lazy model download - _defaultEmbedder = probe; - } catch (err) { - console.warn( - `[embedder] 双语模型 (bge-small-zh-v1.5) 加载失败,降级为 SimpleEmbedder。\n` + - ` 错误: ${(err as Error).message?.split('\n')[0]}\n` + - `\n` + - ` SimpleEmbedder 的召回质量较低,建议修复模型下载:\n` + - ` 1. 设置镜像: export HF_ENDPOINT=https://hf-mirror.com\n` + - ` 2. 手动下载: node scripts/download-model.mjs\n` - ); - _defaultEmbedder = new SimpleEmbedder(); - } - } else { - console.warn( - '[embedder] @huggingface/transformers 未安装,使用 SimpleEmbedder。\n' + - ' 安装后可使用双语模型提升召回质量:\n' + - ' npm install @huggingface/transformers\n' + - ' node scripts/download-model.mjs\n' - ); - _defaultEmbedder = new SimpleEmbedder(); - } - return _defaultEmbedder; -} - -/** - * Return a synchronous SimpleEmbedder instance. - * - * This bypasses the async TransformersEmbedder path entirely and is intended - * for use inside synchronous code paths (e.g. the `retrieve()` function). - */ -export function getSyncEmbedder(): SimpleEmbedder { - if (!_syncEmbedder) { - _syncEmbedder = new SimpleEmbedder(); - } - return _syncEmbedder; -} - -/** - * Force-reset the cached default embedder (useful for tests). - */ -export function resetEmbedder(): void { - _defaultEmbedder = null; - _syncEmbedder = null; - _transformersModule = undefined; - _transformersLoadFailed = false; -} - -// --------------------------------------------------------------------------- -// Internal helpers — weighted tokenization -// --------------------------------------------------------------------------- - -interface WeightedToken { - token: string; - weight: number; -} - -// ── CJK n-gram weights ────────────────────────────────────────────────────── -// Trigram: "矩形树图" — highly discriminative → weight 2.0 -// Bigram: "树图", "柱状" — moderately discriminative → weight 1.0 -// Unigram: "图", "型" — mostly noise → weight 0.15 -// ──────────────────────────────────────────────────────────────────────────── -const CJK_UNIGRAM_WEIGHT = 0.15; -const CJK_BIGRAM_WEIGHT = 1.0; -const CJK_TRIGRAM_WEIGHT = 2.0; - -// ── English word weights ──────────────────────────────────────────────────── -const EN_WORD_WEIGHT = 1.5; // "treemap", "sankey" — discriminative -const EN_SINGLE_CHAR_WEIGHT = 0.1; // "x", "y" — axis labels, noise - -// ── Chart-type synonym map ────────────────────────────────────────────────── -// Now uses the shared synonyms.ts module instead of a local copy. -// This ensures FTS query expansion and embedding token expansion use -// the SAME mapping, eliminating the drift between retriever.ts and -// embedder.ts that existed before. -// ──────────────────────────────────────────────────────────────────────────── -import { getSynonymMap } from '../synonyms'; - -function tokenizeWeighted(text: string): WeightedToken[] { - const synonymMap = getSynonymMap(); - const tokens: WeightedToken[] = []; - const seen = new Set(); // deduplicate — each token once per doc - const lower = text.toLowerCase(); - const segments = splitMixed(lower); - - for (const seg of segments) { - if (isCJK(seg)) { - // CJK: weighted n-grams 1..3 - // Trigrams first (highest weight) - for (let i = 0; i + 3 <= seg.length; i++) { - const t = seg.slice(i, i + 3); - if (!seen.has(t)) { - seen.add(t); - tokens.push({ token: t, weight: CJK_TRIGRAM_WEIGHT }); - } - } - // Bigrams - for (let i = 0; i + 2 <= seg.length; i++) { - const t = seg.slice(i, i + 2); - if (!seen.has(t)) { - seen.add(t); - tokens.push({ token: t, weight: CJK_BIGRAM_WEIGHT }); - } - } - // Unigrams (lowest weight, may be stopped) - for (const ch of seg) { - if (seen.has(ch) || CJK_UNIGRAM_STOP.has(ch)) continue; - seen.add(ch); - tokens.push({ token: ch, weight: CJK_UNIGRAM_WEIGHT }); - } - - // Synonym expansion: add English equivalents for known chart types - for (const [term, synonyms] of synonymMap) { - if (seg.includes(term)) { - for (const syn of synonyms) { - if (seen.has(syn)) continue; - seen.add(syn); - tokens.push({ token: syn, weight: 1.0 }); - } - } - } - } else { - // Non-CJK: whitespace-split, weight by word length - for (const w of seg.split(/\s+/)) { - const trimmed = w.trim(); - if (!trimmed || STOP_WORDS.has(trimmed) || seen.has(trimmed)) continue; - seen.add(trimmed); - const weight = - trimmed.length === 1 ? EN_SINGLE_CHAR_WEIGHT : EN_WORD_WEIGHT; - tokens.push({ token: trimmed, weight }); - - // Synonym expansion for English terms - const syns = synonymMap.get(trimmed); - if (syns) { - for (const syn of syns) { - if (seen.has(syn)) continue; - seen.add(syn); - tokens.push({ token: syn, weight: 1.0 }); - } - } - } - } - } - - return tokens; -} - -export function isCJK(ch: string): boolean { - const cp = ch.codePointAt(0)!; - return ( - (cp >= 0x4e00 && cp <= 0x9fff) || // CJK Unified - (cp >= 0x3400 && cp <= 0x4dbf) || // CJK Ext-A - (cp >= 0x3040 && cp <= 0x30ff) || // Hiragana + Katakana - (cp >= 0xac00 && cp <= 0xd7af) // Hangul - ); -} - -/** Split text into alternating CJK / non-CJK segments. */ -function splitMixed(text: string): string[] { - const result: string[] = []; - let buf = ''; - let bufIsCJK: boolean | null = null; - - for (const ch of text) { - const cjk = isCJK(ch); - if (bufIsCJK === null) { - bufIsCJK = cjk; - } else if (cjk !== bufIsCJK) { - result.push(buf); - buf = ''; - bufIsCJK = cjk; - } - buf += ch; - } - if (buf) result.push(buf); - return result; -} - -/** FNV-1a 32-bit hash with optional seed for multi-hash. */ -function hashToken(token: string, seed = 0): number { - let hash = (2166136261 + seed) >>> 0; - for (let i = 0; i < token.length; i++) { - hash ^= token.charCodeAt(i); - hash = Math.imul(hash, 16777619); - } - return hash >>> 0; -} - -// ── Stop words ────────────────────────────────────────────────────────────── -// Extended from the original minimal set to include high-frequency -// chart-document CJK terms that appear in nearly every doc. -// ──────────────────────────────────────────────────────────────────────────── -const STOP_WORDS = new Set([ - // Original - '的', - '了', - '在', - '是', - '我', - '有', - '和', - '就', - '不', - 'the', - 'a', - 'an', - 'is', - 'are', - 'was', - 'were', - 'be', - 'been', - 'being', - 'to', - 'of', - 'in', - 'for', - 'on', - 'with', - 'at', - 'by', - 'from', - 'as', - 'i', - 'me', - 'my', - 'we', - 'our', - 'he', - 'him', - 'his', - 'she', - 'her', - 'it', - 'its', - 'and', - 'but', - 'or', - 'if', - 'this', - 'that', - 'these', - 'those', - 'not', - 'no', - 'nor', - 'only', - 'chart', - 'using', - 'use', - // Extended: high-frequency chart-document CJK - '图表', - '数据', - '配置', - '展示', - '需要', - '支持', - '进行', - '通过', - '绘制', - '实现', - '基于', - '根据', - '使用', - '方式', - '效果', - '功能', - '用于', - '可以', - '一个', - '表示', - '如下', - '参考' -]); - -// Single CJK characters that carry almost no discriminative signal. -// Stopped at the unigram level (bigrams/trigrams containing these are kept). -const CJK_UNIGRAM_STOP = new Set([ - '的', - '了', - '在', - '是', - '和', - '就', - '不', - '也', - '都', - '很', - '到', - '要', - '会', - '着', - '能', - '可', - '以', - '对', - '与', - '或', - '而', - '且', - '但', - '则', - '因', - '所', - '被', - '把', - '从', - '由', - '向', - '往', - '用', - '为', - '让', - '使', - '给', - '将', - '比', - '更', - '最', - '只', - '这', - '那', - '其', - '各', - '某', - '每', - '任', - '何', - '另', - '别', - '全', - '整', - '些', - '几', - '上', - '下', - '中', - '内', - '外', - '前', - '后', - '左', - '右', - '大', - '小', - '多', - '少', - '高', - '一', - '二', - '三', - '两', - '个', - '次', - '种', - '项', - '批', - '组', - '类', - '型' -]); diff --git a/src/core/retrieval/zvec-store.ts b/src/core/retrieval/zvec-store.ts deleted file mode 100644 index 5c1a3e5..0000000 --- a/src/core/retrieval/zvec-store.ts +++ /dev/null @@ -1,605 +0,0 @@ -/** - * ZvecStore – zvec Collection management abstraction. - * - * Two implementations: - * - ActualZvecStore: wraps @zvec/zvec SDK with full FTS + Vector + Hybrid - * - MemoryZvecStore: pure in-memory fallback (dev / no SDK) - * - * The IZvecStore interface isolates the rest of the code from zvec SDK details. - */ - -export interface ZvecDoc { - id: string; - vector: number[]; - fields: Record; -} - -export interface ZvecQueryResult { - id: string; - score: number; - fields: Record; -} - -export interface ZvecSearchParams { - vector: number[]; - topK: number; - /** Optional field-level filter (exact match expression like `library = 'g2'`). */ - filter?: string; -} - -export interface ZvecHybridParams { - /** Query text for FTS path (no embedding needed). */ - queryText: string; - /** Query vector for ANN path (must be pre-computed). */ - queryVector: number[]; - topK: number; - filter?: string; -} - -export interface IZvecStore { - insert(docs: ZvecDoc[]): Promise; - /** Pure ANN vector search. */ - search(params: ZvecSearchParams): Promise; - /** Hybrid FTS + Vector with native RRF fusion (when available). */ - searchHybrid(params: ZvecHybridParams): Promise; - /** Synchronous ANN vector search. */ - searchSync(params: ZvecSearchParams): ZvecQueryResult[]; - /** Synchronous hybrid FTS + Vector search. */ - searchHybridSync(params: ZvecHybridParams): ZvecQueryResult[]; - close(): Promise; -} - -// --------------------------------------------------------------------------- -// Doc document field names (shared between both implementations) -// --------------------------------------------------------------------------- - -export const DOC_SCALAR_FIELDS = [ - 'title', - 'description', - 'library', - 'category', - 'tags', - 'content', - 'use_cases', - 'anti_patterns', - 'path', - 'content_hash', - 'source', - 'expires_at' -] as const; - -/** Fields that get FTS indexes in ActualZvecStore. */ -export const FTS_FIELDS = [ - 'title', - 'description', - 'tags', - 'content', - 'use_cases', - 'anti_patterns' -] as const; - -export const VECTOR_FIELD = 'embedding'; -export const VECTOR_DIMS = 512; - -// --------------------------------------------------------------------------- -// MemoryZvecStore – pure JS fallback (cosine similarity + linear scan + text) -// --------------------------------------------------------------------------- - -export class MemoryZvecStore implements IZvecStore { - private docs: ZvecDoc[] = []; - - async insert(docs: ZvecDoc[]): Promise { - this.docs.push(...docs); - } - - async search(params: ZvecSearchParams): Promise { - const { vector, topK, filter } = params; - let scored: ZvecQueryResult[] = []; - - for (const doc of this.docs) { - if (filter && !evalMemoryFilter(filter, doc.fields)) continue; - const score = cosineSimilarity(vector, doc.vector); - scored.push({ id: doc.id, score, fields: doc.fields }); - } - - scored.sort((a, b) => b.score - a.score); - return scored.slice(0, topK); - } - - async searchHybrid(params: ZvecHybridParams): Promise { - const { queryText, queryVector, topK, filter } = params; - - // Build reciprocal-rank maps - const rrScores = new Map(); - - // 1. Text path: case-insensitive substring + field-boosted scoring - const terms = queryText.toLowerCase().split(/\s+/).filter(Boolean); - const textRanked = this.docs - .filter((d) => !filter || evalMemoryFilter(filter, d.fields)) - .map((doc) => { - let score = 0; - const title = String(doc.fields.title || '').toLowerCase(); - const desc = String(doc.fields.description || '').toLowerCase(); - const content = String(doc.fields.content || '').toLowerCase(); - const tags = String(doc.fields.tags || '').toLowerCase(); - - for (const term of terms) { - if (title.includes(term)) score += 3; - if (tags.includes(term)) score += 2; - if (desc.includes(term)) score += 1; - if (content.includes(term)) score += 0.5; - } - return { id: doc.id, score }; - }) - .filter((r) => r.score > 0) - .sort((a, b) => b.score - a.score); - - for (let i = 0; i < textRanked.length; i++) { - rrScores.set(textRanked[i].id, 1 / (i + 1)); - } - - // 2. Vector path: cosine similarity - const vecRanked = this.docs - .filter((d) => !filter || evalMemoryFilter(filter, d.fields)) - .map((doc) => ({ - id: doc.id, - score: cosineSimilarity(queryVector, doc.vector) - })) - .sort((a, b) => b.score - a.score); - - for (let i = 0; i < vecRanked.length; i++) { - rrScores.set( - vecRanked[i].id, - (rrScores.get(vecRanked[i].id) ?? 0) + 1 / (i + 1) - ); - } - - // 3. Merge by RRF score - return [...rrScores.entries()] - .sort((a, b) => b[1] - a[1]) - .slice(0, topK) - .map(([id, score]) => { - const doc = this.docs.find((d) => d.id === id)!; - return { id, score: score / 2, fields: doc.fields }; - }); - } - - searchSync(params: ZvecSearchParams): ZvecQueryResult[] { - return doSyncSearch(this.docs, params); - } - - searchHybridSync(params: ZvecHybridParams): ZvecQueryResult[] { - return doSyncHybridSearch(this.docs, params); - } - - async close(): Promise { - this.docs = []; - } -} - -function doSyncSearch( - docs: ZvecDoc[], - params: ZvecSearchParams -): ZvecQueryResult[] { - const { vector, topK, filter } = params; - const scored: ZvecQueryResult[] = []; - for (const doc of docs) { - if (filter && !evalMemoryFilter(filter, doc.fields)) continue; - scored.push({ - id: doc.id, - score: cosineSimilarity(vector, doc.vector), - fields: doc.fields - }); - } - scored.sort((a, b) => b.score - a.score); - return scored.slice(0, topK); -} - -function doSyncHybridSearch( - docs: ZvecDoc[], - params: ZvecHybridParams -): ZvecQueryResult[] { - const { queryText, queryVector, topK, filter } = params; - const rrScores = new Map(); - - // Text path: field-boosted substring scoring - const terms = queryText.toLowerCase().split(/\s+/).filter(Boolean); - const textRanked = docs - .filter((d) => !filter || evalMemoryFilter(filter, d.fields)) - .map((doc) => { - let score = 0; - const title = String(doc.fields.title || '').toLowerCase(); - const desc = String(doc.fields.description || '').toLowerCase(); - const content = String(doc.fields.content || '').toLowerCase(); - const tags = String(doc.fields.tags || '').toLowerCase(); - for (const term of terms) { - if (title.includes(term)) score += 3; - if (tags.includes(term)) score += 2; - if (desc.includes(term)) score += 1; - if (content.includes(term)) score += 0.5; - } - return { id: doc.id, score }; - }) - .filter((r) => r.score > 0) - .sort((a, b) => b.score - a.score); - - for (let i = 0; i < textRanked.length; i++) { - rrScores.set(textRanked[i].id, 1 / (i + 1)); - } - - // Vector path - const vecRanked = docs - .filter((d) => !filter || evalMemoryFilter(filter, d.fields)) - .map((doc) => ({ - id: doc.id, - score: cosineSimilarity(queryVector, doc.vector) - })) - .sort((a, b) => b.score - a.score); - - for (let i = 0; i < vecRanked.length; i++) { - rrScores.set( - vecRanked[i].id, - (rrScores.get(vecRanked[i].id) ?? 0) + 1 / (i + 1) - ); - } - - return [...rrScores.entries()] - .sort((a, b) => b[1] - a[1]) - .slice(0, topK) - .map(([id, score]) => { - const doc = docs.find((d) => d.id === id)!; - return { id, score: score / 2, fields: doc.fields }; - }); -} - -function cosineSimilarity(a: number[], b: number[]): number { - let dot = 0, - na = 0, - nb = 0; - for (let i = 0; i < a.length; i++) { - dot += a[i] * b[i]; - na += a[i] * a[i]; - nb += b[i] * b[i]; - } - const denom = Math.sqrt(na) * Math.sqrt(nb); - return denom === 0 ? 0 : dot / denom; -} - -function evalMemoryFilter( - filter: string, - fields: Record -): boolean { - // Simple `field = 'value'` parser for MemoryZvecStore (zvec SQL-style syntax) - const m = filter.match(/^(\w+)\s*=\s*'([^']*)'$/); - if (!m) return true; - return fields[m[1]] === m[2]; -} - -// --------------------------------------------------------------------------- -// ActualZvecStore – wraps @zvec/zvec native bindings (full schema + FTS) -// --------------------------------------------------------------------------- - -let _zvecModule: any = undefined; -let _zvecLoadFailed = false; - -function loadZvecSync(): any | undefined { - if (_zvecModule) return _zvecModule; - if (_zvecLoadFailed) return undefined; - try { - // eslint-disable-next-line @typescript-eslint/no-require-imports - _zvecModule = require('@zvec/zvec'); - } catch { - _zvecLoadFailed = true; - return undefined; - } - return _zvecModule; -} - -/** - * ZvecStore backed by the native @zvec/zvec library. - * - * Provides true hybrid search: zvec's FTS path accepts raw text (no embedding), - * the vector path uses pre-computed embeddings, and `multiQuerySync` with RRF - * fuses both in the engine. - */ -export class ActualZvecStore implements IZvecStore { - private _collection: any; // ZVecCollection - private _closed = false; - - constructor(collection: any) { - this._collection = collection; - } - - /** - * Create a new zvec collection with full schema (scalar fields + FTS indexes - * + HNSW vector index). - */ - static async create(path: string, dims: number): Promise { - const z = requireZvecSync(); - const schema = buildDocSchema(z, dims); - const collection = z.ZVecCreateAndOpen(path, schema); - return new ActualZvecStore(collection); - } - - /** Synchronous version of `create`. */ - static createSync(path: string, dims: number): ActualZvecStore { - const z = requireZvecSync(); - const schema = buildDocSchema(z, dims); - const collection = z.ZVecCreateAndOpen(path, schema); - return new ActualZvecStore(collection); - } - - static async open(path: string): Promise { - const z = requireZvecSync(); - const collection = z.ZVecOpen(path); - return new ActualZvecStore(collection); - } - - /** Synchronous version of `open`. Uses read-only to allow concurrent readers. */ - static openSync(path: string): ActualZvecStore { - const z = requireZvecSync(); - const collection = z.ZVecOpen(path, { readOnly: true }); - return new ActualZvecStore(collection); - } - - async insert(docs: ZvecDoc[]): Promise { - if (this._closed) throw new Error('Store is closed'); - if (docs.length === 0) return; - - const records = docs.map((d) => ({ - id: d.id, - vectors: { [VECTOR_FIELD]: d.vector }, - fields: d.fields - })); - this._collection.insertSync(records); - } - - async search(params: ZvecSearchParams): Promise { - if (this._closed) throw new Error('Store is closed'); - - const rawResults = this._collection.querySync({ - fieldName: VECTOR_FIELD, - vector: params.vector, - topk: params.topK, - filter: params.filter - }); - - return rawResults.map((r: any) => ({ - id: r.id, - score: r.score, - fields: r.fields ?? {} - })); - } - - /** Build multi-field FTS query paths for hybrid search. */ - private _buildFtsQueries(queryText: string, topK: number): any[] { - const ftsParams = this._getFtsQueryParams(); - return [ - { fieldName: 'title', fts: { matchString: queryText }, numCandidates: topK * 2, params: ftsParams }, - { fieldName: 'tags', fts: { matchString: queryText }, numCandidates: topK * 2, params: ftsParams }, - { fieldName: 'content', fts: { matchString: queryText }, numCandidates: topK * 2, params: ftsParams }, - ]; - } - - async searchHybrid(params: ZvecHybridParams): Promise { - if (this._closed) throw new Error('Store is closed'); - - const rawResults = this._collection.multiQuerySync({ - queries: [ - // Path 1: Vector ANN on pre-computed embedding - { - fieldName: VECTOR_FIELD, - vector: params.queryVector, - numCandidates: params.topK * 2 - }, - // Paths 2-5: multi-field FTS (title, tags, description, content) - ...this._buildFtsQueries(params.queryText, params.topK), - ], - topk: params.topK, - filter: params.filter, - rerank: { type: 'rrf', rankConstant: 60 } - }); - - return rawResults.map((r: any) => ({ - id: r.id, - score: r.score, - fields: r.fields ?? {} - })); - } - - searchSync(params: ZvecSearchParams): ZvecQueryResult[] { - if (this._closed) throw new Error('Store is closed'); - - const rawResults = this._collection.querySync({ - fieldName: VECTOR_FIELD, - vector: params.vector, - topk: params.topK, - filter: params.filter - }); - - return rawResults.map((r: any) => ({ - id: r.id, - score: r.score, - fields: r.fields ?? {} - })); - } - - searchHybridSync(params: ZvecHybridParams): ZvecQueryResult[] { - if (this._closed) throw new Error('Store is closed'); - - const rawResults = this._collection.multiQuerySync({ - queries: [ - { - fieldName: VECTOR_FIELD, - vector: params.queryVector, - numCandidates: params.topK * 2 - }, - // Multi-field FTS: title, tags, description, content - ...this._buildFtsQueries(params.queryText, params.topK), - ], - topk: params.topK, - filter: params.filter, - rerank: { type: 'rrf', rankConstant: 60 } - }); - - return rawResults.map((r: any) => ({ - id: r.id, - score: r.score, - fields: r.fields ?? {} - })); - } - - async close(): Promise { - if (this._closed) return; - this._closed = true; - try { - this._collection.closeSync(); - } catch { - // best-effort - } - } - - private _getFtsQueryParams(): any { - const z = loadZvecSync(); - if (!z) return undefined; - return { indexType: z.ZVecIndexType.FTS, defaultOperator: 'OR' }; - } -} - -function requireZvecSync(): any { - const z = loadZvecSync(); - if (!z) { - throw new Error( - '@zvec/zvec is not installed. Install it with:\n' + - ' pnpm add @zvec/zvec' - ); - } - return z; -} - -/** - * Build the full ZVecCollectionSchema with: - * - Vector field (HNSW index, cosine similarity) - * - Scalar fields matching the Doc type - * - FTS indexes on title, description, tags, content, use_cases, anti_patterns - */ -function buildDocSchema(z: any, dims: number): any { - const { ZVecCollectionSchema, ZVecDataType, ZVecIndexType, ZVecMetricType } = - z; - - const vectorSchema = { - name: VECTOR_FIELD, - dataType: ZVecDataType.VECTOR_FP32, - dimension: dims, - indexParams: { - indexType: ZVecIndexType.HNSW, - metricType: ZVecMetricType.COSINE, - m: 32, - efConstruction: 200 - } - }; - - const fieldSchemas = [ - { - name: 'title', - dataType: ZVecDataType.STRING, - indexParams: { - indexType: ZVecIndexType.FTS, - tokenizerName: 'jieba', - filters: ['lowercase'] - } - }, - { - name: 'description', - dataType: ZVecDataType.STRING, - indexParams: { indexType: ZVecIndexType.FTS, tokenizerName: 'jieba' } - }, - { - name: 'library', - dataType: ZVecDataType.STRING, - indexParams: { indexType: ZVecIndexType.INVERT } - }, - { - name: 'category', - dataType: ZVecDataType.STRING, - indexParams: { indexType: ZVecIndexType.INVERT } - }, - { - name: 'tags', - dataType: ZVecDataType.STRING, - indexParams: { indexType: ZVecIndexType.FTS, tokenizerName: 'jieba' } - }, - { - name: 'content', - dataType: ZVecDataType.STRING, - indexParams: { - indexType: ZVecIndexType.FTS, - tokenizerName: 'jieba', - filters: ['lowercase'] - } - }, - { - name: 'use_cases', - dataType: ZVecDataType.STRING, - indexParams: { indexType: ZVecIndexType.FTS, tokenizerName: 'jieba' } - }, - { - name: 'anti_patterns', - dataType: ZVecDataType.STRING, - indexParams: { indexType: ZVecIndexType.FTS, tokenizerName: 'jieba' } - }, - { name: 'path', dataType: ZVecDataType.STRING }, - { name: 'content_hash', dataType: ZVecDataType.STRING }, - { name: 'source', dataType: ZVecDataType.STRING }, - { name: 'expires_at', dataType: ZVecDataType.INT64 } - ]; - - return new ZVecCollectionSchema({ - name: 'docs', - vectors: vectorSchema, - fields: fieldSchemas - }); -} - -// --------------------------------------------------------------------------- -// Convenience factories -// --------------------------------------------------------------------------- - -export async function createZvecStore( - path: string, - dims: number -): Promise { - const z = loadZvecSync(); - if (z) { - return ActualZvecStore.create(path, dims); - } - return new MemoryZvecStore(); -} - -export async function openZvecStore(path: string): Promise { - return openZvecStoreSync(path); -} - -/** - * Synchronously open a zvec store. - * - * This avoids the async Promise wrapper so it can be used inside synchronous - * code paths (e.g. `retrieve()`). Both `ActualZvecStore.open()` and - * `MemoryZvecStore` are internally synchronous. - */ -export function openZvecStoreSync(path: string): IZvecStore { - const z = loadZvecSync(); - if (z) { - return ActualZvecStore.openSync(path); - } - throw new Error( - 'Cannot open zvec store: @zvec/zvec is not installed and MemoryZvecStore ' + - 'has no persistence. Install @zvec/zvec or use createZvecStore() to create ' + - 'a new MemoryZvecStore.' - ); -} - -/** Synchronous check: is @zvec/zvec available? */ -export function isZvecAvailable(): boolean { - return loadZvecSync() !== undefined; -} diff --git a/src/core/retriever.ts b/src/core/retriever.ts index b6c506d..09527d1 100644 --- a/src/core/retriever.ts +++ b/src/core/retriever.ts @@ -1,201 +1,146 @@ /** - * Retriever — thin coordination layer that delegates to: - * - index-loader.ts (index loading + caching) - * - synonyms.ts (query expansion) - * - token-budget.ts (progressive disclosure + token trimming) - * - zvec-store.ts (vector / hybrid search) - * - embedder.ts (text → vector) + * Retriever — thin coordination layer that delegates to @antv/context. + * + * When context is unavailable (model not downloaded), returns empty results + * with a clear install hint — no independent retrieval logic here. + * + * Doc metadata (title, tags, category, etc.) is read directly from + * QueryResult.meta (populated from markdown frontmatter by context), + * so no index.json intermediate layer is needed. */ import fs from 'fs'; import path from 'path'; +import { Context } from '@antv/context'; +import type { ContextOptions, QueryResult } from '@antv/context'; import type { Doc, RetrieveOptions } from './types'; -import { expandQuery } from './synonyms'; +import { synonymRecord } from './synonyms'; import { applyTokenBudget } from './token-budget'; -import { - availableLibraries, - buildDocMap, - getDocInfo as _getDocInfo, - getDocById as _getDocById, - listDocs as _listDocs -} from './index-loader'; -import { getEmbedder, SimpleEmbedder } from './retrieval/embedder'; -import { openZvecStoreSync } from './retrieval/zvec-store'; -import type { IZvecStore, ZvecQueryResult } from './retrieval/zvec-store'; // --------------------------------------------------------------------------- -// Exports for backward compatibility — redirect to index-loader +// Exports // --------------------------------------------------------------------------- -export { - availableLibraries, - loadIndex, - getDocInfo, - getDocById, - listDocs -} from './index-loader'; -export { expandQuery } from './synonyms'; +export { synonymRecord } from './synonyms'; export { applyTokenBudget, estimateTokens } from './token-budget'; // --------------------------------------------------------------------------- -// zvec path resolution & store management +// Available libraries — scan content directories on disk // --------------------------------------------------------------------------- const DEFAULT_INDEX_DIR = path.resolve(__dirname, '../index'); +const DEFAULT_CONTENT_DIR = path.resolve(__dirname, '../content'); -const ZVEC_INDEX_DIRS = [ - DEFAULT_INDEX_DIR, - ...(DEFAULT_INDEX_DIR.endsWith(`${path.sep}dist${path.sep}index`) - ? [ - DEFAULT_INDEX_DIR.replace( - `${path.sep}dist${path.sep}index`, - `${path.sep}src${path.sep}index` - ) - ] - : []) -]; - -const zvecCache = new Map(); - -function resolveZvecPath( - library: string, - fallback = false -): string | undefined { - const bases = fallback - ? [`${library}.zvec.simple`, `${library}.zvec`] - : [`${library}.zvec`]; - for (const dir of ZVEC_INDEX_DIRS) { - for (const base of bases) { - const p = path.join(dir, base); - if (fs.existsSync(p)) return p; - } - } - return undefined; -} - -function getZvecStoreSync( - library: string, - fallback = false -): IZvecStore | undefined { - const cacheKey = fallback ? `${library}__fallback` : library; - if (zvecCache.has(cacheKey)) return zvecCache.get(cacheKey)!; - - const zvecPath = resolveZvecPath(library, fallback); - if (!zvecPath) return undefined; - - try { - const store = openZvecStoreSync(zvecPath); - zvecCache.set(cacheKey, store); - return store; - } catch { - return undefined; - } +/** + * Return the list of libraries that have a built zvec index on disk. + */ +export function availableLibraries(): string[] { + if (!fs.existsSync(DEFAULT_INDEX_DIR)) return []; + + return fs + .readdirSync(DEFAULT_INDEX_DIR) + .filter( + (f) => + f.endsWith('.zvec') && + fs.statSync(path.join(DEFAULT_INDEX_DIR, f)).isDirectory() + ) + .map((f) => f.replace('.zvec', '')) + .sort(); } /** - * Invalidate all caches (index cache + zvec store cache). - * Useful when indexes are rebuilt at runtime (harness IndexAgent). + * Return the list of libraries that have content directories on disk. + * Used by build to discover which libraries to build. */ -export function invalidateCaches(): void { - zvecCache.clear(); - const mod = require('./index-loader') as typeof import('./index-loader'); - mod.invalidateCache(); +export function contentLibraries(): string[] { + if (!fs.existsSync(DEFAULT_CONTENT_DIR)) return []; + + return fs + .readdirSync(DEFAULT_CONTENT_DIR, { withFileTypes: true }) + .filter((e) => e.isDirectory()) + .map((e) => e.name) + .sort(); } // --------------------------------------------------------------------------- -// Strategy helpers +// QueryResult → Doc mapping // --------------------------------------------------------------------------- -interface StrategyParams { - library?: string; - topK: number; -} - -function buildLibraryFilter(library: string): string { - return `library = '${library}'`; -} - -function hasZvecCollections(libs: string[], fallback = false): boolean { - return libs.some((lib) => resolveZvecPath(lib, fallback) !== undefined); +/** + * Convert a context QueryResult into a Doc object. + * All metadata comes from the frontmatter stored in QueryResult.meta. + */ +function resultToDoc(result: QueryResult): Doc { + const meta = (result.meta ?? {}) as Record; + return { + id: result.id, + title: typeof meta.title === 'string' ? meta.title : '', + description: typeof meta.description === 'string' ? meta.description : '', + library: typeof meta.library === 'string' ? meta.library : '', + version: typeof meta.version === 'string' ? meta.version : '', + category: typeof meta.category === 'string' ? meta.category : '', + subcategory: typeof meta.subcategory === 'string' ? meta.subcategory : '', + tags: Array.isArray(meta.tags) ? (meta.tags as string[]) : [], + use_cases: Array.isArray(meta.use_cases) + ? (meta.use_cases as string[]) + : [], + anti_patterns: Array.isArray(meta.anti_patterns) + ? (meta.anti_patterns as string[]) + : [], + related: Array.isArray(meta.related) ? (meta.related as string[]) : [], + path: result.path, + content: result.content + }; } -async function retrieveVector( - query: string, - params: StrategyParams -): Promise { - const { library, topK } = params; - const libs = library ? [library] : availableLibraries(); - - const docMap = buildDocMap(libs); - const expandedQuery = expandQuery(query); - const embedder = await getEmbedder(); - const useFallback = embedder instanceof SimpleEmbedder; - - if (!hasZvecCollections(libs, useFallback)) { - console.error( - '[retrieve] zvec index not found. Run "build:index:zvec" to generate vector indexes.' - ); - return []; - } - const queryVec = await embedder.embed(expandedQuery); +// --------------------------------------------------------------------------- +// Context instance management (lazy init) +// --------------------------------------------------------------------------- - const allResults: ZvecQueryResult[] = []; - for (const lib of libs) { - const store = getZvecStoreSync(lib, useFallback); - if (!store) continue; - const results = store.searchSync({ - vector: queryVec, - topK, - filter: buildLibraryFilter(lib) - }); - allResults.push(...results); - } +let _contextInstance: Context | null = null; +let _contextAvailable: boolean = false; +let _contextInitPromise: Promise | null = null; + +async function tryInitContext(): Promise { + if (_contextInitPromise) return _contextInitPromise; + + _contextInitPromise = (async () => { + try { + const options: ContextOptions = { + vectorsDir: DEFAULT_INDEX_DIR, + basePath: path.resolve(__dirname, '..'), + queryExpansion: { synonyms: synonymRecord }, + ftsFields: ['content'], + ftsFieldWeights: { content: 1 } + }; + + _contextInstance = await Context.create(options); + _contextAvailable = true; + } catch (err) { + _contextAvailable = false; + _contextInstance = null; + console.warn( + `[retrieve] @antv/context unavailable — semantic search disabled.\n` + + ` Error: ${(err as Error).message?.split('\n')[0]}\n` + + ` Install model: export HF_ENDPOINT=https://hf-mirror.com && node scripts/download-model.mjs` + ); + } + })(); - allResults.sort((a, b) => b.score - a.score); - return allResults - .slice(0, topK) - .map((r) => docMap.get(r.id)) - .filter((d): d is Doc => d !== undefined); + return _contextInitPromise; } -async function retrieveHybrid( - query: string, - params: StrategyParams -): Promise { - const { library, topK } = params; - const libs = library ? [library] : availableLibraries(); - - const docMap = buildDocMap(libs); - const expandedQuery = expandQuery(query); - const embedder = await getEmbedder(); - const useFallback = embedder instanceof SimpleEmbedder; - - if (!hasZvecCollections(libs, useFallback)) { - console.error( - '[retrieve] zvec index not found. Run "build:index:zvec" to enable hybrid search.' - ); - return []; - } - const queryVec = await embedder.embed(expandedQuery); - - const allResults: ZvecQueryResult[] = []; - for (const lib of libs) { - const store = getZvecStoreSync(lib, useFallback); - if (!store) continue; - const results = store.searchHybridSync({ - queryText: expandedQuery, - queryVector: queryVec, - topK, - filter: buildLibraryFilter(lib) - }); - allResults.push(...results); +export async function invalidateCaches(): Promise { + if (_contextInstance) { + try { + await _contextInstance.close(); + } catch { + /* best-effort */ + } } - - allResults.sort((a, b) => b.score - a.score); - return allResults - .slice(0, topK) - .map((r) => docMap.get(r.id)) - .filter((d): d is Doc => d !== undefined); + _contextInstance = null; + _contextAvailable = false; + _contextInitPromise = null; } // --------------------------------------------------------------------------- @@ -210,46 +155,53 @@ export async function retrieve( library, topK = 7, content = true, - includeConstraints = content, strategy = 'hybrid', maxTokens, progressiveLevel = 1 } = options; - let docs: Doc[] = - strategy === 'vector' - ? await retrieveVector(query, { library, topK }) - : await retrieveHybrid(query, { library, topK }); + const libs = library ? [library] : availableLibraries(); + await tryInitContext(); + + let docs: Doc[]; + + if (_contextAvailable && _contextInstance) { + const mode = strategy === 'vector' ? 'vector' : 'hybrid'; + const allResults: { doc: Doc; score: number }[] = []; + + for (const lib of libs) { + const zvecPath = path.join(DEFAULT_INDEX_DIR, `${lib}.zvec`); + if (!fs.existsSync(zvecPath)) { + console.error( + `[retrieve] zvec index not found for "${lib}". Run "build:index:zvec" first.` + ); + continue; + } + + const results = await _contextInstance.query(query, { + library: lib, + topK, + mode, + rerank: false + }); + + for (const result of results) { + allResults.push({ doc: resultToDoc(result), score: result.score ?? 0 }); + } + } + + allResults.sort((a, b) => b.score - a.score); + docs = allResults.slice(0, topK).map((item) => item.doc); + } else { + // Context unavailable — no independent retrieval logic. + // User must install model for semantic search. + docs = []; + } if (!content) { docs = docs.map(({ content, ...doc }) => doc); } - if (includeConstraints) { - const libs = library ? [library] : [...new Set(docs.map((d) => d.library))]; - const infoDocs: Doc[] = libs.flatMap((lib) => { - const docInfo = _getDocInfo(lib); - if (!docInfo) return []; - return [ - { - id: `__info__${lib}`, - title: docInfo.name, - description: docInfo.description, - library: lib, - version: '', - category: '__info__', - subcategory: '', - tags: [], - use_cases: [], - anti_patterns: [], - related: [], - content: docInfo.constraintsContent - } - ]; - }); - docs = [...infoDocs, ...docs]; - } - if (maxTokens && content) { docs = applyTokenBudget(docs, maxTokens, progressiveLevel); } diff --git a/src/core/synonyms.ts b/src/core/synonyms.ts index 3cf1bd2..22eb0c5 100644 --- a/src/core/synonyms.ts +++ b/src/core/synonyms.ts @@ -1,22 +1,18 @@ /** - * Shared chart-type synonym map — single source of truth for both - * FTS query expansion (retriever) and embedding token expansion (embedder). + * Synonym expansion for chart visualization queries. * - * Rules for adding entries: - * 1. Only add distinctive chart-type terms (not common English words). - * "饼图" → "pie" hurts more than helps ("pie" is ambiguous outside chart context). - * 2. Only expand to unambiguous chart-type names (treemap, sankey, etc.). - * 3. Keep bidirectional: Chinese → English AND English → Chinese. + * The synonym map is the single source of truth for chart-type term bridges. + * At runtime, context's query() uses this map via queryExpansion option, + * so expandQuery() is only needed for standalone / testing use. */ +import { expand } from '../utils/expand'; + // --------------------------------------------------------------------------- // Bidirectional synonym pairs: [term, synonyms[]] -// Each pair is listed once in one direction; the reverse direction is -// generated automatically by initSynonyms(). // --------------------------------------------------------------------------- const SYNONYM_PAIRS: [string, string[]][] = [ - // ── G2 chart types: Chinese → English ────────────────────────────────── ['矩形树图', ['treemap']], ['树图', ['treemap']], ['旭日图', ['sunburst']], @@ -50,91 +46,54 @@ const SYNONYM_PAIRS: [string, string[]][] = [ ['面积图', ['area']], ['环形图', ['donut']], ['气泡图', ['bubble']], - - // ── G2 transforms ────────────────────────────────────────────────────── ['归一化', ['normalizey']], ['堆叠', ['stacky']], - - // ── G6 distinctive ───────────────────────────────────────────────────── ['思维导图', ['mindmap']], ['鱼骨图', ['fishbone']], - ['dagre', ['流程图']], + ['dagre', ['流程图']] ]; // --------------------------------------------------------------------------- -// Initialized synonym map (bidirectional, lazily built on first access) +// Build bidirectional synonym record from pairs // --------------------------------------------------------------------------- -let _synonymMap: Map | null = null; - -function initSynonymMap(): Map { - if (_synonymMap) return _synonymMap; - - const map = new Map(); - +function buildSynonymRecord(): Record { + const map: Record = {}; for (const [term, synonyms] of SYNONYM_PAIRS) { - // Forward direction - map.set(term, synonyms); - - // Reverse direction: each synonym → [term] + map[term] = synonyms; for (const syn of synonyms) { - const existing = map.get(syn); + const existing = map[syn]; if (existing) { - // Avoid duplicate reverse entries if (!existing.includes(term)) existing.push(term); } else { - map.set(syn, [term]); + map[syn] = [term]; } } } - - _synonymMap = map; return map; } -/** - * Get the full bidirectional synonym map. - * Used by embedder for token-level synonym expansion. - */ +export const synonymRecord = buildSynonymRecord(); + +// --------------------------------------------------------------------------- +// Public API +// --------------------------------------------------------------------------- + +/** Get the full bidirectional synonym map. */ export function getSynonymMap(): Map { - return initSynonymMap(); + return new Map(Object.entries(synonymRecord)); } /** - * Expand a query string with known chart-type synonyms to boost - * cross-language FTS recall. - * - * For each term in the query that appears in the synonym map, all - * associated synonyms are appended (if not already present). - * + * Expand a query with chart-type synonyms. + * Delegates to @antv/context's expand() function. * @example expandQuery('桑基图') → '桑基图 sankey' - * @example expandQuery('treemap') → 'treemap 矩形树图 树图' */ export function expandQuery(query: string): string { - const map = initSynonymMap(); - let expanded = query; - - for (const [term, synonyms] of map) { - if (query.includes(term)) { - for (const syn of synonyms) { - if (!query.includes(syn)) { - expanded += ` ${syn}`; - } - } - } - } - - return expanded; + return expand(query, { synonyms: synonymRecord }); } -/** - * Return all synonym expansions for a given token. - * Used by embedder for per-token synonym injection during embedding. - * - * @param token A single token (e.g. '树图' or 'treemap') - * @returns Array of synonym tokens, or empty array if none found. - */ +/** Return synonym expansions for a single token. */ export function getSynonymsForToken(token: string): string[] { - const map = initSynonymMap(); - return map.get(token) ?? []; + return synonymRecord[token] ?? []; } diff --git a/src/core/token-budget.ts b/src/core/token-budget.ts index e1b6d7c..cfc670a 100644 --- a/src/core/token-budget.ts +++ b/src/core/token-budget.ts @@ -6,7 +6,7 @@ */ import type { Doc } from './types'; -import { isCJK } from './retrieval/embedder'; +import { isCJK } from '../utils/isCJK'; // --------------------------------------------------------------------------- // Token estimation @@ -53,7 +53,9 @@ export function truncateContent(content: string, maxTokens: number): string { tokens += isCJK(content[i]) ? 0.67 : 0.25; if (tokens >= maxTokens) break; } - return content.slice(0, i) + (i < content.length ? '\n' : ''); + return ( + content.slice(0, i) + (i < content.length ? '\n' : '') + ); } // --------------------------------------------------------------------------- @@ -73,7 +75,11 @@ export function truncateContent(content: string, maxTokens: number): string { * @param level Progressive disclosure level (0, 1, or 2). * @param budget Maximum token budget for this doc's content. */ -export function formatForBudget(doc: Doc, level: number, budget: number): string { +export function formatForBudget( + doc: Doc, + level: number, + budget: number +): string { const parts: string[] = []; parts.push(`## ${doc.title}\n`); if (doc.description) parts.push(`${doc.description}\n`); @@ -99,10 +105,10 @@ export function formatForBudget(doc: Doc, level: number, budget: number): string /** * Trim doc content to fit within maxTokens budget, respecting progressiveLevel. * - * The `__info__` doc (library constraints) is given full budget first, - * then remaining budget is distributed across reference docs. + * Budget is distributed evenly across all docs — no special treatment + * for any doc type (constraints docs are now regular search results). * - * @param docs Array of docs (may include __info__ prefix). + * @param docs Array of docs. * @param maxTokens Total token budget. * @param progressiveLevel Progressive disclosure level (0, 1, or 2). */ @@ -111,20 +117,13 @@ export function applyTokenBudget( maxTokens: number, level: 0 | 1 | 2 ): Doc[] { - // Shallow-copy each doc to avoid mutating cached objects from - // indexCache / docMapCache. Without this, setting doc.content = undefined - // or doc.content = formatted would permanently pollute the cache, - // causing subsequent retrieve() calls (even without maxTokens) to - // return corrupted data. + // Shallow-copy each doc to avoid mutating cached objects. const result: Doc[] = docs.map((d) => ({ ...d })); - const infoIdx = result.findIndex((d) => d.id.startsWith('__info__')); - const constraints = infoIdx >= 0 ? result[infoIdx].content || '' : ''; - let budget = maxTokens - estimateTokens(constraints); + let budget = maxTokens; for (let i = 0; i < result.length; i++) { const doc = result[i]; - if (doc.id.startsWith('__info__')) continue; if (budget <= 0) { doc.content = undefined; continue; diff --git a/src/core/types.ts b/src/core/types.ts index e982c4d..352f9c1 100644 --- a/src/core/types.ts +++ b/src/core/types.ts @@ -15,25 +15,11 @@ export interface Doc { content?: string; } -export interface DocIndex { - library: string; - version: string; - generated: string; - total: number; - docs: Doc[]; - info?: DocInfo; -} - export interface RetrieveOptions { library?: string; topK?: number; /** Include markdown content body (default: true). */ content?: boolean; - /** - * When true, prepend the library's constraints as the first result - * (id prefixed with `__info__`). Default: same as `content`. - */ - includeConstraints?: boolean; /** * Retrieval strategy: * - 'vector' dense vector similarity via zvec index @@ -50,23 +36,3 @@ export interface RetrieveOptions { */ progressiveLevel?: 0 | 1 | 2; } - -export interface ListOptions { - library?: string; - category?: string | null; - tags?: string[]; -} - -export interface DocInfo { - name: string; - description: string; - /** Full DOC.md body (after frontmatter). */ - content: string; - /** - * Content up to and including the `` marker. - * Used by `retrieve --content` to inject only the core constraints section - * instead of the full document, avoiding context-window bloat. - * Falls back to `content` when the marker is absent. - */ - constraintsContent: string; -} diff --git a/src/index.ts b/src/index.ts index 24c4564..1fc4af2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,9 +3,6 @@ import { Command } from 'commander'; import path from 'path'; import { registerRetrieveCommand } from './commands/retrieve'; -import { registerListCommand } from './commands/list'; -import { registerInfoCommand } from './commands/info'; -import { registerGetCommand } from './commands/get'; const pkg = require(path.resolve(__dirname, '../package.json')); @@ -18,14 +15,7 @@ program .option('--debug', 'Show full stack trace on error'); registerRetrieveCommand(program); -registerGetCommand(program); -registerListCommand(program); -registerInfoCommand(program); -// Wrap parse() so errors thrown inside synchronous action handlers are caught -// here rather than relying on the global uncaughtException hook, which would -// also swallow unexpected programming errors (TypeError, ReferenceError, etc.). -// Pass --debug to see the full stack when debugging unexpected failures. try { program.parse(); } catch (err) { diff --git a/src/scripts/build-zvec.ts b/src/scripts/build-zvec.ts index 7bf5d8b..3b1cc42 100644 --- a/src/scripts/build-zvec.ts +++ b/src/scripts/build-zvec.ts @@ -1,236 +1,74 @@ #!/usr/bin/env node /** - * Build script: generates zvec vector index from doc index JSON files. + * Build script: generates zvec vector index directly from content markdown files + * using @antv/context for embedding and store management. * - * Run this after `build:index:json` (or rely on `build:index` which chains both). - * - * Usage: - * tsx src/scripts/build-zvec.ts # default - * tsx src/scripts/build-zvec.ts --root=... # override project root + * No index.json intermediate step required — context.load() reads markdown + * frontmatter directly and stores all metadata in zvec fields. */ import fs from 'fs'; import path from 'path'; -import crypto from 'crypto'; -import type { Doc, DocIndex } from '../core/types'; -import { getEmbedder, SimpleEmbedder } from '../core/retrieval/embedder'; -import type { Embedder } from '../core/retrieval/embedder'; -import { createZvecStore, isZvecAvailable } from '../core/retrieval/zvec-store'; -import type { IZvecStore } from '../core/retrieval/zvec-store'; - -// --------------------------------------------------------------------------- -// Config -// --------------------------------------------------------------------------- +import { Context } from '@antv/context'; +import type { ContextOptions } from '@antv/context'; +import { synonymRecord } from '../core/synonyms'; const rootArg = process.argv.find((a) => a.startsWith('--root=')); const PKG_ROOT = rootArg ? path.resolve(rootArg.slice('--root='.length)) : path.resolve(__dirname, '../..'); const INDEX_DIR = path.join(PKG_ROOT, 'src', 'index'); - -// --------------------------------------------------------------------------- -// Constrain embedding text to ~500 chars of body content to keep vectors -// focused on the document's topic rather than full implementation details. -// --------------------------------------------------------------------------- -const MAX_EMBED_CHARS = 500; - -// Truncate content stored in zvec fields for FTS (keep first 3000 chars). -const MAX_FIELD_CONTENT_CHARS = 3000; - -function hashContent(text: string): string { - return crypto.createHash('sha256').update(text).digest('hex').slice(0, 16); -} - -// --------------------------------------------------------------------------- -// Build embedding text for a single skill document. -// Title is repeated 5x to amplify its signal in the embedding. -// Code blocks are excluded to focus the vector on conceptual content. -// --------------------------------------------------------------------------- -function buildEmbeddingText(doc: Doc): string { - const parts: string[] = []; - - // Title x5 — strongest signal, title carries the most discriminative tokens - const title = doc.title || ''; - if (title) parts.push(title, title, title, title, title); - - if (doc.description) parts.push(doc.description); - - if (doc.tags && doc.tags.length > 0) { - parts.push(doc.tags.join(' ')); - } - - // Use cases and anti-patterns carry high-signal domain vocabulary - if (doc.use_cases && doc.use_cases.length > 0) { - parts.push(doc.use_cases.join(' ')); - } - if (doc.anti_patterns && doc.anti_patterns.length > 0) { - parts.push(doc.anti_patterns.join(' ')); - } - - if (doc.content) { - // Strip code blocks and table rows — keep section headings, - // which carry conceptual framing ("核心概念", "常见错误与修正", etc.) - const cleanText = doc.content - .replace(/```[\s\S]*?```/g, ' ') // remove all fenced code blocks - .replace(/\|.+\|/g, ' ') // remove table rows (keep heading text short) - .replace(/\n{2,}/g, '\n') // collapse whitespace - .replace(/[ \t]{2,}/g, ' ') - .replace(/^#{1,6}\s+/gm, '') // strip markdown heading markers (##) but keep text - .trim(); - const snippet = - cleanText.length > MAX_EMBED_CHARS - ? cleanText.slice(0, MAX_EMBED_CHARS) - : cleanText; - parts.push(snippet); - } - - return parts.join(' '); -} - -// --------------------------------------------------------------------------- -// Build zvec fields record for a skill document. -// Mirrors the design doc schema (Section 3.1.4): -// title*, description*, tags*, content*, use_cases*, anti_patterns* -// (starred = searchable via FTS when zvec native FTS is available) -// plus bookkeeping: library, category, path, content_hash, source, -// expires_at. -// --------------------------------------------------------------------------- -function buildZvecFields(doc: Doc): Record { - const content = - (doc.content || '').length > MAX_FIELD_CONTENT_CHARS - ? doc.content!.slice(0, MAX_FIELD_CONTENT_CHARS) - : doc.content || ''; - - return { - title: doc.title || '', - description: doc.description || '', - library: doc.library || '', - category: doc.category || '', - tags: (doc.tags || []).join(' '), - content, - use_cases: (doc.use_cases || []).join(' '), - anti_patterns: (doc.anti_patterns || []).join(' '), - path: doc.path || '', - content_hash: hashContent(doc.content || ''), - source: 'static', - expires_at: 0 - }; -} - -// --------------------------------------------------------------------------- -// Main -// --------------------------------------------------------------------------- +const CONTENT_DIR = path.join(PKG_ROOT, 'src', 'content'); async function build(): Promise { - const zvecNativeAvailable = isZvecAvailable(); - - console.log('Building zvec vector indexes...'); - if (!zvecNativeAvailable) { - console.log( - '⚠️ @zvec/zvec native bindings are NOT available on this platform.\n' + - ' The zvec index will be built in-memory only and will NOT be\n' + - ' included in the dist/ package.\n' + - '\n' + - ' Supported platforms: darwin-arm64 (Apple Silicon), linux-x64, win32-x64.\n' + - ' Current platform: ' + - process.platform + - '-' + - process.arch + - '\n' + - '\n' + - ' To publish a package with zvec indexes, run this build on one of\n' + - ' the supported platforms above. On unsupported platforms the runtime\n' + - ' will automatically fall back to BM25 keyword search.\n' - ); - return; - } - console.log(''); + console.log('Building zvec vector indexes...\n'); - // Collect index JSON files - const indexFiles = fs.existsSync(INDEX_DIR) + // Discover libraries from content directory subdirectories + const libEntries = fs.existsSync(CONTENT_DIR) ? fs - .readdirSync(INDEX_DIR) - .filter((f) => f.endsWith('.index.json')) - .sort() + .readdirSync(CONTENT_DIR, { withFileTypes: true }) + .filter((e) => e.isDirectory()) + .sort((a, b) => a.name.localeCompare(b.name)) : []; - if (indexFiles.length === 0) { - console.log('No index JSON files found. Run "build:index:json" first.'); + if (libEntries.length === 0) { + console.log(`No library directories found in ${CONTENT_DIR}`); return; } - // ── Build helper ────────────────────────────────────────────────────────── - async function buildIndex( - embedder: Embedder, - suffix: string, - ): Promise { - for (const indexFile of indexFiles) { - const library = indexFile.replace('.index.json', ''); - const indexPath = path.join(INDEX_DIR, indexFile); - - console.log(` ${library.toUpperCase()}: Loading index...`); - const index: DocIndex = JSON.parse(fs.readFileSync(indexPath, 'utf-8')); - const { docs } = index; - - const texts = docs.map(buildEmbeddingText); - const vectors = embedder.constructor.name === 'SimpleEmbedder' - ? texts.map((t) => (embedder as SimpleEmbedder).embedSync(t)) - : await embedder.embedBatch(texts); - - console.log( - ` Embedded ${vectors.length} texts → ${vectors[0]?.length ?? 0}d` - ); - - const zvecPath = path.join(INDEX_DIR, `${library}.zvec${suffix}`); + // Delete existing zvec files + for (const entry of libEntries) { + for (const suffix of ['', '.simple']) { + const zvecPath = path.join(INDEX_DIR, `${entry.name}.zvec${suffix}`); if (fs.existsSync(zvecPath)) { fs.rmSync(zvecPath, { recursive: true, force: true }); } - - const store: IZvecStore = await createZvecStore( - zvecPath, - embedder.dimensions - ); - - const batchSize = 100; - for (let i = 0; i < docs.length; i += batchSize) { - const batch = docs.slice(i, i + batchSize); - const batchVectors = vectors.slice(i, i + batchSize); - const items = batch.map((doc, idx) => ({ - id: doc.id, - vector: batchVectors[idx], - fields: buildZvecFields(doc) - })); - await store.insert(items); - } - - await store.close(); - - if (fs.existsSync(zvecPath)) { - const files = fs.readdirSync(zvecPath).length; - console.log(` ${library}.zvec${suffix} written (${files} files).`); - } else { - console.error(` ERROR: ${library}.zvec${suffix} not persisted.`); - process.exit(1); - } } } - // ── Pass 1: primary embedder (TransformersEmbedder or SimpleEmbedder) ───── - const embedder = await getEmbedder(); + const options: ContextOptions = { + vectorsDir: INDEX_DIR, + basePath: PKG_ROOT, + queryExpansion: { synonyms: synonymRecord }, + ftsFields: ['content'] + }; + + const ctx = await Context.create(options); console.log( - `Pass 1: ${embedder.constructor.name} (${embedder.dimensions}d)\n` + `Embedder: @antv/context (${ctx.embedderInfo.dimensions}d)\n` ); - await buildIndex(embedder, ''); - // ── Pass 2: SimpleEmbedder fallback (only when Pass 1 used Transformers) ── - if (embedder.constructor.name === 'TransformersEmbedder') { - const simpleEmbedder = new SimpleEmbedder(); - console.log(`\nPass 2: SimpleEmbedder (${simpleEmbedder.dimensions}d) fallback index\n`); - await buildIndex(simpleEmbedder, '.simple'); + for (const entry of libEntries) { + const library = entry.name; + const contentPattern = path.join(CONTENT_DIR, library, '**/*.md'); + console.log(` ${library.toUpperCase()}: Loading via context...`); + await ctx.load(library, contentPattern); + console.log(` ${library.toUpperCase()}: Done.\n`); } - console.log('\nDone.'); + await ctx.close(); + console.log('Done.'); } build().catch((err) => { diff --git a/src/scripts/build.ts b/src/scripts/build.ts deleted file mode 100644 index 55f09aa..0000000 --- a/src/scripts/build.ts +++ /dev/null @@ -1,197 +0,0 @@ -#!/usr/bin/env node - -/** - * Build script: generates JSON index files from doc markdown files. - * Run independently before publishing: `node dist/scripts/build.js` - */ - -import fs from 'fs'; -import path from 'path'; -import matter from 'gray-matter'; -import type { Doc, DocIndex } from '../core/types'; - -// Allow overriding the project root via --root= (used by harness when running inside a worktree) -const rootArg = process.argv.find((a) => a.startsWith('--root=')); -const PKG_ROOT = rootArg - ? path.resolve(rootArg.slice('--root='.length)) - : path.resolve(__dirname, '../..'); -const CONTENT_DIR = path.join(PKG_ROOT, 'src', 'content'); -const INDEX_DIR = path.join(PKG_ROOT, 'src', 'index'); - -// Default major version per library (used for index header if no version is specified) -const LIBRARY_VERSIONS: Record = { - g2: '5.x', - g6: '5.x', - x6: '3.x' -}; - -// Default info metadata per library (used when constraints.md has no frontmatter) -const LIBRARY_INFO_DEFAULTS: Record< - string, - { name: string; description: string } -> = { - g2: { - name: 'antv-g2-chart', - description: - 'Generate G2 v5 chart code. Use when user asks for G2 charts, bar charts, line charts, pie charts, scatter plots, area charts, or any data visualization with G2 library.' - }, - g6: { - name: 'antv-g6-graph', - description: - 'Generate G6 v5 graph/network visualization code. Use when user asks for G6 graphs, network diagrams, tree graphs, flow charts, or any graph visualization with G6 library.' - }, - x6: { - name: 'antv-x6-editor', - description: - 'Generate X6 v3 diagram/editor code. Use when user asks for X6 diagrams, flowcharts, DAGs, ER diagrams, org charts, or any node-edge editor with X6 library.' - } -}; - -function walkDir( - dir: string, - library: string, - skipNames?: Set -): Doc[] { - const docs: Doc[] = []; - if (!fs.existsSync(dir)) return docs; - - // Keep deterministic output across environments to avoid index diff noise. - const entries = fs - .readdirSync(dir, { withFileTypes: true }) - .sort((a, b) => a.name.localeCompare(b.name)); - - for (const entry of entries) { - const fullPath = path.join(dir, entry.name); - - if (entry.isDirectory()) { - docs.push(...walkDir(fullPath, library, skipNames)); - } else if ( - entry.isFile() && - entry.name.endsWith('.md') && - !['README.md', 'CONTRIBUTING.md'].includes(entry.name) && - !skipNames?.has(entry.name) - ) { - const content = fs.readFileSync(fullPath, 'utf-8'); - const parsed = matter(content); - const meta = parsed.data as Record; - - if (library && meta.library && meta.library !== library) continue; - if (!meta.id) { - console.warn(`Skipping (missing id): ${fullPath}`); - continue; - } - - const relativePath = path.relative(PKG_ROOT, fullPath); - - docs.push({ - id: meta.id, - title: meta.title || '', - description: (meta.description || '').replace(/\n\s*/g, ' ').trim(), - library: meta.library || '', - version: meta.version || '', - category: meta.category || '', - subcategory: meta.subcategory || '', - tags: Array.isArray(meta.tags) ? meta.tags : [], - use_cases: Array.isArray(meta.use_cases) ? meta.use_cases : [], - anti_patterns: Array.isArray(meta.anti_patterns) - ? meta.anti_patterns - : [], - related: Array.isArray(meta.related) ? meta.related : [], - path: relativePath, - content: parsed.content - }); - } - } - - return docs; -} - -function build(): void { - console.log('Building AntV docs indexes...\n'); - - if (!fs.existsSync(INDEX_DIR)) { - fs.mkdirSync(INDEX_DIR, { recursive: true }); - } - - // Discover libraries from content directory subdirectories - const libEntries = fs.existsSync(CONTENT_DIR) - ? fs - .readdirSync(CONTENT_DIR, { withFileTypes: true }) - .filter((e) => e.isDirectory()) - .sort((a, b) => a.name.localeCompare(b.name)) - : []; - - if (libEntries.length === 0) { - console.warn(`No library directories found in ${CONTENT_DIR}`); - return; - } - - const libraries = libEntries.map((e) => e.name); - - for (const lib of libraries) { - const libDir = path.join(CONTENT_DIR, lib); - - // Exclude special files (constraints, mistakes) from the docs array — - // they have no frontmatter and serve as the info source instead. - const skipNames = new Set(['constraints.md', 'mistakes.md']); - - const docs = walkDir(libDir, lib, skipNames); - - console.log(`${lib.toUpperCase()}: Found ${docs.length} documents.`); - - // Build info section from {lib}-constraints.md - const defaults = LIBRARY_INFO_DEFAULTS[lib]; - let info: DocIndex['info']; - let version = LIBRARY_VERSIONS[lib] || ''; - const constraintsPath = path.join(libDir, 'constraints.md'); - - if (fs.existsSync(constraintsPath)) { - const constraintsContent = fs.readFileSync(constraintsPath, 'utf-8'); - - // Extract the section between CONSTRAINTS markers if present - let coreConstraints: string; - const startMarker = ''; - const endMarker = ''; - const startIdx = constraintsContent.indexOf(startMarker); - const endIdx = constraintsContent.indexOf(endMarker); - - if (startIdx !== -1 && endIdx !== -1) { - coreConstraints = constraintsContent.slice( - startIdx, - endIdx + endMarker.length - ); - } else { - coreConstraints = constraintsContent; - } - - info = { - name: defaults?.name || `antv-${lib}`, - description: defaults?.description || '', - content: constraintsContent, - constraintsContent: coreConstraints - }; - } else if (defaults) { - info = { - name: defaults.name, - description: defaults.description, - content: '', - constraintsContent: '' - }; - } - - const indexData: DocIndex = { - library: lib, - version, - generated: new Date().toISOString().split('T')[0], - total: docs.length, - docs, - info: info! - }; - - const indexPath = path.join(INDEX_DIR, `${lib}.index.json`); - fs.writeFileSync(indexPath, JSON.stringify(indexData), 'utf-8'); - console.log(` Written ${lib}.index.json\n`); - } -} - -build(); diff --git a/src/utils/expand.ts b/src/utils/expand.ts new file mode 100644 index 0000000..059fc0a --- /dev/null +++ b/src/utils/expand.ts @@ -0,0 +1,71 @@ +/** + * Synonym query expander — pure function. + */ + +import { isCJK } from './isCJK'; + +export interface QueryExpansionOptions { + synonyms?: Record; +} + +const WORD_BOUNDARY_RE = + /[\s,,。.!!??;;::\(\)\[\]{}""''\"\'\-_\/\\|@#$%^&*+=<>~`]/; + +export function containsCJK(text: string): boolean { + for (const ch of text) { + if (isCJK(ch)) return true; + } + return false; +} + +function containsTerm(text: string, term: string): boolean { + if (!text.includes(term)) return false; + + // CJK terms use substring match + if (containsCJK(term)) return true; + + // Latin terms use word boundary match + let searchFrom = 0; + while (searchFrom <= text.length - term.length) { + const idx = text.indexOf(term, searchFrom); + if (idx === -1) return false; + + const prevOk = idx === 0 || WORD_BOUNDARY_RE.test(text[idx - 1]); + const afterIdx = idx + term.length; + const afterOk = + afterIdx >= text.length || WORD_BOUNDARY_RE.test(text[afterIdx]); + + if (prevOk && afterOk) return true; + searchFrom = idx + 1; + } + return false; +} + +export function expand( + query: string, + queryExpansion?: QueryExpansionOptions | false +): string { + if (queryExpansion === false) return query; + const synonyms = queryExpansion?.synonyms; + if (!synonyms || Object.keys(synonyms).length === 0) return query; + + const queryLower = query.toLowerCase().trim(); + const additions = new Set(); + + for (const [term, syns] of Object.entries( + synonyms as Record + )) { + const termLower = term.toLowerCase(); + + if (containsTerm(queryLower, termLower)) { + for (const syn of syns) { + if (!containsTerm(queryLower, syn.toLowerCase())) { + additions.add(syn); + } + } + } + } + + if (additions.size === 0) return query; + return `${query} ${[...additions].join(' ')}`; +} diff --git a/src/utils/isCJK.ts b/src/utils/isCJK.ts new file mode 100644 index 0000000..e01ec1d --- /dev/null +++ b/src/utils/isCJK.ts @@ -0,0 +1,12 @@ +/** + * Check whether a character is CJK (Chinese / Japanese / Korean). + */ +export function isCJK(ch: string): boolean { + const cp = ch.codePointAt(0)!; + return ( + (cp >= 0x4e00 && cp <= 0x9fff) || // CJK Unified + (cp >= 0x3400 && cp <= 0x4dbf) || // CJK Ext-A + (cp >= 0x3040 && cp <= 0x30ff) || // Hiragana + Katakana + (cp >= 0xac00 && cp <= 0xd7af) // Hangul + ); +}