code: function buildScales(){
              let minX = d3Array.min(dataByTopic, ({dates}) => d3Array.min(dates, getDate)),
                  maxX = d3Array.max(dataByTopic, ({dates}) => d3Array.max(dates, getDate)),
                  maxY = d3Array.max(dataByTopic, ({dates}) => d3Array.max(dates, getValue)),
                  minY = d3Array.min(dataByTopic, ({dates}) => d3Array.min(dates, getValue));
              let yScaleBottomValue = Math.abs(minY) < 0 ? Math.abs(minY) : 0;
  
              xScale = d3Scale.scaleTime()
                  .domain([minX, maxX])
                  .rangeRound([0, chartWidth]);
  
              yScale = d3Scale.scaleLinear()
                  .domain([yScaleBottomValue, Math.abs(maxY)])
                  .rangeRound([chartHeight, 0])
                  .nice();
  
              colorScale = d3Scale.scaleOrdinal()
                  .range(colorSchema)
                  .domain(dataByTopic.map(getTopic));
  
              let range = colorScale.range();
  
              topicColorMap = colorScale.domain().reduce((memo, item, i) => {
                  memo[item] = range[i];
  
                  return memo;
              }, {});
          }
docs: Creates the x and y scales of the graph
  @private