Can't find vb or c# code for Chartjs setup & usage

0
0

Hi all,

For the life of me I can’t get chartjs to work and can’t find any useful docs. on it, either.

I need:

1/ A date/time x-axis with a user-adjustable timespan (default 10 minutes)

2/ User adjustable y-axis but with option to autoscale to any or all data series

3/ Chart will be line type and should behave like a strip-chart, continuously scrolling as new data is added

4/ Programmatically add/remove and hide/show series on the fly.
Is there a limit on the number of series?

5/ User zoom functions, if possible?

6/ User scroll functions, if possible?

7/ Option to smooth lines, if possible (as opposed to straight lines between points)

8/ Set a gradient background on the chart, if possible?

Any guidance on the above greatly appreciated!

Thanks

Darren

  • You must to post comments
0
0

I just downloaded ChartJs sample from https://wisej.com/examples. Unzipped the project. Opened the sln in Visual Studio 2015. Recompiled. Double clicked on MainPage.cs (it’s a web application, which is a class library) to open it in  the designer, this is what I get:

 

charjs-example-design

The I simply clicked Run (Google Chrome button at the top), and I get this:

charjs-example-runtime

I didn’t change anything in the project. All the samples are in C# but they work just the same in VB.NET.

 

 

 

 

  • darren logan
    Howdy, Hmmm, I don’t have a MainPage.cs !! (if I did I would have run it). I’ve also downloaded the Smoothchart demo. and it’s the same – NO mainpage.cs!! How strange. I’ll see if I can find something obvious. Cheers
  • Luca (ITG)
    We don’t have a smoothchart demo. You are probably downloading from /extensions (which are the controls). The ChartJS example is in https://wisej.com/examples.
  • darren logan
    Ahhh, blimey… what a twonk I am. I downloaded the extension, not the demo!! Got it now. Thanks
  • Luca (ITG)
    No problem at all. BTW, this is the smooth chart demo (which we do have, but it’s not published) http://demo.wisej.com/SmoothieChartSample.html But it’s different from the ChartJS which is a charting control. The smoothie chart is a live streaming chart, which is also based on the open source smoothie chart. It’s useful for live feeds.
  • darren logan
    Hi, Me again… still struggling with chartjs! I can’t seem to get the chart to work when xaxis is time. I’d like the axis span to be 15 minutes with a tick at say, every minute – then add data, one point at a time about once every 5 seconds, and see the data gradually fill the chart from left to right. Any, similar examples? I can only seem to get something to work if xaxis type is set to category.
  • You must to post comments
0
0

There is a (hopefully) working sample in /examples.

I don’t know all the functionality of chart js, it’s here: https://www.chartjs.org/

  • Darren
    Hi Luca, Ah… Sorry, I didn’t realise there were samples in there. Cheers
  • darren logan
    Hi there, Back on this again. I’ve downloaded the demo. and it doesn’t work at work because I’m still using visual studio 2012. We are due to upgrade though. I’ve downloaded the demo. at home (visual studio 2015 community) and there’s no window – it’s just a class library. I can’t find any instructions on what to do with the library. Yes, I can import the DLL but the chart tool is already in the toolbox, so why would I need to? PLEASE can I have instructions on how to use the chart? I’ve tried copying/converting the online javascript examples but they don’t work either. I can’t get any data in the chart. VB preferable. Thanks Darren
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.