mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
refactor of variable names
This commit is contained in:
parent
984efd7493
commit
d71aee00cd
@ -792,8 +792,8 @@ function loadPriceBreakTable(table, options) {
|
||||
tableData = tableData.sort((a,b)=>a.quantity-b.quantity);
|
||||
|
||||
// split up for graph definition
|
||||
var labels = Array.from(tableData, x => x.quantity);
|
||||
var data = Array.from(tableData, x => parseFloat(x.price));
|
||||
var graphLabels = Array.from(tableData, x => x.quantity);
|
||||
var graphData = Array.from(tableData, x => parseFloat(x.price));
|
||||
|
||||
// destroy chart if exists
|
||||
if (chart){
|
||||
@ -801,11 +801,11 @@ function loadPriceBreakTable(table, options) {
|
||||
}
|
||||
chart = loadLineChart(linkedGraph,
|
||||
{
|
||||
labels: labels,
|
||||
labels: graphLabels,
|
||||
datasets: [
|
||||
{
|
||||
label: '{% trans "Unit Price" %}',
|
||||
data: data,
|
||||
data: graphData,
|
||||
backgroundColor: 'rgba(255, 206, 86, 0.2)',
|
||||
borderColor: 'rgb(255, 206, 86)',
|
||||
stepped: true,
|
||||
|
Loading…
Reference in New Issue
Block a user