Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 31 12:35
    mussonero commented #731
  • Mar 24 11:15
    mussonero commented #731
  • Mar 24 11:09
    mussonero commented #731
  • Mar 24 01:24
    me60732 commented #731
  • Mar 23 15:46
    mussonero commented #731
  • Mar 22 17:41
    mussonero commented #731
  • Mar 04 23:05
    ozluy commented #719
  • Mar 04 23:05
    ozluy commented #719
  • Mar 04 23:05
    ozluy commented #719
  • Feb 14 14:11
    lucked opened #749
  • Feb 07 16:44
    rrag commented #748
  • Feb 07 16:21
    alexbom commented #748
  • Feb 07 16:12
    rrag commented #748
  • Feb 07 16:06
    alexbom opened #748
  • Feb 05 19:47
    alexbom commented #747
  • Feb 05 19:06
    alexbom commented #747
  • Feb 05 15:27
    alexbom commented #747
  • Feb 05 14:46
    rrag commented #747
  • Feb 05 14:44
    rrag commented #747
  • Feb 05 11:37
    alexbom commented #747
Sudhagar
@SudhagarS
@gewure_twitter Ya, would love to do that
Ragu Ramaswamy
@rrag
Hey people,
if there is anyone interested in maintaining the repo, I am open to adding collaborators
show me you can do it by answering some of the issues on github
peace
Ali Nuraldin
@Alirun
Hey guys, do you know if we can customize candles by providing border radius?
image.png
This way
Ragu Ramaswamy
@rrag
nope
Ali Nuraldin
@Alirun
So, only forking and manual fixing would work? :) Do you want a PR for this?
Ragu Ramaswamy
@rrag
yes forking
not interested in that feature. I dont like it
Omegaki113r
@Omegaki113r
hi, I am new to react and new to stockchart library as well. Is there anyway to remove the Type DropDown ?
@rrag
Ragu Ramaswamy
@rrag
you have to remove the TypeChooser from the examples
sushpradi
@sushpradi
hi
if I am setting connectNulls to true it is having no effect
line is still displayed with breaks
Pa22
@Pa22
Hello!
Is there anyone therE?
Omegaki113r
@Omegaki113r
hi
@Pa22 any issues?
Pa22
@Pa22
Yes, In assembling the chart
Iwant to have this chart but I don't know wherecould I find his file where ar scrips are together
MaxYari
@MaxYari
Hey everyone! A bit tired looking for the info, can someone point me - how can I put custom svg on chart? I don't want to use annotations since locations of those icons are based on data structure separate from chart's dataset. It seems that i need to use chats xScale() and yScale() to calculate onscreen svg coordinates, but how do i get those scale function from chart before constructing my svg?
(I'm using continuous time scale)
Just to test - i've tried this in my react component:
var xScale=scaleTime();
return (<text x={xScale(new Date(endTime))} y={150} fill="white">AAAAAAAAAAAAAAAAAAA</text>)
this component is then used inside chart
and AAAAAAAAAAA is nowhere to be seen. It's visible though if i just hardcode 150 instead of x
and i have no clue how to get yScale
Thanks in advance
MaxYari
@MaxYari
In case this is an XY problem - what essentially i'm trying to do - put some svg icons onto candlestick chart given time and price coordinate that icon should be located at.
MaxYari
@MaxYari
Also can someone look at that issue: rrag/react-stockcharts#737
I still have no clue how to make it adjust automatically, I can make a map for possible timeframes to use different d3-time function (utcDay, utcMinute e.t.c) but then how would i handle 30min timeframe for ex?
MaxYari
@MaxYari
Ok nvm that issue, i've worked around it, anow only interestedd in how to place those svg icons/text at custom coordinates
MaxYari
@MaxYari
So back to my question, i've made a simple component
class SingleTextAnnotation extends Component {
    constructor(props) {
        super(props);
        this.renderSVG = this.renderSVG.bind(this);
        this.saveNode = this.saveNode.bind(this);
    }
    renderSVG(moreProps) {    
        var props = this.props;    
        var { xScale, chartConfig: { yScale } } = moreProps;

        if ((!props.x && props.x !== 0) || (!props.y && props.y !== 0)) return null;        

        return (            
            <text className="single_text_annotation" x={xScale(props.x)} y={yScale(props.y)-5} fill={props.fill}>{props.text}</text>);
        )            
    }
    saveNode(node) {
        this.node = node;
    }
    render() {
        var self = this;        

        return (
            <GenericChartComponent ref={self.saveNode}
            svgDraw={self.renderSVG}            
            drawOn={["pan"]}/>
        )
    }
};
Seems to be working, but I'm having a hard time figuring out how to make the text clickable, any clues?
MaxYari
@MaxYari
Will still appreciate some response :)
MaxYari
@MaxYari
btw for anyone interested - that code snippet i posted above was lagging like hell, I had to implement canvasDraw method which works much much faster than svgDraw, don't want to flood here with additional code, but if you need it ping me, or just look up https://github.com/rrag/react-stockcharts/blob/master/src/lib/interactive/components/StraightLine.js - that's what I used as an example of building component.
bnnhoc
@bnnhoc
Hello everyone, I got problem with disable select and edit trending line. I don't know how to disable it, I tried to disable DrawingObjectSelector but it doesn't help. Is there anyway to disable select or edit trending line? Thanks
bnnhoc
@bnnhoc
...
Olmeca DEX
@OlmecaD_twitter
Hi, anyone have source code of depth charts and how to fetch?
MaxYari
@MaxYari

Hey @bnnhoc if you need to display predefined trendlines that are not selectable nor editable - you can use straightLine

import StraightLine from "react-stockcharts/lib/interactive/components/StraightLine";

You can look up it's parameters in the imported file.
If you're still interested and can't figure it out - ping me.

@OlmecaD_twitter you should be able to find everything in git repo, but to be hones I don't know which depth chart do you mean.
nash12548
@nash12548
hi Sorry for the bad English. There is a way to display a regular browser contextmenu when right-clicking ???
I need it very, very much . so much tnx for any help
nash12548
@nash12548
context menu noting show when i right clicking on chart :-(
jantomsa
@jantomsa

Hello, first of all I want to thank you @rrag for this amazing library! :) Thank you.
Please I am trying to render Candle stick chart with "annotations" as same as here: http://rrag.github.io/react-stockcharts-next/documentation.html#/ma_crossover_using_svg_shape

I have already done a RSI indicator in chart and next step is to add marks, where stock bot got sell and buy signals. But I can not get it work...
The console is clear and all seems to be working but no annotations are showing. Is here someone with same experience? Do I have to set some special props? Please, help. I am not able to solve it for one and half day and its killing me.

screen

My component: https: chart Component

Screenshot: screen