From d7ccab5dbfdd9422938a14410c2e835251afc83a Mon Sep 17 00:00:00 2001 From: Sergey Neikovich Date: Sat, 16 Mar 2019 16:04:43 +0300 Subject: [PATCH] delete test array from view --- .../main/java/com/fdev/backgroundchartexample/MainActivity.kt | 2 +- .../src/main/java/com/fdev/backgroundchart/GradientChart.kt | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/fdev/backgroundchartexample/MainActivity.kt b/app/src/main/java/com/fdev/backgroundchartexample/MainActivity.kt index 0af17ad..3d138bc 100644 --- a/app/src/main/java/com/fdev/backgroundchartexample/MainActivity.kt +++ b/app/src/main/java/com/fdev/backgroundchartexample/MainActivity.kt @@ -11,7 +11,7 @@ class MainActivity : AppCompatActivity() { setContentView(R.layout.activity_main) gradientChart.chartValues = arrayOf( - 10f, 30f, 25f, 32f, 13f, 5f, 18f, 36f, 20f, 30f, 28f, 27f, 29f + 40f, 40f, 40f, 32f, 13f, 5f, 18f, 36f, 20f, 30f, 28f, 27f, 29f ) } diff --git a/backgroundchart/src/main/java/com/fdev/backgroundchart/GradientChart.kt b/backgroundchart/src/main/java/com/fdev/backgroundchart/GradientChart.kt index a583a82..de43d26 100644 --- a/backgroundchart/src/main/java/com/fdev/backgroundchart/GradientChart.kt +++ b/backgroundchart/src/main/java/com/fdev/backgroundchart/GradientChart.kt @@ -17,9 +17,7 @@ import android.util.Log class GradientChart : View { // region public settings - var chartValues: Array = arrayOf( - 10f, 30f, 25f, 32f, 13f, 5f, 18f, 36f, 20f, 30f, 28f, 27f, 29f - ) + var chartValues: Array = arrayOf() set(value) { field = value invalidate()