File tree Expand file tree Collapse file tree
chartLib/src/main/kotlin/info/appdev/charting/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class Legend() : ComponentBase() {
2727 NONE ,
2828
2929 /* *
30- * Do not draw the a form, but leave space for it
30+ * Do not draw the form, but leave space for it
3131 */
3232 EMPTY ,
3333
@@ -71,14 +71,14 @@ class Legend() : ComponentBase() {
7171 /* *
7272 * The legend entries array
7373 */
74- var entries: Array <LegendEntry > = arrayOf< LegendEntry > ()
74+ var entries: Array <LegendEntry > = arrayOf()
7575 private set
7676
7777 /* *
7878 * Entries that will be appended to the end of the auto calculated entries after calculating the legend.
7979 * (if the legend has already been calculated, you will need to call notifyDataSetChanged() to let the changes take effect)
8080 */
81- var extraEntries: Array <LegendEntry > = arrayOf< LegendEntry > ()
81+ var extraEntries: Array <LegendEntry > = arrayOf()
8282 private set
8383
8484 /* *
@@ -218,8 +218,8 @@ class Legend() : ComponentBase() {
218218 var max = 0f
219219
220220 for (entry in this .entries) {
221- val label = entry.label
222- if ( label == null ) continue
221+ if (entry == null ) continue
222+ val label = entry.label ? : continue
223223
224224 val length = p.calcTextHeight(label).toFloat()
225225
You can’t perform that action at this time.
0 commit comments