. Net language APP development platform-Smobiler Learning Log: how to display bar charts on mobile phones, appsmobiler
First, scycler is a development platform that uses the. Net language to develop apps in the VS environment. It may be more convenient than Xamarin. 1. Target Style
The following operations are required to achieve the effect:
1. Drag a BarChart control from "scycler Components" on the toolbar to the form interface.
2. Modify the attributes of BarChart a. DefaultColors.
Open the Set Editor and click Add. 1. Figure 2
|
VB: Private Sub TestChart_Load (sender As Object, e As EventArgs) Handles MyBase. load Dim matTable As New DataTable matTable. columns. add ("XMember", GetType (String) matTable. columns. add ("YMember", GetType (Integer) For I As Integer = 1 To 12 Step 1 Dim row As DataRow = matTable. newRow row ("XMember") = I. toString + "month" row ("YMember") = 0 matTable. rows. add (row) Next matTable. rows (6) ("YMember") = 20000 matTable. rows (8) ("YMember") = 300000 matTable. rows (9) ("YMember") = 150000 matTable. rows (10) ("YMember") = 40000 Me. barChart2.DataSource = matTable Me. barChart2.DataBind () End SubC #: private void TestChart1_Load (object sender, EventArgs e) {DataTable matTable = new DataTable (); matTable. columns. add ("XMember", typeof (string); matTable. columns. add ("YMember", typeof (int); for (int I = 1; I <= 12; I + = 1) {DataRow row = matTable. newRow (); row ["XMember"] = I. toString () + "month"; row ["YMember"] = 0; matTable. rows. add (row);} matTable. rows [7] ["YMember"] = 20000; matTable. rows [8] ["YMember"] = 300000; matTable. rows [9] ["YMember"] = 150000; matTable. rows [10] ["YMember"] = 40000; this. barChart2.DataSource = matTable; this. barChart2.DataBind ();}} C. XAxisLabelMember attributesValue bound to the X axis, 3 D. YAxisLabelMember attributesValue bound to the Y axis, 4
Ii. Mobile phone effect display |