I am creating a chevron chart using tikz
and am having trouble with two issues:
it is too long and going out of my document
I figure that a change to the width (linewidth long) would also need a line break for longer text, else the text would go out of the chevron (only my noobish guess here)
Here is my example
\begin{figure}[h]
\centering
\begin{tikzpicture}
\tikzset{
arrow/.style={
draw,
minimum height=2cm,
shape=signal,
signal from=west,
signal to=east,
signal pointer angle=110,
}
}
\begin{scope}[start chain=transition going right,node distance=0, draw=blueaccent, distance=\linewidth]
\node[arrow,on chain] {Auswahl};
\node[arrow,on chain] {Exploration};
\node[arrow,on chain] {Stichprobenziehung};
\node[arrow,on chain] {Vorverarbeitung};
\node[arrow,on chain] {Transformation};
\node[arrow,on chain] {Wissensgewinnnung};
\end{scope}
\end{tikzpicture}
\caption{Data Mining Prozess}
\label{fig:DataMiningProzess}
\end{figure}
distance=\linewidth does not seem to have any effect and width
is not a recognized option for scope. I also looked at these two question/answers but the dealt with nodes itself but not with a chevron shape (if I am not mistaken).
Manual/automatic line breaks and text alignment in TikZ nodes
Tikzpicture: Line break in node label to right
- EDIT
I got the chevron code from this answer : Best way to draw a chevron diagram using Tikz
MEW:
\documentclass[fontsize=12pt,a4paper,oneside,
listof=totoc, % Tabellen- und Abbildungsverzeichnis ins Inhaltsverzeichnis
bibliography=totoc, % Literaturverzeichnis ins Inhaltsverzeichnis aufnehmen
titlepage, % Titlepage-Umgebung statt \maketitle
headsepline, % horizontale Linie unter Kolumnentitel
%abstracton, % Überschrift beim Abstract einschalten, Abstract muss dazu in {abstract}-Umgebung stehen
DIV12, % auskommentieren, um den Seitenspiegel zu vergrößern
BCOR=0mm, % Bindekorrektur, die den Seitenspiegel um 6mm nach rechts verschiebt. geometry package überschreibt diesen Wert
]{scrreprt}
\usepackage[pdftex,dvipsnames]{xcolor} % einfache Verwendung von Farben in nahezu allen Farbmodellen
\usepackage{pgfplots} % Zum erstellen von mathematischen Diagrammen, wie Balken, Flächen usw.
\usetikzlibrary{chains,positioning,shapes.symbols}
\definecolor{blueaccent}{RGB}{0,150,214}
\usepackage[a4paper, left=2.5cm, right=3cm, top=2.5cm, bottom=2.5cm, bindingoffset=6mm]{geometry}
\begin{document}
\begin{figure}[h]
\centering
\begin{tikzpicture}
\tikzset{
arrow/.style={
draw,
minimum height=2cm,
shape=signal,
signal from=west,
signal to=east,
signal pointer angle=110,
}
}
\begin{scope}[start chain=transition going right,node distance=0, draw=blueaccent, distance=\linewidth]
\node[arrow,on chain] {Auswahl};
\node[arrow,on chain] {Exploration};
\node[arrow,on chain] {Stichprobenziehung};
\node[arrow,on chain] {Vorverarbeitung};
\node[arrow,on chain] {Transformation};
\node[arrow,on chain] {Wissensgewinnnung};
\end{scope}
\end{tikzpicture}
\caption{Data Mining Prozess}
\label{fig:DataMiningProzess}
\end{figure}
\end{document}
\linewidth
will not break automatically (for TeX it is just one box). TikZ won't break a chain neither. How would you like the diagram to look? Even without theshape=signal
it is propably too wide. Maybe take a look at thesmartdiagram
package.\linewidth
. And if the text cant fit into one line then it should break. Like in microsoft office when you resize a shape too small. The optimal diagram would be where the text is the same font and fontsize as my document. the text inside should look as good as possible and the width should be adjustable as I like. Obviously, if I enter stupid numbers it will look stupid (like make the width 0.1 cm and expecting the text to be still inside with fontsize 12...)