Power BI Visuals - Candlestick (K-line chart) introduction document

Note: This article was originally published on d-bi.gitee.io (April 2020) and migrated to CSDN in June 2023


Note: This article will briefly introduce the use of the new Power BI visualization – Candlestick

Introduction

Candlestick is a Power BI visualization developed by myself (Davis ZHANG) using R language. It will be released on Microsoft AppSource in a few days (depending on the progress of the review) and made available for everyone to download and use. This visualization – Candlestick, as the name suggests, is used For analyzing the candle charts (K-line charts) of the stock market, the motivation for developing this visualization is that the recent stock market decline caused by the epidemic has increased people's attention to the financial market, but there is currently no visualization market dedicated to analyzing the financial stock market. Visualization, the only K-line chart is the visualization released by OKViz – Candlestick by OKViz
, but this visualization has some limitations, because it is designed according to the general visualization ideas, so it does not take into account the data interruption caused by the market closing days. On the other hand, I also had the experience of developing PowerBI visualization last year and accumulated a little experience. Developing a new visualization should not cost too much time, so Candlestick Born from this idea.

Design ideas

As the initial version of financial visualization, I want to make it as simple as possible, providing basic candlestick charts and daily moving average displays. The initial design idea is to develop two versions for Candlestick, a development version and a user version. The development version is the traditional version. The Power BI visual design idea leaves all the decision-making power of the visually presented results to the report developer, such as the color and style of the chart, the size of the font, etc. I will even add some predefined elements; and the user version It is very different. Developers only need to drag in the necessary fields, and may still need to set basic settings such as color and font, but some settings, such as chart style, annotation text, etc., will be displayed in the form of keystrokes or Other forms are left to the user to decide on the front-end interface, which can give users a better user experience. However, due to my time and energy constraints, I have only developed the first version for the time being, but this is not a bad thing, so that I can pass Releasing the first version of the visualization gets some valuable user feedback and some possible bugs so that I can improve it in future versions.

About use

In Power BI Desktop, import the visualization and the system will prompt you to install the necessary packages (if you have not installed them before), including GGPlot2, etc. If you use it directly in Power BI Service, there is no need to perform additional installation operations because Power BI Service has integrated the necessary R script execution environment, but if you want to publish reports with this visualization to the space, you need to have at least a Pro License (click here to view the current known limitations of using R visualization).

In this version of Candlestick (v1.0.0 may be different if there are changes later), you only need to drag in the stock price data (opening, closing, highest and lowest). What needs to be noted here is that all data must use calculated columns. , or use all measure values. If calculated columns and measure values ​​are mixed, it may cause chart display errors.

Functional architecture

Here is a flow chart showing the functional architecture of the initial version:

Insert image description here

Partial screenshot

Insert image description here

Insert image description here

Insert image description here

Known limitations

The following are the current main problems with this visualization. If you find other problems, please give me feedback.

  1. This visualization accepts up to 10,000 rows of data, and any excess will be truncated.
  2. The function of copying to the clipboard is currently limited to 1,000 rows of data, and the excess will be truncated (I will consider whether to increase the row limit in future versions based on user feedback). Users can still use the visualization default export to csv option to export. Data, but this will export a lot of irrelevant fields, such as color values, etc.
  3. Chinese, Japanese and Korean characters will have garbled characters, which will be fixed in the next version.

Follow the author: Zhihu | Power BI official community

Guess you like

Origin blog.csdn.net/qq_44794714/article/details/131099148