. Net language APP development platform-Smobiler Learning Log: How to Implement linear charts in mobile APP development

Source: Internet
Author: User

. Net language APP development platform-Smobiler Learning Log: How to Implement linear charts in mobile APP development

Smobiler is a development platform that uses the. Net language to develop apps in the VS environment. It may be more convenient than Xamarin.

 

Style 1, Target Style

The following operations are required to achieve the effect:

1. Drag a LineChart control from "Smobiler Components" on the toolbar to the form interface.

2. Modify the LineChart attribute a. DefaultColors.

Open the Set Editor and click Add. 1. Figure 2

Figure 1 Figure 2
B. Load event (add data)
VB:    Private Sub TestChart4_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 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 void TestChart4_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 <= 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();    }
C. XAxisLabelMember attributes

Value bound to the X axis, 3

D. YAxisLabelMember attributes

Value bound to the Y axis, 4

Figure 3 Figure 4
Ii. Mobile phone effect display

Related Article

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.