question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Width paramater is broken

See original GitHub issue

On line 15 and 16 I added title and color but can’t get it to appear.

https://github.com/HTTP-Warriors/Stock-Byte-App/blob/master/app/javascript/components/Pages/chart.js

import React from "react"
import KaktanaChart from 'kaktana-react-lightweight-charts'

class Chart extends React.Component {

    render () {
            const { chartData } = this.props
            let lightChartData = chartData.map((element)=>{
                return ({ time: element.date, value: element.close })
                })
        return (
            <>
                <KaktanaChart
                    options = {{
                        lineStyle: 1,
                        lineWidth: 1,
                        crosshairMarkerVisible: true,
                        crosshairMarkerRadius: 6,
                        lineType: 1,
                        alignLabels: true,
                            localization: {
                                dateFormat: "yyyy/MMMM/dd",
                                priceFormatter: function(price) {
                                    // add $ sign before price
                        
                                    return '$' + price;
                                    },
                                },
                            grid: {
                                vertLines: {
                                    color: "#E0B64A",
                                    style: 1,
                                    visible: true,
                                },
                                horzLines: {
                                    color: "#E0B64A",
                                    style: 1,
                                    visible: true,
                                },
                            },
                            priceScale: {
                                position: 'right',
                                mode: 1,
                                autoScale: true,
                                invertScale: false,
                                alignLabels: true,
                                borderVisible: true,
                                borderColor: "#E0B64A",
                                scaleMargins: {
                                    top: 0.30,
                                    bottom: 0.25,
                                    },
                            },
                            crosshair: {
                                vertLine: {
                                    color: "#E0B64A",
                                    width: 1,
                                    style: 0,
                                    visible: true,
                                    labelVisible: false,
                                },
                                horzLine: {
                                    color: "#E0B64A",
                                    width: 1,
                                    style: 0,
                                    visible: true,
                                    labelVisible: true,
                                },
                                mode: 1,
                            },
                            timeScale: {
                                rightOffset: 0,
                                barSpacing: 30,
                                fixLeftEdge: true,
                                lockVisibleTimeRangeOnResize: true,
                                rightBarStaysOnScroll: true,
                                borderVisible: true,
                                borderColor: "#E0B64A",
                                visible: true,
                                timeVisible: true,
                                secondsVisible: false
                            }
                        }}
                    lineSeries =  
                    {[{
                        data: lightChartData
                    }]}
                    height = {320}
                    width = {640}
                />
            </>
            );
        }
}
export default Chart

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
AurelRebcommented, Apr 21, 2020

I added documentation for all the wrapper props/features in the Readme. I think it will be easier to achieve anything you want now 😃

0reactions
richandcreamycommented, Apr 21, 2020

Alright! I updated the bug title for you 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

WIDTH PARAMETER NOT WORKING PROPERLY
WIDTH PARAMETER IN NOT WORKING, IF IT CHANGED BY DIFFERENT TYPE. PLEASE CHECK THE VIDEO AND THE ATTACHED FILE.
Read more >
CSS div width not working - Stack Overflow
I have a strange problem.One of my div's width is not working. My CSS is like
Read more >
Visualforce & Lightning: CSS width attribute is completely ...
Visualforce & Lightning: CSS width attribute is completely broken when inside a 2-column pageBlockSection - Salesforce Stack Exchange. Stack ...
Read more >
tabcmd export width height not working - Tableau Community
Hello, i am using the command line tool to export a Viz to a PNG file. the export works fine with both views...
Read more >
Paginated Reports - Parameter responsive width
Parameters are responsive in Report Builder preview, width gets adjusted based one the maximum length of the text values.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found