翻譯|使用教程|編輯:吳園園|2020-01-09 16:30:37.917|閱讀 721 次
概述:數據可視化工具廣泛應用于所有行業領域。此示例顯示了一個特定的業務案例,以可視化的方式將一個部門中虛構的公司整個年度的成本可視化為一個交互式儀表板。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
LightningChart JS是Web上性能最高的圖表庫具有出色的執行性能 - 使用高數據速率同時監控數十個數據源。 GPU加速和WebGL渲染確保您的設備的圖形處理器得到有效利用,從而實現高刷新率和流暢的動畫。非常適合用于貿易,工程,航空航天,醫藥和其他領域的應用。
儀表板業務
儀表板 xy 欄 列 ui 行 日期時間
數據可視化工具廣泛應用于所有行業領域。此示例顯示了一個特定的業務案例,以可視化的方式將一個部門中虛構的公司整個年度的成本可視化為一個交互式儀表板。
儀表板布局
儀表板網格由4行2列創建。本示例中的某些可視化組件通過在創建過程中顯式提供行跨度和列跨度來填充多個單元格。
1、左上角的單元格。該單元格包含一個圖表,該圖表顯示使用通過SegmentSeries(不同于RectangleSeries)工具實現的條形圖或柱形圖顯示的每個部門每年的成本。段系列提供了通過指定起點和終點來自由創建和放置線段的功能。
// Create XY chart and attach to the dashboard. const barChart = dashboard.createChartXY({ columnIndex: 2, rowIndex: 0, columnSpan: 2, rowSpan: 1 }) // Add segment series to series individual line segments. // This series uses default axes. const bars = barChart.addSegmentSeries()段系列接受以下格式的輸入:{startX:number,startY:number,endX:number,endY:number}。該系列返回創建的線段,以提供進一步修改的能力。圖表填充2行和1列。
// Add line segment. const column = bars.add({ startX: 10, startY: 10, endX: 20, endY: 20 })關于定制,可以將每列配置為具有單獨的樣式以及鼠標和觸摸事件。每個圖表和系列都有鼠標/觸摸事件。通過開始鍵入“ onMouse”來搜索我們的API文檔。
// Configure the created bar column. column .setStrokeStyle( style => ... ) .onMouseEnter( () => pointerEnterHandler ) .onTouchEvent( () => pointerEnterHandler )2、右上方的單元格,上部。該單元格包含一個UI面板,該面板顯示了全年的公司總成本。UI面板只能顯示UI組件。圖表填充1行和1列。
// Create UI panel and attach to the dashboard. const panel = dashboard.createUIPanel({ columnIndex: 3, rowIndex: 1, columnSpan: 1, rowSpan: 1 }) // Add UI element specifying the builder. // E.g. CheckBox, Button, Legend, etc. panel.addUIElement(/* builder from the library */)3、右上方的單元格,下部。該單元格包含一個圖表,該圖表顯示了一年中每一天單個部門的唯一成本。該圖表將線形圖與通過將鼠標移至條形圖中的列上方而收集的數據一起呈現。圖表填充1行和1列。
// Decide on an origin for DateTime axes. const dateTimeTickStrategy = AxisTickStrategies.DateTime(new Date(2018, 0, 1)) // Create a chart for visualizing the costs of selected department. // Specify DateTime format for x-axis labels. const lineChart = dashboard.createChartXY({ columnIndex: 2, rowIndex: 1, columnSpan: 1, rowSpan:1, chartXYOptions: { defaultAxisXTickStrategy: dateTimeTickStrategy } }) // Create line series for elected department. const lineSeries = lineChart.addLineSeries()3、底部單元格。該單元格包含一個圖表,該圖表顯示了全年所有公寓的總費用的平滑線(使用SplineSeries)。圖表填充2行2列。
// Create a chart for visualizing the total costs of the company. // Specify DateTime format for x-axis labels similarly as before. const totalCostsChart = dashboard.createChartXY({ columnIndex: 0, rowIndex: 0, columnSpan: 2, rowSpan:2, chartXYOptions: { defaultAxisXTickStrategy: dateTimeTickStrategy } }) // Create line series for total costs of the company. const lineSeries = lineChart.addSplineSeries()**如果你想LightningChart JS應用于商業用途,歡迎。
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:LightningChart JS