Skip to content

Instantly share code, notes, and snippets.

@sturdysturge
Created June 21, 2022 10:39
Show Gist options
  • Select an option

  • Save sturdysturge/caed2293328c0ce54024253b42a40889 to your computer and use it in GitHub Desktop.

Select an option

Save sturdysturge/caed2293328c0ce54024253b42a40889 to your computer and use it in GitHub Desktop.
Chart(data) {
LineMark(
x: .value("Category", $0.category),
y: .value("Value", $0.value)
)
.foregroundStyle(.blue)
}
.chartBackground { chartProxy in
Color.green
.onAppear {
print(chartProxy.plotAreaFrame)
print(chartProxy.plotAreaSize)
print(chartProxy.position(for: (x: 64, y: 46)))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment