UNPKG

react-native-pathjs-charts

Version:

Cross platform React Native charting library based on path-js and react-native-svg

75 lines (66 loc) 1.85 kB
/* Copyright 2016 Capital One Services, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-Copyright: Copyright (c) Capital One Services, LLC SPDX-License-Identifier: Apache-2.0 */ import LineChart from './Line' const SmoothLine = require('paths-js/smooth-line') export default class SmoothLineChart extends LineChart { constructor(props) { super(props, SmoothLine) } static defaultProps = { options: { width: 600, height: 600, color: '#2980B9', margin: {top: 40, left: 60, bottom: 50, right: 20}, animate: { type: 'delayed', duration: 200, fillTransition:3 }, axisX: { showAxis: true, showLines: true, showLabels: true, showTicks: true, zeroAxis: false, orient: 'bottom', label: { fontFamily: 'Arial', fontSize: 14, bold: true, color: '#34495E' } }, axisY: { showAxis: true, showLines: true, showLabels: true, showTicks: true, zeroAxis: false, orient: 'left', label: { fontFamily: 'Arial', fontSize: 14, bold: true, color: '#34495E' } }, cursorLine: { stroke: "white", strokeWidth: "1" }, interaction: false } } }