lab 5 done (again)
This commit is contained in:
@@ -6,7 +6,7 @@ function drawGraph(data, keyX, drawMin, drawMax, graphtype) {
|
||||
// значения по оси ОХ
|
||||
|
||||
// создаем массив для построения графика
|
||||
console.log(keyX)
|
||||
// console.log(keyX)
|
||||
if(keyX=="Год"){
|
||||
data = d3.sort(data, (x,y)=>Number(x["labelX"])-Number(y["labelX"]));
|
||||
}
|
||||
@@ -145,7 +145,7 @@ const ChartDraw = (props) => {
|
||||
.attr("width", boundsWidth)
|
||||
.attr("height", boundsHeight)
|
||||
.style("fill", "lightgrey");
|
||||
console.log(props)
|
||||
// console.log(props)
|
||||
drawGraph(props.data,props.ox,props.minMax[0],props.minMax[1],Number(props.graphType))
|
||||
});
|
||||
|
||||
|
||||
@@ -13,7 +13,10 @@ const Table = (props) => {
|
||||
const [activePage, setActivePage] = useState("1");
|
||||
|
||||
const [dataTable, setDataTable] = useState(props.data);
|
||||
const updateDataTable = (value) => setDataTable(value);
|
||||
const updateDataTable = (value) => {
|
||||
props.setFilteredDataCallback(value);
|
||||
setDataTable(value);
|
||||
};
|
||||
|
||||
const changeActive = (event) => {
|
||||
setActivePage(event.target.innerHTML);
|
||||
|
||||
Reference in New Issue
Block a user