Posts

Showing posts with the label charts

Chart JS +ng2-charts not working on Angular+2

16 1 Hello developers i have been literally the whole day trying to implement charts on my proyect , but following the official docs there is not way i could rid off this error : ERROR in ./node_modules/ng2-charts/__ivy_ngcc__/fesm2015/ng2-charts.js 317:8-21 "export 'pluginService' was not found in 'chart.js' node_modules/ng2-charts/lib/base-chart.directive.d.ts:4:59 - error TS2305: Module '"../../chart.js/types/index.esm"' has no exported member 'ChartPoint'. 4 import { ChartConfiguration, ChartDataSets, ChartOptions, ChartPoint, ChartType, PluginServiceGlobalRegistration, PluginServiceRegistrationOptions } from 'chart.js'; ~~~~~~~~~~ n...

Why does nuxt give me this error with vue-chartjs?

5 3 I get this error while trying to make vue-chartjs work WARN in ./node_modules/vue-chartjs/es/BaseCharts.js "export 'default' (imported as 'Chart') was not found in 'chart.js' And also this in devtools: TypeError: chart_js__WEBPACK_IMPORTED_MODULE_0__.default is not a constructor Steps to recreate: Create nuxt app with: $ yarn create nuxt-app <project_name> Add vue-chartjs with $ yarn add vue-chartjs chart.js Add following code which should work according to vue-chartjs docs ~/components/BarChart.js import { Bar } from 'vue-chartjs' export default { extends: Bar, props: ['data', 'options'], mounted() { this.renderChart(this.data, this.options) }, } ~/pages/index.vue <template...

React native real time chart

I am facing some performance issues when trying to draw real-time chart using various libraries for data visualization in react native based mobile app. I tried multiple libraries like react native chart2, react-native-pathjs-charts, arty-charty etc. but all in vain. Is it React Native issue or just simple i could find right library ? PS: I get data every 500 ms, 1000 ms, 2000 ms in my mobile app. For example using, react-native-chart2 //In Render function, i have below source <RNChart style={styles.rnchart} chartData={chartData} verticalGridStep={50} gridColor={'white'} labelTextColor={"white"} showYAxisLabels={false} xLabels={xAxisTime}/> //In data receive event callback, i have below source let newArr1 = yAxisDataArr.slice(sliceFrom); newArr1.push(currntMa); newArr1.push(currntMa/4); yAxisDataArr = newArr1; chartData = [ { name:'LineChart', //color:'gray', lineWidth:2, showDataPoint:false, data:yAxisDataArr } ]; this._tick()...

Solution for Charts (react-native) [on hold]

I'm new to react-native and I want to use chart in my application. I've been trying use some libs: react-native-pathjs-charts react-native-ios-charts But they are not really good choices (bad performance, hard to use). I want to ask, which of the followings is the best solution for me !!!? Use D3 + ART draw chart by my self. Find a good native lib and try to port it to react-native. You can check my repo: https://github.com/wuxudong/react-native-charts-wrapper Support both android and ios, Latest MpAndroidChart and Charts are used. I am late to the game but victory-native. https://github.com/FormidableLabs/victory-native It is very declarative and the API is very usable. I would try react-native-svg-charts, it's easy to setup and very customisable You should have a look here: https://js.coach/react-native?search=chart, you'll probably find something that would suit your needs I know it is a quite old question...