Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WV-3117 Charting Feature Styling Updates #5281

Merged
merged 13 commits into from
Oct 16, 2024
16 changes: 7 additions & 9 deletions e2e/features/charting/charting-test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,10 @@ test('Select an Area of Interest works appropriately', async () => {
const isChartingEnabled = await page.$('#chart-toggle-button')
if (isChartingEnabled) {
await page.locator('#chart-toggle-button').click()
const aoiIcon = page.locator('#wv-charting-mode-container > div.charting-aoi-container > h3')
await expect(aoiIcon).toHaveText('Select Area of Interest')
await page.locator('#wv-charting-mode-container > div.charting-aoi-container > svg').click()
await page.mouse.click(300, 300)
await page.mouse.click(400, 400)
await expect(aoiIcon).toHaveText('Area of Interest Selected')
const aoiBtn = page.locator('#wv-charting-mode-container > div.charting-aoi-container > .edit-coordinates')
await expect(aoiBtn).toHaveText('Entire Screen')
await aoiBtn.click()
await expect(aoiBtn).toHaveText('Area Selected')
}
})

Expand All @@ -96,12 +94,12 @@ test('Confirm defaults for time span selection', async () => {
}
})

test('Calendar icon opens datepicker modal', async () => {
test('Date selector opens datepicker modal', async () => {
await page.goto(multipleDataLayers)
const isChartingEnabled = await page.$('#chart-toggle-button')
if (isChartingEnabled) {
await page.locator('#chart-toggle-button').click()
await page.locator('#charting-calendar-container > svg').click()
await page.locator('#charting-date-button').click()
const chartingDateModal = page.locator('#charting_date_modal > div > div > div.modal-header > h5')
await expect(chartingDateModal).toHaveText('Charting Mode Date Selection')
}
Expand All @@ -116,7 +114,7 @@ test('Info modal opens on mode start & on icon click', async () => {
await expect(infoModal).toHaveText('Charting Tool')
await page.locator('#charting_info_modal > div > div > div.modal-header > button').click()
await expect(infoModal).toHaveCount(0)
await page.locator('#charting-info-container > svg').click()
await page.locator('#charting-info-container svg').click()
await expect(infoModal).toHaveText('Charting Tool')
}
})
Expand Down
11 changes: 6 additions & 5 deletions web/js/components/charting/chart-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function ChartComponent (props) {
const { data } = liveData;

// Arbitrary array of colors to use
const lineColors = ['#8884D8', '#82CA9D', 'orange', 'pink', 'green', 'red', 'yellow', 'aqua', 'maroon'];
const lineColors = ['#A3905D', '#82CA9D', 'orange', 'pink', 'green', 'red', 'yellow', 'aqua', 'maroon'];

function formatToThreeDigits(str) {
return parseFloat(str).toFixed(3);
Expand Down Expand Up @@ -144,9 +144,10 @@ function ChartComponent (props) {
</div>
</div>
<div className="charting-discalimer">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this isn't your error but can we fix this typo?

discalimer --> disclaimer

<strong>NOTE:</strong>
<strong>Note:</strong>
<br />
{' '}
Numerical analyses performed on imagery should only be used for initial basic exploratory purposes
Numerical analyses performed on imagery should only be used for initial basic exploratory purposes.
</div>
</>
);
Expand All @@ -160,8 +161,8 @@ function ChartComponent (props) {
{' '}
<Legend />
{getLineChart(data)}
<XAxis dataKey="name" />
<YAxis type="number" domain={yAxisValuesArr} />
<XAxis dataKey="name" stroke="#a6a5a6" />
<YAxis type="number" stroke="#a6a5a6" domain={yAxisValuesArr} />
<Legend />
</LineChart>
</div>
Expand Down
5 changes: 3 additions & 2 deletions web/js/components/charting/simple-statistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ function SimpleStatistics(props) {
</div>
</div>
<div className="charting-discalimer">
<strong>NOTE:</strong>
<strong>Note:</strong>
<br />
{' '}
Numerical analyses performed on imagery should only be used for initial basic exploratory purposes
Numerical analyses performed on imagery should only be used for initial basic exploratory purposes.
</div>
</>
);
Expand Down
Loading
Loading