KagiChart
Details and Options
- A Kagi chart is drawn as a series of vertical lines connected by horizontal lines. Prices are drawn in a column until the price reverses by more than the threshold rt, when a new column is started with a horizontal line connecting to the previous column.
- The style of the lines changes when the price rises above the high of the previous column or drops below the low of the previous column.
- KagiChart […] is equivalent to KagiChart […,{"Relative",0.02}] for a reversal threshold of 2% of the average price.
- The following arguments can be used to specify the reversal threshold rt:
-
{"Percent",p} percent of previous price{"Relative",p} fraction of price range (default){"Absolute",p} absolute price change
- The dates datei are considered an ordered sequence of events and are not shown on an absolute time scale.
- The date formats for datei are the same as used in DateListPlot .
- The "name" and daterange are the same as used in FinancialData .
- Data elements for KagiChart can be given in the following forms:
-
{datei,pi} a pure date-price pairwi[{datei,pi},…] a date-price pair and wrapper wiformi->mi a date-price pair with metadata mi
- A line segment may represent several date-price pairs, and the corresponding wrappers will apply to the entire line segment.
- Data not given in these is taken to be missing and typically is excluded when generating the chart.
- Data for KagiChart can be given in the following forms:
-
{e1,e2,…} list of elements with or without wrappersw[{e1,e2,…}] wrapper applied to the whole data
- KagiChart [Tabular […]cspec] extracts and plots values from the tabular object using the column specification cspec.
- The following forms of column specifications cspec are allowed for plotting tabular data:
-
{coldate,colp} plot values from column colp against dates from coldate
- The following wrappers can be used for data elements:
-
- In KagiChart , Labeled and Placed allow the following positions:
-
{lx,ly} scaled position {lx,ly} in the label
- KagiChart has the same options as Graphics with the following additions and changes: [List of all options]
-
- With ScalingFunctions->sy, the function sy is applied to the prices. ScalingFunctions only affects the display and none of the controls.
- Style and other specifications from options and other constructs in KagiChart are effectively applied in the order TrendStyle , Style and other wrappers, with later specifications overriding earlier ones.
- Highlight options with settings specific to KagiChart
-
ImageMargins 0. the margins to leave around the graphicPreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic
List of all options
Examples
open all close allBasic Examples (2)
Chart the prices from a list of values:
Use three months of prices from FinancialData entities:
Specify a date range:
Scope (26)
Data and Wrappers (16)
Automatically get quarterly data for a financial entity:
Get data for a specific date range:
Get data from FinancialData :
Reversal threshold by default is a fraction of the price range:
Use thresholds relative to the overall price range:
Use thresholds that are a percentage of the current price:
Use absolute thresholds:
The data may include units:
Specify the units to use:
Data can be TimeSeries , EventSeries , or TemporalData :
Use wrappers on individual data:
Use wrappers on entire datasets:
Wrappers can be nested:
Override the default tooltips:
Use PopupWindow to provide additional drilldown information:
Button can be used to trigger any action:
Tabular Data (1)
Get tabular data:
Plot tabular data whose columns represent dates and prices:
Use a smaller reversal threshold:
Styling and Appearance (6)
Specify styles for up and down trends:
Use preset styles:
ChartBaseStyle can be used to set a style for the entire chart:
Style can be used to override styles:
Use a theme with simple ticks and grid lines in a bright color scheme:
Use a theme with a dark background in a high-contrast color scheme:
Options (64)
AspectRatio (3)
By default, KagiChart uses a fixed height-to-width ratio for the plot:
Make the height the same as the width with AspectRatio 1:
AspectRatio Full adjusts the height and width to tightly fit inside other constructs:
Axes (3)
AxesLabel (3)
No axes labels are drawn by default:
Place a label on the axis:
Use units as labels when using FinancialData :
AxesOrigin (3)
The position of the axes is determined automatically:
Specify an explicit date as origin for the axes:
Use named positions for the axis:
AxesStyle (4)
Change the style for the axes:
Specify the style of each axis:
Use different styles for the ticks and the axes:
Use different styles for the labels and the axes:
ChartBaseStyle (1)
Use ChartBaseStyle to apply overall styles to lines:
EventLabels (3)
Frame (3)
FrameStyle (2)
Specify the style of the frame:
Specify style for each frame edge:
GridLines (4)
Grid lines are used by default:
Turn off date grid lines:
Turn off price grid lines:
Place grid lines at month or year boundaries:
Use dotted grid lines for months and red grid lines for years:
GridLinesStyle (4)
By default, GridLinesStyle uses dotted grid lines:
Year grid lines are emphasized:
Style grid lines:
GridLines overrides GridLinesStyle :
ImageSize (7)
Use named sizes such as Tiny , Small , Medium and Large :
Specify the width of the plot:
Specify the height of the plot:
Allow the width and height to be up to a certain size:
Specify the width and height for a graphic, padding with space if necessary:
Setting AspectRatio Full will fill the available space:
Use maximum sizes for the width and height:
Use ImageSize Full to fill the available space in an object:
Specify the image size as a fraction of the available space:
PerformanceGoal (3)
Generate a KagiChart with interactive highlighting:
Emphasize performance by disabling interactive behaviors:
Typically, less memory is required for non-interactive charts:
PlotRange (3)
PlotTheme (2)
Use a theme with simple ticks and grid lines in a bright color scheme:
Change the trend style:
ScalingFunction (1)
Show prices on a logarithmic scale:
Ticks (7)
Ticks are placed automatically in each plot:
Use Ticks None to draw axes without any tick marks:
Use ticks on the axis, but not the axis:
Draw tick marks at the specified positions with the specified labels:
Use specific ticks on one axis and automatic ticks on the other:
Specify the lengths for ticks as a fraction of graphics size:
Use different sizes in the positive and negative directions for each tick:
Specify a style for each tick:
TicksStyle (4)
By default, the ticks and tick labels use the same styles as the axis:
Specify an overall ticks style, including the tick labels:
Specify ticks style for each of the axes:
Use a different style for the tick labels and tick marks:
TrendStyle (4)
Style up and down trends:
Use additional named styles:
TrendStyle combines with ChartBaseStyle :
With TrendStyle set to None , ChartBaseStyle is used:
Applications (1)
See mean temperature in Chicago using WeatherData on KagiChart :
Properties & Relations (7)
Larger thresholds filter out more noise:
KagiChart only shows time periods with significant change in price:
Use CandlestickChart to visualize the financial data:
Use TradingChart to visualize and analyze financial data:
Use InteractiveTradingChart to visualize and interactively analyze financial data:
Use PointFigureChart , LineBreakChart , and RenkoChart to analyze the relation of financial prices and time:
Use DateListPlot to visualize financial data:
Related Guides
History
Introduced in 2010 (8.0) | Updated in 2012 (9.0) ▪ 2014 (10.0) ▪ 2025 (14.2)
Text
Wolfram Research (2010), KagiChart, Wolfram Language function, https://reference.wolfram.com/language/ref/KagiChart.html (updated 2025).
CMS
Wolfram Language. 2010. "KagiChart." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/KagiChart.html.
APA
Wolfram Language. (2010). KagiChart. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KagiChart.html
BibTeX
@misc{reference.wolfram_2025_kagichart, author="Wolfram Research", title="{KagiChart}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/KagiChart.html}", note=[Accessed: 04-January-2026]}
BibLaTeX
@online{reference.wolfram_2025_kagichart, organization={Wolfram Research}, title={KagiChart}, year={2025}, url={https://reference.wolfram.com/language/ref/KagiChart.html}, note=[Accessed: 04-January-2026]}