. NET Language app development platform--smobiler Learning log: How to implement a linear chart in mobile app development

Source: Internet
Author: User

Front: Smobiler is a development platform that uses. NET language to develop apps in the VS environment, perhaps more convenient than Xamarin

Style one by one, target style

We want to achieve the effect in the following actions:

1. Drag a Linechart control to the form interface from "Smobiler components" on the toolbar

2. Modify the properties of the Linechart A.defaultcolors property

Open the Collection Editor and click Add, 1, Figure 2

Figure 1 Figure 2
B.load event (add data)
Vb:PrivateSub testchart4_load (sender as Object, e AsEventArgs) Handles MyBase. Load DimMattable as NewDataTableMATTABLE.COLUMNS.ADD ("Xmember",GetType (string)) MATTABLE.COLUMNS.ADD ( "Ymember", gettype (integer)) for span class= "str" >i as Integer = 1 to 7 Step 1 Dim  Row as datarow = mattable.newrow row ( "xmember") =  "10-" + (i + 25). ToString Row ( "ymember") = 0 matTable.Rows.Add (row)  Next mattable.rows (0) ( "ymember") = 3 Mattable.rows (1) ( "ymember") = 1 mattable.rows (3) ( " Ymember ") = 1 mattable.rows (6) (" xmember ") = " 11-01 " Me.LineChart1.DataSource = mattable me.linechart1.databind () End Sub      
C#:private voidTestchart4_load (ObjectSenderEventArgsE{ DataTablemattable = newDataTable();mattable.columns.add ( "Xmember", typeof ( string)); MATTABLE.COLUMNS.ADD ( "Ymember", typeof (int)); for (int i = 1; I <= 7; i + = 1) {datarow row = Mattable.newrow ( ); Row[ "xmember"] =  "10-" + (i + 25). ToString (); Row[ "ymember"] = 0; MatTable.Rows.Add (row), Mattable.rows[0][ "ymember"] = 3; Mattable.rows[1][ "ymember"] = 1; Mattable.rows[3][ "ymember"] = 1; Mattable.rows[6][ "xmember"] =  "11-01"; this. Linechart1.datasource = mattable; this. Linechart1.databind ();                /span>      
C.xaxislabelmember Property

The value of the bound x-axis, 3

D.yaxislabelmember Property

The value of the bound y-axis, 4

Figure 3 Figure 4
Second, the mobile phone effect display

. NET Language app development platform--smobiler Learning log: How to implement a linear chart in mobile app development

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.