-
Notifications
You must be signed in to change notification settings - Fork 2
/
StockChartsBarChart.swift
44 lines (38 loc) · 1.33 KB
/
StockChartsBarChart.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// SwiftChartsBarChart.swift
// Charts
//
// Created by Jannik Arndt on 29.08.21.
//
import SwiftUI
import StockCharts
struct StockChartsBarChart: View {
var body: some View {
Form {
Text("Bar Chart")
CapsuleChartView(percentageOfWidth: 0.9, style: CapsuleChartStyle(capsuleColor: Color.blue))
CapsuleChartView(percentageOfWidth: 0.8, style: CapsuleChartStyle(capsuleColor: Color.green))
CapsuleChartView(percentageOfWidth: 0.1, style: CapsuleChartStyle(capsuleColor: Color.red))
Text("Cool!")
}
}
}
struct StockChartsCapsuleChart: View {
var body: some View {
RoundedRectangle(cornerRadius: 25)
.frame(width: 400, height: 120)
.foregroundColor(.white)
.shadow(color: Color(.gray).opacity(0.15), radius: 10)
.overlay(
VStack(alignment: .leading) {
Text("Dennis Concepcion")
.font(.title3)
.fontWeight(.semibold)
Text("Random guy")
CapsuleChartView(percentageOfWidth: 0.6, style: CapsuleChartStyle(capsuleColor: Color.blue))
.padding(.top)
}
.padding()
)
}
}