Skip to content

Commit

Permalink
Merge pull request #96 from Team-Beforeget/feature/29-report-graph-in…
Browse files Browse the repository at this point in the history
…flate

[BUG] 디자인 요청 사항
  • Loading branch information
hjh1161514 authored Jan 20, 2022
2 parents f258325 + 75a5014 commit ec8fc41
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
6 changes: 1 addition & 5 deletions .idea/sonarlint/issuestore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class ReportGraphFragment : Fragment() {
private var COUNT_X_LABEL = 5
private var recordCount = ArrayList<String>()
private var monthCount = ArrayList<String>()
private var isFirst = true

override fun onCreateView(
inflater: LayoutInflater,
Expand Down Expand Up @@ -82,7 +83,11 @@ class ReportGraphFragment : Fragment() {
private fun initBarChart(recordCount: ArrayList<String>) {
val data: BarData = createBarChartData(recordCount)
// set bar width
data.barWidth = 0.1f
if (MAX_X_VALUE < 5) {
data.barWidth = 0.06f
} else {
data.barWidth = 0.1f
}
configureChartAppearance()
prepareChartData(data)
}
Expand All @@ -92,13 +97,15 @@ class ReportGraphFragment : Fragment() {
tvGraph3Month.setOnClickListener {
MAX_X_VALUE = 3
COUNT_X_LABEL = 3
isFirst = false
tvGraph5Month.setTextColor(Color.GRAY)
tvGraph3Month.setTextColor(Color.WHITE)
initNetwork()
}
tvGraph5Month.setOnClickListener {
MAX_X_VALUE = 5
COUNT_X_LABEL = 5
isFirst = false
tvGraph5Month.setTextColor(Color.WHITE)
tvGraph3Month.setTextColor(Color.GRAY)
initNetwork()
Expand Down Expand Up @@ -145,13 +152,14 @@ class ReportGraphFragment : Fragment() {
extraBottomOffset = 20f

// X, Y 바의 애니메이션 효과
animateY(2000)
if (isFirst) animateY(300)
// bar background
setDrawBarShadow(true)
// bar touch
setTouchEnabled(false)

// chart label
getLegend().isEnabled = false
legend.isEnabled = false
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class ReportOnepageFragment : Fragment() {
extraBottomOffset = 45f

// X, Y 바의 애니메이션 효과
animateY(2000)
animateY(1000)
// bar background
setDrawBarShadow(true)
// bar touch
Expand Down

0 comments on commit ec8fc41

Please sign in to comment.