Skip to content

Commit 1ea05b8

Browse files
update(area-basic): highcharts — comprehensive quality review
Added tooltip formatting, y-axis min, axis units, fixed window size and screenshot
1 parent ed0fb1b commit 1ea05b8

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

plots/area-basic/implementations/highcharts.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
""" pyplots.ai
1+
"""pyplots.ai
22
area-basic: Basic Area Chart
3-
Library: highcharts unknown | Python 3.13.11
4-
Quality: 91/100 | Created: 2025-12-23
3+
Library: highcharts 1.10.3 | Python 3.14.2
4+
Quality: /100 | Updated: 2026-02-11
55
"""
66

77
import tempfile
@@ -43,7 +43,7 @@
4343

4444
# Title
4545
chart.options.title = {
46-
"text": "area-basic · highcharts · pyplots.ai",
46+
"text": "area-basic \u00b7 highcharts \u00b7 pyplots.ai",
4747
"style": {"fontSize": "72px", "fontWeight": "bold"},
4848
}
4949

@@ -55,12 +55,13 @@
5555
"gridLineColor": "rgba(0, 0, 0, 0.1)",
5656
}
5757

58-
# Y-axis
58+
# Y-axis — set min close to data range to avoid wasted whitespace
5959
chart.options.y_axis = {
60-
"title": {"text": "Daily Visitors", "style": {"fontSize": "48px"}},
60+
"title": {"text": "Daily Visitors (count)", "style": {"fontSize": "48px"}},
6161
"labels": {"style": {"fontSize": "36px"}},
6262
"gridLineWidth": 1,
6363
"gridLineColor": "rgba(0, 0, 0, 0.1)",
64+
"min": 1000,
6465
}
6566

6667
# Plot options with semi-transparent fill and gradient
@@ -73,6 +74,7 @@
7374
"lineWidth": 4,
7475
"marker": {"enabled": True, "radius": 8, "fillColor": "#306998"},
7576
"color": "#306998",
77+
"tooltip": {"headerFormat": "<b>Day {point.x}</b><br/>", "pointFormat": "Visitors: {point.y:,.0f}"},
7678
}
7779
}
7880

@@ -130,15 +132,13 @@
130132
chrome_options.add_argument("--no-sandbox")
131133
chrome_options.add_argument("--disable-dev-shm-usage")
132134
chrome_options.add_argument("--disable-gpu")
133-
chrome_options.add_argument("--window-size=5000,3000")
135+
chrome_options.add_argument("--window-size=4800,2700")
134136

135137
driver = webdriver.Chrome(options=chrome_options)
136138
driver.get(f"file://{temp_path}")
137139
time.sleep(5) # Wait for chart to render
138140

139-
# Screenshot the chart element specifically for exact 4800x2700
140-
container = driver.find_element("id", "container")
141-
container.screenshot("plot.png")
141+
driver.save_screenshot("plot.png")
142142
driver.quit()
143143

144144
Path(temp_path).unlink() # Clean up temp file

plots/area-basic/metadata/highcharts.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
library: highcharts
22
specification_id: area-basic
33
created: '2025-12-23T00:49:25Z'
4-
updated: '2025-12-23T01:21:43Z'
5-
generated_by: claude-opus-4-5-20251101
4+
updated: '2026-02-11T22:20:05+00:00'
5+
generated_by: claude-opus-4-6
66
workflow_run: 20447991263
77
issue: 0
8-
python_version: 3.13.11
9-
library_version: unknown
8+
python_version: 3.14.2
9+
library_version: 1.10.3
1010
preview_url: https://storage.googleapis.com/pyplots-images/plots/area-basic/highcharts/plot.png
1111
preview_thumb: https://storage.googleapis.com/pyplots-images/plots/area-basic/highcharts/plot_thumb.png
1212
preview_html: https://storage.googleapis.com/pyplots-images/plots/area-basic/highcharts/plot.html
13-
quality_score: 91
13+
quality_score: null
1414
impl_tags:
1515
dependencies:
1616
- selenium

0 commit comments

Comments
 (0)