File tree Expand file tree Collapse file tree 4 files changed +22
-7
lines changed
FormatDateLabelAsShortDate
TestsAddStaticTextTooltip Expand file tree Collapse file tree 4 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ class FormatDateLabelAsDate {
4040
4141 is Double -> {
4242 try {
43- val millis = item.toLong()
43+ val ticks = item
44+ var millis = (ticks / 10000.0 ).toLong();
4445 Calendar .getInstance().apply { timeInMillis = millis }
4546 } catch (e: Exception ) {
4647 return item.toString()
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ class FormatDateLabelAsShortDate {
4040
4141 is Double -> {
4242 try {
43- val millis = item.toLong()
43+ val ticks = item
44+ var millis = (ticks / 10000.0 ).toLong();
4445 Calendar .getInstance().apply { timeInMillis = millis }
4546 } catch (e: Exception ) {
4647 return item.toString()
@@ -67,10 +68,10 @@ class FormatDateLabelAsShortDate {
6768 }
6869
6970 return String .format(
70- " %02d/%02d/%02d %02d:%02d:%02d " ,
71+ " %02d/%02d/%02d" ,
7172 calendar.get(Calendar .MONTH ) + 1 ,
72- calendar.get(Calendar .DAY_OF_MONTH ) + 1 ,
73- calendar.get(Calendar .YEAR )
73+ calendar.get(Calendar .DAY_OF_MONTH ),
74+ calendar.get(Calendar .YEAR ) % 100
7475 )
7576 }
7677 // end eventHandler
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ class FormatDateLabelAsTime {
4040
4141 is Double -> {
4242 try {
43- val millis = item.toLong()
43+ val ticks = item
44+ var millis = (ticks / 10000.0 ).toLong();
4445 Calendar .getInstance().apply { timeInMillis = millis }
4546 } catch (e: Exception ) {
4647 return item.toString()
Original file line number Diff line number Diff line change 11// begin imports
2+ import com.infragistics.mobile.controls.IgaChartToolTipUpdatingEventHandler
3+ import com.infragistics.mobile.controls.IgaChartToolTipUpdatingEventArgs
24import com.infragistics.mobile.controls.IgaDataChart
35import android.widget.TextView
46// end imports
@@ -13,7 +15,17 @@ public class TestsAddStaticTextTooltip {
1315 val chart = CodeGenHelper .getDescription<IgaDataChart >(" content" )!! ;
1416 for (series in chart.series!! .toArray()) {
1517 if (! series!! .isLayer) {
16- // TODO
18+ series.chartToolTipUpdating = object : IgaChartToolTipUpdatingEventHandler {
19+ override fun invoke (sender : Any? , args : IgaChartToolTipUpdatingEventArgs ? ) {
20+ var cv = args!! .currentView;
21+ if (cv == null ) {
22+ var tv = android.widget.TextView (chart.context);
23+ cv = tv;
24+ args!! .currentView = cv;
25+ }
26+ (cv as android.widget.TextView ).text = " text"
27+ }
28+ }
1729 }
1830 }
1931 }
You can’t perform that action at this time.
0 commit comments