
##WhatisClChart
ClChartisasimple,high-performanceandcross-platformopensourceprojectforstockdatavisualizationcreatedbasedonthecanvas.SupportPC,webAppandReactNativeandWeexplatforms.FullyadaptingtheopensourceprojectGCanvasonReactNativeandWeexmakesiteasytouseGCanvastoenableyourdevelopedapplicationstohavenativedrawingcapabilitiesonandroidandios.
##WhydoyouneedClChart
Intheexistingopensourcelibraries,therearenoshortageofverygoodopensourcechartlibraries.Thegeneralchartlibrariesincludechartjs,echart,highchart,etc.Thesechartlibrarieshaveverycompletecharttypesandpowerfuldrawingcapabilitiesandspeeds,butduetotheneedoftheseitemsThereisgenerality,andweneedtoexpandwhenwedrawthetradingdocument.Thespecificchartlibrariesforstockssuchasstocksare:techanjsandhighcharts/highstock.Thesechartinglibrarieshavedonesomeveryprofessionalprocessingandoptimizationofthestockdrawing,buttheyareallbasedonsvgdrawing.Wehaveperformanceissueswhendrawinglargenumbersofdatagraphsanddealingwithcross-platforms.
ThefollowingisacomparisonoftheK-chartsdrawnbythestocksofeachgalleryintheuseprocess. Thefollowingcomparisonsarebasedontheuseofthesechartinglibrariestodrawcomparisonsofthemappingcapabilitiesofthesecuritiesofthesecuritiestype,andthedatasubjectiveexperiencedetermination.
||chartjs|echart|techanjs|highchart|clchart| |---|---|---|---|---|---| |Drawingelement|canvas|canvas&svg|svg|svg|canvas| |Easytouse|☆☆☆☆☆|☆☆☆|☆☆☆☆|☆☆☆☆|☆☆☆☆☆| |Drawingspeed|☆☆☆☆☆|☆☆☆|☆☆|☆☆|☆☆☆☆☆| |Expandingability|☆☆☆|☆☆☆☆|☆☆☆☆|☆☆☆☆|☆☆☆☆☆| |Cross-platform|☆☆☆|☆☆☆|☆☆|☆|☆☆☆☆☆|
Therefore,weurgentlyneedaniconlibrarywithhigh-performance,cross-platform,andeasy-to-usestocktypes.
IntheexistingiconlibraryReactNative,youcanloadhtmlfilesviawebview,usewindow.document.addEventListener('message',function(e){})andwindow.postMessagetocompletethehtmlandReactNatvecommunicationdrawing,butusetheactualuseprocess,insomepoorperformanceandroiddevices,especiallyandroidAndroidsystemswithversionslowerthan4.4performparticularlybadlywhenplottinglargedatavolumegraphsanduserinteractions.Catonoftenoccurs,andtheremaybeissuessuchasslowloading. ##ClChartdesigngoals
Theuseofcanvasdevelopmenthasahighlyefficient,cross-platformofprofessionalstockchartinglibrary
HavingcompatibleGCanvasprovidedcanvasinterface,inReactNativeandWeexreachnativedrawingon,andabletolivehorizontallyextendedformorestockmarketequationsystemintheformofplug-ins,foruserswithspecialneeds,itispossibletoprovidecustomPlug-inanddatastructurecapabilities.
##ClChartdevelopmentandimplementation
###Builddevelopmentenvironment
*[x]Usingeslinttoimplementcodespecification *[x]Usingwebpackforcodepackaging *[x]Writeanexampledemo *[]Usekarmaandmochatowritecodetests(inprogress...)
###Double-layercanvas,separationofprimaryandsecondarylayers,efficientdrawing
Whenstudyingthedrawingprogramoftradingview,wefoundthatinordertoquicklyredrawtheauxiliarylinessuchascrosshairs,theuseofdouble-layeredcanvasseparationcrosshairs(suchasauxiliarylines)andthedrawingofthemainlayergreatlyreducesthetimeneededtoquicklymovethecrosshairs.Theextradrawingcalculationscome.Enablesandroidasmoothuserexperienceonlow-endmobiledevicesandwebapps
###Scalabledatalayer
ClChartImplementationofanindependentdatalayer,whichcanpreprocessthedata,cachefunctions,dataFIELDdefinitionandreadthroughthefield,theusercaneasilycustomizethedatafieldtoquicklyintegratewiththeexistingdata.
###Customformulasystem
ClChartSupportscustomformulasystems.Bothdevelopersanduserscancustomizeformulasfordrawingduringuse.
###Plugin
ClChartSupportscustomdrawingplug-ins,nowhasplug-indatatagtypes
##Screenshot
##ClChartprojectaddress,documentation,andtestcases
HTML5DemoCanopenexperienceonmobilephoneandPCseparately