Skip to content

Commit 66b65a4

Browse files
feat(highcharts): implement area-basic (#505)
## Summary Implements `area-basic` for **highcharts** library. **Parent Issue:** #201 **Sub-Issue:** #473 **Base Branch:** `plot/area-basic` **Attempt:** 1/3 ## Implementation - `plots/highcharts/area/area-basic/default.py` ## Features - Basic area chart showing monthly sales trend - Python Blue (#306998) color scheme - Filled area with 50% opacity - Visible markers on data points - Subtle grid lines (10% opacity) - Full x-axis labels (Jan-Dec) and y-axis label (Sales $) - 4800x2700px output via Selenium screenshot Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
1 parent e6de0dd commit 66b65a4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

plots/highcharts/area/area-basic/default.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@
3838
chart.options.x_axis = {
3939
"title": {"text": "Month", "style": {"fontSize": "40px"}},
4040
"categories": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
41-
"labels": {"style": {"fontSize": "32px"}},
41+
"labels": {"style": {"fontSize": "32px"}, "enabled": True},
4242
"gridLineWidth": 1,
4343
"gridLineColor": "rgba(0, 0, 0, 0.1)",
44+
"tickmarkPlacement": "on",
4445
}
4546

4647
chart.options.y_axis = {
@@ -93,12 +94,16 @@
9394
chrome_options.add_argument("--no-sandbox")
9495
chrome_options.add_argument("--disable-dev-shm-usage")
9596
chrome_options.add_argument("--disable-gpu")
96-
chrome_options.add_argument("--window-size=4800,2700")
97+
chrome_options.add_argument("--window-size=4800,2800")
9798

9899
driver = webdriver.Chrome(options=chrome_options)
100+
driver.set_window_size(4800, 2800)
99101
driver.get(f"file://{temp_path}")
100102
time.sleep(5)
101-
driver.save_screenshot("plot.png")
103+
104+
# Get the container element and screenshot it directly
105+
container = driver.find_element("id", "container")
106+
container.screenshot("plot.png")
102107
driver.quit()
103108

104109
Path(temp_path).unlink()

0 commit comments

Comments
 (0)