44import java .util .List ;
55
66/**
7- * Data object that allows the combination of Line-, Bar-, Scatter- and
7+ * Data object that allows the combination of Line-, Bar-, Scatter-, Bubble- and
88 * CandleData. Used in the CombinedChart class.
99 *
1010 * @author Philipp Jahoda
@@ -52,13 +52,13 @@ public void setData(CandleData data) {
5252 mDataSets .addAll (data .getDataSets ());
5353 init (data .getDataSets ());
5454 }
55-
55+
5656 public void setData (BubbleData data ) {
5757 mBubbleData = data ;
5858 mDataSets .addAll (data .getDataSets ());
5959 init (data .getDataSets ());
6060 }
61-
61+
6262 public BubbleData getBubbleData () {
6363 return mBubbleData ;
6464 }
@@ -81,9 +81,15 @@ public CandleData getCandleData() {
8181
8282 @ Override
8383 public void notifyDataChanged () {
84- mLineData .notifyDataChanged ();
85- mBarData .notifyDataChanged ();
86- mCandleData .notifyDataChanged ();
87- mScatterData .notifyDataChanged ();
84+ if (mLineData != null )
85+ mLineData .notifyDataChanged ();
86+ if (mBarData != null )
87+ mBarData .notifyDataChanged ();
88+ if (mCandleData != null )
89+ mCandleData .notifyDataChanged ();
90+ if (mScatterData != null )
91+ mScatterData .notifyDataChanged ();
92+ if (mBubbleData != null )
93+ mBubbleData .notifyDataChanged ();
8894 }
8995}
0 commit comments