Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/core/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@
},
onClick: null,
defaultColor: 'rgba(0,0,0,0.1)',
defaultFontColor: '#666',
defaultFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
defaultFontSize: 12,
defaultFontStyle: 'normal',

// Element defaults defined in element extensions
elements: {},
Expand Down
8 changes: 4 additions & 4 deletions src/core/core.legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

labels: {
boxWidth: 40,
fontSize: 12,
fontStyle: "normal",
fontColor: "#666",
fontFamily: "Helvetica Neue",
fontSize: Chart.defaults.global.defaultFontSize,
fontStyle: Chart.defaults.global.defaultFontStyle,
fontColor: Chart.defaults.global.defaultFontColor,
fontFamily: Chart.defaults.global.defaultFontFamily,
padding: 10,
// Generates labels shown in the legend
// Valid properties to return:
Expand Down
16 changes: 8 additions & 8 deletions src/core/core.scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

// scale label
scaleLabel: {
fontColor: '#666',
fontFamily: 'Helvetica Neue',
fontSize: 12,
fontStyle: 'normal',
fontColor: Chart.defaults.global.defaultFontColor,
fontFamily: Chart.defaults.global.defaultFontFamily,
fontSize: Chart.defaults.global.defaultFontSize,
fontStyle: Chart.defaults.global.defaultFontStyle,

// actual label
labelString: '',
Expand All @@ -37,10 +37,10 @@
// label settings
ticks: {
beginAtZero: false,
fontSize: 12,
fontStyle: "normal",
fontColor: "#666",
fontFamily: "Helvetica Neue",
fontSize: Chart.defaults.global.defaultFontSize,
fontStyle: Chart.defaults.global.defaultFontStyle,
fontColor: Chart.defaults.global.defaultFontColor,
fontFamily: Chart.defaults.global.defaultFontFamily,
maxRotation: 90,
mirror: false,
padding: 10,
Expand Down
6 changes: 3 additions & 3 deletions src/core/core.title.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
position: 'top',
fullWidth: true, // marks that this box should take the full width of the canvas (pushing down other boxes)

fontColor: '#666',
fontFamily: 'Helvetica Neue',
fontSize: 12,
fontColor: Chart.defaults.global.defaultFontColor,
fontFamily: Chart.defaults.global.defaultFontFamily,
fontSize: Chart.defaults.global.defaultFontSize,
fontStyle: 'bold',
padding: 10,

Expand Down
14 changes: 7 additions & 7 deletions src/core/core.tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
custom: null,
mode: 'single',
backgroundColor: "rgba(0,0,0,0.8)",
titleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
titleFontSize: 12,
titleFontFamily: Chart.defaults.global.defaultFontFamily,
titleFontSize: Chart.defaults.global.defaultFontSize,
titleFontStyle: "bold",
titleSpacing: 2,
titleMarginBottom: 6,
titleColor: "#fff",
titleAlign: "left",
bodyFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
bodyFontSize: 12,
bodyFontStyle: "normal",
bodyFontFamily: Chart.defaults.global.defaultFontFamily,
bodyFontSize: Chart.defaults.global.defaultFontSize,
bodyFontStyle: Chart.defaults.global.defaultFontStyle,
bodySpacing: 2,
bodyColor: "#fff",
bodyAlign: "left",
footerFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
footerFontSize: 12,
footerFontFamily: Chart.defaults.global.defaultFontFamily,
footerFontSize: Chart.defaults.global.defaultFontSize,
footerFontStyle: "bold",
footerSpacing: 2,
footerMarginTop: 6,
Expand Down
6 changes: 3 additions & 3 deletions src/scales/scale.radialLinear.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@

pointLabels: {
//String - Point label font declaration
fontFamily: "'Arial'",
fontFamily: Chart.defaults.global.defaultFontFamily,

//String - Point label font weight
fontStyle: "normal",
fontStyle: Chart.defaults.global.defaultFontStyle,

//Number - Point label font size in pixels
fontSize: 10,

//String - Point label font colour
fontColor: "#666",
fontColor: Chart.defaults.global.defaultFontColor,

//Function - Used to convert point labels
callback: function(label) {
Expand Down
8 changes: 4 additions & 4 deletions test/core.helpers.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ describe('Core helper tests', function() {
position: "right",
scaleLabel: {
fontColor: '#666',
fontFamily: 'Helvetica Neue',
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 12,
fontStyle: 'normal',
labelString: '',
Expand All @@ -235,7 +235,7 @@ describe('Core helper tests', function() {
ticks: {
beginAtZero: false,
fontColor: "#666",
fontFamily: "Helvetica Neue",
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 12,
fontStyle: "normal",
maxRotation: 90,
Expand Down Expand Up @@ -264,7 +264,7 @@ describe('Core helper tests', function() {
position: "left",
scaleLabel: {
fontColor: '#666',
fontFamily: 'Helvetica Neue',
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 12,
fontStyle: 'normal',
labelString: '',
Expand All @@ -273,7 +273,7 @@ describe('Core helper tests', function() {
ticks: {
beginAtZero: false,
fontColor: "#666",
fontFamily: "Helvetica Neue",
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 12,
fontStyle: "normal",
maxRotation: 90,
Expand Down
4 changes: 2 additions & 2 deletions test/scale.category.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Category scale tests', function() {
position: "bottom",
scaleLabel: {
fontColor: '#666',
fontFamily: 'Helvetica Neue',
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 12,
fontStyle: 'normal',
labelString: '',
Expand All @@ -34,7 +34,7 @@ describe('Category scale tests', function() {
ticks: {
beginAtZero: false,
fontColor: "#666",
fontFamily: "Helvetica Neue",
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 12,
fontStyle: "normal",
maxRotation: 90,
Expand Down
4 changes: 2 additions & 2 deletions test/scale.linear.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Linear Scale', function() {
position: "left",
scaleLabel: {
fontColor: '#666',
fontFamily: 'Helvetica Neue',
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 12,
fontStyle: 'normal',
labelString: '',
Expand All @@ -33,7 +33,7 @@ describe('Linear Scale', function() {
ticks: {
beginAtZero: false,
fontColor: "#666",
fontFamily: "Helvetica Neue",
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 12,
fontStyle: "normal",
maxRotation: 90,
Expand Down
4 changes: 2 additions & 2 deletions test/scale.logarithmic.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Logarithmic Scale tests', function() {
position: "left",
scaleLabel: {
fontColor: '#666',
fontFamily: 'Helvetica Neue',
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 12,
fontStyle: 'normal',
labelString: '',
Expand All @@ -32,7 +32,7 @@ describe('Logarithmic Scale tests', function() {
ticks: {
beginAtZero: false,
fontColor: "#666",
fontFamily: "Helvetica Neue",
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 12,
fontStyle: "normal",
maxRotation: 90,
Expand Down
6 changes: 3 additions & 3 deletions test/scale.radialLinear.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ describe('Test the radial linear scale', function() {
lineArc: false,
pointLabels: {
fontColor: "#666",
fontFamily: "'Arial'",
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 10,
fontStyle: "normal",
callback: defaultConfig.pointLabels.callback, // make this nicer, then check explicitly below
},
position: "chartArea",
scaleLabel: {
fontColor: '#666',
fontFamily: 'Helvetica Neue',
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 12,
fontStyle: 'normal',
labelString: '',
Expand All @@ -49,7 +49,7 @@ describe('Test the radial linear scale', function() {
backdropPaddingX: 2,
beginAtZero: false,
fontColor: "#666",
fontFamily: "Helvetica Neue",
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 12,
fontStyle: "normal",
maxRotation: 90,
Expand Down
4 changes: 2 additions & 2 deletions test/scale.time.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('Time scale tests', function() {
position: "bottom",
scaleLabel: {
fontColor: '#666',
fontFamily: 'Helvetica Neue',
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 12,
fontStyle: 'normal',
labelString: '',
Expand All @@ -37,7 +37,7 @@ describe('Time scale tests', function() {
ticks: {
beginAtZero: false,
fontColor: "#666",
fontFamily: "Helvetica Neue",
fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
fontSize: 12,
fontStyle: "normal",
maxRotation: 90,
Expand Down