FinanceData / FinanceDataReader

Financial data reader
1.1k stars 357 forks source link

FinanceDataReader.chart.plot() not compatable with Bokeh==3.1.0 #190

Closed tasoo-oos closed 7 months ago

tasoo-oos commented 8 months ago

Bokeh 2.4.1 공식문서에 따르면 plot_width와 plot_height가 bokeh.plotting.figure() 함수의 매개변수로 존재합니다만, Bokeh 3.1.0 에서는 해당 매개변수가 없어 다음과 같은 에러가 일어납니다.

FinanceDataReader/chart.py in plot(df, start, end, **kwargs)

    103     if params['volume']:
    104         height = int(params['height'] - params['height'] * params['volume_height'])
--> 105     pp = figure(plot_width=params['width'], 
    106                 plot_height=height,
    107                 x_range=(-1, min(120, len(df))),

bokeh/plotting/_figure.py in init(self, *arg, **kw)

    190         for name in kw.keys():
    191             if name not in names:
--> 192                 self._raise_attribute_error_with_matches(name, names | opts.properties())
    193 
    194         super().__init__(*arg, **kw)

bokeh/core/has_props.py in _raise_attribute_error_with_matches(self, name, properties)

    373             matches, text = sorted(properties), "possible"
    374 
--> 375         raise AttributeError(f"unexpected attribute {name!r} to {self.__class__.__name__}, {text} attributes are {nice_join(matches)}")
    376 
    377     def __str__(self) -> str:

AttributeError: unexpected attribute 'plot_width' to figure, similar attributes are outer_width, width or min_width

의존성 옵션을 추가해주시거나, 관련 코드를 수정해주십시오.

FinanceData commented 7 months ago

의견과 상세한 설명 너무나 감사합니다.

(향후 다양한 사용자 정의를 수용하기 위해서) 기반 라이브러리를 Bokeh 에서 plotly 로 변경하였습니다. Bokeh에 대한 의존성이 없으므로 이 이슈는 닫도록 하겠습니다.

감사합니다.