Skip to content

Commit d011272

Browse files
committed
tidy some code
remove some old unused code
1 parent 80fa8f4 commit d011272

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

R/ggplot_chart_class.R

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ setMethod(f = "chart_plot",
6868
definition = function(obj, dobj, rebuild = NULL) {
6969
# Determine whether to rebuild based on rebuild parameter and data state
7070
should_rebuild = FALSE
71-
71+
7272
if (!is.null(rebuild)) {
7373
# If rebuild parameter is explicitly set, use it
7474
should_rebuild = rebuild
7575
} else {
7676
# Default behavior: only rebuild if data is empty (not already built)
7777
should_rebuild = (nrow(obj@data) == 0)
7878
}
79-
79+
8080
# Build the chart if needed
8181
if (should_rebuild) {
8282
obj = chart_build(obj, dobj)
@@ -110,11 +110,4 @@ setMethod(f = 'show',
110110
}
111111
)
112112

113-
# Helper functions for common ggplot operations
114-
xlab = function(label) {
115-
return(ggplot2::xlab(label))
116-
}
117113

118-
ylab = function(label) {
119-
return(ggplot2::ylab(label))
120-
}

R/scatter_chart_class.R

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,6 @@ setMethod(f = "chart_build",
243243
# Store the prepared data
244244
obj@data = plot_data
245245

246-
# Update the mapping to use the prepared data
247-
obj@mapping@value = aes(
248-
x = .data[['x']],
249-
y = .data[['y']]
250-
)
251246

252247
# Build all layers and add them to the unified layers slot
253248
layers_list = list()

R/struct_preset_class.R

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,4 @@ preset = function(name, ...) {
2020
return(L)
2121
}
2222

23-
# Helper function to standardise aesthetic names (similar to ggplot2::standardise_aes_names)
24-
standardise_aes_names = function(names) {
25-
# This is a simplified version - in practice, this would match ggplot2's implementation
26-
# For now, just return the names as-is
27-
return(names)
28-
}
2923

0 commit comments

Comments
 (0)