【发布时间】:2014-10-13 13:52:59
【问题描述】:
我正在尝试使用 ionScroll 组件制作可滚动的 n 轴 X 的基本图表(使用 AmChart 库创建):
http://ionicframework.com/docs/api/directive/ionScroll/
问题是,如果我使用移动设备上的 ionScroll 组件移动,我会收到错误消息:
E/Web Console﹕ Uncaught TypeError: Cannot call method 'contains' of undefined:2882
我不知道这个问题是由 amchart 还是 ionic 引起的,但它在移动设备上不起作用(在 Chrome 中模拟移动设备时它正在运行)。
我正在使用 Ionic 版本: v1.0.0-beta.13 "镧-豹
什么会导致这个错误?
这里是chart div和ion-scroll模板的附加内容:
<ion-view title="Hourly charts" animation="slide-in-up">
<ion-nav-buttons side="left">
<button class="button button-icon icon ion-arrow-left-c" ui-sref="home">
</button>
</ion-nav-buttons>
<!--content-->
<ion-content ng-controller="HourlyChartsCtrl"
ng-init="setDateRange('today');">
<div class="chart_range_date">
Date: {{dateFrom}} 8 AM - 6 PM
</div>
<!--daily charts-->
<ion-scroll
id="scroll_hourly"
style="width:100%;"
class="vh72"
direction="x"
has-bouncing="false"
locking="false"
paging="true">
<div id="chartdiv_hourly" class="vh72" style="width:200%;">
</div>
</ion-scroll>
<h3 class="swipeNote">Swipe here to move through weeks</h3>
</ion-content>
<!--tabbar-->
<div class="tabs-striped tabs-background-positive tabs-light tabs-icon-left">
<div class="tabs">
<a class="tab-item active" ui-sref="hourly-chart" href="/#/hourly-chart">
Hours
</a>
<a class="tab-item" ui-sref="daily-chart" href="/#/daily-chart">
Days
</a>
<a class="tab-item " ui-sref="monthly-chart" href="/#/monthly-chart">
Months
</a>
</div>
</div>
</ion-view>
【问题讨论】:
标签: javascript android ionic-framework amcharts