Closed xq369 closed 3 years ago
your bug report does not contain enough information for me to understand what you're talking about. i'm not going to try to figure out what changes you have made in your zip file and what you're trying to achieve. you need to show me the problem as simply as possible; what you have done is the opposite of this.
thanks!
hi, please do not shoot the messenger (-;
here screenshots of the difference same hmtl, js, css, but adapted uPlot.iife.js, using the OHLC plugin
changing html, css, js and the plugin conform the demo's provided did not solve the issue so had to go into iife.js sorry but i do not recall what i've changed in the code, as i was in the process of understanding iife.js you will know your code much better than me, so my changes certainly will not be optimal
suggest to do a test to create dark mode and provide in a demo
On 20 Aug 2021, at 23:27, Leon Sorokin @.***> wrote:
your bug report does not contain enough information for me to understand what you're talking about. i'm not going to try to figure out what changes you have made in your zip file and what you're trying to achieve.
you need to show me the problem as simply as possible; what you have done is the opposite of this.
please provide a jsfiddle that demonstrates the problem (like https://jsfiddle.net/mtku94cg/ https://jsfiddle.net/mtku94cg/) and an image of what you need it to look like. if you want, you can also submit a PR so that i can see the proposed changes thanks!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/leeoniya/uPlot/issues/562#issuecomment-902967277, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVIP62PQTCI6A37JVAREJBDT53CF3ANCNFSM5CQZCLBA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.
?
i appeared to have made some notes in the code :
var microTask=typeof queueMicrotask=="undefined"?fn=>Promise.resolve().then(fn) :queueMicrotask;
var WIDTH="width";
var HEIGHT="height";
var TOP="top";
var BOTTOM="bottom";
var LEFT="left";
var RIGHT="right";
//var black="#000";
//var transparent="#fff"; //black+"0";
var cursorOpts={show:true,x:true,y:true,lock:false,move:cursorMove,
points:{static:true,show:cursorPointShow,size:cursorPointSize,width:0,stroke:cursorPointStroke,fill:cursorPointFill,},
bind:{mousedown:filtBtn0,mouseup:filtBtn0,click:filtBtn0,dblclick:filtBtn0,mousemove:passThru,mouseleave:passThru,mouseenter:passThru,},
drag:{setScale:true,x:true,y:false,dist:0,uni:null,_x:false,_y:false,},
focus:{prox:-1,},left:-10,top:-10,idx:null,dataIdx:dataIdx,idxs:[],};
var grid={show:true,stroke:"rgba(255,255,255,0.1)",width:1,dash:[],filter:retArg1,};
var ticks=assign({},grid,{size:10});
var font='12px system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"';
var labelFont="bold "+font;
var lineMult=1; // font-size multiplier
var setXaxis={show:true,scale:"x",space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:labelFont,side:2,
//stroke:black, cuased black letters ----- class:"x-vals",incrs:timeIncrs,values:timeVals,filter:retArg1,
grid:grid,ticks:ticks,font:font,rotate:0,};
function numSeriesVal(self,val) {return val==null?"" :fmtNum(val);} var setYaxis={show:true,scale:"y",space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:labelFont,side:3,grid:grid,ticks:ticks,font:font,rotate:0,}; //stroke:black,caused black letters --- class:"y-vals",incrs:numIncrs,values:(vals,space)=>vals,filter:retArg1,
function setCtxStyle(stroke,width,dash,cap,fill) {
ctx.strokeStyle=stroke; //||transparent; caused black letters
ctx.lineWidth=width;
ctx.lineJoin="round"; ctx.lineCap=cap||"butt"; // (‿|‿)
ctx.setLineDash(dash||[]); ctx.fillStyle=fill}; //||transparent;} caused black letters
you're trying to explain the solution without having first demonstrated the problem.
your original bug report stated that "dark mode colour gets overruled; letters & charts stay black". i then showed you an example of how to control the colors of the letters and grid.
i still don't understand what issue you are trying to solve, so i will not spend time to try to understand whatever code you have changed as a solution.
please provide an example of what is broken without any uPlot modifications, as i have asked.
i'm closing this until further information is provided here. please do not open more duplicate issues; we can re-open this one, if needed.
https://github.com/leeoniya/uPlot/issues/561#issuecomment-902715866
Defining dark mode in javascript does not work, because of bugs in the original code. Therefore the original code has temporary been adjusted until bugs get fixed.