Lightweight Charts Draw Price Line on chart

Hey G’s. I am developing some charts in streamlit and I would like to add price line and boxes to my Lightweight charts by tradingview. I am using this wrapper I have no idea how to draw lines on these charts. Any help would be appreciated!

import streamlit as st
from streamlit_lightweight_charts import renderLightweightCharts

chartOptions = {
    "layout": {
        "textColor": 'black',
        "background": {
            "type": 'solid',
            "color": 'white'

seriesAreaChart = [{
    "type": 'Area',
    "data": [
        { "time": '2018-12-22', "value": 32.51 },
        { "time": '2018-12-23', "value": 31.11 },
        { "time": '2018-12-24', "value": 27.02 },
        { "time": '2018-12-25', "value": 27.32 },
    "options": {}

st.subheader("Area Chart sample")

renderLightweightCharts( [
        "chart": chartOptions,
        "series": seriesAreaChart,
], 'area')

Hi @cptbmate

You can check out this example code for rendering the price line on chart:

There are also several other examples in the repo’s example directory that you can also get inspiration from:

Hope this helps!

Hi @dataprofessor!

Some how I manenaged to get these results!

Thank you for your reply!

1 Like

Amazing, glad it worked out!