Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupted data series (shifted data points) if x-axis label definition is not starting with 0 or ticks are not linear (e.g. 0, 1, 3) #1

Open
lenasrd opened this issue Sep 7, 2017 · 1 comment

Comments

@lenasrd
Copy link
Contributor

lenasrd commented Sep 7, 2017

Please check the x-axis definition (non-linear ticks).

<viz:Chart width="100%" height="300px" zoomEnabled = "true" showTooltip="true" showLegend = "true">
	<viz:series>
		<viz:ChartSeries type="line" name="firstSeries" lineStyle = "dashed">
			<viz:data>
				<viz:ChartDataPoint value = "1" label = "value 1"/>
				<viz:ChartDataPoint value = "2" label = "value 2"/>
				<viz:ChartDataPoint value = "3" label = "value 3"/>
				<viz:ChartDataPoint value = "4" label = "value 4"/>
				<viz:ChartDataPoint value = "5" label = "value 5"/>
				<viz:ChartDataPoint value = "6" label = "value 6"/>
				<viz:ChartDataPoint value = "7" label = "value 7"/>
				<viz:ChartDataPoint value = "8" label = "value 8"/>
				<viz:ChartDataPoint value = "9" label = "value 9"/>
			</viz:data>
		</viz:ChartSeries>
	</viz:series>
	<viz:xAxis>
		<viz:ChartAxis
			title = "Lenas X-Axis"
            showTitle = "true"
            showGridLines = "false"
            visible = "true">
            <viz:labels>
            	<viz:ChartAxisLabel value = "0" title = "v1"/>
            	<viz:ChartAxisLabel value = "1" title = "v2"/>
            	<viz:ChartAxisLabel value = "3" title = "v3"/>
            </viz:labels>
   		</viz:ChartAxis>
	</viz:xAxis>
	<viz:yAxis>
		<viz:ChartAxis
			title = "Lenas Y-Axis"
            showTitle = "true"
            showGridLines = "true"
            visible = "true">
            <viz:labels>
            	<viz:ChartAxisLabel value = "0" title = "v1"/>
            	<viz:ChartAxisLabel value = "1" title = "v2"/>
            	<viz:ChartAxisLabel value = "10" title = "v3"/>
            </viz:labels>
   		</viz:ChartAxis>
	</viz:yAxis>
	</viz:Chart>
@lenasrd
Copy link
Contributor Author

lenasrd commented Sep 22, 2017

Lösungsansatz:

  • xAxis type ist per switch case IMMER timeseries oder category - für "Lückenerkennung" wäre wahrscheinlich die default-Option notwendig
    -> in C3 gibt es drei Funktionen: isTimeSeries(), isCategorized(), isCustomX()
    -> wenn ...
  1. der xAxis-types-Abschnitt in Charts.js auskommentiert wird
  2. der xAxis-tick-Format-Abschnitt in Charts.js auskommentiert wird
  3. der tooltip-title-Abschnitt in Charts.js auskommentiert wird

... funktioniert alles wie in C3. Auch connectNull kann aktiviert werden.

xaxisproblem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant