fix H2O page issue
parent
bf6a8cecc6
commit
dd76ae05a7
@ -0,0 +1,22 @@
|
|||||||
|
class UserProgressForMonthDataModel {
|
||||||
|
int monthNumber;
|
||||||
|
String monthName;
|
||||||
|
int percentageConsumed;
|
||||||
|
|
||||||
|
UserProgressForMonthDataModel(
|
||||||
|
{this.monthNumber, this.monthName, this.percentageConsumed});
|
||||||
|
|
||||||
|
UserProgressForMonthDataModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
monthNumber = json['MonthNumber'];
|
||||||
|
monthName = json['MonthName'];
|
||||||
|
percentageConsumed = json['PercentageConsumed'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['MonthNumber'] = this.monthNumber;
|
||||||
|
data['MonthName'] = this.monthName;
|
||||||
|
data['PercentageConsumed'] = this.percentageConsumed;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
class UserProgressForWeekDataModel {
|
||||||
|
int dayNumber;
|
||||||
|
dynamic dayDate;
|
||||||
|
String dayName;
|
||||||
|
int percentageConsumed;
|
||||||
|
|
||||||
|
UserProgressForWeekDataModel(
|
||||||
|
{this.dayNumber, this.dayDate, this.dayName, this.percentageConsumed});
|
||||||
|
|
||||||
|
UserProgressForWeekDataModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
dayNumber = json['DayNumber'];
|
||||||
|
dayDate = json['DayDate'];
|
||||||
|
dayName = json['DayName'];
|
||||||
|
percentageConsumed = json['PercentageConsumed'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['DayNumber'] = this.dayNumber;
|
||||||
|
data['DayDate'] = this.dayDate;
|
||||||
|
data['DayName'] = this.dayName;
|
||||||
|
data['PercentageConsumed'] = this.percentageConsumed;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,12 +1,12 @@
|
|||||||
import 'package:diplomaticquarterapp/config/config.dart';
|
import 'package:diplomaticquarterapp/config/config.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/check_activation_code_for_e_referral_request_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_relationship_types_response_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_request_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_response_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/send_activation_code_for_e_referral_request_model.dart';
|
||||||
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
||||||
import 'package:diplomaticquarterapp/models/AlHabibMedicalServices/EReferral/check_activation_code_for_e_referral_request_model.dart';
|
|
||||||
import 'package:diplomaticquarterapp/models/AlHabibMedicalServices/EReferral/create_e_referral_request_model.dart';
|
|
||||||
import 'package:diplomaticquarterapp/models/AlHabibMedicalServices/EReferral/get_all_cities_response_model.dart';
|
|
||||||
import 'package:diplomaticquarterapp/models/AlHabibMedicalServices/EReferral/get_all_relationship_types_response_model.dart';
|
|
||||||
import 'package:diplomaticquarterapp/models/AlHabibMedicalServices/EReferral/search_e_referral_request_model.dart';
|
|
||||||
import 'package:diplomaticquarterapp/models/AlHabibMedicalServices/EReferral/search_e_referral_response_model.dart';
|
|
||||||
import 'package:diplomaticquarterapp/models/AlHabibMedicalServices/EReferral/send_activation_code_for_e_referral_request_model.dart';
|
|
||||||
|
|
||||||
class EReferralService extends BaseService {
|
class EReferralService extends BaseService {
|
||||||
List<GetAllRelationshipTypeResponseModel> _relationTypes = List();
|
List<GetAllRelationshipTypeResponseModel> _relationTypes = List();
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
||||||
|
|
||||||
|
class AuthenticatedUserObject{
|
||||||
|
AuthenticatedUser user;
|
||||||
|
AppSharedPreferences sharedPref = AppSharedPreferences();
|
||||||
|
bool isLogin = false;
|
||||||
|
AuthenticatedUserObject(){
|
||||||
|
getUser();
|
||||||
|
}
|
||||||
|
|
||||||
|
getUser() async {
|
||||||
|
if (user==null) {
|
||||||
|
var userData = await sharedPref.getObject(USER_PROFILE);
|
||||||
|
if (userData != null) user = AuthenticatedUser.fromJson(userData);
|
||||||
|
}
|
||||||
|
|
||||||
|
var isLogin = await sharedPref.getString(LOGIN_TOKEN_ID);
|
||||||
|
this.isLogin = isLogin != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,122 +1,73 @@
|
|||||||
import 'dart:ui';
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h2o_page.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||||
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
|
import 'package:diplomaticquarterapp/widgets/data_display/CarouselSlider.dart';
|
||||||
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart';
|
|
||||||
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart';
|
|
||||||
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart';
|
|
||||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
||||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
class H2OPage extends StatefulWidget {
|
class H2OPageIndexPage extends StatelessWidget {
|
||||||
@override
|
|
||||||
_H2OPageState createState() => _H2OPageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _H2OPageState extends State<H2OPage>
|
|
||||||
with SingleTickerProviderStateMixin {
|
|
||||||
TabController _tabController;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
_tabController = TabController(length: 3, vsync: this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
_tabController.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BaseView<PrescriptionsViewModel>(
|
return AppScaffold(
|
||||||
onModelReady: (model) => model.getPrescriptions(),
|
|
||||||
builder: (_, model, widget) => AppScaffold(
|
|
||||||
isShowAppBar: true,
|
isShowAppBar: true,
|
||||||
appBarTitle: TranslationBase.of(context).myDoctor,
|
appBarTitle: "Service Information",
|
||||||
body: Scaffold(
|
body: SingleChildScrollView(
|
||||||
extendBodyBehindAppBar: true,
|
padding: EdgeInsets.all(12),
|
||||||
appBar: PreferredSize(
|
child: Column(
|
||||||
preferredSize: Size.fromHeight(65.0),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
child: Stack(
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Positioned(
|
Texts(
|
||||||
bottom: 1,
|
"Water Tracker:",
|
||||||
left: 0,
|
fontWeight: FontWeight.normal,
|
||||||
right: 0,
|
fontSize: 25,
|
||||||
child: BackdropFilter(
|
color: Hexcolor("#60686b"),
|
||||||
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
|
),
|
||||||
child: Container(
|
SizedBox(
|
||||||
color: Theme.of(context)
|
height: 12,
|
||||||
.scaffoldBackgroundColor
|
),
|
||||||
.withOpacity(0.8),
|
Texts(
|
||||||
height: 70.0,
|
"This service is designed to help you to set drinking water goals and track the volume of water you are drinking on a daily basis. This service allows for schedule reminders and offers a basic statistical analysis of the amount of what you have consumed over the course of a day, week or month.",
|
||||||
),
|
fontWeight: FontWeight.normal,
|
||||||
),
|
fontSize: 17,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 22,
|
||||||
),
|
),
|
||||||
Center(
|
Center(
|
||||||
child: Container(
|
child: SizedBox(
|
||||||
height: 60.0,
|
height: MediaQuery.of(context).size.height * 0.55,
|
||||||
margin: EdgeInsets.only(top: 10.0),
|
width: MediaQuery.of(context).size.width * 0.50,
|
||||||
width: MediaQuery.of(context).size.width * 0.9,
|
child: CarouselSlider(
|
||||||
|
imagesUrlList: [
|
||||||
child: Center(
|
"https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/0.png",
|
||||||
child: TabBar(
|
"https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/1.png"
|
||||||
isScrollable: true,
|
],
|
||||||
controller: _tabController,
|
|
||||||
indicatorWeight: 5.0,
|
|
||||||
indicatorSize: TabBarIndicatorSize.label,
|
|
||||||
indicatorColor: Colors.red[800],
|
|
||||||
labelColor: Theme.of(context).primaryColor,
|
|
||||||
labelPadding:
|
|
||||||
EdgeInsets.only(top: 4.0, left: 10.0, right: 13.0),
|
|
||||||
unselectedLabelColor: Colors.grey[800],
|
|
||||||
tabs: [
|
|
||||||
Container(
|
|
||||||
width: MediaQuery.of(context).size.width * 0.28,
|
|
||||||
child: Center(
|
|
||||||
child: Texts(
|
|
||||||
"Today"),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: MediaQuery.of(context).size.width * 0.28,
|
|
||||||
child: Center(
|
|
||||||
child: Texts("Week"),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: MediaQuery.of(context).size.width * 0.28,
|
|
||||||
child: Center(
|
|
||||||
child: Texts("Month"),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 77,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
)),
|
||||||
),
|
bottomSheet: Container(
|
||||||
body: Column(
|
height: MediaQuery.of(context).size.height * 0.10,
|
||||||
|
width: double.infinity,
|
||||||
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Container(
|
||||||
child: TabBarView(
|
width: MediaQuery.of(context).size.width * 0.9,
|
||||||
physics: BouncingScrollPhysics(),
|
child: SecondaryButton(
|
||||||
controller: _tabController,
|
onTap: () =>
|
||||||
children: <Widget>[TodayPage(), WeekPage(), MonthPage()],
|
Navigator.push(context, FadePage(page: H2OPage())),
|
||||||
),
|
label: "Water Tracker",
|
||||||
)
|
textColor: Theme.of(context).backgroundColor),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
));
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,120 @@
|
|||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class H2OPage extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_H2OPageState createState() => _H2OPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _H2OPageState extends State<H2OPage>
|
||||||
|
with SingleTickerProviderStateMixin {
|
||||||
|
TabController _tabController;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_tabController = TabController(length: 3, vsync: this,);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
_tabController.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BaseView<H2OViewModel>(
|
||||||
|
builder: (_, model, widget) => AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: "Water Tracker",
|
||||||
|
body: Scaffold(
|
||||||
|
extendBodyBehindAppBar: true,
|
||||||
|
appBar: PreferredSize(
|
||||||
|
preferredSize: Size.fromHeight(65.0),
|
||||||
|
child: Stack(
|
||||||
|
children: <Widget>[
|
||||||
|
Positioned(
|
||||||
|
bottom: 1,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
child: BackdropFilter(
|
||||||
|
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
|
||||||
|
child: Container(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.scaffoldBackgroundColor
|
||||||
|
.withOpacity(0.8),
|
||||||
|
height: 70.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: Container(
|
||||||
|
height: 60.0,
|
||||||
|
margin: EdgeInsets.only(top: 10.0),
|
||||||
|
width: MediaQuery.of(context).size.width * 0.9,
|
||||||
|
|
||||||
|
child: Center(
|
||||||
|
child: TabBar(
|
||||||
|
isScrollable: false,
|
||||||
|
controller: _tabController,
|
||||||
|
indicatorWeight: 5.0,
|
||||||
|
indicatorSize: TabBarIndicatorSize.label,
|
||||||
|
indicatorColor: Colors.red[800],
|
||||||
|
labelColor: Theme.of(context).primaryColor,
|
||||||
|
labelPadding:
|
||||||
|
EdgeInsets.only(top: 4.0, left: 10.0, right: 13.0),
|
||||||
|
unselectedLabelColor: Colors.grey[800],
|
||||||
|
tabs: [
|
||||||
|
Container(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.28,
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
"Today"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.28,
|
||||||
|
child: Center(
|
||||||
|
child: Texts("Week"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.28,
|
||||||
|
child: Center(
|
||||||
|
child: Texts("Month"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: TabBarView(
|
||||||
|
physics: BouncingScrollPhysics(),
|
||||||
|
controller: _tabController,
|
||||||
|
children: <Widget>[TodayPage(), WeekPage(), MonthPage()],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,8 +1,27 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/charts/app_bar_chart.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/errors/app_embedded_error.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
class MonthPage extends StatelessWidget {
|
class MonthPage extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Center(child: Container(child: Text("Month Page "),));
|
return BaseView<H2OViewModel>(
|
||||||
|
onModelReady: (model) => model.getUserProgressForMonthData(),
|
||||||
|
builder: (_, model, widget) => AppScaffold(
|
||||||
|
isShowAppBar: false,
|
||||||
|
appBarTitle: "Water Tracker",
|
||||||
|
baseViewModel:model ,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 12),
|
||||||
|
child: AppBarChart(
|
||||||
|
seriesList: model.userProgressForMonthDataSeries),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,30 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/charts/app_bar_chart.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/errors/app_embedded_error.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class WeekPage extends StatelessWidget {
|
class WeekPage extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Center(child: Container(child: Text("Week page"),));
|
return BaseView<H2OViewModel>(
|
||||||
|
onModelReady: (model) => model.getUserProgressForWeekData(),
|
||||||
|
builder: (_, model, widget) => AppScaffold(
|
||||||
|
isShowAppBar: false,
|
||||||
|
appBarTitle: "Water Tracker",
|
||||||
|
baseViewModel: model,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 12),
|
||||||
|
child: AppBarChart(seriesList: model.userProgressForWeekDataSeries),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,43 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:charts_flutter/flutter.dart' as charts;
|
||||||
|
|
||||||
|
class AppBarChart extends StatelessWidget {
|
||||||
|
const AppBarChart({
|
||||||
|
Key key,
|
||||||
|
@required this.seriesList,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final List<charts.Series> seriesList;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
height: 400,
|
||||||
|
margin: EdgeInsets.only(top: 60),
|
||||||
|
child: charts.BarChart(
|
||||||
|
seriesList,
|
||||||
|
// animate: animate,
|
||||||
|
|
||||||
|
/// Customize the primary measure axis using a small tick renderer.
|
||||||
|
/// Use String instead of num for ordinal domain axis
|
||||||
|
/// (typically bar charts).
|
||||||
|
primaryMeasureAxis: new charts.NumericAxisSpec(
|
||||||
|
renderSpec: new charts.GridlineRendererSpec(
|
||||||
|
// Display the measure axis labels below the gridline.
|
||||||
|
//
|
||||||
|
// 'Before' & 'after' follow the axis value direction.
|
||||||
|
// Vertical axes draw 'before' below & 'after' above the tick.
|
||||||
|
// Horizontal axes draw 'before' left & 'after' right the tick.
|
||||||
|
labelAnchor: charts.TickLabelAnchor.before,
|
||||||
|
|
||||||
|
// Left justify the text in the axis.
|
||||||
|
//
|
||||||
|
// Note: outside means that the secondary measure axis would right
|
||||||
|
// justify.
|
||||||
|
labelJustification:
|
||||||
|
charts.TickLabelJustification.outside,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue