翻譯|使用教程|編輯:吳園園|2020-03-17 09:36:22.833|閱讀 301 次
概述:此示例顯示了一個簡單的儀表板,其中包含多種圖表類型和LegendBox面板。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
LightningChart JS是Web上性能最高的圖表庫具有出色的執行性能 - 使用高數據速率同時監控數十個數據源。 GPU加速和WebGL渲染確保您的設備的圖形處理器得到有效利用,從而實現高刷新率和流暢的動畫。非常適合用于貿易,工程,航空航天,醫藥和其他領域的應用。
帶有LegendBox的儀表板
儀表板允許使用最少的內存資源高效地在單個視口中渲染多個場景。在創建儀表板實例的過程中,必須指定行和列的數量。此后無法更改。
// Create a dashboard with three rows and two columns. const dashboard = lightningChart().Dashboard({ numberOfRows: 3, numberOfColumns: 2 })然后可以將圖表和面板添加到儀表盤,如下所示:
// Create a ChartXY that occupies the top row of the dashboard. const chartXY = dashboard.createChartXY({ // Row index (starting from bottom). columnIndex: 2, // Column index (starting from left). rowIndex: 0, // Row span (height, basically). columnSpan: 1, // Column span (width, basically). rowSpan: 2 })
儀表板具有用于添加不同種類的圖表或面板的單獨方法。儀表板代表具有行和列的網格。在創建元素期間,應指定行和列索引以及水平和垂直跨度,以將其放置在正確的位置并填充所需數量的單元格。
// Create a spider chart and attach to dashboard. // Row 0, Column 0, Rows to fill 2, Columns to fill 1. const spiderChart = dashboard.createSpider( 0, 0, 2, 1 ) // Create a Legend Box Panel and attach to dashboard. // Row 0, Column 1, Rows to fill 2, Columns to fill 1. const legendBox = dashboard.createLegendBoxPanel( { columnIndex: 0, rowIndex: 1, columnSpan: 2, rowSpan: 1 })儀表板的行和列可以分別具有不同的高度和寬度-您可以通過單擊并拖動將列和行彼此分開的網格線或使用編程方式設置它們的方法來調整它們的大小:
// Set height of the first row of a dashboard. // By default each row and column has a size of 1. // The size is always relative to the combined size of each row / column. dashboard.setRowHeight( 0, 2 ) // Set width of the first and the second column of a dashboard. // First column width will be 2/5 of the entire view's width. dashboard.setColumnWidth( 0, 2 ) // Second column width will be 3/5 of the entire view's width. dashboard.setColumnWidth( 1, 3 )
=====================================================
如果你想LightningChart JS應用于商業用途,歡迎。
關注下方的微信公眾號,及時獲取產品最新資訊▼▼▼
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自: