Skip to content

Commit

Permalink
Made the graph line a bit bigger
Browse files Browse the repository at this point in the history
  • Loading branch information
galadril committed Aug 6, 2020
1 parent 0524728 commit 9034dda
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
24 changes: 24 additions & 0 deletions app/src/main/java/nl/hnogames/domoticz/fragments/Graph.java
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ private LineData generateData(View view) {
LineDataSet dataSet = new LineDataSet(valuest, ((TextView) view.findViewById(R.id.legend_temperature)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_blue_600));
dataSet.setDrawCircles(false);
dataSet.setLineWidth(2);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);

Expand All @@ -484,6 +485,7 @@ private LineData generateData(View view) {

if (addTemperatureRange) {
dataSet = new LineDataSet(valuestMax, "Max"); // add entries to dataset
dataSet.setLineWidth(2);
dataSet.setColor(ContextCompat.getColor(context, R.color.md_blue_50));
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
Expand All @@ -492,6 +494,7 @@ private LineData generateData(View view) {
entries.add(dataSet);

dataSet = new LineDataSet(valuestMin, "Min"); // add entries to dataset
dataSet.setLineWidth(2);
dataSet.setColor(ContextCompat.getColor(context, R.color.md_blue_50));
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
Expand All @@ -506,6 +509,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_humidity)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valueshu, ((TextView) view.findViewById(R.id.legend_humidity)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_orange_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -515,6 +519,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_barometer)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesba, ((TextView) view.findViewById(R.id.legend_barometer)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_green_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -524,6 +529,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_counter)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesc, ((TextView) view.findViewById(R.id.legend_counter)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_indigo_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -533,6 +539,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_powerusage)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valueeu, ((TextView) view.findViewById(R.id.legend_powerusage)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_yellow_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -541,6 +548,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_powerdeliv)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valueeg, ((TextView) view.findViewById(R.id.legend_powerdeliv)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_deep_purple_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -550,12 +558,14 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_percentage)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesv, ((TextView) view.findViewById(R.id.legend_percentage)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_yellow_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);

if (addPercentageRange) {
dataSet = new LineDataSet(valuesvMax, "Max"); // add entries to dataset
dataSet.setLineWidth(2);
dataSet.setColor(ContextCompat.getColor(context, R.color.md_blue_50));
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
Expand All @@ -564,6 +574,7 @@ private LineData generateData(View view) {
entries.add(dataSet);

dataSet = new LineDataSet(valuesvMin, "Min"); // add entries to dataset
dataSet.setLineWidth(2);
dataSet.setColor(ContextCompat.getColor(context, R.color.md_blue_50));
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
Expand All @@ -578,6 +589,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_percentage2)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesv2, ((TextView) view.findViewById(R.id.legend_percentage2)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_orange_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -587,6 +599,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_direction)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesdi, ((TextView) view.findViewById(R.id.legend_direction)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_green_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -596,6 +609,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_sunpower)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesuv, ((TextView) view.findViewById(R.id.legend_sunpower)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_deep_purple_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -605,6 +619,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_speed)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuessp, ((TextView) view.findViewById(R.id.legend_speed)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_amber_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -614,6 +629,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_usage)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesu, ((TextView) view.findViewById(R.id.legend_usage)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_orange_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -623,6 +639,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_rain)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesmm, ((TextView) view.findViewById(R.id.legend_rain)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_light_green_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -632,6 +649,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_co2)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesco2, ((TextView) view.findViewById(R.id.legend_co2)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_blue_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -641,6 +659,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_co2min)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesco2min, ((TextView) view.findViewById(R.id.legend_co2min)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_light_green_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -650,6 +669,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_co2max)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesco2max, ((TextView) view.findViewById(R.id.legend_co2max)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.md_red_400));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -659,6 +679,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_Lux)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesLux, ((TextView) view.findViewById(R.id.legend_Lux)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_blue_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -668,6 +689,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_Luxmin)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesLuxmin, ((TextView) view.findViewById(R.id.legend_Luxmin)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.material_light_green_600));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -677,6 +699,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_Luxmax)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesLuxmax, ((TextView) view.findViewById(R.id.legend_Luxmax)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.md_red_400));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -686,6 +709,7 @@ private LineData generateData(View view) {
(filterLabels != null && filterLabels.contains(((TextView) view.findViewById(R.id.legend_LuxAvg)).getText().toString()))) {
LineDataSet dataSet = new LineDataSet(valuesLuxAvg, ((TextView) view.findViewById(R.id.legend_LuxAvg)).getText().toString()); // add entries to dataset
dataSet.setColor(ContextCompat.getColor(context, R.color.md_yellow_400));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,15 @@ private LineData generateData(View view) {
if (addTemperature) {
LineDataSet dataSet = new LineDataSet(valuest, list.getKey() + " " + getString(R.string.temperature)); // add entries to dataset
dataSet.setColor(MaterialColorPalette.getRandomColor("600"));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);

if (addSetpoint) {
dataSet = new LineDataSet(valuesse, list.getKey() + " " + getString(R.string.set_point)); // add entries to dataset
dataSet.setColor(MaterialColorPalette.getRandomColor("600"));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -411,6 +413,7 @@ private LineData generateData(View view) {
if (addTemperatureRange) {
dataSet = new LineDataSet(valuestMax, list.getKey() + " " + "Max"); // add entries to dataset
dataSet.setColor(MaterialColorPalette.getRandomColor("600"));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
dataSet.setDrawFilled(true);
Expand All @@ -419,6 +422,7 @@ private LineData generateData(View view) {

dataSet = new LineDataSet(valuestMin, list.getKey() + " " + "Min"); // add entries to dataset
dataSet.setColor(MaterialColorPalette.getRandomColor("600"));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
dataSet.setFillAlpha(255);
Expand All @@ -431,6 +435,7 @@ private LineData generateData(View view) {
if (addHumidity) {
LineDataSet dataSet = new LineDataSet(valueshu, list.getKey() + " " + getString(R.string.humidity)); // add entries to dataset
dataSet.setColor(MaterialColorPalette.getRandomColor("600"));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand All @@ -439,6 +444,7 @@ private LineData generateData(View view) {
if (addBarometer) {
LineDataSet dataSet = new LineDataSet(valuesba, list.getKey() + " " + getString(R.string.barometer)); // add entries to dataset
dataSet.setColor(MaterialColorPalette.getRandomColor("600"));
dataSet.setLineWidth(2);
dataSet.setDrawCircles(false);
dataSet.setMode(LineDataSet.Mode.LINEAR);
entries.add(dataSet);
Expand Down
4 changes: 2 additions & 2 deletions app/version.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Thu Aug 06 10:18:53 CEST 2020
VERSION_BUILD=7872
#Thu Aug 06 11:22:02 CEST 2020
VERSION_BUILD=7873
VERSION_PATCH=231
VERSION_CODE=522
2 changes: 1 addition & 1 deletion domoticzapi/version.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Thu Aug 06 10:18:53 CEST 2020
#Thu Aug 06 11:22:02 CEST 2020
VERSION_BUILD=3675
VERSION_PATCH=254
VERSION_CODE=254

0 comments on commit 9034dda

Please sign in to comment.