原創(chuàng)|產(chǎn)品更新|編輯:鄭恭琳|2018-02-06 10:42:14.000|閱讀 590 次
概述:圖表工具TeeChart for Xamarin.Forms 2018 v4.1.2018.01040版本更新,更容易將圖表集成到您的APP。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
TeeChart for Xamarin.Forms 通過(guò)相同的核心圖表代碼完全跨平臺(tái)支持.NET桌面,Windows Phone,iOS以及Android。它還支持來(lái)自相同圖表庫(kù)的圖表、儀表和地圖,而無(wú)需獲得單獨(dú)的產(chǎn)品模塊。
Steema很高興地通知您最新TeeChart for Xamarin.Forms 2018 v4.1.2018.01040版本的可用性。
這個(gè)新版本包括源代碼、評(píng)估和注冊(cè)的二進(jìn)制安裝程序。
1)現(xiàn)在,更容易將圖表集成到您的APP,因?yàn)樽远x呈現(xiàn)和ChartView類已經(jīng)是集成到TeeChart NET中的Xamarin.Forms程序集。這意味著您不必為您的新項(xiàng)目增加額外的文件以便使用圖表組件。
以下是將圖表組件添加到您的APP中的步驟:
1)在xaml頁(yè)面中通過(guò)xaml代碼添加Chart組件。代碼示例:
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:ChartViewIntegrated" xmlns:charting="clr-namespace:Steema.TeeChart;assembly=TeeChart.PCL" x:Class="ChartViewIntegrated.MainPage"> VerticalOptions="Center" HorizontalOptions="Center"/>
------使用xaml代碼創(chuàng)建TeeChart ChartView -----
< StackLayout x:Name="PageLayout"> < charting:ChartView x:Name="BarChart" HeightRequest="300" WidthRequest="450"> < /charting:ChartView>< /StackLayout>< /ContentPage>
2)通過(guò)CSharp代碼在.cs代碼類中添加Chart組件。代碼示例:
/* Create ChartView by code at ContentPage */ ChartView BarChart = new ChartView(); BarChart.WidthRequest = 300; BarChart.HeightRequest = 300; Content = new StackLayout { Children = { BarChart }, VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.CenterAndExpand, };
那么您只需要通過(guò)cs代碼開(kāi)始配置圖表,即:
BarChart.Chart.Series.Add(new Bar()); BarChart.Chart.Series[0].FillSampleValues(3); BarChart.Chart.Panel.Gradient.Visible = false; BarChart.Chart.Panel.Color = Color.Aquamarine; BarChart.Chart.Invalidate();
重要提示:由于Xamarin.Forms iOS的工作方式,它只查看加載的程序集,這意味著TeeChart使用自定義的ChartViewRenderer(現(xiàn)在已經(jīng)集成到iOS程序集中),為了使渲染器工作,我們需要在之前添加下面的代碼行Xamarin.Forms.Init被調(diào)用(通常在AppDelegate.cs文件中):
Steema.TeeChart.TChart.Init();
請(qǐng)記住,這只是Xamarin.Forms iOS項(xiàng)目所必需的。
2)“System.NotImplementedException:該方法或操作未執(zhí)行。”錯(cuò)誤修復(fù)。
所有關(guān)于授權(quán)升級(jí)、授權(quán)折扣和其他細(xì)節(jié)的附加信息,請(qǐng)移步我們的價(jià)格頁(yè)面進(jìn)行查看。
我們將很高興回答您可能想要知道的所有的問(wèn)題!請(qǐng)即時(shí)與我們的聯(lián)系!
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@ke049m.cn
文章轉(zhuǎn)載自:慧都控件網(wǎng)