@@ -390,34 +390,37 @@ public override void Render(IRenderContext rc)
390390 }
391391 }
392392
393- // draw volume & bar separation line
394- if ( this . VolumeStyle != VolumeStyle . None )
393+ if ( this . SeparatorStrokeThickness > 0 && this . SeparatorLineStyle != LineStyle . None )
395394 {
396- var ysep = ( clippingSep . Bottom + clippingSep . Top ) / 2.0 ;
397- rc . DrawClippedLine (
398- clippingSep ,
399- new [ ] { new ScreenPoint ( clippingSep . Left , ysep ) , new ScreenPoint ( clippingSep . Right , ysep ) } ,
400- 0 ,
401- this . SeparatorColor ,
402- this . SeparatorStrokeThickness ,
403- this . SeparatorLineStyle . GetDashArray ( ) ,
404- LineJoin . Miter ,
405- true ) ;
406- }
395+ // draw volume & bar separation line
396+ if ( this . VolumeStyle != VolumeStyle . None )
397+ {
398+ var ysep = ( clippingSep . Bottom + clippingSep . Top ) / 2.0 ;
399+ rc . DrawClippedLine (
400+ clippingSep ,
401+ new [ ] { new ScreenPoint ( clippingSep . Left , ysep ) , new ScreenPoint ( clippingSep . Right , ysep ) } ,
402+ 0 ,
403+ this . SeparatorColor ,
404+ this . SeparatorStrokeThickness ,
405+ this . SeparatorLineStyle . GetDashArray ( ) ,
406+ LineJoin . Miter ,
407+ true ) ;
408+ }
407409
408- // draw volume y=0 line
409- if ( this . VolumeAxis != null && this . VolumeStyle == VolumeStyle . PositiveNegative )
410- {
411- var y0 = this . VolumeAxis . Transform ( 0 ) ;
412- rc . DrawClippedLine (
413- clippingVol ,
414- new [ ] { new ScreenPoint ( clippingVol . Left , y0 ) , new ScreenPoint ( clippingVol . Right , y0 ) } ,
415- 0 ,
416- OxyColors . Goldenrod ,
417- this . SeparatorStrokeThickness ,
418- this . SeparatorLineStyle . GetDashArray ( ) ,
419- LineJoin . Miter ,
420- true ) ;
410+ // draw volume y=0 line
411+ if ( this . VolumeAxis != null && this . VolumeStyle == VolumeStyle . PositiveNegative )
412+ {
413+ var y0 = this . VolumeAxis . Transform ( 0 ) ;
414+ rc . DrawClippedLine (
415+ clippingVol ,
416+ new [ ] { new ScreenPoint ( clippingVol . Left , y0 ) , new ScreenPoint ( clippingVol . Right , y0 ) } ,
417+ 0 ,
418+ OxyColors . Goldenrod ,
419+ this . SeparatorStrokeThickness ,
420+ this . SeparatorLineStyle . GetDashArray ( ) ,
421+ LineJoin . Miter ,
422+ true ) ;
423+ }
421424 }
422425 }
423426
@@ -442,19 +445,22 @@ public override void RenderLegend(IRenderContext rc, OxyRect legendBox)
442445 legendBox . Width ,
443446 this . XAxis . Transform ( this . data [ 0 ] . X + datacandlewidth ) - this . XAxis . Transform ( this . data [ 0 ] . X ) ) ;
444447
445- rc . DrawLine (
446- new [ ] { new ScreenPoint ( xmid , legendBox . Top ) , new ScreenPoint ( xmid , legendBox . Bottom ) } ,
447- lineUp ,
448- this . StrokeThickness ,
449- dashArray ,
450- LineJoin . Miter ,
451- true ) ;
452-
453- rc . DrawRectangleAsPolygon (
454- new OxyRect ( xmid - ( candlewidth * 0.5 ) , yclose , candlewidth , yopen - yclose ) ,
455- fillUp ,
456- lineUp ,
457- this . StrokeThickness ) ;
448+ if ( this . StrokeThickness > 0 )
449+ {
450+ rc . DrawLine (
451+ new [ ] { new ScreenPoint ( xmid , legendBox . Top ) , new ScreenPoint ( xmid , legendBox . Bottom ) } ,
452+ lineUp ,
453+ this . StrokeThickness ,
454+ dashArray ,
455+ LineJoin . Miter ,
456+ true ) ;
457+
458+ rc . DrawRectangleAsPolygon (
459+ new OxyRect ( xmid - ( candlewidth * 0.5 ) , yclose , candlewidth , yopen - yclose ) ,
460+ fillUp ,
461+ lineUp ,
462+ this . StrokeThickness ) ;
463+ }
458464 }
459465
460466 /// <summary>
0 commit comments