Gantt Chart with DateTimeContinuousAxis

android

#1

Hi, I am currently trying to develop gantt chart on my app. May I know is there any chance this will work?

I have tried using the DateTimeContinuousAxis example without success as I need categorical axis on the vertical axis and datetime on the horizontal axis, I am getting this error:

 System.err: java.lang.Error: The date string specified cannot be parsed with the current source date format. Please specify a source date format that can parse the dates coming from the data source.
System.err: 	at com.telerik.widget.chart.engine.axes.continuous.DateTimeContinuousAxisModel.buildValues(DateTimeContinuousAxisModel.java:849)
System.err: 	at com.telerik.widget.chart.engine.axes.continuous.DateTimeContinuousAxisModel.updateCore(DateTimeContinuousAxisModel.java:282)
System.err: 	at com.telerik.widget.chart.engine.axes.AxisModel.update(AxisModel.java:624)
System.err: 	at com.telerik.widget.chart.engine.chartAreas.ChartAreaModelWithAxes.updateAxis(ChartAreaModelWithAxes.java:385)
System.err: 	at com.telerik.widget.chart.engine.chartAreas.ChartAreaModelWithAxes.updateAxes(ChartAreaModelWithAxes.java:353)
System.err: 	at com.telerik.widget.chart.engine.chartAreas.ChartAreaModelWithAxes.arrangeOverride(ChartAreaModelWithAxes.java:194)
System.err: 	at com.telerik.widget.chart.engine.elementTree.ChartNode.arrange(ChartNode.java:185)
System.err: 	at com.telerik.widget.chart.engine.elementTree.ChartNode.arrange(ChartNode.java:166)
System.err: 	at com.telerik.widget.chart.visualization.common.RadChartViewBase.updateChartArea(RadChartViewBase.java:873)
System.err: 	at com.telerik.widget.chart.visualization.common.RadChartViewBase.arrangeOverride(RadChartViewBase.java:581)
System.err: 	at com.telerik.widget.chart.visualization.common.RadChartViewBase.onMeasure(RadChartViewBase.java:507)
System.err: 	at android.view.View.measure(View.java:16515)
System.err: 	at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:719)
System.err: 	at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:455)
System.err: 	at android.view.View.measure(View.java:16515)
System.err: 	at org.nativescript.widgets.CommonLayoutParams.measureChild(CommonLayoutParams.java:262)
System.err: 	at org.nativescript.widgets.StackLayout.onMeasure(StackLayout.java:83)
System.err: 	at android.view.View.measure(View.java:16515)
System.err: 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5169)
System.err: 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
System.err: 	at android.view.View.measure(View.java:16515)
System.err: 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5169)
System.err: 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
System.err: 	at android.view.View.measure(View.java:16515)
System.err: 	at org.nativescript.widgets.CommonLayoutParams.measureChild(CommonLayoutParams.java:262)
System.err: 	at org.nativescript.widgets.MeasureHelper.measureChildFixedColumnsAndRows(GridLayout.java:1055)
System.err: 	at org.nativescript.widgets.MeasureHelper.measure(GridLayout.java:865)
System.err: 	at org.nativescript.widgets.GridLayout.onMeasure(GridLayout.java:279)
System.err: 	at android.view.View.measure(View.java:16515)
System.err: 	at org.nativescript.widgets.CommonLayoutParams.measureChild(CommonLayoutParams.java:262)
System.err: 	at org.nativescript.widgets.ContentLayout.onMeasure(ContentLayout.java:32)
System.err: 	at android.view.View.measure(View.java:16515)
System.err: 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5169)
System.err: 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
System.err: 	at android.view.View.measure(View.java:16515)
System.err: 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5169)
System.err: 	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
System.err: 	at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
System.err: 	at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
System.err: 	at android.view.View.measure(View.java:16515)
System.err: 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5169)
System.err: 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
System.err: 	at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2310)
System.err: 	at android.view.View.measure(View.java:16515)
System.err: 	at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1958)
System.err: 	at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1155)
System.err: 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1337)
System.err: 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1042)
System.err: 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5721)
System.err: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
System.err: 	at android.view.Choreographer.doCallbacks(Choreographer.java:574)
System.err: 	at android.view.Choreographer.doFrame(Choreographer.java:544)
System.err: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
System.err: 	at android.os.Handler.handleCallback(Handler.java:733)
System.err: 	at android.os.Handler.dispatchMessage(Handler.java:95)
System.err: 	at android.os.Looper.loop(Looper.java:136)
System.err: 	at android.app.ActivityThread.main(ActivityThread.java:5050)
System.err: 	at java.lang.reflect.Method.invokeNative(Native Method)
System.err: 	at java.lang.reflect.Method.invoke(Method.java:515)
System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:805)
System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:621)
System.err: 	at dalvik.system.NativeStart.main(Native Method)
System.err: Caused by: java.text.ParseException: Unparseable date: "Assembly" (at offset 0)
System.err: 	at java.text.DateFormat.parse(DateFormat.java:555)
System.err: 	at com.telerik.widget.chart.engine.axes.continuous.DateTimeContinuousAxisModel.buildValues(DateTimeContinuousAxisModel.java:844)
System.err: 	... 61 more
ActivityManager: Process org.nativescript.nativescript (pid 21706) has died.

Here is my code:

        <RadCartesianChart  tkExampleTitle tkToggleNavButton>
            <DateTimeContinuousAxis tkCartesianHorizontalAxis minimum="01/01/2018'" 
                maximum="02/01/2015" majorStep="Minutes" dateFormat="MMM-dd"
                plotMode="OnTicks" allowPan="true" allowZoom="true"></DateTimeContinuousAxis>
            <!-- <LinearAxis tkCartesianVerticalAxis allowPan="true" allowZoom="true"></LinearAxis> -->
            <!-- <LinearAxis tkCartesianHorizontalAxis allowPan="true" allowZoom="true"></LinearAxis> -->
            <CategoricalAxis tkCartesianVerticalAxis allowPan="true" allowZoom="true"></CategoricalAxis>
            <LineSeries tkCartesianSeries [items]="pallets" categoryProperty="sectionId" 
                valueProperty="startTime"></LineSeries>
            <!-- <BarSeries tkCartesianSeries [items]="pallets" categoryProperty="sectionId" 
                valueProperty="duration"></BarSeries> -->
        </RadCartesianChart>

Note that sectionId is a string object. Besides, I want to display the horizontal axis in hh:mm format for a chosen date e.g. 1/1/2018 08:00 - 2/1/2018 00:00 with minute interval.

Edit: Since my data source contain multiple data with repeated sectionId e.g. Paint Section but they have different start and finish time, is it possible to show all data in one chart? Like the stackedBarSeries shown in the sample app.

Please advise.

Thanks in advance
Lanette