Skip to content

Commit

Permalink
text in energy legend is black, see #240
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Apr 30, 2020
1 parent b13f8b2 commit d967482
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions js/energy-skate-park/common/view/PieChartLegend.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ class PieChartLegend extends Panel {
}, options );

// The x-coordinate of a bar chart bar
const createLabel = ( index, title, color, tandemName ) => {
const createLabel = ( index, title, tandemName ) => {
return new Text( title, {
tandem: tandem.createTandem( tandemName ),
fill: color,
font: new PhetFont( 12 ),
pickable: false,
maxWidth: 97 // selected by choosing the length of widest English string in ?stringTest=double
Expand All @@ -68,10 +67,10 @@ class PieChartLegend extends Panel {
const thermalBar = createBar( 2, EnergySkateParkColorScheme.thermalEnergy );
const totalBar = createBar( 3, EnergySkateParkColorScheme.totalEnergy );

const kineticLabel = createLabel( 0, energyKineticString, EnergySkateParkColorScheme.kineticEnergy, 'kineticEnergyLabel' );
const potentialLabel = createLabel( 1, energyPotentialString, EnergySkateParkColorScheme.potentialEnergy, 'potentialEnergyLabel' );
const thermalLabel = createLabel( 2, energyThermalString, EnergySkateParkColorScheme.thermalEnergy, 'thermalEnergyLabel' );
const totalLabel = createLabel( 3, energyTotalString, EnergySkateParkColorScheme.totalEnergy, 'totalEnergyLabel' );
const kineticLabel = createLabel( 0, energyKineticString, 'kineticEnergyLabel' );
const potentialLabel = createLabel( 1, energyPotentialString, 'potentialEnergyLabel' );
const thermalLabel = createLabel( 2, energyThermalString, 'thermalEnergyLabel' );
const totalLabel = createLabel( 3, energyTotalString, 'totalEnergyLabel' );

const clearThermalButton = new MoveToTrashButton( {
arrowColor: EnergySkateParkColorScheme.thermalEnergy,
Expand Down

0 comments on commit d967482

Please sign in to comment.