From 5e9d38c741ba91cff34de155793947551449e2a8 Mon Sep 17 00:00:00 2001 From: Eden2016 Date: Tue, 21 Jan 2020 10:38:43 -0500 Subject: [PATCH 1/3] repositioning labels for LineChart --- app/components/AppletData/LineChart.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/AppletData/LineChart.js b/app/components/AppletData/LineChart.js index ea88c6f4c..013e3697b 100644 --- a/app/components/AppletData/LineChart.js +++ b/app/components/AppletData/LineChart.js @@ -126,11 +126,11 @@ class LineChart extends React.Component { } - - {minLabelBreak.map((t, i) => {t})} + + {minLabelBreak.map((t, i) => {t})} - - {maxLabelBreak.map((t, i) => {t})} + + {maxLabelBreak.map((t, i) => {t})} ); From c911fdc8ea04bf147f83124e910ddd4f53353ca6 Mon Sep 17 00:00:00 2001 From: Eden2016 Date: Tue, 21 Jan 2020 11:12:18 -0500 Subject: [PATCH 2/3] refactoring code to put labels outside LineChart --- app/components/AppletData/LineChart.js | 85 ++++++++++++-------------- 1 file changed, 39 insertions(+), 46 deletions(-) diff --git a/app/components/AppletData/LineChart.js b/app/components/AppletData/LineChart.js index 013e3697b..baceb4e2a 100644 --- a/app/components/AppletData/LineChart.js +++ b/app/components/AppletData/LineChart.js @@ -1,12 +1,10 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Dimensions } from 'react-native'; +import { Dimensions, StyleSheet, Text, View } from 'react-native'; import moment from 'moment'; import { Svg, Line, - Text, - TSpan, Circle, Path, } from 'react-native-svg'; @@ -16,34 +14,29 @@ import { line } from 'd3-shape'; import { colors } from '../../themes/colors'; - -const textBreaker = (text, charLength) => { - const textBreakBySpace = text.split(' '); - let current = 0; - const output = [textBreakBySpace[0]]; - - // eslint-disable-next-line - for (let i=1; i xMapper(moment(d.date))) .y(d => yMapper(d.value)); - const minLabelBreak = textBreaker(minMaxLabels[0], 9); - const maxLabelBreak = textBreaker(minMaxLabels[1], 9); return ( - - - { - xTicks.map((x, i) => ) - } - - { - yTicks.map((y, i) => ) - } - { - data.map((d, i) => ) - } - - - - {minLabelBreak.map((t, i) => {t})} + + + {minMaxLabels[1]} - - {maxLabelBreak.map((t, i) => {t})} + + + { + xTicks.map((x, i) => ) + } + + { + yTicks.map((y, i) => ) + } + { + data.map((d, i) => ) + } + + + + + {minMaxLabels[0]} - + ); } } From ba9eeb6bb93711233905dec1cca901e518287520 Mon Sep 17 00:00:00 2001 From: Eden2016 Date: Tue, 21 Jan 2020 11:14:55 -0500 Subject: [PATCH 3/3] versioning --- CHANGELOG.md | 3 +++ android/app/build.gradle | 4 ++-- ios/MDCApp/Info.plist | 4 ++-- package.json | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e60458a6..d512f1a73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ======= +## [0.9.18] - 2019-01-21 +- :lipstick: Repositioning chart labels outside LineChart component + ## [0.9.16] - 2019-01-16 - :lipstick: Redesign Progress Bar diff --git a/android/app/build.gradle b/android/app/build.gradle index d7e324030..24370c46a 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -101,8 +101,8 @@ android { applicationId "lab.childmindinstitute.data" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 109 - versionName "0.9.16" + versionCode 112 + versionName "0.9.18" ndk { abiFilters "arm64-v8a", "x86_64", "armeabi-v7a", "x86" } diff --git a/ios/MDCApp/Info.plist b/ios/MDCApp/Info.plist index 1b3c4cecf..3980eca48 100644 --- a/ios/MDCApp/Info.plist +++ b/ios/MDCApp/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9.16 + 0.9.18 CFBundleSignature ???? CFBundleVersion - 109 + 112 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS diff --git a/package.json b/package.json index cc3eb88c7..798e5c645 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "MindLogger", - "version": "0.9.16", + "version": "0.9.18", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start",