Download as pdf or txt
Download as pdf or txt
You are on page 1of 69

Pro Power BI Theme Creation: JSON

Stylesheets for Automated Dashboard


Formatting 1st Edition Adam Aspin
Visit to download the full and correct content document:
https://ebookmeta.com/product/pro-power-bi-theme-creation-json-stylesheets-for-auto
mated-dashboard-formatting-1st-edition-adam-aspin/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Pro Power BI Theme Creation: JSON Stylesheets for


Automated Dashboard Formatting 2nd Edition Adam Aspin

https://ebookmeta.com/product/pro-power-bi-theme-creation-json-
stylesheets-for-automated-dashboard-formatting-2nd-edition-adam-
aspin/

Pro Power BI Dashboard Creation: Building Elegant and


Interactive Dashboards with Visually Arresting
Analytics 1st Edition Adam Aspin

https://ebookmeta.com/product/pro-power-bi-dashboard-creation-
building-elegant-and-interactive-dashboards-with-visually-
arresting-analytics-1st-edition-adam-aspin/

Pro DAX and Data Modeling in Power BI: Creating the


Perfect Semantic Layer to Drive Your Dashboard
Analytics 1st Edition Adam Aspin

https://ebookmeta.com/product/pro-dax-and-data-modeling-in-power-
bi-creating-the-perfect-semantic-layer-to-drive-your-dashboard-
analytics-1st-edition-adam-aspin/

Pro Data Mashup for Power BI: Powering up with Power


Query and the M Language to Find, Load, and Transform
Data 1st Edition Adam Aspin

https://ebookmeta.com/product/pro-data-mashup-for-power-bi-
powering-up-with-power-query-and-the-m-language-to-find-load-and-
transform-data-1st-edition-adam-aspin/
Pro Power BI Architecture 2nd Edition Reza Rad

https://ebookmeta.com/product/pro-power-bi-architecture-2nd-
edition-reza-rad/

Microsoft Power BI For Dummies Jack Hyman

https://ebookmeta.com/product/microsoft-power-bi-for-dummies-
jack-hyman/

Learning Microsoft Power BI Jeremey Arnold

https://ebookmeta.com/product/learning-microsoft-power-bi-
jeremey-arnold/

Supercharge Power BI Power BI is Better When You Learn


To Write DAX Third Edition Matt Allington

https://ebookmeta.com/product/supercharge-power-bi-power-bi-is-
better-when-you-learn-to-write-dax-third-edition-matt-allington/

Beginning Power BI 2nd Edition Dan Clark

https://ebookmeta.com/product/beginning-power-bi-2nd-edition-dan-
clark/
Adam Aspin

Pro Power BI Theme Creation


JSON Stylesheets for Automated Dashboard
Formatting
1st ed.
Adam Aspin
STAFFORD, UK

Any source code or other supplementary material referenced by the


author in this book is available to readers on GitHub via the book’s
product page, located at www.apress.com/9781484270677. For more
detailed information, please visit http://www.apress.com/source-code.

ISBN 978-1-4842-7067-7 e-ISBN 978-1-4842-7068-4


https://doi.org/10.1007/978-1-4842-7068-4

© Adam Aspin 2021

This work is subject to copyright. All rights are solely and exclusively
licensed by the Publisher, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in
any other physical way, and transmission or information storage and
retrieval, electronic adaptation, computer software, or by similar or
dissimilar methodology now known or hereafter developed.

The use of general descriptive names, registered names, trademarks,


service marks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from the
relevant protective laws and regulations and therefore free for general
use.

The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.

This Apress imprint is published by the registered company APress


Media, LLC part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY
10004, U.S.A.
To Karine and Timothy.
Introduction
As a Power BI user, you are used to delivering eye-catching analytical
dashboards. However, formatting and reformatting dozens or even
hundreds of visuals across a set of dashboards can be a time-consuming
and needlessly repetitive task. This effort can require heroic levels of
concentration and patience when you are faced with the task of
creating a unified look and feel for a suite of reports or standardizing an
enterprise-wide analytics suite in Power BI.
This book is about helping you to minimize the time and effort you
need to spend on formatting and tweaking dashboard visuals. It shows
you how a small investment in time up front can save you hundreds of
hours later when it comes to delivering analytics. All this is done by
defining a theme file that can be used to specify – once and for all – the
presentation of each and every visual that is built in to Power BI
Desktop.
Applying theme files makes your dashboards adopt instantly the
look and feel that you have designed. Not only that but any changes that
you make later to the theme can be reapplied in a couple of clicks to
update the presentation to match the latest definition. This is not only
time saved, it is also a liberation from the drudgery of manual
formatting. This means that you are now free to concentrate on
delivering powerful analytics and data journeys that entrance and
motivate your users.
Winning back this wasted time requires only a small up-front
investment. You have to learn how the formatting pane in Power BI
Desktop maps to JSON elements in a theme file. Then you discover how
the theme file is structured to define visual formatting. In case you are
not a JSON expert, this book also introduces you to the core elements of
JSON that you need to understand in order to create powerful theme
files.
You can, if you wish, read this book from start to finish, as it is
designed to be a progressive self-tutorial. However, as Power BI
Desktop themes can be applied at several levels of complexity
(requiring progressively more advanced skills), the book is broken
down into chapters (or groups of chapters) that correspond to the
various levels and methods of theme generation. They are as follows:
Chapter 1 provides a high-level overview of what a theme file can do
to accelerate dashboard production.
Chapter 2 explains how to create theme files directly inside Power
BI Desktop. This serves as a basic introduction to how themes work in
practice and how you can develop usable JSON files without writing a
line of JSON code.
Chapter 3 shows how to create high-level theme files directly in
JSON using theme classes to simplify theme file creation. This can avoid
theme developers having to go into all the intricate layers of detail
needed to apply visual formatting while producing effective themes
quickly and easily.
Chapter 4 describes the techniques required for generic theme
definition. These are theme files that can set common attributes of
multiple visuals. This approach can help theme creators produce
simple yet powerful theme files in a relatively short time.
Chapters 5 through 12 are a complete reference that explain each
and every attribute of all the visuals currently available in Power BI
Desktop. These chapters explain each detail of how every standard
visual can be formatted in a JSON file. Every option and selection is
explained so that you can tweak dashboard presentation down to the
finest and most intricate level of detail.
Chapter 13 extends your knowledge by introducing the concept of
cascading style definitions. These allow you to specify formatting
attributes that apply at selected levels of formatting. This approach can
make the maintenance of theme files considerably easier.
This book comes with several dozen theme files to help you both
learn about themes in Power BI and create your own theme files. Some
of these files cover a specific aspect of formatting a dashboard, some
apply to a single visual so that you can delve into the intricacies of a
specific object, and others are complete and detailed report theme files
containing several thousand lines of JSON code.
This book also comes with a small sample data set that you can
download from http://www.apress.com/9781484270677 and
use to create visuals. As the focus is on form and not analysis, I prefer to
use an extremely simplistic data structure so that the reader is free to
concentrate on formatting and not the data itself.
Inevitably, not every question about styling dashboards can be
answered and not every issue can be resolved in one book. I truly hope
that I have answered many of the essential Power BI stylesheet
questions that you will face and have provided ways of solving most of
the pre-formatting challenges that you may encounter. I wish you good
luck in using Power BI Desktop when formatting your insights. And I
sincerely hope that you have as much fun with themes as I had writing
this book.
—Adam Aspin
Acknowledgments
Writing a technical book can prove to be a daunting challenge. So I am
all the more grateful for all the help and encouragement that I have
received from so many friends and colleagues.
First, my heartfelt thanks go, once again, to Jonathan Gennick, the
commissioning editor of this book. Throughout the publication process,
Jonathan has been an exemplary mentor. He has shared his knowledge
and experience selflessly and courteously and provided much valuable
guidance.
My deepest gratitude goes yet again to Jill Balzano, the Apress
coordinating editor, for managing this, our sixth book together, through
the rocks and shoals of the publication process. She has succeeded in
the Sisyphean task of making a potentially stress-filled trek into a
pleasant journey filled with light and good humor. Her team also
deserves thanks for their efforts. So my gratitude also goes to Ann
Gemer Tuballa for editing and polishing my prose.
When delving into the arcane depths of technical products, it is all
too easy to lose sight of the main objectives of a book. Fortunately, my
good friend and former colleague Natalie Jayne Heger, the technical
reviewer, has worked unstintingly to help me retain focus on the
objectives of this book. She has also shared her considerable experience
of Power BI Desktop in the enterprise and has helped me immensely
with her comments and suggestions.
Finally, my deepest gratitude has to be reserved for the two people
who have given the most to this book. They are my wife and son, who
have always encouraged me to persevere while providing all the
support and encouragement that anyone could want. I am very lucky to
have both of them.
Table of Contents
Chapter 1:​Introduction to Power BI Themes
Theme Basics
Anatomy of a Theme
Themes and the Format Pane
Writing JSON Files
Applying Themes
Conclusion
Chapter 2:​Create and Customize a Theme in Power BI Desktop
Creating a Simple Theme
Name and Color Settings
Text Settings
Visual Settings
Page Settings
Filter Pane Settings
Overall Comments on Interactive Theme File Creation
About the Theme File
Conclusion
Chapter 3:​High-Level Theme Definition
What Is JSON?​
Palette Colors
The JSON Object
Attributes Defined by the Theme File
A JSON Array
Colors in a JSON Theme File
Generic Colors (Color Classes)
Generic Text Attributes (Text Classes)
Conclusion
Chapter 4:​Default Visual Styles
Common Visual Elements
JSON Attribute Definition
JSON Keywords
The JSON Hierarchy in Theme Files
Elements Common to Most Chart Types
Extending Generic Formatting for Specific Chart Types
Table Elements
Final Comments
Hints on Writing JSON Theme Files
Conclusion
Chapter 5:​Object Visual Styles
Textbox
Image
Shape
Conclusion
Chapter 6:​Card and Table Visual Styles
Card
Multi-row Card
Table
Matrix
Conclusion
Chapter 7:​Classic Chart Visual Styles
Stacked Bar Chart
Stacked Column Chart
Clustered Bar Chart
Clustered Column Chart
Line Chart
Area Chart
Conclusion
Chapter 8:​Complex Chart Visual Styles
100 % Stacked Bar Chart
100 % Stacked Column Chart
Stacked Area Chart
Line and Stacked Column Chart
Line and Clustered Column Chart
Scatter Chart
Conclusion
Chapter 9:​Other Chart Visual Styles
Pie Chart
Donut Chart
Treemap
Waterfall Chart
Funnel Chart
Ribbon Chart
Conclusion
Chapter 10:​Maps
Map
Filled Map
Shape Map
Conclusion
Chapter 11:​Miscellaneous Visual Styles
Gauge
Python Visual
R Script Visual
Key Influencers Visual
Decomposition Tree Visual
KPI
Conclusion
Chapter 12:​Dashboard Styling
Action Button
Slicer
Filter Pane
Page Formatting
Adding Notes to Theme Files
Analyze the Contents of Power BI Desktop Files
Conclusion
Chapter 13:​Cascading Styles
Style Hierarchy
Putting It All Together
Applying Cascading Palette Colors
Conclusion
Index
About the Author
Adam Aspin
is an independent business intelligence
consultant based in the United Kingdom.
He has worked with SQL Server for over
25 years and now focuses on the Power
BI ecosystem. During this time, he has
developed several dozen BI and analytics
systems based on the Microsoft BI
product suite. Adam has been creating
JSON theme files since the feature was
first introduced in Power BI Desktop and
has delivered corporate Power BI themes
for dozens of clients across Europe.
Adam is a graduate of Oxford
University. He has applied his skills for a
range of clients in finance, banking,
utilities, telecoms, construction, and
retail. He is the author of SQL Server
2012 Data Integration Recipes; Business
Intelligence with SQL Server Reporting Services; High Impact Data
Visualization in Excel with Power View, 3D Maps, Get & Transform and
Power BI; Pro Power BI Desktop; and Data Mashup with Microsoft Excel
Using Power Query and M.
About the Technical Reviewer
Natalie Jayne Heger
is a business intelligence
developer/consultant based in the West
Midlands of England.
She has worked in the IT industry for
over 20 years. She started professional
development using VB6 and Microsoft
Access in the late 1990s until discovering
SQL Server was a far more robust
database solution and worked with
DTS/SSIS, SSRS, and SSAS for many years
for a broad range of companies.
She now works in the construction
industry developing solutions with
Power BI and enjoys thinking outside the
box in producing quality reporting solutions, particularly in relation to
D365 integration.
© The Author(s), under exclusive license to APress Media, LLC, part of Springer
Nature 2021
A. Aspin, Pro Power BI Theme Creation
https://doi.org/10.1007/978-1-4842-7068-4_1

1. Introduction to Power BI Themes


Adam Aspin1
(1) STAFFORD, UK

Power BI has taken the world by storm when it comes to creating


attention-grabbing dashboards that empower users. It has come to
dominate the analytics arena with its ease of use, wide range of
connectivity options, and the variety of available visuals.
However, formatting (and reformatting) dashboard visuals can
prove time-consuming and repetitive – as can standardizing the
presentation of multiple dashboards to create a unified look and feel for
a suite of reports. Most users would rather spend their time analyzing
and delivering meaningful insights as opposed to applying colors and
font choices to charts and tables.
This is where the creation and application of Power BI themes
comes in. A theme is a standardized definition of some – or all – of the
formatting of a dashboard. This can range from defining a color palette
and a selection of font choices to the detailed specification of each and
every visual. Applying a theme allows you to format virtually every
visual in a dashboard instantly. What is more, any changes that you
subsequently make to a theme can be reapplied in a few clicks to
update your dashboard’s presentation. Themes can be created once,
then applied to dozens or even hundreds of Power BI dashboards to
guarantee a coherent and rigorously standardized presentation style
across a department or even an entire organization.
Themes can be as simple – or as detailed – as you require. They can
specify standardized fonts, text colors, and font sizes or set the tiniest
details of how each individual type of visual is formatted. Indeed,
themes are designed to work at multiple levels – starting with general
elements and then progressing deeper and deeper into tightly specified
definitions of the presentation of each element in a dashboard. This
gives you a range of options when it comes to defining how you
standardize Power BI dashboards.

Theme Basics
Themes are, technically, JSON files. That is, they use the JSON
(JavaScript Object Notation) format to store the definition of how
dashboard objects are formatted. But don’t worry if you have never
used – or even heard of – JSON before now, as I will be explaining all
you need to know about it during the course of this book. The only
thing to retain for the moment is that themes are like external
stylesheets for Power BI (very like the stylesheets that are used by
Microsoft Word, for instance). The advantage of defining formats with
external files is that you can simply send your colleagues themes as
small text-based files that they can then apply in a few clicks to any of
their own Power BI dashboards. Themes can also be integrated into
Power BI templates to accelerate even further the dashboard creation
process.
Themes are applied to Power BI Desktop files. Once loaded, they
become an integral part of the Power BI Desktop .pbix file. The
formatting is then, of course, carried over into the Power BI service
when you publish the dashboard. Moreover, you can switch between
different theme files in a few clicks to try out different formatting
approaches or apply a completely different look and feel. Equally
fortunately, there is nothing definitive about applying a theme file, as
you can switch to another Power BI presentation style based on a
different theme at any time. So you are free to experiment with
different styles until you find the look and feel that suits the particular
dashboard that you are creating.
A theme allows you to preset virtually anything that is defined in
the Power BI formatting pane. Consequently, it can contain formatting
definitions for
The color palette
The page
Inserted objects (text boxes, shapes, buttons, and images)
Built-in visuals (tables, charts, maps, and other visuals)
You can even apply a theme to the Power BI Desktop Filter pane.
The principle is simple: if you can alter presentation in the formatting
pane of Power BI Desktop, then you can define the format using a
theme file.
The portable nature of dashboard themes means that there are now
a wide range of different themes that are freely available to enhance the
presentation of Power BI dashboards. You may even have experimented
with some of the themes that are available as an integral part of Power
BI Desktop or shared through the Web.
After reading this book and learning how these themes are created,
you, too, will be able to develop themes that you can share – with
friends, colleagues, or even the world.

Anatomy of a Theme
It is important to understand from the start that themes operate at two
distinct levels. Firstly, themes can be defined to operate in a “generic”
way. That is, you can define a set of high-level specifications to set core
aspects of a dashboard and the visuals it contains without going into
low levels of detail. This way you can quickly and easily define
Colors
Standard font attributes
Shared elements for all visuals
Certain elements specific to certain types of visuals
You will discover how to create “generic” themes in Chapter 3.
Then, at a more detailed level (and once you have acquired a
thorough understanding of how themes work), you can specify the
exact formatting for each and every element of each visual to give you
total control of the appearance of each element in a dashboard. An in-
depth definition of the JSON that is required at the level of individual
visuals is the subject of Chapters 5 through 12.
However, don’t get the idea that you have to choose between two
different approaches. The truth is that a theme JSON file can “mix and
match” the two approaches so that you can both define a set of overall
style principles and then add highly specific definitions of the way that
you want certain visuals to be displayed in a dashboard. The principle
will always be that a more generic level of formatting applies unless a
more detailed definition is found in the theme file.

Themes and the Format Pane


A theme is nothing more than the definition of the formatting that you
would otherwise apply manually using the Power BI format pane. It
follows that you need to know what the format pane is and how it is
used to format dashboard objects. I will not be explaining the
intricacies of the Format Pane in this book, however, and refer you to
my book Pro Power BI Desktop for full details on how to format
dashboards manually.
Nonetheless, it is worth reminding yourself of the core elements in
the Format Pane and how formatting works at a generic level.
Essentially, formatting is a hierarchy of three elements:
Visual (a table or chart – although this could be the page as well).
Element: This is the aspect of a visual that you want to format.
This corresponds to the expandable sections of the formatting pane
in Power BI Desktop (they are also called tabs or cards). The X axis
section for a chart is an example of this.
Property (often referred to as an attribute): This is the specific
setting you define. This could be the font color, for instance.
You can see this (for a stacked bar chart visual) in Figure 1-1, where
the Data labels element is expanded to show all the available properties
that you can set for data labels.
Figure 1-1 The Format Pane
It is important to bear this hierarchy in mind when creating theme
files, as the entire JSON structure is predicated on this nested approach
– as will be explained further in Chapter 3.

Writing JSON Files


As you will have to write or adapt actual JSON files for all but the
simplest theme files, you will need to choose a tool to carry out your
modifications. As JSON is a text-based format, there is a plethora of
tools that are available to do this. It is entirely up to you to select a tool
that you are happy with. A few that I have used are
Notepad
Notepad++
Visual Studio
Visual Studio Code
An online JSON editor
There are literally dozens of tools available, and the choice of an
application to use is entirely up to you. My only advice is to find
something that you are comfortable with and that provides you with
the balance of usability and power that you require. Above all, it must
be able to save or export text files. As, in practice, you are likely to test
and revise your choices over and over again, the tool that you choose
needs to have multiple levels of undo and redo as well as having a
powerful search and replace capability.
A tool that displays JSON in an easy-to-read format is a must when
writing theme files for Power BI. This is because the JSON structure
used by Power BI Desktop can get intricate, and consequently it helps
considerably to be able to see the nested levels of text and how they are
structured. However, I don’t want to get too far ahead, yet, so will come
back to this later in the book.
If you have not yet made up your mind, I suggest downloading
Notepad++. This is a free text editor that can display JSON in a very
readable format.

Applying Themes
Before looking at how you create your own themes, it is probably best
that I remind you of the far-reaching effects that themes can deliver.
Hopefully, this will incentivize you to want to learn more and encourage
you how to create your own theme files.
Take, for instance, a very simple dashboard like the one shown in
Figure 1-2. (This is the file SampleDashboard.pbix from the sample
files.)

Figure 1-2 An unformatted dashboard

This dashboard is strictly “plain vanilla.” That is, no formatting has


been applied at all. Imagine that this dashboard were a 15-page report
and that you have to make it not only presentable but also mapping to a
corporate standard. This could take hours in a worst-case scenario.
However, you are fortunate enough to have a theme JSON file
available that defines all the corporate standards. To apply it, all you
have to do is
1. Click View to activate the View ribbon.

2. Click the Themes popup.


3. Click Browse for themes.

4. Navigate to the sample files and select the theme file


(BaseTheme.json in this example).

5. Click Open. After a few seconds, you will see the dialog in Figure 1-
3.

Figure 1-3 Successful theme file import


6. Click Close.

That is it! Your dashboard (every object on every page) is now


formatted, instantly. The result is shown in Figure 1-4.
Figure 1-4 A dashboard after applying a theme file
You can now add any final formatting that you require to override
the theme at the level of individual elements (a theme, after all, is a
time-saver – not a straitjacket). The end result is almost certainly that
you have saved a vast amount of time adding presentational touches
and have ensured that your dashboard conforms to a standard look and
feel.

Note The theme file that you applied in this example is not
designed to show off subtleties of dashboard design – nor is it based
on cutting-edge design principles. It is, however, designed to
illustrate how quick and easy it is to reformat an entire dashboard
using a theme file.

Conclusion
In this chapter, you have seen what themes are all about and exactly
how powerful they can be. It is time, now, to move on to creating your
own themes. Initially, we will begin by using Power BI Desktop to write
the JSON for you – as you will discover in the next chapter.
© The Author(s), under exclusive license to APress Media, LLC, part of Springer
Nature 2021
A. Aspin, Pro Power BI Theme Creation
https://doi.org/10.1007/978-1-4842-7068-4_2

2. Create and Customize a Theme in


Power BI Desktop
Adam Aspin1
(1) STAFFORD, UK

If you do not come from an IT background (or have never used JSON
files before), and the thought of hand-crafting complex text structures
fills you with dread, then now is the time to relax and breathe deeply,
because it is ridiculously easy to define a simple yet powerful Power BI
theme file without writing or modifying a single line of code.
This is because Power BI Desktop allows you to specify (in a few
clicks) a core subset of formatting attributes that will apply to your
entire dashboard. Not only that, but once you have defined these
attributes, Power BI Desktop will write the JSON theme file for you so
that you can use it in other dashboards – or share with colleagues. All
this is done using the Customize current theme option of the Themes
button in the View menu.
While this approach does not let you craft every precise formatting
attribute of each individual type of visual, it does allow you to create a
standard presentation style in a few minutes at most – and you can
subsequently take this theme as a basis for further development. What
is more, the resulting theme file is an excellent introduction to how
JSON themes function in Power BI.
Be aware, nonetheless, that creating themes using the Power BI
Desktop interface does not allow you to attain the sophisticated levels
of presentation that you can deliver using “hand-crafted” JSON. So it is
best to consider the techniques that you will discover in this chapter
both as a practical introduction to the subject of themes and also as an
extremely fast way of developing simple style principles that can be
applied to entire dashboards.
To provide a little structure to the process, this “interactive theme
generation” directly inside Power BI Desktop breaks down the theme
elements that you can alter into the following five categories:
Name and colors: Where you can give your theme a name and
specify the color palette and key colors to use in a dashboard
Text: Where you can define core text attributes such as font, size,
and color for various elements in a dashboard
Visuals: Where you can specify key common attributes of all
visuals
Page: Where you can set basic attributes of the dashboard pages
Filter pane: That allows you to specify the way that the filter pane
appears
You do not have to specify every option that Power BI Desktop
makes available in the Customize current theme dialogs. You can
change a couple of options – or reset everything that is available (and
all steps in between).

Creating a Simple Theme


To get you started, let’s create a very simple JSON theme file that alters
a few of the colors in the color palette that Power BI Desktop uses for
color selection.
1. Activate the View menu.

2. Click the popup for the Themes. You will see something like the
options shown in Figure 2-1.
Figure 2-1 The Themes popup
3. Click Customize current theme. The dialog shown in Figure 2-2 will
appear.

Figure 2-2 The Customize theme dialog

4. Select different colors for the first few Theme colors in the dialog
(these correspond to the colors in the standard Power BI color
palette, from left to right starting at the third column). It is worth
noting that you cannot alter the first two (monochrome) colors in
the color palette.
5. Click Apply. The selected colors will be applied to the current
dashboard.

6. Click View ➤ Themes ➤ Save current theme. The Save As dialog


will appear.
7. Browse to a suitable directory and enter a name for the theme file.
This file must have the extension .json.

8. Click Save.

That is it! You now have a fully functioning JSON theme file that you
can apply to other dashboards. You can see the effect of the theme
simply by displaying the Color popup for any element in a dashboard
where this theme file has been applied. You will see that the top row of
the available colors has changed to display the colors that you selected
in step 4 earlier (well, for all but the first two colors which will always
remain white and black).
The choices that you just made are, fortunately, not set in stone. So
you can alter the theme settings at any time by repeating the process
that you just applied and selecting any of the available options and
resaving the theme file.

Note When you resave a theme file, Power BI Desktop does not
remember the name that you last used and will default to
Theme.json. Remember to select the previous file name before
clicking Save if you want to update the existing file. You will, of
course, have to confirm that you wish to overwrite the existing file.

Name and Color Settings


A customized theme can define much more than simply the color
palette. So, now that the basics have been explained, it is time to review
all the customizable options that are available using the Power BI
Desktop theme interface. These are all available in the dialog that you
saw in Figure 2-2.
Name: This field that appears at the top of the Customize
theme/Name and colors tab (although it is not visible in Figure 2-2)
allows you to add a text description inside the actual JSON file. This
can be useful for tracking the evolution of your definition of themes –
or simply reminding you what a particular theme is used for.
Sentiment colors: These are used in KPI and waterfall charts to
indicate positive, negative, or neutral results.
Divergent colors: These are used in conditional formatting to show
when data falls inside a range.
Advanced (colors): The advanced options allow you to set a series of
six colors that will be applied to a wide range of Power BI dashboard
elements. You can see the Customize theme/Advanced tab in Figure
2-3.
Figure 2-3 The Customize theme/Advanced tab
As the names of each of these color elements are somewhat
abstract, here is the full list of the elements that each color setting will
modify:
First-level elements: (Labels background color (when outside data
points), trend line color, textbox default color, table and matrix values
and totals font colors, data bars axis color, card data labels, gauge
callout value color, KPI goal color, KPI text color, slicer item color
(when in focus mode), slicer dropdown item font color, slicer
numeric input font color, slicer header font color, scatter chart ratio
line color, line chart forecast line color, map leader line color, filter
pane and card text color)
Second-level elements: “Light” secondary text classes, label colors,
legend label color, axis label color, table and matrix header font color,
gauge target and target leader line color, KPI trend axis color, slicer
slider color, slicer item font color, slicer outline color, line chart hover
color, multi-row card title color, ribbon chart stroke color, shape map
border color, button text font color, button icon line color, button
outline color
Third-level elements: Axis gridline color, table and matrix grid
color, slicer header background color (when in focus mode), multi-
row card outline color, shape fill color, gauge arc background color,
applied filter card background color, disabled button outline color
Fourth-level elements: Legend dimmed color, card category label
color, multi-row card category labels color, multi-row card bar color,
funnel chart conversion rate stroke color, disabled button text font
color, disabled button icon line color
Background elements: Labels background color (when inside data
points), slicer dropdown items background color, donut chart stroke
color, treemap stroke color, combo chart background color, button fill
color, filter pane and available filter card background color
Secondary background elements: Table and matrix grid outline
color, shape map default color, ribbon chart ribbon fill color (when
match series option is turned off), when background is not set to
FFFFFF, the disabled button fill color, and the disabled button outline
color
To give you some idea of how these formats are applied, take a look
at Figure 2-4. Please note that this dashboard is not a complete
reference – it just aims to show you how the principle of general color
settings works.

Figure 2-4 Anatomy of high-level color customization

Text Settings
As you might expect, there is also a set of text formats that you can
define as part of a custom theme. Again, to make defining the elements
easier, they are subset into a number (four in this case) of distinct
elements. These subelements are
General: Formats table and matrix column headers, matrix row
headers, table and matrix grid, table and matrix values
Title: Formats category axis title, value axis title, multi-row card title,
slicer header
Cards and KPIs: Formats card data labels, KPI indicators
Tab headers: Formats key influencers headers
Each of the tables corresponding to one of these subelements allows
you to set the
Font
Font size
Font color
Let’s look at each of these subelements individually.
The Customize theme/Text/General tab looks like Figure 2-5.

Figure 2-5 The Customize theme/Text/General tab

Note As you will see in subsequent chapters, this setting


corresponds to the label element in JSON.

The Customize theme/Text/Title tab looks like Figure 2-6.


Figure 2-6 The Customize theme/Text/Title tab

Note As you will see in subsequent chapters, this setting


corresponds to the title element in a JSON theme.

The Customize theme/Text/Cards and KPIs tab looks like Figure 2-7.
Figure 2-7 The Customize theme/Text/Cards and KPIs tab

Note As you will see in subsequent chapters, this setting


corresponds to the callout element in JSON.

The Customize theme/Text/Tab headers tab looks like Figure 2-8.


Figure 2-8 The Customize theme/Text/Tab headers tab

Note As you will see in subsequent chapters, this setting


corresponds to the header element in JSON.

To give you some idea of how these text formats are applied, take a look
at Figure 2-9. Please note that this drawing is not a complete reference
– once again, the idea is simply to show you how the principle of
general color settings works.
Figure 2-9 Anatomy of high-level text customization

Note You can see from this image that the colors defined in the
name and colors section override colors set in the text section.

Visual Settings
All visuals in Power BI contain a core set of elements whose format you
can define globally. This ensures a standard look and feel for all the
built-in visuals that you create in a dashboard. The elements that you
can define are
Background: The background color and transparency of a visual
Border: The visual’s border attributes
Header: A visual header (including its visibility)
Tooltip: The colors of the popup tooltip elements
Each of these elements corresponds very closely to the standard
cards (also called elements or sections) that you are used to dealing
with when formatting visuals in the format pane of Power BI Desktop.
They show the same attributes that you have probably tweaked many
times, but presented slightly differently.
Let’s take a detailed look at the way that these settings can be
customized by looking at the four tabs in the Visuals section of the
Customize theme dialog.
The Customize theme/Visuals/Background tab looks like Figure 2-
10. This tab lets you set the color of the background for all visuals as
well as the level of transparency.

Figure 2-10 The Customize theme/Visuals/Background tab


The Customize theme/Visuals/Border tab looks like Figure 2-11. As
you might expect, this tab lets you specify whether a border is required,
and if it is, what color the border should be. You can also define the
border as having rounded corners by setting a radius figure.
Figure 2-11 The Customize theme/Visuals/Border tab
The Customize theme/Visuals/Header tab (shown in Figure 2-12)
allows you to set the essential attributes of all visual headers.
Specifically, you can define
The header background color
The header border color
The header transparency
The color of the icons in the header
Figure 2-12 The Customize theme/Visuals/Header tab
The Customize theme/Visuals/Tooltip tab enables you to define the
background, label, and value font colors for all popup tooltips.
It looks like Figure 2-13.
Figure 2-13 The Customize theme/Visuals/Tooltip tab

Page Settings
There are two settings that you can modify as far as defining the page
formatting when creating a JSON theme file with Power BI Desktop is
concerned. These are
The wallpaper (the area outside the page itself)
The page background (the color of the page underneath any visuals)
These settings are accessed using the Customize theme/Page dialog.
The Customize theme/Page/Wallpaper tab looks like Figure 2-14.
Figure 2-14 The Customize theme/Page/Wallpaper tab
As you can see in Figure 2-15 the Customize theme/Page/Page
background tab, you can also set the color and transparency of the page
background.
Figure 2-15 The Customize theme/Page/Page background tab

Filter Pane Settings


The final aspect of customized themes that you can define concerns the
filter pane. Fairly logically, this is broken down into three areas:
The filter pane itself
Available filter cards
Applied filter cards
The first pane that you can use is the Customize theme/Filter
pane/Filter pane tab. This contains options to define
Background color
Transparency
Font and icon color
Title font size
Header font size
Checkbox and Apply color
You can see this in Figure 2-16.

Figure 2-16 The Customize theme/Filter pane/Filter pane tab

The second pane (shown in Figure 2-17) that you can use is the
Customize theme/Filter pane/Available filter cards tab. This contains
options to define (for the filter cards inside the filter pane)
Background color
Transparency
Font and icon color
Font size

Figure 2-17 The Customize theme/Filter pane/Available filter cards tab


The final pane in this dialog that you can use is the Customize
theme/Filter pane/Applied filter cards tab. This sets the formatting for
any active filters in the filter pane. This pane, which you can see in
Figure 2-18, contains options to define filter cards when a filter is set.
They are
Background color
Transparency
Font and icon color
Another random document with
no related content on Scribd:
army of the Czar, or the omnipresent police of the Kaiser. In
Richmond, and Charleston, and New Orleans, the citizens are as
careless and gay as in Boston or London, and their servants a
thousand times as childlike and cordial, to all appearance, in their
relations with them as our servants are with us. But go to the bottom
of this security and dependence, and you come to police machinery
such as you never find in towns under free government: citadels,
sentries, passports, grape-shotted cannon, and daily public
whippings for accidental infractions of police ceremonies. I happened
myself to see more direct expression of tyranny in a single day and
night at Charleston, than at Naples [under Bomba] in a week; and I
found that more than half the inhabitants of this town were subject to
arrest, imprisonment, and barbarous punishment, if found in the
streets without a passport after the evening ‘gun-fire.’ Similar
precautions and similar customs may be discovered in every large
town in the South.
“Nor is it so much better, as is generally imagined, in the rural
districts. Ordinarily there is no show of government any more than at
the North: the slaves go about with as much apparent freedom as
convicts in a dockyard. There is, however, nearly everywhere,
always prepared to act, if not always in service, an armed force, with
a military organization, which is invested with more arbitrary and
cruel power than any police in Europe. Yet the security of the whites
is in a much less degree contingent on the action of the ‘patrols’ than
upon the constant, habitual, and instinctive surveillance and authority
of all white people over all black. I have seen a gentleman, with no
commission or special authority, oblige negroes to show their
passports, simply because he did not recognize them as belonging
to any of his neighbours. I have seen a girl, twelve years old, in a
district where, in ten miles, the slave population was fifty to one of
the free, stop an old man on the public road, demand to know where
he was going, and by what authority, order him to face about and
return to his plantation, and enforce her command with turbulent
anger, when he hesitated, by threatening that she would have him
well whipped if he did not instantly obey. The man quailed like a
spaniel, and she instantly resumed the manner of a lovely child with
me, no more apprehending that she had acted unbecomingly, than
that her character had been influenced by the slave’s submission to
her caprice of supremacy; no more conscious that she had
increased the security of her life by strengthening the habit of the
slave to the master race, than is the sleeping seaman that he
tightens his clutch of the rigging as the ship meets each new billow.
“There is no part of the South in which the people are more free from
the direct action of slavery upon the character, or where they have
less to apprehend from rebellion, than Eastern Tennessee. Yet, after
the burning of a negro near Knoxville, a few years ago, the deed was
justified, as necessary for the maintenance of order among the
slaves, by the editor of a newspaper (the Register), in the following
terms:—‘It was,’ he observed, ‘a means of absolute, necessary self-
defence, which could not be secured by an ordinary resort to the
laws. Two executions on the gallows have occurred in this county
within a year or two past, and the example has been unavailing. Four
executions by hanging have taken place, heretofore, in Jefferson, of
slaves guilty of similar offences, and it has produced no radical terror
or example for the others designing the same crimes, and hence any
example less horrible and terrifying would have availed nothing
here.’
“The other local paper (the Whig), upon the same occasion, used the
following language:—
“‘We have to say in defence of the act, that it was not perpetrated by
an excited multitude, but by one thousand citizens—good citizens at
that—who were cool, calm, and deliberate.’
“And the editor, who is a Methodist preacher, presently adds, after
explaining the enormity of the offence with which the victim was
charged—‘We unhesitatingly affirm that the punishment was unequal
to the crime. Had we been there we should have taken a part, and
even suggested the pinching of pieces out of him with red-hot
pincers—the cutting off of a limb at a time, and then burning them all
in a heap. The possibility of his escaping from jail forbids the idea of
awaiting the tardy movements of the law.’ [Although one thousand
trusty citizens volunteered to guard him at the stake.]
“How much more horrible than the deed are these apologies for it.
They make it manifest that it was not accidental in its character, but a
phenomenon of general and fundamental significance. They explain
the paralytic effect upon the popular conscience of the great calamity
of the South. They indicate a necessary tendency of people living
under such circumstances to return in their habits of thought to the
dark ages of mankind. For who, from the outside, can fail to see that
the real reason why men in the middle of the nineteenth century, and
in the centre of the United States, are publicly burned at the stake, is
one much less heathenish, less disgraceful to the citizens than that
given by the more zealous and extemporaneous of their journalistic
exponents—the desire to torture the sinner proportionately to the
measure of his sin. Doubtless, this reverend gentleman expresses
the utmost feeling of the ruling mind of his community. But would a
similar provocation have developed a similar avenging spirit in any
other nominally Christian or civilized people? Certainly not. All over
Europe, and in every Free State—California, for significant reasons,
temporarily excepted—in similar cases, justice deliberately takes its
course; the accused is systematically assisted in defending or
excusing himself. If the law demands his life, the infliction of
unnecessary suffering, and the education of the people in violence
and feelings of revenge, is studiously avoided. Go back to the
foundation of the custom which thus neutralizes Christianity among
the people of the South, which carries them backward blindly against
the tide of civilization, and what do we find it to be? The editor who
still retains moral health enough to be suspected—as men more
enlightened than their neighbours usually are—of heterodoxy,
answers. To follow the usual customs of civilization elsewhere would
not be felt safe. To indulge in feelings of humanity would not be felt
safe. To be faithful to the precepts of Christ would not be felt safe. To
act in a spirit of cruel, inconsiderate, illegal, violent, and pitiless
vengeance, must be permitted, must be countenanced, must be
defended by the most conservative, as a ‘means of absolute,
necessary self-defence.’ To educate the people practically otherwise
would be felt to be suicidal. Hence no free press, no free pulpit, no
free politics can be permitted in the South. Hence every white
stripling in the South may carry a dirk-knife in his pocket, and play
with a revolver before he has learned to swim.”[68]
I happened to pass through Tennessee shortly after this tragedy, and
conversed with a man who was engaged in it—a mild, common-
sense native of the country. He told me that there was no evidence
against the negro but his own confession. I suggested that he might
have been crazy. “What if he was?” he asked with a sudden asperity.
What if he was, to be sure? The slaves who were brought together to
witness his torture were not insane. They were at least capable of
instruction. That day they were given a lesson; were taught to know
their masters better; were taught that when ordinary and legal
discipline failed, resort would be had to more potent means of
governing them. A better informed man, having regard to the
ignorance of a stranger, might have answered me: “It was of no
consequence, practically, whether he were sane or mad. We do not
wish our slaves to study the right and the wrong of every exciting
occurrence. To say that being mad the negro was not responsible,
therefore not guilty of a crime, therefore not to be punished, would
be proclaiming to them that only that which is wrong is to be
dreaded. Whatever offends us, whatever is against our will and
pleasure, is what a slave must be made to dread.”
Constantly, and everywhere throughout the South, are there
occurrences of this significance; I do not say as horrible, though I
can answer for it, that no year in the last ten has passed without
something as bad;[69] but constantly and everywhere of the same
nature, of the same impulse, the same reasoning, the same
purposes, the same disregard of principles of society, which no
people can ever set aside and not have reason to feel their situation
insecure. It is false, it is the most dangerous mistake possible to
assume that this feeling of insecurity, this annihilation of the only
possible basis of security in human society, is, in the slightest
degree, the result of modern agitation. It is the fundamental law of
slavery, as distinctly appears in the decision of Justice Ruffin, of
North Carolina, in the case of the State v. Mann.[70] The American
system of slavery from its earliest years (as shown p. 496,
“Seaboard Slave States”), and without cessation to the present time,
has had this accompaniment. Less in the last twenty years, if
anything, than before. Would it not be more just to say that this
element of the present system was the cause of agitation? Must not
the determined policy of the South to deal with slavery on the
assumption that it is, in its present form, necessary, just, good, and
to be extended, strengthened, and perpetuated indefinitely, involve
constant agitation as a necessary incident of the means used to
carry it out? I do not say with you or with me, reader, but with a
goodly number of any civilized community? Do you not, who wish to
think otherwise, consider that it will always require what you must
deem a superior mind not to be overcome by incidents necessary to
the carrying out of this determination? And will not such agitation
give renewed sense of danger, and occasion renewed demands for
assurance from us?
I have remarked before that in no single instance did I find an inquiry
of the owner or the overseer of a large plantation about the poor
whites of its vicinity fail to elicit an expression indicating habitual
irritation with them. This equally with the polished and tranquil
gentleman of South Carolina and the rude pioneer settler of Texas,
himself born a dirt-eating sand-hiller. It was evident in most cases,
and in one it was distinctly explained to me by a Louisianian planter,
that the reason of this was not merely the bad effect upon the
discipline of the plantation, which was had by the intercourse
between these people and the slaves, but that it was felt that the
contrast between the habits of the former—most of the time idle, and
when working, working only for their own benefit and without a
master—constantly offered suggestions and temptations to the
slaves to neglect their duty, to run away and live a vagabond life, as
these poor whites were seen to. Hence, one of the acknowledged
advantages of very large and isolated plantations, and hence, in
part, the desire of every planter to get possession of the land of any
poor non-slaveholding neighbour.
As few Southern writers seem to have noticed this, I suppose that
few Southerners are aware how universal with planters is this
feeling. My attention being early directed to the causes of the
condition of the poor whites, I never failed to make inquiries of
planters, and of intelligent men especially, about those in their
neighbourhood; and being soon struck by the constant recurrence of
similar expressions with regard to them, I was the more careful to
introduce the subject at every proper opportunity, and, I repeat,
always with the same result. I am afraid that the feeling of the South
to the North is (more or less defined in individual minds) of the same
nature, and that the contiguity of a people whose labourers take care
of themselves, and labour industriously without being owned, can
never be felt to be safe by slaveholders. That it must always be
looked upon with apprehension, with a sense of danger, more or less
vague, more or less well defined, but always sufficient to lead to
efforts intended to counteract its natural influence—its influence not
so much with slaves, certainly not alone with the slaves, but also
with that important element of population which reaps no profit from
the good behaviour of the slaves.
In De Bow’s “Review” for January, 1850, will be found the following
passage in an article discussing the practicability of employing the
non-slaveholding whites in factories, the argument being that there
will be less danger of their becoming “Abolitionists” under such
circumstances than at present exists:-
“The great mass of our poor white population begin to
understand that they have rights, and that they, too, are
entitled to some of the sympathy which falls upon the
suffering. They are fast learning that there is an almost
infinite world of industry opening before them by which
they can elevate themselves and their families from
wretchedness and ignorance to competence and
intelligence. It is this great upheaving of our masses that
we have to fear, so far as our institutions are concerned.”
It is, in the nature of things, while slaveholders refuse the slightest
concession to the spirit of the age—while, in their legislation, they
refuse to recognize, in the slightest degree, the principles of social
science under which we live, and must live, and which every civilized
people has fully adopted, that they should endeavour to make it
appear the fault of others that they do not feel assured of safety and
at ease with themselves; that they should try to make their own
ignorant people believe that it is from without all danger is to be
apprehended—all assurance of safety to be clamoured for—that
they should endeavour to make themselves believe it.[71]
Those who seriously propose to stop all agitation on the subject of
slavery, by causing the Abolitionists to refrain from proceedings
which cause apprehension at the South, by silencing all who
entertain sentiments the utterance of which is deemed a source of
“danger to Southern institutions,” by refraining themselves from all
proceedings which will be looked upon with alarm by their fellow-
citizens of the Slave States, can know very little of what would be
required before the South were satisfied. The destruction of some
million dollars’ cost in school and text books would be one of the first
things, and yet but a small item in the undertaking. Books which
directly comment upon slavery are considered comparatively safe,
because their purpose being defined, they can be guarded against.
As is well understood, it is the insidious attacks of a free press that
are most feared. But is it well understood what are felt to be
“insidious attacks?” Some idea may be formed from the following
passages which I take, not from the heated columns of a daily
newspaper, but from the cool pages of the deliberate De Bow’s
“Review.” The apprehension they express is not of to-day; in the first
article from which I quote (which was published in the middle of Mr.
Pierce’s presidential term), reference is made to warnings of the
same character which have been sounded from time to time before;
and this very number of the “Review” contains a testimonial from
fifty-five Southern senators and representatives in Congress to the
“ability and accuracy” of its “exposition of the working of the system
of polity of the Southern States.”
“Our text books are abolition books. They are so to the
extent of their capacity.”... “We have been too careless
and indifferent to the import of these things.”
“And so long as we use such works as ‘Wayland’s Moral
Science,’ and the abolition geographies, readers, and
histories, overrunning, as they do, with all sorts of
slanders, caricatures, and blood-thirsty sentiments, let us
never complain of their [northern Church people’s] use of
that transitory romance [Uncle Tom’s Cabin]. They seek to
array our children by false ideas, against the established
ordinance of God; and it sometimes takes effect. A
professor in one of our Southern seminaries, not long
since placed in the hands of a pupil ‘Wayland’s Moral
Science,’ and informed her that the chapter on slavery
was heretical and unscriptural, and that she would not be
examined on that chapter, and need not study it. Perhaps
she didn’t. But on the day of examination she wished her
teacher to tell her ‘if that chapter was heretical how she
was to know but they were all so?’ We might enumerate
many other books of similar character and tendencies. But
we will refer to only one more—it is ‘Gilbert’s Atlas’—
though the real author’s name does not appear on the title
page. On the title page it is called ‘Appleton’s Complete
Guide of the World;’ published by D. Appleton & Co, New
York. This is an elegant and comprehensive volume,
endorsed by the Appletons and sent South, containing
hidden lessons of the most fiendish and murderous
character that enraged fanaticism could conceive or indite.
[72] It is a sort of literary and scientific infernal machine.
And whatever the design may have been, the tendency is
as shocking as the imagination can picture.... This is the
artillery and these the implements England and our own
recreant sister States are employing to overturn the order
of society and the established forms of labour that date
back beyond the penning of the decalogue.... This book,
and many other Northern school-books scattered over the
country, come within the range of the statutes of this State,
which provide for the imprisonment for life or the infliction
of the penalty of death upon any person who shall ‘publish
or distribute’ such works; and were I a citizen of New
Orleans, this work should not escape the attention of the
grand jury. But need I add more to convince the sceptical
of the necessity there is for the production of our own text-
books, and, may I not add, our own literature? Why should
the land of domestic servitude be less productive in the
great works of the mind now than when Homer evoked the
arts, poetry, and eloquence into existence? Moses wrote
the Genesis of Creation, the Exodus of Israel, and the
laws of mankind? and when Cicero, Virgil, Horace, St.
John, and St. Paul became the instructors of the world?
[73]... They will want no cut-throat literature, no fire-brand
moral science ... nor Appleton’s ‘Complete Atlas,’ to
encourage crimes that would blanch the cheek of a pirate,
nor any of the ulcerous and polluting agencies issuing
from the hot-beds of abolition fanaticism.”
From an article on educational reform at the South, in the same
“Review,” 1856, I take the following indications of what, among other
Northern doings, are considered to imperil the South:—
“‘Lovell’s United States Speaker,’ the ‘National Reader,’
the ‘Young Ladies’ Reader,’ ‘Columbian Orator,’ ‘Scott’s
Lessons,’ the ‘Village Reader,’ and numerous others, have
been used for years, and are all, in some respects,
valuable compilations. We apprehend, however, there are
few parents or teachers who are familiar with the whole of
their contents, or they would demand expurgated editions
for the use of their children. The sickly sentimentality of
the poet Cowper, whose ear became so ‘pained,’ and his
soul ‘sick with every day’s report of wrong and outrage,’
that it made him cry out in agony for ‘a lodge in some vast
wilderness,’ where he might commune with howling
wolves and panthers on the blessings of liberty (?),
stamps its infectious poison upon many of the pages of
these works.”...
“From the American First Class Book, page 185, we quote
another more modern sentiment, which bears no less
higher authority than the name of the great Massachusetts
statesman, Mr. Webster:”
Having burnt or expurgated Webster and Cowper, is it to be
imagined that the leaders of opinion in the South would yet be willing
to permit familiar intercourse between themselves and a people who
allowed a book containing ‘Such lines as these to circulate freely?—

“What is a man
If his chief good and market of his time
Be but to sleep and feed? A beast, no more.
Sure, He that made us with such large discourse,
Looking before and after, gave us not
That capability and Godlike reason,
To rust unused.”

What a dangerous sentiment to come by any chance to a slave! Is it


not? Are you, then, prepared to burn your Shakespeare? I will not
ask if you will have another book “expurgated,” of all passages the
tendency of which is to set the bondmen free.
If the security of life and property at the South must for ever be
dependent on the thoroughness with which the negro population is
prevented from acquiring knowledge; from thinking of themselves
and for themselves, it will never be felt to be greater than it is to-day.
Efforts made to increase this security will of themselves occasion
agitation, and agitation must counteract those efforts. Knowledge,
knowledge of what is going on elsewhere, of the condition of men
elsewhere, of what is thought elsewhere, must have increased
currency with every class of mankind in all parts of this continent, as
it increases in population, and the movements of its population
increase in activity and importance. No human laws, embargoes, or
armies and navies can prevent it. Do our utmost, we cannot go back
of the steam-engine, the telegraph, the cotton-gin, and the cylinder
press. The South has admitted steamboats and railroads. It was not
practicable to stop with these, and bar out all the rest that is peculiar
to the nineteenth century. Is it practicable to admit the machinery of
modern civilized life, and not stir up its free people? Is it practicable
to stir up its intermediate class, and keep its lowest torpid? Assuredly
the security which depends upon preventing either of these steps
can never be permanently increased; spite of all possible further
extension of slave territory, and dispersion and disconnection of
plantations, it must gradually lessen. As it lessens, the demand upon
the nation to supply new grounds of security must increase—
increase continually, until at length, this year, next year, or another,
they conclusively and hopelessly fail. It may cost us much or it may
cost us little to reach that point, but it is inevitably to be reached. It
may be after long and costly civil war, or longer and more costly
foreign wars, or it may be peaceably, sensibly, and soon, but it must
come. The annexation of Cuba, international fugitive slave laws,[74]
the African slave trade, judgments of the Supreme Court, and
whatever else may be first asked and given, will not prevent it—
nothing the North will do, nothing the North can do, will prevent it.
The proximity of a people who cannot hold labour in contempt; who
cannot keep labourers in ignorance and permanent dependence
each upon another man; who cannot have an effective censorship of
the press, or a trustworthy army of mouchards, prevents, and must
always prevent, the South from standing with the slightest
confidence of safety on that policy which it proclaims to be its only
ground of safety. Nothing but a reversal of the current of our
Northern history for half a century, nothing, in fact, but the
enslavement of labour at the North, could in the nature of things,
give that security, even temporarily, to the capitalists of labour at the
South which they need.[75] Some demand of the South upon the
nation, acquiescence in which it holds essential to its safety, must
then at length be distinctly refused. And when, ten or twenty years
hence, if so be, this shall come to pass, what then is to happen to
us?
Dissolution?
This is what many Southern politicians avow, whenever they
contemplate such a contingency.
Why?
Because it is known that the people of the North are unwilling that
the Union should be dissolved, whereas they have no indisposition
to the only course which it will then be possible for the South to
adopt, for the sake of increasing the security of its citizens, against
insurrectionary movements of its slaves. This plainly would be to
arrange a systematic opportunity and method for the slaves to
labour, whenever they chose, and as much as they might choose, in
an orderly, peaceable, and wise way, for their own release and
improvement, each man for himself and those most dear to him;
each man by himself, independently, openly, with no occasion for
combination, secrecy, plots, or conspiracy. To prepare, for those
disposed to avail themselves of it, a field, either here or elsewhere,
in which their capability and Godlike reason, such as it may be, little
or great, need not be forced by law to rust unused, or brighten only
to the material advantage of a master. This I must think to be
consciously, even now, the only final course of safety before every
reflective Southern mind. This, or——dissolution, and the chances of
war.

[The above was written before Mr. Lincoln was spoken of as a


candidate for the Presidency.]
APPENDIX (A.)
THE CONDITION OF VIRGINIA.—STATISTICS.

1.
The Richmond Enquirer, a strong and influential pro-slavery
newspaper of Virginia, in advocating some railroad projects, thus
describes the progress of the State relatively to that of some of the
Free States, since the Revolution. (Dec. 29, 1852.)
“Virginia, anterior to the Revolution, and up to the adoption
of the Federal Constitution, contained more wealth and a
larger population than any other State of this Confederacy.
***
“Virginia, from being first in point of wealth and political
power, has come down to the fifth in the former, and the
fourth in the latter. New York, Pennsylvania,
Massachusetts, and Ohio stand above her in wealth, and
all, but Massachusetts, in population and political power.
Three of these States are literally chequered over with
railroads and canals; and the fourth (Massachusetts) with
railroads alone. * * *
“But when we find that the population of the single city of
New York and its environs exceeds the whole free
population of Eastern Virginia, and the valley between the
Blue Ridge and Alleghany, we have cause to feel deeply
for our situation. Philadelphia herself contains a population
far greater than the whole free population of Eastern
Virginia. The little State of Massachusetts has an
aggregate wealth exceeding that of Virginia by more than
one hundred and twenty-six millions of dollars—a State,
too, which is incapable of subsisting its inhabitants from
the production of its soil. And New York, which was as
much below Massachusetts, at the adoption of the Federal
Constitution, in wealth and power, as the latter was below
Virginia, now exceeds the wealth of both. While the
aggregate wealth of New York, in 1850, amounted to
$1,080,309,216, that of Virginia was $436,701,082—a
difference in favour of the former of $643,608,134. The
unwrought mineral wealth of Virginia exceeds that of New
York. The climate and soil are better; the back country,
with equal improvements, would contribute as much.”
The same journal adds, on another occasion:—
“In no State of the Confederacy do the facilities for
manufacturing operations exist in greater profusion than in
Virginia. Every condition essential to success in these
employments is found here in prodigal abundance, and in
a peculiarly convenient combination. First, we have a
limitless supply of water power—the cheapest of motors—
in localities easy of access. So abundant is this supply of
water power that no value is attached to it distinct from the
adjacent lands, except in the vicinity of the larger towns.
On the Potomac and its tributaries; on the Rappahannock;
on the James and its tributaries; on the Roanoke and its
tributaries; on the Holston, the Kanawha, and other
streams, numberless sites may now be found where the
supply of water power is sufficient for the purposes of a
Lawrence or a Lowell. Nor is there any want of material for
building at these localities; timber and granite are
abundant; and, to complete the circle of advantages, the
climate is genial and healthful, and the soil eminently
productive. * * * Another advantage which Virginia
possesses, for the manufacture of cotton, is the proximity
of its mills to the raw material. At the present prices of the
staple, the value of this advantage is estimated at 10 per
cent.”
The Lynchburg Virginian, another newspaper of respectability,
having a similar purpose in hand, namely, to induce capitalists to
invest their money in enterprises that shall benefit the State,
observes that—
“The coal fields of Virginia are the most extensive in the
world, and her coal is of the best and purest quality. Her
iron deposits are altogether inexhaustible, and in many
instances so pure that it is malleable in its primitive state;
and many of these deposits in the immediate vicinity of
extensive coal-fields. She has, too, very extensive
deposits of copper, lead, and gypsum. Her rivers are
numerous and bold, generally with fall enough for
extensive water power.
“A remarkable feature in the mining and manufacturing
prospects of Virginia is, the ease and economy with which
all her minerals are mined; instead of being, as in England
and elsewhere, generally imbedded deep within the
bowels of the earth, from which they can be got only with
great labour and at great cost, ours are found everywhere
on the hills and slopes, with their ledges dipping in the
direction of the plains below. Why, then, should not
Virginia at once employ at least half of her labour and
capital in mining and manufacturing? Richmond could as
profitably manufacture all cotton and woollen goods as
Lowell, or any other town in New England. Why should not
Lynchburg, with all her promised facility of getting coal and
pig metal, manufacture all articles of iron and steel just as
cheaply, and yet as profitably, as any portion of the
Northern States? Why should not every town and village
on the line of every railroad in the State, erect their shops,
in which they may manufacture a thousand articles of daily
consumption, just as good and cheap as they may be
made anywhere? * * *
“Dependent upon Europe and the North for almost every
yard of cloth, and every coat, and boot, and hat we wear;
for our axes, scythes, tubs, and buckets—in short, for
everything except our bread and meat!—it must occur to
the South that if our relations with the North should ever
be severed—and how soon they may be, none can know
(may God avert it long!)—we would, in all the South, not
be able to clothe ourselves. We could not fell our forests,
plough our fields, nor mow our meadows. In fact, we
would be reduced to a state more abject than we are
willing to look at even prospectively. And yet, with all these
things staring us in the face, we shut our eyes, and go on
blindfold.”
At the Convention for the formation of the Virginia State Agricultural
Society, in 1852, the draft of an address to the farmers of the State
was read, approved, and once adopted by the Convention. The vote
by which it was adopted was soon afterwards reconsidered, and it
was again approved and adopted. A second time it was
reconsidered; and finally it was rejected, on the ground that there
were admissions in it that would feed the fanaticism of the
Abolitionists. No one argued against it on the ground of the falsity or
inaccuracy of these admissions. Twenty of the most respectable
proprietors in the State, immediately afterwards, believing it to
contain “matter of grave import,” which should not be suppressed for
such a reason, united in requesting a copy of it for publication. In the
note of these gentlemen to the author, they express the belief that
Virginia now “possesses the richest soil, most genial climate, and
cheapest labour on earth.” The author of the address, in his reply,
says: “Fanaticism is a fool for whose vagaries I am not responsible. I
am a pro-slavery man—I believe it, at this time, impossible to abolish
it, and not desirable if it were possible.”
The address was accordingly published, and I make the following
extracts from it:—
“ADDRESS TO THE FARMERS OF VIRGINIA.
“‘The Southern States stand foremost in agricultural
labour, though they hold but the third rank in population.’
At the head of these Southern States, in production, in
extent of territory, in climate, in soil, and in population,
stands the Commonwealth of Virginia. She is a nation of
farmers. Eight-tenths of her industry is expended upon the
soil; but less than one-third of her domain is in pasturage,
or under the plough.
“Out of somewhat more than thirty-nine millions of acres,
she tills but little over ten millions of acres, or about
twenty-six and a quarter per cent., whilst New York has
subdued about forty-one per cent., or twelve and a quarter
out of her twenty-nine and a half millions of acres: and
Massachusetts, with her sterile soil and inhospitable
climate, has reclaimed from the forest, the quarry, and the
marsh, about forty-two and a half per cent., or two and
one-eighth out of her little territory of five millions of acres.
Yet, according to the census of 1840, only six-tenths of the
labour of New York, and four-tenths of that of
Massachusetts, or, relatively, one-fifth and two-fifths less
than our own, is expended upon agriculture. * * *
“The live stock of Virginia are worth only three dollars and
thirty-one cents for every arable acre; but in New York
they are worth six dollars and seven cents, and in
Massachusetts four dollars and fifty-two cents.
“The proportion of hay for the same quantity of land is, for
Virginia, eighty-one pounds; for New York, six hundred
and seventy-nine pounds; for Massachusetts, six hundred
and eighty-four pounds. * * *
“With access to the same markets, and with hundreds of
mechanics of our own, who can vie with the best Northern
manufacturers, we find that our implements are inferior,
that the New York farmer spends upon his nearly three
times as much as we do upon ours, and the
Massachusetts farmer more than double. * * *
“Manure is indispensable to good husbandry. Judging from
the history of agriculture in all other countries, we may
safely say, that farming can never attain to continued
perfection where manure is not put on with an unsparing
hand. By far the larger part of this can only be made by
stock, which should, at the same time, be made the
source of profit, at least sufficient to pay the cost of their
keep, so that, other things being equal, it is a safe rule to
estimate the condition of a farming district by the amount
of live stock it may possess, and the provision made for
their sustenance. Applied in this instance, we see that the
New York farmer has invested in live stock two dollars and
seventy-six cents, and the Massachusetts farmer one
dollar and twenty-one cents per acre more than the
Virginia farmer. In pasturage we cannot tell the difference.
It is well, perhaps, for the honour of the State, that we
cannot. But in hay, New York has five hundred and ninety-
eight pounds, and Massachusetts six hundred and three
pounds more per acre than we have. This, however, does
not present the true state of the case. Land-locked by
mountain barriers, as yet impassable for the ordinary
agricultural staples, or debarred from their production by
distance and prohibitory rates of transportation, most of
the wealth and exports of many considerable portions of
our State consists of live stock alone. What proportion
these parts bear to the whole, we have been unable
definitely to ascertain; but it is, no doubt, so great as to
warrant us in assuming a much more considerable
disparity than the statistics show in the live stock of the
whole Atlantic slope, as compared with New York and
Massachusetts. And we shall appreciate, still more highly,
the skill of the Northern farmer, if we reflect that a readier
market for every, the most trivial, product of his farm,
operates as a constant temptation to break up his rotation
and diminish his stock.
“In the above figures, carefully calculated from the data of
authentic documents,[76] we find no cause for self-
gratulation, but some food for meditation. They are not
without use to those who would improve the future by the
past. They show that we have not done our part in the
bringing of land into cultivation; that, notwithstanding
natural advantages which greatly exceed those of the two
States drawn into parallel with Virginia, we are yet behind
them both—that with forty and sixty per cent. respectively
of their industry devoted to other pursuits, into which it has
been lured by prospects of greater gain, they have done
more than we have done. * * *
“Whilst our population has increased for the last ten years,
in a ratio of 11·66, that of New York has increased in a
ratio of 27·52, and that of Massachusetts at the still
heavier and more startling rate of 34·81. With a territorial
area thirty per cent. larger than New York, we have but
little more than one-third of her Congressional
representation; and Massachusetts, only one-eighth our
size, comes within two of our number of representatives,
we being cut down to thirteen, while she rises to eleven.
And thus we, who once swayed the councils of the Union,
find our power gone, and our influence on the wane, at a
time when both are of vital importance to our prosperity, if
not to our safety. As other States accumulate the means of
material greatness, and glide past us on the road to
wealth and empire, we slight the warnings of dull statistics,
and drive lazily along the field of ancient customs, or stop
the plough, to speed the politician—should we not, in too
many cases, say with more propriety, the demagogue?
“State pride is a good thing; it is one mode in which
patriotism is manifested. But it is not always a wise one.
Certainly not, when it makes us content on small grounds.
And when it smothers up improvement in self-satisfaction,
it is a most pernicious thing. We have much to be proud of
in Virginia. In intellect and fitness to command, in personal
and social qualities, in high tone and noble bearing, in
loyalty, in generosity, and magnanimity, and
disinterestedness, above all, in moral purity, we once
stood—let us hope, still stand—preeminent among our
sister States. But the possession and practice of these
virtues do not comprise our whole duty as men or as
citizens. The great decree which has gone forth ordaining
that we shall ‘increase, and multiply, and replenish the
earth,’ enjoins upon us quite other duties, which cannot be
neglected with impunity; so we have found out by
experience—for we have neglected these duties. And
when we contemplate our field of labour, and the work we
have done in it, we cannot but observe the sad contrast
between capacity and achievement. With a wide-spread
domain, with a kindly soil, with a climate whose sun
radiates fertility, and whose very dews distil abundance,
we find our inheritance so wasted that the eye aches to
behold the prospect.”
2.
The Census of 1850 gives the following values to agricultural land in
the adjoining States of Virginia and Pennsylvania.
In Virginia. In Pennsylvania.
No. of acres 10,360,135 8,626,619
improved land in
farms,
" 15,792,176 6,294,728
unimproved,
Cash value of farms, $216,401,543— $407,876,099—
$8 an acre. $25 an acre.
Considering that, at the Revolution, Virginia had nearly twice the
population of Pennsylvania, was in possession of much more wealth
or disposable capital, and had much the best natural facilities for
external commerce and internal communication, if her political and
social constitution had been and had continued equally good, and
her people equally industrious and enterprising with those of
Pennsylvania, there is no reason why the value of her farms should
not have been, at this time, at least equal to those of Pennsylvania.
Were it so, it appears that Virginia, in that particular alone, would
now be richer than she is by four hundred and thirty millions of
dollars.
If it should be thought that this difference between the value of land
in Virginia and Pennsylvania is in some degree due to more fertile

You might also like